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