@zoom/cobrowsesdk
Version:
ZOOM Cobrowse sdk
1 lines • 3.38 MB
JavaScript
function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var n,o=_getPrototypeOf(e);if(t){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n,o){return Object.defineProperty(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o})}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(t,n,o,a){var i=n&&n.prototype instanceof d?n:d,r=Object.create(i.prototype);return c(r,"_invoke",function(t,n,o){var a=1;return function(i,r){if(3===a)throw Error("Generator is already running");if(4===a){if("throw"===i)throw r;return{value:e,done:!0}}for(o.method=i,o.arg=r;;){var s=o.delegate;if(s){var c=_(s,o);if(c){if(c===p)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(1===a)throw a=4,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=3;var u=l(t,n,o);if("normal"===u.type){if(a=o.done?4:2,u.arg===p)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(a=4,o.method="throw",o.arg=u.arg)}}}(t,o,new S(a||[])),!0),r}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p={};function d(){}function h(){}function m(){}var g={};c(g,i,(function(){return this}));var f=Object.getPrototypeOf,v=f&&f(f(C([])));v&&v!==n&&o.call(v,i)&&(g=v);var y=m.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(a,i,r,s){var c=l(e[a],e,i);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==_typeof(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,r,s)}),(function(e){n("throw",e,r,s)})):t.resolve(p).then((function(e){u.value=e,r(u)}),(function(e){return n("throw",e,r,s)}))}s(c.arg)}var a;c(this,"_invoke",(function(e,o){function i(){return new t((function(t,a){n(e,o,t,a)}))}return a=a?a.then(i,i):i()}),!0)}function _(t,n){var o=n.method,a=t.i[o];if(a===e)return n.delegate=null,"throw"===o&&t.i.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),p;var i=l(a,t.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var r=i.arg;return r?r.done?(n[t.r]=r.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function w(e){this.tryEntries.push(e)}function E(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function S(e){this.tryEntries=[[-1]],e.forEach(w,this),this.reset(!0)}function C(t){if(null!=t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,r=function n(){for(;++a<t.length;)if(o.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}throw new TypeError(_typeof(t)+" is not iterable")}return h.prototype=m,c(y,"constructor",m),c(m,"constructor",h),h.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},b(k.prototype),c(k.prototype,r,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,o,a,i){void 0===i&&(i=Promise);var r=new k(u(e,n,o,a),i);return t.isGeneratorFunction(n)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},b(y),c(y,s,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.unshift(o);return function e(){for(;n.length;)if((o=n.pop())in t)return e.value=o,e.done=!1,e;return e.done=!0,e}},t.values=C,S.prototype={constructor:S,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(e){r.type="throw",r.arg=t,n.next=e}for(var a=n.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],r=i[4],s=this.prev,c=i[1],u=i[2];if(-1===i[0])return o("end"),!1;if(!c&&!u)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=s){if(s<c)return this.method="next",this.arg=e,o(c),!0;if(s<u)return o(u),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o[0]>-1&&o[0]<=this.prev&&this.prev<o[2]){var a=o;break}}a&&("break"===e||"continue"===e)&&a[0]<=t&&t<=a[2]&&(a=null);var i=a?a[4]:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a[2],p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var o=n[4];if("throw"===o.type){var a=o.arg;E(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={i:C(t),r:n,n:o},"next"===this.method&&(this.arg=e),p}},t}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).ZoomCobrowseSDK=t()}(this,(function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(a,i){function r(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}c((o=o.apply(e,t||[])).next())}))}function t(e){if("object"===("undefined"==typeof window?"undefined":_typeof(window))){var t=encodeURI(e);return btoa(t)}return Buffer.from(e).toString("base64")}var n=function(e){return t(e)},o=function(){function e(t){var o=t.requestOrigin,a=t.parentFrameId;_classCallCheck(this,e),this.parentFrameId=a;var i=n(o);a&&(i=a+"--"+i),this.frameId=i}return _createClass(e,[{key:"equal",value:function(e){var t=e.requestOrigin,o=e.parentFrameId;return o===this.parentFrameId&&this.frameId===o+"--"+n(t)}},{key:"isParentFrame",value:function(e){return this.frameId===e}},{key:"isSubFrame",value:function(e){return this.parentFrameId===e}}]),e}(),a=function(){function e(t){_classCallCheck(this,e),this.frames=new Map,this.tabId=t}return _createClass(e,[{key:"getFrame",value:function(e){var t=e.requestOrigin,n=e.parentFrameId,o=null;return this.frames.forEach((function(e){e.equal({requestOrigin:t,parentFrameId:n})&&(o=e)})),o}},{key:"checkAddFrame",value:function(e){var t=this,n=e.requestOrigin,o=e.parentFrameId,a=this.getFrame({requestOrigin:n,parentFrameId:o});if(a)return a;if(this.tabId===o)return this.addFrame({requestOrigin:n,parentFrameId:o});var i=null;return this.frames.forEach((function(e){i||e.isParentFrame(o)&&(i=t.addFrame({requestOrigin:n,parentFrameId:o}))})),i}},{key:"getSubFrames",value:function(e){var t=[];return this.frames.forEach((function(n){n.isSubFrame(e)&&t.push(n)})),t}},{key:"addFrame",value:function(e){var t=e.requestOrigin,n=e.parentFrameId,a=new o({requestOrigin:t,parentFrameId:n});return this.frames.set(a.frameId,a),a}}]),e}(),i=function(){function e(){_classCallCheck(this,e),this.tabs=new Map}return _createClass(e,[{key:"makeRequest",value:function(e){var t=e.requestOrigin,o=e.parentFrameId,i="";return o?(this.tabs.forEach((function(e){if(!i){var n=e.checkAddFrame({requestOrigin:t,parentFrameId:o});n&&(i=n.frameId)}})),i):this.tabs.size?(this.tabs.forEach((function(e,t){i||(i=t)})),i):(i=n(t),this.tabs.set(i,new a(i)),i)}},{key:"makeViewerRequest",value:function(e){var t=e.parentFrameId,n="";return this.tabs.forEach((function(e){var o;if(t){if(n)return;var a=e.getSubFrames(t);n=(null===(o=a[0])||void 0===o?void 0:o.frameId)||""}else n=e.tabId})),n}}]),e}(),r=new(function(){function e(){_classCallCheck(this,e),this.rooms=new Map}return _createClass(e,[{key:"makeRequest",value:function(e){var t=e.roomId,n=e.requestOrigin,o=e.parentFrameId,a=e.isViewer;this.rooms.get(t)||this.rooms.set(t,new i);var r=this.rooms.get(t);return r?a?r.makeViewerRequest({parentFrameId:o}):r.makeRequest({requestOrigin:n,parentFrameId:o}):""}}]),e}());"undefined"!=typeof global&&(global.cpsRoomManager=r);var s,c,u,l=function(e,t){return"".concat(e).concat(t)},p={log:{report:"/report-log"},blob:{uploadBlob:"/upload-blob",getBlobUrl:function(e){return"/cps-blob-".concat(e)},getBlobUrlReg:/cps-blob-([^?#\/]+)/}};!function e(t,n){var o={},a=function(){var a=t[i];"string"==typeof a?o[i]=l(n,a):"function"==typeof a?o[i]=function(){return l(n,a.apply(void 0,arguments))}:"object"===_typeof(a)&&(a instanceof RegExp||(o[i]=e(a,n)))};for(var i in t)a();return o}(p,"/co-browsing"),function(e){e.LOCAL="local",e.PROD="prod"}(s||(s={})),function(e){e.LEADER="1",e.FOLLOWER="2",e.RECORDER="11"}(c||(c={})),function(e){e.IMG="IMG",e.SOURCE="SOURCE",e.LINK="LINK",e.A="A",e.AUDIO="AUDIO",e.IFRAME="IFRAME",e.FORM="FORM",e.SCRIPT="SCRIPT",e.STYLE="STYLE"}(u||(u={}));var d,h,m,g,f,v,y,b;!function(e){e.LEADER="HR",e.FOLLOWER="VR"}(d||(d={})),new RegExp("(.+)(HTTPS?)/(.+)/".concat("CPS-SEP-FLAG","/(").concat(d.FOLLOWER,"|").concat(d.LEADER,")")),function(e){e[e.TYPE_UNKNOWN=-1]="TYPE_UNKNOWN",e[e.TYPE_TOP=1]="TYPE_TOP",e[e.TYPE_FRAME=2]="TYPE_FRAME",e[e.TYPE_AUX=3]="TYPE_AUX",e[e.TYPE_SCRIPT=4]="TYPE_SCRIPT",e[e.TYPE_MODULE=5]="TYPE_MODULE",e[e.TYPE_LINK=6]="TYPE_LINK",e[e.TYPE_XHR=7]="TYPE_XHR",e[e.TYPE_RESOURCE=8]="TYPE_RESOURCE",e[e.TYPE_WORKER=9]="TYPE_WORKER",e[e.TYPE_WORKER_SCOPE=10]="TYPE_WORKER_SCOPE",e[e.TYPE_REDIRECT=11]="TYPE_REDIRECT",e[e.TYPE_PAWS=12]="TYPE_PAWS",e[e.TYPE_CONTINUATION=13]="TYPE_CONTINUATION"}(h||(h={})),function(e){e.UNKNOW="unknow",e.BROWSER="browser",e.BROWSER_WORKER="worker",e.NODE="node",e.NODE_WORKER="node_worker"}(m||(m={})),g="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f="undefined"!=typeof window,v="function"==typeof importScripts,y=g&&!v,b=!g&&!f,v?m.BROWSER_WORKER:f?m.BROWSER:b?m.NODE:y?m.NODE_WORKER:m.UNKNOW;var k,_=_createClass((function e(){var t=this;_classCallCheck(this,e),this.promise=new Promise((function(e,n){t.reject=n,t.resolve=e})),this.promise.then((function(e){return t.resolved=!0,e})).catch((function(){t.resolved=!1})).finally((function(){t.finished=!0,t.finishedTimestamp=Date.now()}))}));!function(e){e.PING="sdk-ping",e.PONG="sdk-pong"}(k||(k={}));var w=new(function(){function e(){_classCallCheck(this,e),this._initTimer=null,this._bindedPongHandler=null,this.receivedPong=!1,this.currentInstance=null,this.pingPongTimeout=500}return _createClass(e,[{key:"initCallback",value:function(e){this.currentInstance&&this.currentCallback?this.currentCallback.call(this.currentInstance,e):this.isTopLevel=e}},{key:"registerCallback",value:function(e,t){this.currentInstance=e,this.currentCallback=t,void 0!==this.isTopLevel&&t.call(e,this.isTopLevel)}},{key:"ping",value:function(){this.addListener();try{if(window.parent===window)return void this.initCallback(!0);window.parent.postMessage(k.PING,"*")}catch(e){return this.stopInitTimer(),void this.initCallback(!0)}this.startInitTimer()}},{key:"startInitTimer",value:function(){var e=this;this.stopInitTimer(),this._initTimer=setTimeout((function(){e.receivedPong||e.initCallback(!0)}),this.pingPongTimeout)}},{key:"stopInitTimer",value:function(){this.removeListener(),this._initTimer&&(clearTimeout(this._initTimer),this._initTimer=null)}},{key:"addListener",value:function(){this._bindedPongHandler=this.handlePong.bind(this),window.addEventListener("message",this._bindedPongHandler)}},{key:"removeListener",value:function(){this._bindedPongHandler&&window.removeEventListener("message",this._bindedPongHandler)}},{key:"handlePong",value:function(e){var t;try{e.data===k.PING&&(null===(t=e.source)||void 0===t||t.postMessage(k.PONG,"*")),e.data===k.PONG&&(this.receivedPong=!0,this.initCallback(!1))}catch(e){this.stopInitTimer(),this.initCallback(!0)}}}]),e}()),E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S=function(e){return e&&e.Math===Math&&e},C=S("object"==("undefined"==typeof globalThis?"undefined":_typeof(globalThis))&&globalThis)||S("object"==("undefined"==typeof window?"undefined":_typeof(window))&&window)||S("object"==("undefined"==typeof self?"undefined":_typeof(self))&&self)||S("object"==_typeof(E)&&E)||S("object"==_typeof(E)&&E)||function(){return this}()||Function("return this")(),T=function(e){try{return!!e()}catch(e){return!0}},R=!T((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),O=R,I=Function.prototype,j=I.apply,A=I.call,N="object"==("undefined"==typeof Reflect?"undefined":_typeof(Reflect))&&Reflect.apply||(O?A.bind(j):function(){return A.apply(j,arguments)}),D=R,x=Function.prototype,L=x.call,P=D&&x.bind.bind(L,L),M=D?P:function(e){return function(){return L.apply(e,arguments)}},z=M,F=z({}.toString),B=z("".slice),U=function(e){return B(F(e),8,-1)},V=U,W=M,H=function(e){if("Function"===V(e))return W(e)},G="object"==("undefined"==typeof document?"undefined":_typeof(document))&&document.all,Y=void 0===G&&void 0!==G?function(e){return"function"==typeof e||e===G}:function(e){return"function"==typeof e},K={},$=!T((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),J=R,Z=Function.prototype.call,q=J?Z.bind(Z):function(){return Z.apply(Z,arguments)},X={},Q={}.propertyIsEnumerable,ee=Object.getOwnPropertyDescriptor,te=ee&&!Q.call({1:2},1);X.f=te?function(e){var t=ee(this,e);return!!t&&t.enumerable}:Q;var ne,oe,ae=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ie=T,re=U,se=Object,ce=M("".split),ue=ie((function(){return!se("z").propertyIsEnumerable(0)}))?function(e){return"String"===re(e)?ce(e,""):se(e)}:se,le=function(e){return null==e},pe=le,de=TypeError,he=function(e){if(pe(e))throw new de("Can't call method on "+e);return e},me=ue,ge=he,fe=function(e){return me(ge(e))},ve=Y,ye=function(e){return"object"==_typeof(e)?null!==e:ve(e)},be={},ke=be,_e=C,we=Y,Ee=function(e){return we(e)?e:void 0},Se=function(e,t){return arguments.length<2?Ee(ke[e])||Ee(_e[e]):ke[e]&&ke[e][t]||_e[e]&&_e[e][t]},Ce=M({}.isPrototypeOf),Te=C.navigator,Re=Te&&Te.userAgent,Oe=Re?String(Re):"",Ie=C,je=Oe,Ae=Ie.process,Ne=Ie.Deno,De=Ae&&Ae.versions||Ne&&Ne.version,xe=De&&De.v8;xe&&(oe=(ne=xe.split("."))[0]>0&&ne[0]<4?1:+(ne[0]+ne[1])),!oe&&je&&(!(ne=je.match(/Edge\/(\d+)/))||ne[1]>=74)&&(ne=je.match(/Chrome\/(\d+)/))&&(oe=+ne[1]);var Le=oe,Pe=Le,Me=T,ze=C.String,Fe=!!Object.getOwnPropertySymbols&&!Me((function(){var e=Symbol("symbol detection");return!ze(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Be=Fe&&!Symbol.sham&&"symbol"==_typeof(Symbol.iterator),Ue=Se,Ve=Y,We=Ce,He=Object,Ge=Be?function(e){return"symbol"==_typeof(e)}:function(e){var t=Ue("Symbol");return Ve(t)&&We(t.prototype,He(e))},Ye=String,Ke=function(e){try{return Ye(e)}catch(e){return"Object"}},$e=Y,Je=Ke,Ze=TypeError,qe=function(e){if($e(e))return e;throw new Ze(Je(e)+" is not a function")},Xe=qe,Qe=le,et=function(e,t){var n=e[t];return Qe(n)?void 0:Xe(n)},tt=q,nt=Y,ot=ye,at=TypeError,it={},rt={get exports(){return it},set exports(e){it=e}},st=C,ct=Object.defineProperty,ut=C,lt=function(e,t){try{ct(st,e,{value:t,configurable:!0,writable:!0})}catch(n){st[e]=t}return t},pt="__core-js_shared__",dt=rt.exports=ut[pt]||lt(pt,{});(dt.versions||(dt.versions=[])).push({version:"3.45.1",mode:"pure",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ht=it,mt=function(e,t){return ht[e]||(ht[e]=t||{})},gt=he,ft=Object,vt=function(e){return ft(gt(e))},yt=vt,bt=M({}.hasOwnProperty),kt=Object.hasOwn||function(e,t){return bt(yt(e),t)},_t=M,wt=0,Et=Math.random(),St=_t(1.1.toString),Ct=function(e){return"Symbol("+(void 0===e?"":e)+")_"+St(++wt+Et,36)},Tt=mt,Rt=kt,Ot=Ct,It=Fe,jt=Be,At=C.Symbol,Nt=Tt("wks"),Dt=jt?At.for||At:At&&At.withoutSetter||Ot,xt=function(e){return Rt(Nt,e)||(Nt[e]=It&&Rt(At,e)?At[e]:Dt("Symbol."+e)),Nt[e]},Lt=q,Pt=ye,Mt=Ge,zt=et,Ft=function(e,t){var n,o;if("string"===t&&nt(n=e.toString)&&!ot(o=tt(n,e)))return o;if(nt(n=e.valueOf)&&!ot(o=tt(n,e)))return o;if("string"!==t&&nt(n=e.toString)&&!ot(o=tt(n,e)))return o;throw new at("Can't convert object to primitive value")},Bt=TypeError,Ut=xt("toPrimitive"),Vt=function(e,t){if(!Pt(e)||Mt(e))return e;var n,o=zt(e,Ut);if(o){if(void 0===t&&(t="default"),n=Lt(o,e,t),!Pt(n)||Mt(n))return n;throw new Bt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ft(e,t)},Wt=Ge,Ht=function(e){var t=Vt(e,"string");return Wt(t)?t:t+""},Gt=ye,Yt=C.document,Kt=Gt(Yt)&&Gt(Yt.createElement),$t=function(e){return Kt?Yt.createElement(e):{}},Jt=$t,Zt=!$&&!T((function(){return 7!==Object.defineProperty(Jt("div"),"a",{get:function(){return 7}}).a})),qt=$,Xt=q,Qt=X,en=ae,tn=fe,nn=Ht,on=kt,an=Zt,rn=Object.getOwnPropertyDescriptor;K.f=qt?rn:function(e,t){if(e=tn(e),t=nn(t),an)try{return rn(e,t)}catch(e){}if(on(e,t))return en(!Xt(Qt.f,e,t),e[t])};var sn=T,cn=Y,un=/#|\.prototype\./,ln=function(e,t){var n=dn[pn(e)];return n===mn||n!==hn&&(cn(t)?sn(t):!!t)},pn=ln.normalize=function(e){return String(e).replace(un,".").toLowerCase()},dn=ln.data={},hn=ln.NATIVE="N",mn=ln.POLYFILL="P",gn=ln,fn=qe,vn=R,yn=H(H.bind),bn=function(e,t){return fn(e),void 0===t?e:vn?yn(e,t):function(){return e.apply(t,arguments)}},kn={},_n=$&&T((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),wn=ye,En=String,Sn=TypeError,Cn=function(e){if(wn(e))return e;throw new Sn(En(e)+" is not an object")},Tn=$,Rn=Zt,On=_n,In=Cn,jn=Ht,An=TypeError,Nn=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,xn="enumerable",Ln="configurable",Pn="writable";kn.f=Tn?On?function(e,t,n){if(In(e),t=jn(t),In(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Pn in n&&!n[Pn]){var o=Dn(e,t);o&&o[Pn]&&(e[t]=n.value,n={configurable:Ln in n?n[Ln]:o[Ln],enumerable:xn in n?n[xn]:o[xn],writable:!1})}return Nn(e,t,n)}:Nn:function(e,t,n){if(In(e),t=jn(t),In(n),Rn)try{return Nn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new An("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Mn=kn,zn=ae,Fn=$?function(e,t,n){return Mn.f(e,t,zn(1,n))}:function(e,t,n){return e[t]=n,e},Bn=C,Un=N,Vn=H,Wn=Y,Hn=K.f,Gn=gn,Yn=be,Kn=bn,$n=Fn,Jn=kt,Zn=function(e){var t=function t(n,o,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,o)}return new e(n,o,a)}return Un(e,this,arguments)};return t.prototype=e.prototype,t},qn=function(e,t){var n,o,a,i,r,s,c,u,l,p=e.target,d=e.global,h=e.stat,m=e.proto,g=d?Bn:h?Bn[p]:Bn[p]&&Bn[p].prototype,f=d?Yn:Yn[p]||$n(Yn,p,{})[p],v=f.prototype;for(i in t)o=!(n=Gn(d?i:p+(h?".":"#")+i,e.forced))&&g&&Jn(g,i),s=f[i],o&&(c=e.dontCallGetSet?(l=Hn(g,i))&&l.value:g[i]),r=o&&c?c:t[i],(n||m||_typeof(s)!=_typeof(r))&&(u=e.bind&&o?Kn(r,Bn):e.wrap&&o?Zn(r):m&&Wn(r)?Vn(r):r,(e.sham||r&&r.sham||s&&s.sham)&&$n(u,"sham",!0),$n(f,i,u),m&&(Jn(Yn,a=p+"Prototype")||$n(Yn,a,{}),$n(Yn[a],i,r),e.real&&v&&(n||!v[i])&&$n(v,i,r)))},Xn=Ct,Qn=mt("keys"),eo=function(e){return Qn[e]||(Qn[e]=Xn(e))},to=!T((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),no=kt,oo=Y,ao=vt,io=to,ro=eo("IE_PROTO"),so=Object,co=so.prototype,uo=io?so.getPrototypeOf:function(e){var t=ao(e);if(no(t,ro))return t[ro];var n=t.constructor;return oo(n)&&t instanceof n?n.prototype:t instanceof so?co:null},lo=M,po=qe,ho=ye,mo=function(e){return ho(e)||null===e},go=String,fo=TypeError,vo=function(e,t,n){try{return lo(po(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},yo=ye,bo=he,ko=function(e){if(mo(e))return e;throw new fo("Can't set "+go(e)+" as a prototype")},_o=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=vo(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return bo(n),ko(o),yo(n)?(t?e(n,o):n.__proto__=o,n):n}}():void 0),wo={},Eo=Math.ceil,So=Math.floor,Co=Math.trunc||function(e){var t=+e;return(t>0?So:Eo)(t)},To=function(e){var t=+e;return t!=t||0===t?0:Co(t)},Ro=To,Oo=Math.max,Io=Math.min,jo=To,Ao=Math.min,No=function(e){var t=jo(e);return t>0?Ao(t,9007199254740991):0},Do=function(e){return No(e.length)},xo=fe,Lo=function(e,t){var n=Ro(e);return n<0?Oo(n+t,0):Io(n,t)},Po=Do,Mo=function(e){return function(t,n,o){var a=xo(t),i=Po(a);if(0===i)return!e&&-1;var r,s=Lo(o,i);if(e&&n!=n){for(;i>s;)if((r=a[s++])!=r)return!0}else for(;i>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},zo={includes:Mo(!0),indexOf:Mo(!1)},Fo={},Bo=kt,Uo=fe,Vo=zo.indexOf,Wo=Fo,Ho=M([].push),Go=function(e,t){var n,o=Uo(e),a=0,i=[];for(n in o)!Bo(Wo,n)&&Bo(o,n)&&Ho(i,n);for(;t.length>a;)Bo(o,n=t[a++])&&(~Vo(i,n)||Ho(i,n));return i},Yo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ko=Go,$o=Yo.concat("length","prototype");wo.f=Object.getOwnPropertyNames||function(e){return Ko(e,$o)};var Jo={};Jo.f=Object.getOwnPropertySymbols;var Zo=Se,qo=wo,Xo=Jo,Qo=Cn,ea=M([].concat),ta=Zo("Reflect","ownKeys")||function(e){var t=qo.f(Qo(e)),n=Xo.f;return n?ea(t,n(e)):t},na=kt,oa=ta,aa=K,ia=kn,ra={},sa=Go,ca=Yo,ua=Object.keys||function(e){return sa(e,ca)},la=$,pa=_n,da=kn,ha=Cn,ma=fe,ga=ua;ra.f=la&&!pa?Object.defineProperties:function(e,t){ha(e);for(var n,o=ma(t),a=ga(t),i=a.length,r=0;i>r;)da.f(e,n=a[r++],o[n]);return e};var fa,va=Se("document","documentElement"),ya=Cn,ba=ra,ka=Yo,_a=Fo,wa=va,Ea=$t,Sa="prototype",Ca="script",Ta=eo("IE_PROTO"),Ra=function(){},Oa=function(e){return"<"+Ca+">"+e+"</"+Ca+">"},Ia=function(e){e.write(Oa("")),e.close();var t=e.parentWindow.Object;return e=null,t},ja=function(){try{fa=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ja="undefined"!=typeof document?document.domain&&fa?Ia(fa):(t=Ea("iframe"),n="java"+Ca+":",t.style.display="none",wa.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Oa("document.F=Object")),e.close(),e.F):Ia(fa);for(var o=ka.length;o--;)delete ja[Sa][ka[o]];return ja()};_a[Ta]=!0;var Aa=Object.create||function(e,t){var n;return null!==e?(Ra[Sa]=ya(e),n=new Ra,Ra[Sa]=null,n[Ta]=e):n=ja(),void 0===t?n:ba.f(n,t)},Na=ye,Da=Fn,xa=Error,La=M("".replace),Pa=String(new xa("zxcasd").stack),Ma=/\n\s*at [^:]*:[^\n]*/,za=Ma.test(Pa),Fa=ae,Ba=!T((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Fa(1,7)),7!==e.stack)})),Ua=Fn,Va=function(e,t){if(za&&"string"==typeof e&&!xa.prepareStackTrace)for(;t--;)e=La(e,Ma,"");return e},Wa=Ba,Ha=Error.captureStackTrace,Ga={},Ya=Ga,Ka=xt("iterator"),$a=Array.prototype,Ja={};Ja[xt("toStringTag")]="z";var Za="[object z]"===String(Ja),qa=Za,Xa=Y,Qa=U,ei=xt("toStringTag"),ti=Object,ni="Arguments"===Qa(function(){return arguments}()),oi=qa?Qa:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=ti(e),ei))?n:ni?Qa(t):"Object"===(o=Qa(t))&&Xa(t.callee)?"Arguments":o},ai=oi,ii=et,ri=le,si=Ga,ci=xt("iterator"),ui=function(e){if(!ri(e))return ii(e,ci)||ii(e,"@@iterator")||si[ai(e)]},li=q,pi=qe,di=Cn,hi=Ke,mi=ui,gi=TypeError,fi=q,vi=Cn,yi=et,bi=bn,ki=q,_i=Cn,wi=Ke,Ei=function(e){return void 0!==e&&(Ya.Array===e||$a[Ka]===e)},Si=Do,Ci=Ce,Ti=function(e,t){var n=arguments.length<2?mi(e):t;if(pi(n))return di(li(n,e));throw new gi(hi(e)+" is not iterable")},Ri=ui,Oi=function(e,t,n){var o,a;vi(e);try{if(!(o=yi(e,"return"))){if("throw"===t)throw n;return n}o=fi(o,e)}catch(e){a=!0,o=e}if("throw"===t)throw n;if(a)throw o;return vi(o),n},Ii=TypeError,ji=function(e,t){this.stopped=e,this.result=t},Ai=ji.prototype,Ni=function(e,t,n){var o,a,i,r,s,c,u,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),g=bi(t,l),f=function(e){return o&&Oi(o,"normal"),new ji(!0,e)},v=function(e){return p?(_i(e),m?g(e[0],e[1],f):g(e[0],e[1])):m?g(e,f):g(e)};if(d)o=e.iterator;else if(h)o=e;else{if(!(a=Ri(e)))throw new Ii(wi(e)+" is not iterable");if(Ei(a)){for(i=0,r=Si(e);r>i;i++)if((s=v(e[i]))&&Ci(Ai,s))return s;return new ji(!1)}o=Ti(e,a)}for(c=d?e.next:o.next;!(u=ki(c,o)).done;){try{s=v(u.value)}catch(e){Oi(o,"throw",e)}if("object"==_typeof(s)&&s&&Ci(Ai,s))return s}return new ji(!1)},Di=oi,xi=String,Li=function(e){if("Symbol"===Di(e))throw new TypeError("Cannot convert a Symbol value to a string");return xi(e)},Pi=Li,Mi=qn,zi=Ce,Fi=uo,Bi=_o,Ui=function(e,t,n){for(var o=oa(t),a=ia.f,i=aa.f,r=0;r<o.length;r++){var s=o[r];na(e,s)||n&&na(n,s)||a(e,s,i(t,s))}},Vi=Aa,Wi=Fn,Hi=ae,Gi=function(e,t){Na(t)&&"cause"in t&&Da(e,"cause",t.cause)},Yi=function(e,t,n,o){Wa&&(Ha?Ha(e,t):Ua(e,"stack",Va(n,o)))},Ki=Ni,$i=function(e,t){return void 0===e?arguments.length<2?"":t:Pi(e)},Ji=xt("toStringTag"),Zi=Error,qi=[].push,Xi=function(e,t){var n,o=zi(Qi,this);Bi?n=Bi(new Zi,o?Fi(this):Qi):(n=o?this:Vi(Qi),Wi(n,Ji,"Error")),void 0!==t&&Wi(n,"message",$i(t)),Yi(n,Xi,n.stack,1),arguments.length>2&&Gi(n,arguments[2]);var a=[];return Ki(e,qi,{that:a}),Wi(n,"errors",a),n};Bi?Bi(Xi,Zi):Ui(Xi,Zi,{name:!0});var Qi=Xi.prototype=Vi(Zi.prototype,{constructor:Hi(1,Xi),message:Hi(1,""),name:Hi(1,"AggregateError")});Mi({global:!0,constructor:!0,arity:2},{AggregateError:Xi});var er,tr,nr,or=Y,ar=C.WeakMap,ir=or(ar)&&/native code/.test(String(ar)),rr=C,sr=ye,cr=Fn,ur=kt,lr=it,pr=eo,dr=Fo,hr="Object already initialized",mr=rr.TypeError,gr=rr.WeakMap;if(ir||lr.state){var fr=lr.state||(lr.state=new gr);fr.get=fr.get,fr.has=fr.has,fr.set=fr.set,er=function(e,t){if(fr.has(e))throw new mr(hr);return t.facade=e,fr.set(e,t),t},tr=function(e){return fr.get(e)||{}},nr=function(e){return fr.has(e)}}else{var vr=pr("state");dr[vr]=!0,er=function(e,t){if(ur(e,vr))throw new mr(hr);return t.facade=e,cr(e,vr,t),t},tr=function(e){return ur(e,vr)?e[vr]:{}},nr=function(e){return ur(e,vr)}}var yr,br,kr,_r={set:er,get:tr,has:nr,enforce:function(e){return nr(e)?tr(e):er(e,{})},getterFor:function(e){return function(t){var n;if(!sr(t)||(n=tr(t)).type!==e)throw new mr("Incompatible receiver, "+e+" required");return n}}},wr=$,Er=kt,Sr=Function.prototype,Cr=wr&&Object.getOwnPropertyDescriptor,Tr=Er(Sr,"name"),Rr={EXISTS:Tr,PROPER:Tr&&"something"===function(){}.name,CONFIGURABLE:Tr&&(!wr||wr&&Cr(Sr,"name").configurable)},Or=Fn,Ir=function(e,t,n,o){return o&&o.enumerable?e[t]=n:Or(e,t,n),e},jr=T,Ar=Y,Nr=ye,Dr=Aa,xr=uo,Lr=Ir,Pr=xt("iterator"),Mr=!1;[].keys&&("next"in(kr=[].keys())?(br=xr(xr(kr)))!==Object.prototype&&(yr=br):Mr=!0);var zr=!Nr(yr)||jr((function(){var e={};return yr[Pr].call(e)!==e}));Ar((yr=zr?{}:Dr(yr))[Pr])||Lr(yr,Pr,(function(){return this}));var Fr={IteratorPrototype:yr,BUGGY_SAFARI_ITERATORS:Mr},Br=oi,Ur=Za?{}.toString:function(){return"[object "+Br(this)+"]"},Vr=Za,Wr=kn.f,Hr=Fn,Gr=kt,Yr=Ur,Kr=xt("toStringTag"),$r=function(e,t,n,o){var a=n?e:e&&e.prototype;a&&(Gr(a,Kr)||Wr(a,Kr,{configurable:!0,value:t}),o&&!Vr&&Hr(a,"toString",Yr))},Jr=Fr.IteratorPrototype,Zr=Aa,qr=ae,Xr=$r,Qr=Ga,es=function(){return this},ts=qn,ns=q,os=Rr,as=function(e,t,n,o){var a=t+" Iterator";return e.prototype=Zr(Jr,{next:qr(+!o,n)}),Xr(e,a,!1,!0),Qr[a]=es,e},is=uo,rs=$r,ss=Ir,cs=Ga,us=Fr,ls=os.PROPER,ps=us.BUGGY_SAFARI_ITERATORS,ds=xt("iterator"),hs="keys",ms="values",gs="entries",fs=function(){return this},vs=function(e,t,n,o,a,i,r){as(n,t,o);var s,c,u,l=function(e){if(e===a&&g)return g;if(!ps&&e&&e in h)return h[e];switch(e){case hs:case ms:case gs:return function(){return new n(this,e)}}return function(){return new n(this)}},p=t+" Iterator",d=!1,h=e.prototype,m=h[ds]||h["@@iterator"]||a&&h[a],g=!ps&&m||l(a),f="Array"===t&&h.entries||m;if(f&&(s=is(f.call(new e)))!==Object.prototype&&s.next&&(rs(s,p,!0,!0),cs[p]=fs),ls&&a===ms&&m&&m.name!==ms&&(d=!0,g=function(){return ns(m,this)}),a)if(c={values:l(ms),keys:i?g:l(hs),entries:l(gs)},r)for(u in c)(ps||d||!(u in h))&&ss(h,u,c[u]);else ts({target:t,proto:!0,forced:ps||d},c);return r&&h[ds]!==g&&ss(h,ds,g,{name:a}),cs[t]=g,c},ys=function(e,t){return{value:e,done:t}},bs=fe,ks=function(){},_s=Ga,ws=_r,Es=(kn.f,vs),Ss=ys,Cs="Array Iterator",Ts=ws.set,Rs=ws.getterFor(Cs);Es(Array,"Array",(function(e,t){Ts(this,{type:Cs,target:bs(e),index:0,kind:t})}),(function(){var e=Rs(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ss(void 0,!0);switch(e.kind){case"keys":return Ss(n,!1);case"values":return Ss(t[n],!1)}return Ss([n,t[n]],!1)}),"values");_s.Arguments=_s.Array;ks(),ks(),ks();var Os=C,Is=Oe,js=U,As=function(e){return Is.slice(0,e.length)===e},Ns=As("Bun/")?"BUN":As("Cloudflare-Workers")?"CLOUDFLARE":As("Deno/")?"DENO":As("Node.js/")?"NODE":Os.Bun&&"string"==typeof Bun.version?"BUN":Os.Deno&&"object"==_typeof(Deno.version)?"DENO":"process"===js(Os.process)?"NODE":Os.window&&Os.document?"BROWSER":"REST",Ds="NODE"===Ns,xs=kn,Ls=Se,Ps=function(e,t,n){return xs.f(e,t,n)},Ms=$,zs=xt("species"),Fs=Ce,Bs=TypeError,Us=Y,Vs=it,Ws=M(Function.toString);Us(Vs.inspectSource)||(Vs.inspectSource=function(e){return Ws(e)});var Hs=Vs.inspectSource,Gs=M,Ys=T,Ks=Y,$s=oi,Js=Hs,Zs=function(){},qs=Se("Reflect","construct"),Xs=/^\s*(?:class|function)\b/,Qs=Gs(Xs.exec),ec=!Xs.test(Zs),tc=function(e){if(!Ks(e))return!1;try{return qs(Zs,[],e),!0}catch(e){return!1}},nc=function(e){if(!Ks(e))return!1;switch($s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ec||!!Qs(Xs,Js(e))}catch(e){return!0}};nc.sham=!0;var oc,ac,ic,rc,sc=!qs||Ys((function(){var e;return tc(tc.call)||!tc(Object)||!tc((function(){e=!0}))||e}))?nc:tc,cc=sc,uc=Ke,lc=TypeError,pc=Cn,dc=function(e){if(cc(e))return e;throw new lc(uc(e)+" is not a constructor")},hc=le,mc=xt("species"),gc=function(e,t){var n,o=pc(e).constructor;return void 0===o||hc(n=pc(o)[mc])?t:dc(n)},fc=M([].slice),vc=TypeError,yc=/(?:ipad|iphone|ipod).*applewebkit/i.test(Oe),bc=C,kc=N,_c=bn,wc=Y,Ec=kt,Sc=T,Cc=va,Tc=fc,Rc=$t,Oc=function(e,t){if(e<t)throw new vc("Not enough arguments");return e},Ic=yc,jc=Ds,Ac=bc.setImmediate,Nc=bc.clearImmediate,Dc=bc.process,xc=bc.Dispatch,Lc=bc.Function,Pc=bc.MessageChannel,Mc=bc.String,zc=0,Fc={},Bc="onreadystatechange";Sc((function(){oc=bc.location}));var Uc=function(e){if(Ec(Fc,e)){var t=Fc[e];delete Fc[e],t()}},Vc=function(e){return function(){Uc(e)}},Wc=function(e){Uc(e.data)},Hc=function(e){bc.postMessage(Mc(e),oc.protocol+"//"+oc.host)};Ac&&Nc||(Ac=function(e){Oc(arguments.length,1);var t=wc(e)?e:Lc(e),n=Tc(arguments,1);return Fc[++zc]=function(){kc(t,void 0,n)},ac(zc),zc},Nc=function(e){delete Fc[e]},jc?ac=function(e){Dc.nextTick(Vc(e))}:xc&&xc.now?ac=function(e){xc.now(Vc(e))}:Pc&&!Ic?(rc=(ic=new Pc).port2,ic.port1.onmessage=Wc,ac=_c(rc.postMessage,rc)):bc.addEventListener&&wc(bc.postMessage)&&!bc.importScripts&&oc&&"file:"!==oc.protocol&&!Sc(Hc)?(ac=Hc,bc.addEventListener("message",Wc,!1)):ac=Bc in Rc("script")?function(e){Cc.appendChild(Rc("script"))[Bc]=function(){Cc.removeChild(this),Uc(e)}}:function(e){setTimeout(Vc(e),0)});var Gc={set:Ac,clear:Nc},Yc=C,Kc=$,$c=Object.getOwnPropertyDescriptor,Jc=function(){this.head=null,this.tail=null};Jc.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Zc,qc,Xc,Qc,eu,tu=Jc,nu=/ipad|iphone|ipod/i.test(Oe)&&"undefined"!=typeof Pebble,ou=/web0s(?!.*chrome)/i.test(Oe),au=C,iu=function(e){if(!Kc)return Yc[e];var t=$c(Yc,e);return t&&t.value},ru=bn,su=Gc.set,cu=tu,uu=yc,lu=nu,pu=ou,du=Ds,hu=au.MutationObserver||au.WebKitMutationObserver,mu=au.document,gu=au.process,fu=au.Promise,vu=iu("queueMicrotask");if(!vu){var yu=new cu,bu=function(){var e,t;for(du&&(e=gu.domain)&&e.exit();t=yu.get();)try{t()}catch(e){throw yu.head&&Zc(),e}e&&e.enter()};uu||du||pu||!hu||!mu?!lu&&fu&&fu.resolve?((Qc=fu.resolve(void 0)).constructor=fu,eu=ru(Qc.then,Qc),Zc=function(){eu(bu)}):du?Zc=function(){gu.nextTick(bu)}:(su=ru(su,au),Zc=function(){su(bu)}):(qc=!0,Xc=mu.createTextNode(""),new hu(bu).observe(Xc,{characterData:!0}),Zc=function(){Xc.data=qc=!qc}),vu=function(e){yu.head||Zc(),yu.add(e)}}var ku=vu,_u=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},wu=C.Promise,Eu=C,Su=wu,Cu=Y,Tu=gn,Ru=Hs,Ou=xt,Iu=Ns,ju=Le,Au=Su&&Su.prototype,Nu=Ou("species"),Du=!1,xu=Cu(Eu.PromiseRejectionEvent),Lu=Tu("Promise",(function(){var e=Ru(Su),t=e!==String(Su);if(!t&&66===ju)return!0;if(!Au.catch||!Au.finally)return!0;if(!ju||ju<51||!/native code/.test(e)){var n=new Su((function(e){e(1)})),o=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Nu]=o,!(Du=n.then((function(){}))instanceof o))return!0}return!(t||"BROWSER"!==Iu&&"DENO"!==Iu||xu)})),Pu={CONSTRUCTOR:Lu,REJECTION_EVENT:xu,SUBCLASSING:Du},Mu={},zu=qe,Fu=TypeError,Bu=function(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw new Fu("Bad Promise constructor");t=e,n=o})),this.resolve=zu(t),this.reject=zu(n)};Mu.f=function(e){return new Bu(e)};var Uu,Vu,Wu,Hu=qn,Gu=Ds,Yu=C,Ku=be,$u=q,Ju=Ir,Zu=$r,qu=function(e){var t=Ls(e);Ms&&t&&!t[zs]&&Ps(t,zs,{configurable:!0,get:function(){return this}})},Xu=qe,Qu=Y,el=ye,tl=function(e,t){if(Fs(t,e))return e;throw new Bs("Incorrect invocation")},nl=gc,ol=Gc.set,al=ku,il=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},rl=_u,sl=tu,cl=_r,ul=wu,ll=Pu,pl=Mu,dl="Promise",hl=ll.CONSTRUCTOR,ml=ll.REJECTION_EVENT,gl=cl.getterFor(dl),fl=cl.set,vl=ul&&ul.prototype,yl=ul,bl=vl,kl=Yu.TypeError,_l=Yu.document,wl=Yu.process,El=pl.f,Sl=El,Cl=!!(_l&&_l.createEvent&&Yu.dispatchEvent),Tl="unhandledrejection",Rl=function(e){var t;return!(!el(e)||!Qu(t=e.then))&&t},Ol=function(e,t){var n,o,a,i=t.value,r=1===t.state,s=r?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(r||(2===t.rejection&&Dl(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),a=!0)),n===e.promise?u(new kl("Promise-chain cycle")):(o=Rl(n))?$u(o,n,c,u):c(n)):u(i)}catch(e){l&&!a&&l.exit(),u(e)}},Il=function(e,t){e.notified||(e.notified=!0,al((function(){for(var n,o=e.reactions;n=o.get();)Ol(n,e);e.notified=!1,t&&!e.rejection&&Al(e)})))},jl=function(e,t,n){var o,a;Cl?((o=_l.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),Yu.dispatchEvent(o)):o={promise:t,reason:n},!ml&&(a=Yu["on"+e])?a(o):e===Tl&&il("Unhandled promise rejection",n)},Al=function(e){$u(ol,Yu,(function(){var t,n=e.facade,o=e.value;if(Nl(e)&&(t=rl((function(){Gu?wl.emit("unhandledRejection",o,n):jl(Tl,n,o)})),e.rejection=Gu||Nl(e)?2:1,t.error))throw t.value}))},Nl=function(e){return 1!==e.rejection&&!e.parent},Dl=function(e){$u(ol,Yu,(function(){var t=e.facade;Gu?wl.emit("rejectionHandled",t):jl("rejectionhandled",t,e.value)}))},xl=function(e,t,n){return function(o){e(t,o,n)}},Ll=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Il(e,!0))},Pl=function e(t,n,o){if(!t.done){t.done=!0,o&&(t=o);try{if(t.facade===n)throw new kl("Promise can't be resolved itself");var a=Rl(n);a?al((function(){var o={done:!1};try{$u(a,n,xl(e,o,t),xl(Ll,o,t))}catch(e){Ll(o,e,t)}})):(t.value=n,t.state=1,Il(t,!1))}catch(e){Ll({done:!1},e,t)}}};hl&&(bl=(yl=function(e){tl(this,bl),Xu(e),$u(Uu,this);var t=gl(this);try{e(xl(Pl,t),xl(Ll,t))}catch(e){Ll(t,e)}}).prototype,(Uu=function(e){fl(this,{type:dl,done:!1,notified:!1,parent:!1,reactions:new sl,rejection:!1,state:0,value:null})}).prototype=Ju(bl,"then",(function(e,t){var n=gl(this),o=El(nl(this,yl));return n.parent=!0,o.ok=!Qu(e)||e,o.fail=Qu(t)&&t,o.domain=Gu?wl.domain:void 0,0===n.state?n.reactions.add(o):al((function(){Ol(o,n)})),o.promise})),Vu=function(){var e=new Uu,t=gl(e);this.promise=e,this.resolve=xl(Pl,t),this.reject=xl(Ll,t)},pl.f=El=function(e){return e===yl||e===Wu?new Vu(e):Sl(e)}),Hu({global:!0,constructor:!0,wrap:!0,forced:hl},{Promise:yl}),Wu=Ku.Promise,Zu(yl,dl,!1,!0),qu(dl);var Ml=xt("iterator"),zl=!1;try{var Fl=0,Bl={next:function(){return{done:!!Fl++}},return:function(){zl=!0}};Bl[Ml]=function(){return this},Array.from(Bl,(function(){throw 2}))}catch(e){}var Ul=wu,Vl=function(e,t){try{if(!t&&!zl)return!1}catch(e){return!1}var n=!1;try{var o={};o[Ml]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n},Wl=Pu.CONSTRUCTOR||!Vl((function(e){Ul.all(e).then(void 0,(function(){}))})),Hl=q,Gl=qe,Yl=Mu,Kl=_u,$l=Ni;qn({target:"Promise",stat:!0,forced:Wl},{all:function(e){var t=this,n=Yl.f(t),o=n.resolve,a=n.reject,i=Kl((function(){var n=Gl(t.resolve),i=[],r=0,s=1;$l(e,(function(e){var c=r++,u=!1;s++,Hl(n,t,e).then((function(e){u||(u=!0,i[c]=e,--s||o(i))}),a)})),--s||o(i)}));return i.error&&a(i.value),n.promise}});var Jl=qn,Zl=Pu.CONSTRUCTOR;wu&&wu.prototype,Jl({target:"Promise",proto:!0,forced:Zl,real:!0},{catch:function(e){return this.then(void 0,e)}});var ql=q,Xl=qe,Ql=Mu,ep=_u,tp=Ni;qn({target:"Promise",stat:!0,forced:Wl},{race:function(e){var t=this,n=Ql.f(t),o=n.reject,a=ep((function(){var a=Xl(t.resolve);tp(e,(function(e){ql(a,t,e).then(n.resolve,o)}))}));return a.error&&o(a.value),n.promise}});var np=Mu;qn({target:"Promise",stat:!0,forced:Pu.CONSTRUCTOR},{reject:function(e){var t=np.f(this);return(0,t.reject)(e),t.promise}});var op=Cn,ap=ye,ip=Mu,rp=function(e,t){if(op(e),ap(t)&&t.constructor===e)return t;var n=ip.f(e);return(0,n.resolve)(t),n.promise},sp=qn,cp=wu,up=Pu.CONSTRUCTOR,lp=rp,pp=Se("Promise"),dp=!up;sp({target:"Promise",stat:!0,forced:true},{resolve:function(e){return lp(dp&&this===pp?cp:this,e)}});var hp=q,mp=qe,gp=Mu,fp=_u,vp=Ni;qn({target:"Promise",stat:!0,forced:Wl},{allSettled:function(e){var t=this,n=gp.f(t),o=n.resolve,a=n.reject,i=fp((function(){var n=mp(t.resolve),a=[],i=0,r=1;vp(e,(function(e){var s=i++,c=!1;r++,hp(n,t,e).then((function(e){c||(c=!0,a[s]={status:"fulfilled",value:e},--r||o(a))}),(function(e){c||(c=!0,a[s]={status:"rejected",reason:e},--r||o(a))}))})),--r||o(a)}));return i.error&&a(i.value),n.promise}});var yp=q,bp=qe,kp=Se,_p=Mu,wp=_u,Ep=Ni,Sp="No one promise resolved";qn({target:"Promise",stat:!0,forced:Wl},{any:function(e){var t=this,n=kp("AggregateError"),o=_p.f(t),a=o.resolve,i=o.reject,r=wp((function(){var o=bp(t.resolve),r=[],s=0,c=1,u=!1;Ep(e,(function(e){var l=s++,p=!1;c++,yp(o,t,e).then((function(e){p||u||(u=!0,a(e))}),(function(e){p||u||(p=!0,r[l]=e,--c||i(new n(r,Sp)))}))})),--c||i(new n(r,Sp))}));return r.error&&i(r.value),o.promise}});var Cp=qn,Tp=N,Rp=fc,Op=Mu,Ip=qe,jp=_u,Ap=C.Promise,Np=!1;Cp({target:"Promise",stat:!0,forced:!Ap||!Ap.try||jp((function(){Ap.try((function(e){Np=8===e}),8)})).error||!Np},{try:function(e){var t=arguments.length>1?Rp(arguments,1):[],n=Op.f(this),o=jp((function(){return Tp(Ip(e),void 0,t)}));return(o.error?n.reject:n.resolve)(o.value),n.promise}});var Dp=Mu;qn({target:"Promise",stat:!0},{withResolvers:function(){var e=Dp.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var xp=qn,Lp=wu,Pp=T,Mp=Se,zp=Y,Fp=gc,Bp=rp,Up=Lp&&Lp.prototype;xp({target:"Promise",proto:!0,real:!0,forced:!!Lp&&Pp((function(){Up.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Fp(this,Mp("Promise")),n=zp(e);return this.then(n?function(n){return Bp(t,e()).then((function(){return n}))}:e,n?function(n){return Bp(t,e()).then((function(){throw n}))}:e)}});var Vp=M,Wp=To,Hp=Li,Gp=he,Yp=Vp("".charAt),Kp=Vp("".charCodeAt),$p=Vp("".slice),Jp=function(e){return function(t,n){var o,a,i=Hp(Gp(t)),r=Wp(n),s=i.length;return r<0||r>=s?e?"":void 0:(o=Kp(i,r))<55296||o>56319||r+1===s||(a=Kp(i,r+1))<56320||a>57343?e?Yp(i,r):o:e?$p(i,r,r+2):a-56320+(o-55296<<10)+65536}},Zp={codeAt:Jp(!1),charAt:Jp(!0)}.charAt,qp=Li,Xp=_r,Qp=vs,ed=ys,td="String Iterator",nd=Xp.set,od=Xp.getterFor(td);Qp(String,"String",(function(e){nd(this,{type:td,string:qp(e),index:0})}),(function(){var e,t=od(this),n=t.string,o=t.index;return o>=n.length?ed(void 0,!0):(e=Zp(n,o),t.index+=e.length,ed(e,!1))}));var ad=be.Promise,id={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rd=C,sd=$r,cd=Ga;for(var ud in id)sd(rd[ud],ud),cd[ud]=cd.Array;var ld,pd=ad;!function(e){e.CSS="text/css",e.JS="application/javascript"}(ld||(ld={}));var dd=function(){function t(e){_classCallCheck(this,t),this.options=e,this.codeBlobMap=new Map,this.enableBlob=!1;var n=this.options.doc;this.doc=n,w.registerCallback(this,this.initCallback)}return _createClass(t,[{key:"initCallback",value:function(t){return e(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))}},{key:"addScript",value:function(e,t,n,o,a){var i=e.createElement("script");if(i.type="text/javascript",this.enableBlob?(i.src=n,i.async=!1):i.textContent=n,i.id=a,o)for(var r in o)o.hasOwnProperty(r)&&(i[r]=o[r]);t.appendChild(i)}},{key:"addLink",value:function(e,t,n,o,a){var i=this.enableBlob?"link":"style",r=e.createElement(i);if(this.enableBlob?(r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href",n)):r.textContent=n,r.setAttribute("class","CBS-internal-block"),r.id=a,o)for(var s in o)o.hasOwnProperty(s)&&(r[s]=o[s]);t.appendChild(r)}},{key:"appendByFragment",value:function(t,n,o,a,i){return e(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var r;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.createDocumentFragment(),e.next=3,this.getTrunkBlobUrl(n,o);case 3:e.sent.forEach((function(e){var n=e.url,o=e.attrs,i=e.name;a(t,r,n,o,i)})),i.appendChild(r);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"getTrunkBlobUrl",value:function(t,n){return e(this,void 0,void 0,_regeneratorRuntime().mark((function e(){var o=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.enableBlob){e.next=6;break}return e.next=3,pd.all(t.map((function(e){var t=e.url,a=e.lazyContent;if(o.codeBlobMap.get(t))return pd.resolve(null);var i=new _;return o.codeBlobMap.set(t,i),a.then((function(e){return o.getBlobUrl(e.default,n)})).then((function(e){i.resolve(e)})).catch((function(e){i.reject(e),o.codeBlobMap.delete(t)}))})));case 3:return e.abrupt("return",pd.all(t.map((function(e){var t=e.url,n=e.attrs,a=e.name;return o.codeBlobMap.get(t).promise.then((function(e){return{url:e,attrs:n,name:a}}))}))));case 6:return e.abrupt("return",pd.all(t.map((function(e){var t=e.lazyContent,n=e.attrs,o=e.name;return t.then((function(e){return{url:e.default,attrs:n,name:o}}))}))));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getBlobUrl",value:function(e,t){var n=new Blob([e],{type:t});return URL.createObjectURL(n)}}]),t}();w.ping();var hd="__$ZCB_GLOBAL_PURE_WINDOW$__",md=function(){var e=!1;return new pd((function(t){var n=document.createElement("iframe");n.addEventListener("load",(function(){var a,i,r=document.getElementById("zcb-sdk-polyfill");if(r&&r.textContent){var s=null===(a=n.contentWindow)||void 0===a?void 0:a.document.createElement("script");s&&(s.id="zcb-sdk-iframe-polyfill",s.textContent=r.textContent,null===(i=n.contentWindow)||void 0===i||i.document.head.appendChild(s))}clearTimeout(o),window[hd]=n.contentWindow,e||(e=!0,t(n.contentWindow))})),n.src="about:blank",n.style.display="none",document.head.appendChild(n);var o=setTimeout((function(){window[hd]||e||(console.warn("initGlobalCacheWindow timeout, fallback to window"),window[hd]=window,clearTimeout(o),document.head.removeChild(n),t(window))}),1e4)}))},gd=function(){function e(t){_classCallCheck(this,e),this.metaInfo=t}return _createClass(e,[{key:"sdkVersion",get:function(){var e;return(null===(e=window.ZCB_NPM_SDK_CUSTOMER_MAIN)||void 0===e?void 0:e.sdkVersion)||""}},{key:"domain",get:function(){return this.metaInfo.zoomHostName}},{key:"appKey",get:function(){return this.metaInfo.appKey}}]),e}(),fd=function(t){_inherits(o,t);var n=_createSuper(o);function o(e){var t;if(_classCallCheck(this,o),o.instance)return _possibleConstructorReturn(t,o.instance);(t=n.call(this,e)).sdkVersion="2.10.0",o.instance=_assertThisInitialized(t);var a=e.appKey,i=e.zoomHostName;return window.ZCB_NPM_SDK_CUSTOMER_SESSION_CONTEXT=new gd({appKey:a,zoomHostName:i}),_possibleConstructorReturn(t,_assertThisInitialized(t))}return _createClass(o,[{key:"fullScriptsSrc",get:function(){return[{name:"zcb-sdk-core",url:"./sdk-core",lazyContent:Promise.resolve().then((function(){return yd}))},{name:"zcb-sdk-channel",url:"./sdk-channel",lazyContent:Promise.resolve().then((function(){return bd}))},{name:"zcb-sdk-controller",url:"./sdk-controller",lazyContent:Promise.resolve().then((function(){return kd}))},{name:"zcb-sdk-client",url:"./sdk-client",lazyContent:Promise.resolve().then((function(){return _d}))},{name:"zcb-sdk-portal-customer",url:"./sdk-portal-customer",lazyContent:Promise.resolve().then((function(){return wd}))}]}},{key:"coreScriptsSrc",get:function(){return[{name:"zcb-sdk-core",url:"./sdk-core",lazyContent:Promise.resolve().then((function(){return yd}))}]}},{key:"cssSrc",get:function(){return[{name:"zcb-sdk-portal-customer-css",url:"./sdk-portal-customer/css",lazyContent:Promise.resolve().then((function(){return Ed}))}]}},{key:"polyfillSrc",get:function(){return[{name:"zcb-sdk-polyfill",url:"./sdk-polyfill",lazyContent:Promise.resolve().then((function(){return Sd}))}]}},{key:"initCallback",value:function(t){return e(this,void 0,void 0,_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appendByFragment(this.doc,this.polyfillSrc,ld.JS,this.addScript.bind(this),this.doc.head);case 2:return e.next=4,md();case 4:if(!t){e.next=9;break}return e.next=7,pd.all([this.appendByFragment(this.doc,this.cssSrc,ld.CSS,this.addLink.bind(this),this.doc.head),this.appendByFragment(this.doc,this.fullScriptsSrc,ld.JS,this.addScript.bind(this),this.doc.head)]);case 7:e.next=11;break;case 9:return e.next=11,pd.all([this.appendByFragmen