/** * * (c) Copyright Ascensio System SIA 2021 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ (function(a,u){function w(c){a.Asc.plugin.ie_channel?a.Asc.plugin.ie_channel.postMessage(c):a.parent.postMessage(c,"*")}function r(c,d){if(!c||"object"!=typeof c&&"array"!=typeof c)return c;d=d===u?{}:d;for(var h in c)c.hasOwnProperty(h)&&(d[h]=c[h]&&"object"===typeof c[h]?r(c[h]):c[h]);return d}function p(c){var d=a.location.search,h=c+"=";c=d.indexOf(h);return 0<=c?(c+=h.length,h=d.indexOf("&",c),0>h&&(h=d.length),d.substring(c,h)):u}function n(){var c=p("windowID");c&&(a.Asc.plugin.windowID=c, a.Asc.plugin.guid||(a.Asc.plugin.guid=decodeURIComponent(p("guid"))));return u!==c?!0:!1}function q(c){if(a.Asc&&a.Asc.plugin)if(a.plugin_onMessage)a.Asc.supportOrigins[c.origin]&&a.plugin_onMessage(c);else if(a.Asc.plugin._initInternal&&"string"==typeof c.data){var d={};try{d=JSON.parse(c.data)}catch(h){d={}}"plugin_init"==d.type&&(a.Asc.supportOrigins[c.origin]=!0,a.Asc.plugin.ie_channel_check(c),eval(d.data))}}a.Asc=a.Asc||{};a.Asc.plugin={};a.Asc.plugin.ie_channel=null;a.Asc.plugin.ie_channel_check= function(c){var d=navigator.userAgent.toLowerCase();(-1