@apolitical/component-library 1.4.0 → 1.4.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -10
- package/index.mjs +238 -207
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the MIT license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/var oc;function Pg(){return oc||(oc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,c=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===r||te===f||te===i||te===o||te===h||te===d||typeof te=="object"&&te!==null&&(te.$$typeof===p||te.$$typeof===c||te.$$typeof===s||te.$$typeof===a||te.$$typeof===u||te.$$typeof===_||te.$$typeof===T||te.$$typeof===E||te.$$typeof===m)}function A(te){if(typeof te=="object"&&te!==null){var ze=te.$$typeof;switch(ze){case t:var De=te.type;switch(De){case l:case f:case r:case i:case o:case h:return De;default:var bt=De&&De.$$typeof;switch(bt){case a:case u:case p:case c:case s:return bt;default:return ze}}case n:return ze}}}var w=l,N=f,F=a,M=s,W=t,q=u,V=r,j=p,Y=c,oe=n,K=i,k=o,z=h,J=!1;function de(te){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),X(te)||A(te)===l}function X(te){return A(te)===f}function ee(te){return A(te)===a}function ue(te){return A(te)===s}function ce(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function Ve(te){return A(te)===u}function Q(te){return A(te)===r}function re(te){return A(te)===p}function Pe(te){return A(te)===c}function xe(te){return A(te)===n}function at(te){return A(te)===i}function ct(te){return A(te)===o}function _t(te){return A(te)===h}Ce.AsyncMode=w,Ce.ConcurrentMode=N,Ce.ContextConsumer=F,Ce.ContextProvider=M,Ce.Element=W,Ce.ForwardRef=q,Ce.Fragment=V,Ce.Lazy=j,Ce.Memo=Y,Ce.Portal=oe,Ce.Profiler=K,Ce.StrictMode=k,Ce.Suspense=z,Ce.isAsyncMode=de,Ce.isConcurrentMode=X,Ce.isContextConsumer=ee,Ce.isContextProvider=ue,Ce.isElement=ce,Ce.isForwardRef=Ve,Ce.isFragment=Q,Ce.isLazy=re,Ce.isMemo=Pe,Ce.isPortal=xe,Ce.isProfiler=at,Ce.isStrictMode=ct,Ce.isSuspense=_t,Ce.isValidElementType=b,Ce.typeOf=A}()),Ce}process.env.NODE_ENV==="production"?Hs.exports=Rg():Hs.exports=Pg();var Ig=Hs.exports,xd=Ig,Ng={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Lg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ad={};Ad[xd.ForwardRef]=Ng;Ad[xd.Memo]=Lg;function kg(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Cd(e){const t=G.useContext(Ag);if(!t)throw new Error("Missing <CookiesProvider>");const[n,r]=G.useState(()=>t.getAll());kg()&&G.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Bg(e||null,l,n)&&r(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,n]);const o=G.useMemo(()=>t.set.bind(t),[t]),i=G.useMemo(()=>t.remove.bind(t),[t]),s=G.useMemo(()=>t.update.bind(t),[t]);return[n,o,i,s]}function Bg(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var Rd={exports:{}},oa={exports:{}},to={},ro={exports:{}},aa,ac;function Pd(){return ac||(ac=1,aa=function(t,n){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return t.apply(n,o)}}),aa}var sa,sc;function Xe(){if(sc)return sa;sc=1;var e=Pd(),t=Object.prototype.toString,n=function(k){return function(z){var J=t.call(z);return k[J]||(k[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function r(k){return k=k.toLowerCase(),function(J){return n(J)===k}}function o(k){return Array.isArray(k)}function i(k){return typeof k>"u"}function s(k){return k!==null&&!i(k)&&k.constructor!==null&&!i(k.constructor)&&typeof k.constructor.isBuffer=="function"&&k.constructor.isBuffer(k)}var a=r("ArrayBuffer");function l(k){var z;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?z=ArrayBuffer.isView(k):z=k&&k.buffer&&a(k.buffer),z}function f(k){return typeof k=="string"}function u(k){return typeof k=="number"}function h(k){return k!==null&&typeof k=="object"}function d(k){if(n(k)!=="object")return!1;var z=Object.getPrototypeOf(k);return z===null||z===Object.prototype}var c=r("Date"),p=r("File"),m=r("Blob"),_=r("FileList");function T(k){return t.call(k)==="[object Function]"}function E(k){return h(k)&&T(k.pipe)}function b(k){var z="[object FormData]";return k&&(typeof FormData=="function"&&k instanceof FormData||t.call(k)===z||T(k.toString)&&k.toString()===z)}var A=r("URLSearchParams");function w(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function N(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(k,z){if(!(k===null||typeof k>"u"))if(typeof k!="object"&&(k=[k]),o(k))for(var J=0,de=k.length;J<de;J++)z.call(null,k[J],J,k);else for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&z.call(null,k[X],X,k)}function M(){var k={};function z(X,ee){d(k[ee])&&d(X)?k[ee]=M(k[ee],X):d(X)?k[ee]=M({},X):o(X)?k[ee]=X.slice():k[ee]=X}for(var J=0,de=arguments.length;J<de;J++)F(arguments[J],z);return k}function W(k,z,J){return F(z,function(X,ee){J&&typeof X=="function"?k[ee]=e(X,J):k[ee]=X}),k}function q(k){return k.charCodeAt(0)===65279&&(k=k.slice(1)),k}function V(k,z,J,de){k.prototype=Object.create(z.prototype,de),k.prototype.constructor=k,J&&Object.assign(k.prototype,J)}function j(k,z,J){var de,X,ee,ue={};z=z||{};do{for(de=Object.getOwnPropertyNames(k),X=de.length;X-- >0;)ee=de[X],ue[ee]||(z[ee]=k[ee],ue[ee]=!0);k=Object.getPrototypeOf(k)}while(k&&(!J||J(k,z))&&k!==Object.prototype);return z}function Y(k,z,J){k=String(k),(J===void 0||J>k.length)&&(J=k.length),J-=z.length;var de=k.indexOf(z,J);return de!==-1&&de===J}function oe(k){if(!k)return null;var z=k.length;if(i(z))return null;for(var J=new Array(z);z-- >0;)J[z]=k[z];return J}var K=function(k){return function(z){return k&&z instanceof k}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return sa={isArray:o,isArrayBuffer:a,isBuffer:s,isFormData:b,isArrayBufferView:l,isString:f,isNumber:u,isObject:h,isPlainObject:d,isUndefined:i,isDate:c,isFile:p,isBlob:m,isFunction:T,isStream:E,isURLSearchParams:A,isStandardBrowserEnv:N,forEach:F,merge:M,extend:W,trim:w,stripBOM:q,inherits:V,toFlatObject:j,kindOf:n,kindOfTest:r,endsWith:Y,toArray:oe,isTypedArray:K,isFileList:_},sa}var ua,uc;function Id(){if(uc)return ua;uc=1;var e=Xe();function t(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return ua=function(r,o,i){if(!o)return r;var s;if(i)s=i(o);else if(e.isURLSearchParams(o))s=o.toString();else{var a=[];e.forEach(o,function(u,h){u===null||typeof u>"u"||(e.isArray(u)?h=h+"[]":u=[u],e.forEach(u,function(c){e.isDate(c)?c=c.toISOString():e.isObject(c)&&(c=JSON.stringify(c)),a.push(t(h)+"="+t(c))}))}),s=a.join("&")}if(s){var l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},ua}var ca,cc;function Mg(){if(cc)return ca;cc=1;var e=Xe();function t(){this.handlers=[]}return t.prototype.use=function(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},t.prototype.forEach=function(r){e.forEach(this.handlers,function(i){i!==null&&r(i)})},ca=t,ca}var la,lc;function Fg(){if(lc)return la;lc=1;var e=Xe();return la=function(n,r){e.forEach(n,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(n[r]=i,delete n[s])})},la}var fa,fc;function Pn(){if(fc)return fa;fc=1;var e=Xe();function t(o,i,s,a,l){Error.call(this),this.message=o,this.name="AxiosError",i&&(this.code=i),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(o){r[o]={value:o}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(o,i,s,a,l,f){var u=Object.create(n);return e.toFlatObject(o,u,function(d){return d!==Error.prototype}),t.call(u,o.message,i,s,a,l),u.name=o.name,f&&Object.assign(u,f),u},fa=t,fa}var da,dc;function Nd(){return dc||(dc=1,da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),da}var ha,hc;function Ld(){if(hc)return ha;hc=1;var e=Xe();function t(n,r){r=r||new FormData;var o=[];function i(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,l){if(e.isPlainObject(a)||e.isArray(a)){if(o.indexOf(a)!==-1)throw Error("Circular reference detected in "+l);o.push(a),e.forEach(a,function(u,h){if(!e.isUndefined(u)){var d=l?l+"."+h:h,c;if(u&&!l&&typeof u=="object"){if(e.endsWith(h,"{}"))u=JSON.stringify(u);else if(e.endsWith(h,"[]")&&(c=e.toArray(u))){c.forEach(function(p){!e.isUndefined(p)&&r.append(d,i(p))});return}}s(u,d)}}),o.pop()}else r.append(l,i(a))}return s(n),r}return ha=t,ha}var pa,pc;function Ug(){if(pc)return pa;pc=1;var e=Pn();return pa=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))},pa}var ma,mc;function Dg(){if(mc)return ma;mc=1;var e=Xe();return ma=e.isStandardBrowserEnv()?function(){return{write:function(r,o,i,s,a,l){var f=[];f.push(r+"="+encodeURIComponent(o)),e.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ma}var ga,gc;function $g(){return gc||(gc=1,ga=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),ga}var ya,yc;function jg(){return yc||(yc=1,ya=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),ya}var va,vc;function kd(){if(vc)return va;vc=1;var e=$g(),t=jg();return va=function(r,o){return r&&!e(o)?t(r,o):o},va}var Ea,Ec;function Hg(){if(Ec)return Ea;Ec=1;var e=Xe(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ea=function(r){var o={},i,s,a;return r&&e.forEach(r.split(`
|
|
25
|
-
`),function(f){if(a=f.indexOf(":"),i=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},Ea}var _a,_c;function qg(){if(_c)return _a;_c=1;var e=Xe();return _a=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=i(window.location.href),function(a){var l=e.isString(a)?i(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),_a}var ba,bc;function Go(){if(bc)return ba;bc=1;var e=Pn(),t=Xe();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),ba=n,ba}var wa,wc;function Gg(){return wc||(wc=1,wa=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),wa}var Sa,Sc;function Tc(){if(Sc)return Sa;Sc=1;var e=Xe(),t=Ug(),n=Dg(),r=Id(),o=kd(),i=Hg(),s=qg(),a=Nd(),l=Pn(),f=Go(),u=Gg();return Sa=function(d){return new Promise(function(p,m){var _=d.data,T=d.headers,E=d.responseType,b;function A(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var N=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(N+":"+F)}var M=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(M,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function W(){if(w){var j="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,Y=!E||E==="text"||E==="json"?w.responseText:w.response,oe={data:Y,status:w.status,statusText:w.statusText,headers:j,config:d,request:w};t(function(k){p(k),A()},function(k){m(k),A()},oe),w=null}}if("onloadend"in w?w.onloadend=W:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(W)},w.onabort=function(){w&&(m(new l("Request aborted",l.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new l("Network Error",l.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",oe=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new l(Y,oe.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var q=(d.withCredentials||s(M))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;q&&(T[d.xsrfHeaderName]=q)}"setRequestHeader"in w&&e.forEach(T,function(Y,oe){typeof _>"u"&&oe.toLowerCase()==="content-type"?delete T[oe]:w.setRequestHeader(oe,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),E&&E!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(j){w&&(m(!j||j&&j.type?new f:j),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),_||(_=null);var V=u(M);if(V&&["http","https","file"].indexOf(V)===-1){m(new l("Unsupported protocol "+V+":",l.ERR_BAD_REQUEST,d));return}w.send(_)})},Sa}var Ta,Oc;function Wg(){return Oc||(Oc=1,Ta=null),Ta}var Oa,xc;function _u(){if(xc)return Oa;xc=1;var e=Xe(),t=Fg(),n=Pn(),r=Nd(),o=Ld(),i={"Content-Type":"application/x-www-form-urlencoded"};function s(u,h){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=h)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=Tc()),u}function l(u,h,d){if(e.isString(u))try{return(h||JSON.parse)(u),e.trim(u)}catch(c){if(c.name!=="SyntaxError")throw c}return(d||JSON.stringify)(u)}var f={transitional:r,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var c=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||c&&p==="multipart/form-data"){var _=this.env&&this.env.FormData;return o(m?{"files[]":h}:h,_&&new _)}else if(c||p==="application/json")return s(d,"application/json"),l(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,c=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!c&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(_){if(m)throw _.name==="SyntaxError"?n.from(_,n.ERR_BAD_RESPONSE,this,null,this.response):_}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wg()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(i)}),Oa=f,Oa}var xa,Ac;function Vg(){if(Ac)return xa;Ac=1;var e=Xe(),t=_u();return xa=function(r,o,i){var s=this||t;return e.forEach(i,function(l){r=l.call(s,r,o)}),r},xa}var Aa,Cc;function Bd(){return Cc||(Cc=1,Aa=function(t){return!!(t&&t.__CANCEL__)}),Aa}var Ca,Rc;function zg(){if(Rc)return Ca;Rc=1;var e=Xe(),t=Vg(),n=Bd(),r=_u(),o=Go();function i(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new o}return Ca=function(a){i(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(u){delete a.headers[u]});var l=a.adapter||r.adapter;return l(a).then(function(u){return i(a),u.data=t.call(a,u.data,u.headers,a.transformResponse),u},function(u){return n(u)||(i(a),u&&u.response&&(u.response.data=t.call(a,u.response.data,u.response.headers,a.transformResponse))),Promise.reject(u)})},Ca}var Ra,Pc;function Md(){if(Pc)return Ra;Pc=1;var e=Xe();return Ra=function(n,r){r=r||{};var o={};function i(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(n[h],r[h])}function a(h){if(!e.isUndefined(r[h]))return i(void 0,r[h])}function l(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(void 0,r[h])}function f(h){if(h in r)return i(n[h],r[h]);if(h in n)return i(void 0,n[h])}var u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:f};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(d){var c=u[d]||s,p=c(d);e.isUndefined(p)&&c!==f||(o[d]=p)}),o},Ra}var Pa,Ic;function Fd(){return Ic||(Ic=1,Pa={version:"0.27.2"}),Pa}var Ia,Nc;function Yg(){if(Nc)return Ia;Nc=1;var e=Fd().version,t=Pn(),n={};["object","boolean","number","function","string","symbol"].forEach(function(i,s){n[i]=function(l){return typeof l===i||"a"+(s<1?"n ":" ")+i}});var r={};n.transitional=function(s,a,l){function f(u,h){return"[Axios v"+e+"] Transitional option '"+u+"'"+h+(l?". "+l:"")}return function(u,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!r[h]&&(r[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(u,h,d):!0}};function o(i,s,a){if(typeof i!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var l=Object.keys(i),f=l.length;f-- >0;){var u=l[f],h=s[u];if(h){var d=i[u],c=d===void 0||h(d,u,i);if(c!==!0)throw new t("option "+u+" must be "+c,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+u,t.ERR_BAD_OPTION)}}return Ia={assertOptions:o,validators:n},Ia}var Na,Lc;function Kg(){if(Lc)return Na;Lc=1;var e=Xe(),t=Id(),n=Mg(),r=zg(),o=Md(),i=kd(),s=Yg(),a=s.validators;function l(f){this.defaults=f,this.interceptors={request:new n,response:new n}}return l.prototype.request=function(u,h){typeof u=="string"?(h=h||{},h.url=u):h=u||{},h=o(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var c=[],p=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(h)===!1||(p=p&&N.synchronous,c.unshift(N.fulfilled,N.rejected))});var m=[];this.interceptors.response.forEach(function(N){m.push(N.fulfilled,N.rejected)});var _;if(!p){var T=[r,void 0];for(Array.prototype.unshift.apply(T,c),T=T.concat(m),_=Promise.resolve(h);T.length;)_=_.then(T.shift(),T.shift());return _}for(var E=h;c.length;){var b=c.shift(),A=c.shift();try{E=b(E)}catch(w){A(w);break}}try{_=r(E)}catch(w){return Promise.reject(w)}for(;m.length;)_=_.then(m.shift(),m.shift());return _},l.prototype.getUri=function(u){u=o(this.defaults,u);var h=i(u.baseURL,u.url);return t(h,u.params,u.paramsSerializer)},e.forEach(["delete","get","head","options"],function(u){l.prototype[u]=function(h,d){return this.request(o(d||{},{method:u,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(u){function h(d){return function(p,m,_){return this.request(o(_||{},{method:u,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}l.prototype[u]=h(),l.prototype[u+"Form"]=h(!0)}),Na=l,Na}var La,kc;function Qg(){if(kc)return La;kc=1;var e=Go();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,a=o._listeners.length;for(s=0;s<a;s++)o._listeners[s](i);o._listeners=null}}),this.promise.then=function(i){var s,a=new Promise(function(l){o.subscribe(l),s=l}).then(i);return a.cancel=function(){o.unsubscribe(s)},a},n(function(s){o.reason||(o.reason=new e(s),r(o.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},t.prototype.unsubscribe=function(r){if(this._listeners){var o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}},t.source=function(){var r,o=new t(function(s){r=s});return{token:o,cancel:r}},La=t,La}var ka,Bc;function Xg(){return Bc||(Bc=1,ka=function(t){return function(r){return t.apply(null,r)}}),ka}var Ba,Mc;function Jg(){if(Mc)return Ba;Mc=1;var e=Xe();return Ba=function(n){return e.isObject(n)&&n.isAxiosError===!0},Ba}var Fc;function Zg(){if(Fc)return ro.exports;Fc=1;var e=Xe(),t=Pd(),n=Kg(),r=Md(),o=_u();function i(a){var l=new n(a),f=t(n.prototype.request,l);return e.extend(f,n.prototype,l),e.extend(f,l),f.create=function(h){return i(r(a,h))},f}var s=i(o);return s.Axios=n,s.CanceledError=Go(),s.CancelToken=Qg(),s.isCancel=Bd(),s.VERSION=Fd().version,s.toFormData=Ld(),s.AxiosError=Pn(),s.Cancel=s.CanceledError,s.all=function(l){return Promise.all(l)},s.spread=Xg(),s.isAxiosError=Jg(),ro.exports=s,ro.exports.default=s,ro.exports}var Ma,Uc;function Ud(){return Uc||(Uc=1,Ma=Zg()),Ma}var ey=Function.prototype.toString,Fa=Object.create,ty=Object.defineProperty,ry=Object.getOwnPropertyDescriptor,Dc=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,ny=Object.getPrototypeOf,Dd=Object.prototype,iy=Dd.hasOwnProperty,oy=Dd.propertyIsEnumerable,$d=typeof bu=="function",ay=typeof WeakMap=="function",sy=function(){if(ay)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(n){return!!~this._keys.indexOf(n)},t.prototype.get=function(n){return this._values[this._keys.indexOf(n)]},t.prototype.set=function(n,r){this._keys.push(n),this._values.push(r)},t}();return function(){return new e}}(),jd=function(e,t){var n=e.__proto__||ny(e);if(!n)return Fa(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:Fa(n);if(~ey.call(r).indexOf("[native code]"))try{return new r}catch{}return Fa(n)},uy=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i in e)iy.call(e,i)&&(o[i]=n(e[i],r));if($d)for(var s=bu(e),a=0,l=s.length,f=void 0;a<l;++a)f=s[a],oy.call(e,f)&&(o[f]=n(e[f],r));return o},$c=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i=$d?Dc(e).concat(bu(e)):Dc(e),s=0,a=i.length,l=void 0,f=void 0;s<a;++s)if(l=i[s],l!=="callee"&&l!=="caller")if(f=ry(e,l),f){!f.get&&!f.set&&(f.value=n(e[l],r));try{ty(o,l,f)}catch{o[l]=f.value}}else o[l]=n(e[l],r);return o},cy=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ly=Array.isArray,fy=Object.getPrototypeOf,dy=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function yr(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||dy,o=n?$c:uy,i=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var l=s.__proto__||fy(s),f=l&&l.constructor;if(!f||f===r.Object)return o(s,r,i,a);var u;if(ly(s)){if(n)return $c(s,r,i,a);u=new f,a.set(s,u);for(var h=0,d=s.length;h<d;++h)u[h]=i(s[h],a);return u}if(s instanceof r.Date)return new f(s.getTime());if(s instanceof r.RegExp)return u=new f(s.source,s.flags||cy(s)),u.lastIndex=s.lastIndex,u;if(r.Map&&s instanceof r.Map)return u=new f,a.set(s,u),s.forEach(function(c,p){u.set(p,i(c,a))}),u;if(r.Set&&s instanceof r.Set)return u=new f,a.set(s,u),s.forEach(function(c){u.add(i(c,a))}),u;if(r.Blob&&s instanceof r.Blob)return s.slice(0,s.size,s.type);if(r.Buffer&&r.Buffer.isBuffer(s))return u=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,u),s.copy(u),u;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(s))return u=new f(s.buffer.slice(0)),a.set(s,u),u;if(s instanceof r.ArrayBuffer)return u=s.slice(0),a.set(s,u),u}return typeof s.then=="function"||s instanceof Error||r.WeakMap&&s instanceof r.WeakMap||r.WeakSet&&s instanceof r.WeakSet?s:o(s,r,i,a)};return i(e,sy())}yr.default=yr;yr.strict=function(t,n){return yr(t,{isStrict:!0,realm:n?n.realm:void 0})};var hy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},jc=typeof Symbol<"u"&&Symbol,py=hy,my=function(){return typeof jc!="function"||typeof Symbol!="function"||typeof jc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:py()},Hc={foo:{}},gy=Object,yy=function(){return{__proto__:Hc}.foo===Hc.foo&&!({__proto__:null}instanceof gy)},vy="Function.prototype.bind called on incompatible ",Ua=Array.prototype.slice,Ey=Object.prototype.toString,_y="[object Function]",by=function(t){var n=this;if(typeof n!="function"||Ey.call(n)!==_y)throw new TypeError(vy+n);for(var r=Ua.call(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,r.concat(Ua.call(arguments)));return Object(u)===u?u:this}else return n.apply(t,r.concat(Ua.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l<s;l++)a.push("$"+l);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=function(){};f.prototype=n.prototype,o.prototype=new f,f.prototype=null}return o},wy=by,wu=Function.prototype.bind||wy,Sy=wu,Ty=Sy.call(Function.call,Object.prototype.hasOwnProperty),ge,On=SyntaxError,Hd=Function,Tn=TypeError,Da=function(e){try{return Hd('"use strict"; return ('+e+").constructor;")()}catch{}},Kr=Object.getOwnPropertyDescriptor;if(Kr)try{Kr({},"")}catch{Kr=null}var $a=function(){throw new Tn},Oy=Kr?function(){try{return arguments.callee,$a}catch{try{return Kr(arguments,"callee").get}catch{return $a}}}():$a,vn=my(),xy=yy(),We=Object.getPrototypeOf||(xy?function(e){return e.__proto__}:null),bn={},Ay=typeof Uint8Array>"u"||!We?ge:We(Uint8Array),Qr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":vn&&We?We([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":Hd,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vn&&We?We(We([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vn||!We?ge:We(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vn||!We?ge:We(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vn&&We?We(""[Symbol.iterator]()):ge,"%Symbol%":vn?Symbol:ge,"%SyntaxError%":On,"%ThrowTypeError%":Oy,"%TypedArray%":Ay,"%TypeError%":Tn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(We)try{null.error}catch(e){var Cy=We(We(e));Qr["%Error.prototype%"]=Cy}var Ry=function e(t){var n;if(t==="%AsyncFunction%")n=Da("async function () {}");else if(t==="%GeneratorFunction%")n=Da("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Da("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&We&&(n=We(o.prototype))}return Qr[t]=n,n},qc={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Vi=wu,No=Ty,Py=Vi.call(Function.call,Array.prototype.concat),Iy=Vi.call(Function.apply,Array.prototype.splice),Gc=Vi.call(Function.call,String.prototype.replace),Lo=Vi.call(Function.call,String.prototype.slice),Ny=Vi.call(Function.call,RegExp.prototype.exec),Ly=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ky=/\\(\\)?/g,By=function(t){var n=Lo(t,0,1),r=Lo(t,-1);if(n==="%"&&r!=="%")throw new On("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new On("invalid intrinsic syntax, expected opening `%`");var o=[];return Gc(t,Ly,function(i,s,a,l){o[o.length]=a?Gc(l,ky,"$1"):s||i}),o},My=function(t,n){var r=t,o;if(No(qc,r)&&(o=qc[r],r="%"+o[0]+"%"),No(Qr,r)){var i=Qr[r];if(i===bn&&(i=Ry(r)),typeof i>"u"&&!n)throw new Tn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new On("intrinsic "+t+" does not exist!")},Su=function(t,n){if(typeof t!="string"||t.length===0)throw new Tn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Tn('"allowMissing" argument must be a boolean');if(Ny(/^%?[^%]*%?$/,t)===null)throw new On("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=By(t),o=r.length>0?r[0]:"",i=My("%"+o+"%",n),s=i.name,a=i.value,l=!1,f=i.alias;f&&(o=f[0],Iy(r,Py([0,1],f)));for(var u=1,h=!0;u<r.length;u+=1){var d=r[u],c=Lo(d,0,1),p=Lo(d,-1);if((c==='"'||c==="'"||c==="`"||p==='"'||p==="'"||p==="`")&&c!==p)throw new On("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(l=!0),o+="."+d,s="%"+o+"%",No(Qr,s))a=Qr[s];else if(a!=null){if(!(d in a)){if(!n)throw new Tn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Kr&&u+1>=r.length){var m=Kr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=No(a,d),a=a[d];h&&!l&&(Qr[s]=a)}}return a},qd={exports:{}};(function(e){var t=wu,n=Su,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var d=i(t,o,arguments);if(s&&a){var c=s(d,"length");c.configurable&&a(d,"length",{value:1+l(0,h.length-(arguments.length-1))})}return d};var f=function(){return i(t,r,arguments)};a?a(e.exports,"apply",{value:f}):e.exports.apply=f})(qd);var Fy=qd.exports,Gd=Su,Wd=Fy,Uy=Wd(Gd("String.prototype.indexOf")),Dy=function(t,n){var r=Gd(t,!!n);return typeof r=="function"&&Uy(t,".prototype.")>-1?Wd(r):r};const $y={},jy=Object.freeze(Object.defineProperty({__proto__:null,default:$y},Symbol.toStringTag,{value:"Module"})),Hy=Wi(jy);var Tu=typeof Map=="function"&&Map.prototype,ja=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ko=Tu&&ja&&typeof ja.get=="function"?ja.get:null,Wc=Tu&&Map.prototype.forEach,Ou=typeof Set=="function"&&Set.prototype,Ha=Object.getOwnPropertyDescriptor&&Ou?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=Ou&&Ha&&typeof Ha.get=="function"?Ha.get:null,Vc=Ou&&Set.prototype.forEach,qy=typeof WeakMap=="function"&&WeakMap.prototype,Fi=qy?WeakMap.prototype.has:null,Gy=typeof WeakSet=="function"&&WeakSet.prototype,Ui=Gy?WeakSet.prototype.has:null,Wy=typeof WeakRef=="function"&&WeakRef.prototype,zc=Wy?WeakRef.prototype.deref:null,Vy=Boolean.prototype.valueOf,zy=Object.prototype.toString,Yy=Function.prototype.toString,Ky=String.prototype.match,xu=String.prototype.slice,gr=String.prototype.replace,Qy=String.prototype.toUpperCase,Yc=String.prototype.toLowerCase,Vd=RegExp.prototype.test,Kc=Array.prototype.concat,Ut=Array.prototype.join,Xy=Array.prototype.slice,Qc=Math.floor,qs=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qa=Object.getOwnPropertySymbols,Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",et=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xn||"symbol")?Symbol.toStringTag:null,zd=Object.prototype.propertyIsEnumerable,Xc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Jc(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vd.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Qc(-e):Qc(e);if(r!==e){var o=String(r),i=xu.call(t,o.length+1);return gr.call(o,n,"$&_")+"."+gr.call(gr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gr.call(t,n,"$&_")}var Ws=Hy,Zc=Ws.custom,el=Kd(Zc)?Zc:null,Jy=function e(t,n,r,o){var i=n||{};if(mr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(mr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=mr(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(mr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(mr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Xd(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Jc(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return a?Jc(t,f):f}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Vs(t)?"[Array]":"[Object]";var h=gv(i,r);if(typeof o>"u")o=[];else if(Qd(o,t)>=0)return"[Circular]";function d(Y,oe,K){if(oe&&(o=Xy.call(o),o.push(oe)),K){var k={depth:i.depth};return mr(i,"quoteStyle")&&(k.quoteStyle=i.quoteStyle),e(Y,k,r+1,o)}return e(Y,i,r+1,o)}if(typeof t=="function"&&!tl(t)){var c=sv(t),p=no(t,d);return"[Function"+(c?": "+c:" (anonymous)")+"]"+(p.length>0?" { "+Ut.call(p,", ")+" }":"")}if(Kd(t)){var m=xn?gr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Gs.call(t);return typeof t=="object"&&!xn?fi(m):m}if(hv(t)){for(var _="<"+Yc.call(String(t.nodeName)),T=t.attributes||[],E=0;E<T.length;E++)_+=" "+T[E].name+"="+Yd(Zy(T[E].value),"double",i);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Yc.call(String(t.nodeName))+">",_}if(Vs(t)){if(t.length===0)return"[]";var b=no(t,d);return h&&!mv(b)?"["+zs(b,h)+"]":"[ "+Ut.call(b,", ")+" ]"}if(tv(t)){var A=no(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!zd.call(t,"cause")?"{ ["+String(t)+"] "+Ut.call(Kc.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ut.call(A,", ")+" }"}if(typeof t=="object"&&s){if(el&&typeof t[el]=="function"&&Ws)return Ws(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(uv(t)){var w=[];return Wc&&Wc.call(t,function(Y,oe){w.push(d(oe,t,!0)+" => "+d(Y,t))}),rl("Map",ko.call(t),w,h)}if(fv(t)){var N=[];return Vc&&Vc.call(t,function(Y){N.push(d(Y,t))}),rl("Set",Bo.call(t),N,h)}if(cv(t))return Ga("WeakMap");if(dv(t))return Ga("WeakSet");if(lv(t))return Ga("WeakRef");if(nv(t))return fi(d(Number(t)));if(ov(t))return fi(d(qs.call(t)));if(iv(t))return fi(Vy.call(t));if(rv(t))return fi(d(String(t)));if(!ev(t)&&!tl(t)){var F=no(t,d),M=Xc?Xc(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",q=!M&&et&&Object(t)===t&&et in t?xu.call(Er(t),8,-1):W?"Object":"",V=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",j=V+(q||W?"["+Ut.call(Kc.call([],q||[],W||[]),": ")+"] ":"");return F.length===0?j+"{}":h?j+"{"+zs(F,h)+"}":j+"{ "+Ut.call(F,", ")+" }"}return String(t)};function Yd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Zy(e){return gr.call(String(e),/"/g,""")}function Vs(e){return Er(e)==="[object Array]"&&(!et||!(typeof e=="object"&&et in e))}function ev(e){return Er(e)==="[object Date]"&&(!et||!(typeof e=="object"&&et in e))}function tl(e){return Er(e)==="[object RegExp]"&&(!et||!(typeof e=="object"&&et in e))}function tv(e){return Er(e)==="[object Error]"&&(!et||!(typeof e=="object"&&et in e))}function rv(e){return Er(e)==="[object String]"&&(!et||!(typeof e=="object"&&et in e))}function nv(e){return Er(e)==="[object Number]"&&(!et||!(typeof e=="object"&&et in e))}function iv(e){return Er(e)==="[object Boolean]"&&(!et||!(typeof e=="object"&&et in e))}function Kd(e){if(xn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Gs)return!1;try{return Gs.call(e),!0}catch{}return!1}function ov(e){if(!e||typeof e!="object"||!qs)return!1;try{return qs.call(e),!0}catch{}return!1}var av=Object.prototype.hasOwnProperty||function(e){return e in this};function mr(e,t){return av.call(e,t)}function Er(e){return zy.call(e)}function sv(e){if(e.name)return e.name;var t=Ky.call(Yy.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Qd(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function uv(e){if(!ko||!e||typeof e!="object")return!1;try{ko.call(e);try{Bo.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function cv(e){if(!Fi||!e||typeof e!="object")return!1;try{Fi.call(e,Fi);try{Ui.call(e,Ui)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function lv(e){if(!zc||!e||typeof e!="object")return!1;try{return zc.call(e),!0}catch{}return!1}function fv(e){if(!Bo||!e||typeof e!="object")return!1;try{Bo.call(e);try{ko.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function dv(e){if(!Ui||!e||typeof e!="object")return!1;try{Ui.call(e,Ui);try{Fi.call(e,Fi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hv(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Xd(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Xd(xu.call(e,0,t.maxStringLength),t)+r}var o=gr.call(gr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,pv);return Yd(o,"single",t)}function pv(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Qy.call(t.toString(16))}function fi(e){return"Object("+e+")"}function Ga(e){return e+" { ? }"}function rl(e,t,n,r){var o=r?zs(n,r):Ut.call(n,", ");return e+" ("+t+") {"+o+"}"}function mv(e){for(var t=0;t<e.length;t++)if(Qd(e[t],`
|
|
24
|
+
*/var oc;function Pg(){return oc||(oc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,c=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===r||te===f||te===i||te===o||te===h||te===d||typeof te=="object"&&te!==null&&(te.$$typeof===p||te.$$typeof===c||te.$$typeof===s||te.$$typeof===a||te.$$typeof===u||te.$$typeof===_||te.$$typeof===T||te.$$typeof===E||te.$$typeof===m)}function A(te){if(typeof te=="object"&&te!==null){var ze=te.$$typeof;switch(ze){case t:var De=te.type;switch(De){case l:case f:case r:case i:case o:case h:return De;default:var bt=De&&De.$$typeof;switch(bt){case a:case u:case p:case c:case s:return bt;default:return ze}}case n:return ze}}}var w=l,N=f,F=a,M=s,q=t,W=u,V=r,j=p,Y=c,oe=n,K=i,k=o,z=h,J=!1;function de(te){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),X(te)||A(te)===l}function X(te){return A(te)===f}function ee(te){return A(te)===a}function ue(te){return A(te)===s}function ce(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function Ve(te){return A(te)===u}function Q(te){return A(te)===r}function re(te){return A(te)===p}function Pe(te){return A(te)===c}function xe(te){return A(te)===n}function at(te){return A(te)===i}function ct(te){return A(te)===o}function _t(te){return A(te)===h}Ce.AsyncMode=w,Ce.ConcurrentMode=N,Ce.ContextConsumer=F,Ce.ContextProvider=M,Ce.Element=q,Ce.ForwardRef=W,Ce.Fragment=V,Ce.Lazy=j,Ce.Memo=Y,Ce.Portal=oe,Ce.Profiler=K,Ce.StrictMode=k,Ce.Suspense=z,Ce.isAsyncMode=de,Ce.isConcurrentMode=X,Ce.isContextConsumer=ee,Ce.isContextProvider=ue,Ce.isElement=ce,Ce.isForwardRef=Ve,Ce.isFragment=Q,Ce.isLazy=re,Ce.isMemo=Pe,Ce.isPortal=xe,Ce.isProfiler=at,Ce.isStrictMode=ct,Ce.isSuspense=_t,Ce.isValidElementType=b,Ce.typeOf=A}()),Ce}process.env.NODE_ENV==="production"?Hs.exports=Rg():Hs.exports=Pg();var Ig=Hs.exports,xd=Ig,Ng={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Lg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ad={};Ad[xd.ForwardRef]=Ng;Ad[xd.Memo]=Lg;function kg(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Cd(e){const t=G.useContext(Ag);if(!t)throw new Error("Missing <CookiesProvider>");const[n,r]=G.useState(()=>t.getAll());kg()&&G.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Bg(e||null,l,n)&&r(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,n]);const o=G.useMemo(()=>t.set.bind(t),[t]),i=G.useMemo(()=>t.remove.bind(t),[t]),s=G.useMemo(()=>t.update.bind(t),[t]);return[n,o,i,s]}function Bg(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var Rd={exports:{}},oa={exports:{}},to={},ro={exports:{}},aa,ac;function Pd(){return ac||(ac=1,aa=function(t,n){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return t.apply(n,o)}}),aa}var sa,sc;function Xe(){if(sc)return sa;sc=1;var e=Pd(),t=Object.prototype.toString,n=function(k){return function(z){var J=t.call(z);return k[J]||(k[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function r(k){return k=k.toLowerCase(),function(J){return n(J)===k}}function o(k){return Array.isArray(k)}function i(k){return typeof k>"u"}function s(k){return k!==null&&!i(k)&&k.constructor!==null&&!i(k.constructor)&&typeof k.constructor.isBuffer=="function"&&k.constructor.isBuffer(k)}var a=r("ArrayBuffer");function l(k){var z;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?z=ArrayBuffer.isView(k):z=k&&k.buffer&&a(k.buffer),z}function f(k){return typeof k=="string"}function u(k){return typeof k=="number"}function h(k){return k!==null&&typeof k=="object"}function d(k){if(n(k)!=="object")return!1;var z=Object.getPrototypeOf(k);return z===null||z===Object.prototype}var c=r("Date"),p=r("File"),m=r("Blob"),_=r("FileList");function T(k){return t.call(k)==="[object Function]"}function E(k){return h(k)&&T(k.pipe)}function b(k){var z="[object FormData]";return k&&(typeof FormData=="function"&&k instanceof FormData||t.call(k)===z||T(k.toString)&&k.toString()===z)}var A=r("URLSearchParams");function w(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function N(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(k,z){if(!(k===null||typeof k>"u"))if(typeof k!="object"&&(k=[k]),o(k))for(var J=0,de=k.length;J<de;J++)z.call(null,k[J],J,k);else for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&z.call(null,k[X],X,k)}function M(){var k={};function z(X,ee){d(k[ee])&&d(X)?k[ee]=M(k[ee],X):d(X)?k[ee]=M({},X):o(X)?k[ee]=X.slice():k[ee]=X}for(var J=0,de=arguments.length;J<de;J++)F(arguments[J],z);return k}function q(k,z,J){return F(z,function(X,ee){J&&typeof X=="function"?k[ee]=e(X,J):k[ee]=X}),k}function W(k){return k.charCodeAt(0)===65279&&(k=k.slice(1)),k}function V(k,z,J,de){k.prototype=Object.create(z.prototype,de),k.prototype.constructor=k,J&&Object.assign(k.prototype,J)}function j(k,z,J){var de,X,ee,ue={};z=z||{};do{for(de=Object.getOwnPropertyNames(k),X=de.length;X-- >0;)ee=de[X],ue[ee]||(z[ee]=k[ee],ue[ee]=!0);k=Object.getPrototypeOf(k)}while(k&&(!J||J(k,z))&&k!==Object.prototype);return z}function Y(k,z,J){k=String(k),(J===void 0||J>k.length)&&(J=k.length),J-=z.length;var de=k.indexOf(z,J);return de!==-1&&de===J}function oe(k){if(!k)return null;var z=k.length;if(i(z))return null;for(var J=new Array(z);z-- >0;)J[z]=k[z];return J}var K=function(k){return function(z){return k&&z instanceof k}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return sa={isArray:o,isArrayBuffer:a,isBuffer:s,isFormData:b,isArrayBufferView:l,isString:f,isNumber:u,isObject:h,isPlainObject:d,isUndefined:i,isDate:c,isFile:p,isBlob:m,isFunction:T,isStream:E,isURLSearchParams:A,isStandardBrowserEnv:N,forEach:F,merge:M,extend:q,trim:w,stripBOM:W,inherits:V,toFlatObject:j,kindOf:n,kindOfTest:r,endsWith:Y,toArray:oe,isTypedArray:K,isFileList:_},sa}var ua,uc;function Id(){if(uc)return ua;uc=1;var e=Xe();function t(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return ua=function(r,o,i){if(!o)return r;var s;if(i)s=i(o);else if(e.isURLSearchParams(o))s=o.toString();else{var a=[];e.forEach(o,function(u,h){u===null||typeof u>"u"||(e.isArray(u)?h=h+"[]":u=[u],e.forEach(u,function(c){e.isDate(c)?c=c.toISOString():e.isObject(c)&&(c=JSON.stringify(c)),a.push(t(h)+"="+t(c))}))}),s=a.join("&")}if(s){var l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},ua}var ca,cc;function Mg(){if(cc)return ca;cc=1;var e=Xe();function t(){this.handlers=[]}return t.prototype.use=function(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},t.prototype.forEach=function(r){e.forEach(this.handlers,function(i){i!==null&&r(i)})},ca=t,ca}var la,lc;function Fg(){if(lc)return la;lc=1;var e=Xe();return la=function(n,r){e.forEach(n,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(n[r]=i,delete n[s])})},la}var fa,fc;function Pn(){if(fc)return fa;fc=1;var e=Xe();function t(o,i,s,a,l){Error.call(this),this.message=o,this.name="AxiosError",i&&(this.code=i),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var n=t.prototype,r={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(o){r[o]={value:o}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(o,i,s,a,l,f){var u=Object.create(n);return e.toFlatObject(o,u,function(d){return d!==Error.prototype}),t.call(u,o.message,i,s,a,l),u.name=o.name,f&&Object.assign(u,f),u},fa=t,fa}var da,dc;function Nd(){return dc||(dc=1,da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),da}var ha,hc;function Ld(){if(hc)return ha;hc=1;var e=Xe();function t(n,r){r=r||new FormData;var o=[];function i(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,l){if(e.isPlainObject(a)||e.isArray(a)){if(o.indexOf(a)!==-1)throw Error("Circular reference detected in "+l);o.push(a),e.forEach(a,function(u,h){if(!e.isUndefined(u)){var d=l?l+"."+h:h,c;if(u&&!l&&typeof u=="object"){if(e.endsWith(h,"{}"))u=JSON.stringify(u);else if(e.endsWith(h,"[]")&&(c=e.toArray(u))){c.forEach(function(p){!e.isUndefined(p)&&r.append(d,i(p))});return}}s(u,d)}}),o.pop()}else r.append(l,i(a))}return s(n),r}return ha=t,ha}var pa,pc;function Ug(){if(pc)return pa;pc=1;var e=Pn();return pa=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))},pa}var ma,mc;function Dg(){if(mc)return ma;mc=1;var e=Xe();return ma=e.isStandardBrowserEnv()?function(){return{write:function(r,o,i,s,a,l){var f=[];f.push(r+"="+encodeURIComponent(o)),e.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ma}var ga,gc;function $g(){return gc||(gc=1,ga=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),ga}var ya,yc;function jg(){return yc||(yc=1,ya=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),ya}var va,vc;function kd(){if(vc)return va;vc=1;var e=$g(),t=jg();return va=function(r,o){return r&&!e(o)?t(r,o):o},va}var Ea,Ec;function Hg(){if(Ec)return Ea;Ec=1;var e=Xe(),t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ea=function(r){var o={},i,s,a;return r&&e.forEach(r.split(`
|
|
25
|
+
`),function(f){if(a=f.indexOf(":"),i=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},Ea}var _a,_c;function qg(){if(_c)return _a;_c=1;var e=Xe();return _a=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=i(window.location.href),function(a){var l=e.isString(a)?i(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),_a}var ba,bc;function Go(){if(bc)return ba;bc=1;var e=Pn(),t=Xe();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),ba=n,ba}var wa,wc;function Gg(){return wc||(wc=1,wa=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),wa}var Sa,Sc;function Tc(){if(Sc)return Sa;Sc=1;var e=Xe(),t=Ug(),n=Dg(),r=Id(),o=kd(),i=Hg(),s=qg(),a=Nd(),l=Pn(),f=Go(),u=Gg();return Sa=function(d){return new Promise(function(p,m){var _=d.data,T=d.headers,E=d.responseType,b;function A(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var N=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(N+":"+F)}var M=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(M,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function q(){if(w){var j="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,Y=!E||E==="text"||E==="json"?w.responseText:w.response,oe={data:Y,status:w.status,statusText:w.statusText,headers:j,config:d,request:w};t(function(k){p(k),A()},function(k){m(k),A()},oe),w=null}}if("onloadend"in w?w.onloadend=q:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(q)},w.onabort=function(){w&&(m(new l("Request aborted",l.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new l("Network Error",l.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",oe=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new l(Y,oe.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var W=(d.withCredentials||s(M))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;W&&(T[d.xsrfHeaderName]=W)}"setRequestHeader"in w&&e.forEach(T,function(Y,oe){typeof _>"u"&&oe.toLowerCase()==="content-type"?delete T[oe]:w.setRequestHeader(oe,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),E&&E!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(j){w&&(m(!j||j&&j.type?new f:j),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),_||(_=null);var V=u(M);if(V&&["http","https","file"].indexOf(V)===-1){m(new l("Unsupported protocol "+V+":",l.ERR_BAD_REQUEST,d));return}w.send(_)})},Sa}var Ta,Oc;function Wg(){return Oc||(Oc=1,Ta=null),Ta}var Oa,xc;function _u(){if(xc)return Oa;xc=1;var e=Xe(),t=Fg(),n=Pn(),r=Nd(),o=Ld(),i={"Content-Type":"application/x-www-form-urlencoded"};function s(u,h){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=h)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=Tc()),u}function l(u,h,d){if(e.isString(u))try{return(h||JSON.parse)(u),e.trim(u)}catch(c){if(c.name!=="SyntaxError")throw c}return(d||JSON.stringify)(u)}var f={transitional:r,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var c=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||c&&p==="multipart/form-data"){var _=this.env&&this.env.FormData;return o(m?{"files[]":h}:h,_&&new _)}else if(c||p==="application/json")return s(d,"application/json"),l(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,c=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!c&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(_){if(m)throw _.name==="SyntaxError"?n.from(_,n.ERR_BAD_RESPONSE,this,null,this.response):_}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wg()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(i)}),Oa=f,Oa}var xa,Ac;function Vg(){if(Ac)return xa;Ac=1;var e=Xe(),t=_u();return xa=function(r,o,i){var s=this||t;return e.forEach(i,function(l){r=l.call(s,r,o)}),r},xa}var Aa,Cc;function Bd(){return Cc||(Cc=1,Aa=function(t){return!!(t&&t.__CANCEL__)}),Aa}var Ca,Rc;function zg(){if(Rc)return Ca;Rc=1;var e=Xe(),t=Vg(),n=Bd(),r=_u(),o=Go();function i(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new o}return Ca=function(a){i(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(u){delete a.headers[u]});var l=a.adapter||r.adapter;return l(a).then(function(u){return i(a),u.data=t.call(a,u.data,u.headers,a.transformResponse),u},function(u){return n(u)||(i(a),u&&u.response&&(u.response.data=t.call(a,u.response.data,u.response.headers,a.transformResponse))),Promise.reject(u)})},Ca}var Ra,Pc;function Md(){if(Pc)return Ra;Pc=1;var e=Xe();return Ra=function(n,r){r=r||{};var o={};function i(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(n[h],r[h])}function a(h){if(!e.isUndefined(r[h]))return i(void 0,r[h])}function l(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(void 0,r[h])}function f(h){if(h in r)return i(n[h],r[h]);if(h in n)return i(void 0,n[h])}var u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:f};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(d){var c=u[d]||s,p=c(d);e.isUndefined(p)&&c!==f||(o[d]=p)}),o},Ra}var Pa,Ic;function Fd(){return Ic||(Ic=1,Pa={version:"0.27.2"}),Pa}var Ia,Nc;function Yg(){if(Nc)return Ia;Nc=1;var e=Fd().version,t=Pn(),n={};["object","boolean","number","function","string","symbol"].forEach(function(i,s){n[i]=function(l){return typeof l===i||"a"+(s<1?"n ":" ")+i}});var r={};n.transitional=function(s,a,l){function f(u,h){return"[Axios v"+e+"] Transitional option '"+u+"'"+h+(l?". "+l:"")}return function(u,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!r[h]&&(r[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(u,h,d):!0}};function o(i,s,a){if(typeof i!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var l=Object.keys(i),f=l.length;f-- >0;){var u=l[f],h=s[u];if(h){var d=i[u],c=d===void 0||h(d,u,i);if(c!==!0)throw new t("option "+u+" must be "+c,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+u,t.ERR_BAD_OPTION)}}return Ia={assertOptions:o,validators:n},Ia}var Na,Lc;function Kg(){if(Lc)return Na;Lc=1;var e=Xe(),t=Id(),n=Mg(),r=zg(),o=Md(),i=kd(),s=Yg(),a=s.validators;function l(f){this.defaults=f,this.interceptors={request:new n,response:new n}}return l.prototype.request=function(u,h){typeof u=="string"?(h=h||{},h.url=u):h=u||{},h=o(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var c=[],p=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(h)===!1||(p=p&&N.synchronous,c.unshift(N.fulfilled,N.rejected))});var m=[];this.interceptors.response.forEach(function(N){m.push(N.fulfilled,N.rejected)});var _;if(!p){var T=[r,void 0];for(Array.prototype.unshift.apply(T,c),T=T.concat(m),_=Promise.resolve(h);T.length;)_=_.then(T.shift(),T.shift());return _}for(var E=h;c.length;){var b=c.shift(),A=c.shift();try{E=b(E)}catch(w){A(w);break}}try{_=r(E)}catch(w){return Promise.reject(w)}for(;m.length;)_=_.then(m.shift(),m.shift());return _},l.prototype.getUri=function(u){u=o(this.defaults,u);var h=i(u.baseURL,u.url);return t(h,u.params,u.paramsSerializer)},e.forEach(["delete","get","head","options"],function(u){l.prototype[u]=function(h,d){return this.request(o(d||{},{method:u,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(u){function h(d){return function(p,m,_){return this.request(o(_||{},{method:u,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}l.prototype[u]=h(),l.prototype[u+"Form"]=h(!0)}),Na=l,Na}var La,kc;function Qg(){if(kc)return La;kc=1;var e=Go();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,a=o._listeners.length;for(s=0;s<a;s++)o._listeners[s](i);o._listeners=null}}),this.promise.then=function(i){var s,a=new Promise(function(l){o.subscribe(l),s=l}).then(i);return a.cancel=function(){o.unsubscribe(s)},a},n(function(s){o.reason||(o.reason=new e(s),r(o.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},t.prototype.unsubscribe=function(r){if(this._listeners){var o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}},t.source=function(){var r,o=new t(function(s){r=s});return{token:o,cancel:r}},La=t,La}var ka,Bc;function Xg(){return Bc||(Bc=1,ka=function(t){return function(r){return t.apply(null,r)}}),ka}var Ba,Mc;function Jg(){if(Mc)return Ba;Mc=1;var e=Xe();return Ba=function(n){return e.isObject(n)&&n.isAxiosError===!0},Ba}var Fc;function Zg(){if(Fc)return ro.exports;Fc=1;var e=Xe(),t=Pd(),n=Kg(),r=Md(),o=_u();function i(a){var l=new n(a),f=t(n.prototype.request,l);return e.extend(f,n.prototype,l),e.extend(f,l),f.create=function(h){return i(r(a,h))},f}var s=i(o);return s.Axios=n,s.CanceledError=Go(),s.CancelToken=Qg(),s.isCancel=Bd(),s.VERSION=Fd().version,s.toFormData=Ld(),s.AxiosError=Pn(),s.Cancel=s.CanceledError,s.all=function(l){return Promise.all(l)},s.spread=Xg(),s.isAxiosError=Jg(),ro.exports=s,ro.exports.default=s,ro.exports}var Ma,Uc;function Ud(){return Uc||(Uc=1,Ma=Zg()),Ma}var ey=Function.prototype.toString,Fa=Object.create,ty=Object.defineProperty,ry=Object.getOwnPropertyDescriptor,Dc=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,ny=Object.getPrototypeOf,Dd=Object.prototype,iy=Dd.hasOwnProperty,oy=Dd.propertyIsEnumerable,$d=typeof bu=="function",ay=typeof WeakMap=="function",sy=function(){if(ay)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(n){return!!~this._keys.indexOf(n)},t.prototype.get=function(n){return this._values[this._keys.indexOf(n)]},t.prototype.set=function(n,r){this._keys.push(n),this._values.push(r)},t}();return function(){return new e}}(),jd=function(e,t){var n=e.__proto__||ny(e);if(!n)return Fa(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:Fa(n);if(~ey.call(r).indexOf("[native code]"))try{return new r}catch{}return Fa(n)},uy=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i in e)iy.call(e,i)&&(o[i]=n(e[i],r));if($d)for(var s=bu(e),a=0,l=s.length,f=void 0;a<l;++a)f=s[a],oy.call(e,f)&&(o[f]=n(e[f],r));return o},$c=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i=$d?Dc(e).concat(bu(e)):Dc(e),s=0,a=i.length,l=void 0,f=void 0;s<a;++s)if(l=i[s],l!=="callee"&&l!=="caller")if(f=ry(e,l),f){!f.get&&!f.set&&(f.value=n(e[l],r));try{ty(o,l,f)}catch{o[l]=f.value}}else o[l]=n(e[l],r);return o},cy=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},ly=Array.isArray,fy=Object.getPrototypeOf,dy=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function yr(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||dy,o=n?$c:uy,i=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var l=s.__proto__||fy(s),f=l&&l.constructor;if(!f||f===r.Object)return o(s,r,i,a);var u;if(ly(s)){if(n)return $c(s,r,i,a);u=new f,a.set(s,u);for(var h=0,d=s.length;h<d;++h)u[h]=i(s[h],a);return u}if(s instanceof r.Date)return new f(s.getTime());if(s instanceof r.RegExp)return u=new f(s.source,s.flags||cy(s)),u.lastIndex=s.lastIndex,u;if(r.Map&&s instanceof r.Map)return u=new f,a.set(s,u),s.forEach(function(c,p){u.set(p,i(c,a))}),u;if(r.Set&&s instanceof r.Set)return u=new f,a.set(s,u),s.forEach(function(c){u.add(i(c,a))}),u;if(r.Blob&&s instanceof r.Blob)return s.slice(0,s.size,s.type);if(r.Buffer&&r.Buffer.isBuffer(s))return u=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,u),s.copy(u),u;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(s))return u=new f(s.buffer.slice(0)),a.set(s,u),u;if(s instanceof r.ArrayBuffer)return u=s.slice(0),a.set(s,u),u}return typeof s.then=="function"||s instanceof Error||r.WeakMap&&s instanceof r.WeakMap||r.WeakSet&&s instanceof r.WeakSet?s:o(s,r,i,a)};return i(e,sy())}yr.default=yr;yr.strict=function(t,n){return yr(t,{isStrict:!0,realm:n?n.realm:void 0})};var hy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},jc=typeof Symbol<"u"&&Symbol,py=hy,my=function(){return typeof jc!="function"||typeof Symbol!="function"||typeof jc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:py()},Hc={foo:{}},gy=Object,yy=function(){return{__proto__:Hc}.foo===Hc.foo&&!({__proto__:null}instanceof gy)},vy="Function.prototype.bind called on incompatible ",Ua=Array.prototype.slice,Ey=Object.prototype.toString,_y="[object Function]",by=function(t){var n=this;if(typeof n!="function"||Ey.call(n)!==_y)throw new TypeError(vy+n);for(var r=Ua.call(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,r.concat(Ua.call(arguments)));return Object(u)===u?u:this}else return n.apply(t,r.concat(Ua.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l<s;l++)a.push("$"+l);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=function(){};f.prototype=n.prototype,o.prototype=new f,f.prototype=null}return o},wy=by,wu=Function.prototype.bind||wy,Sy=wu,Ty=Sy.call(Function.call,Object.prototype.hasOwnProperty),ge,On=SyntaxError,Hd=Function,Tn=TypeError,Da=function(e){try{return Hd('"use strict"; return ('+e+").constructor;")()}catch{}},Kr=Object.getOwnPropertyDescriptor;if(Kr)try{Kr({},"")}catch{Kr=null}var $a=function(){throw new Tn},Oy=Kr?function(){try{return arguments.callee,$a}catch{try{return Kr(arguments,"callee").get}catch{return $a}}}():$a,vn=my(),xy=yy(),We=Object.getPrototypeOf||(xy?function(e){return e.__proto__}:null),bn={},Ay=typeof Uint8Array>"u"||!We?ge:We(Uint8Array),Qr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":vn&&We?We([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":Hd,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vn&&We?We(We([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vn||!We?ge:We(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vn||!We?ge:We(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vn&&We?We(""[Symbol.iterator]()):ge,"%Symbol%":vn?Symbol:ge,"%SyntaxError%":On,"%ThrowTypeError%":Oy,"%TypedArray%":Ay,"%TypeError%":Tn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(We)try{null.error}catch(e){var Cy=We(We(e));Qr["%Error.prototype%"]=Cy}var Ry=function e(t){var n;if(t==="%AsyncFunction%")n=Da("async function () {}");else if(t==="%GeneratorFunction%")n=Da("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Da("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&We&&(n=We(o.prototype))}return Qr[t]=n,n},qc={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Vi=wu,No=Ty,Py=Vi.call(Function.call,Array.prototype.concat),Iy=Vi.call(Function.apply,Array.prototype.splice),Gc=Vi.call(Function.call,String.prototype.replace),Lo=Vi.call(Function.call,String.prototype.slice),Ny=Vi.call(Function.call,RegExp.prototype.exec),Ly=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ky=/\\(\\)?/g,By=function(t){var n=Lo(t,0,1),r=Lo(t,-1);if(n==="%"&&r!=="%")throw new On("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new On("invalid intrinsic syntax, expected opening `%`");var o=[];return Gc(t,Ly,function(i,s,a,l){o[o.length]=a?Gc(l,ky,"$1"):s||i}),o},My=function(t,n){var r=t,o;if(No(qc,r)&&(o=qc[r],r="%"+o[0]+"%"),No(Qr,r)){var i=Qr[r];if(i===bn&&(i=Ry(r)),typeof i>"u"&&!n)throw new Tn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new On("intrinsic "+t+" does not exist!")},Su=function(t,n){if(typeof t!="string"||t.length===0)throw new Tn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Tn('"allowMissing" argument must be a boolean');if(Ny(/^%?[^%]*%?$/,t)===null)throw new On("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=By(t),o=r.length>0?r[0]:"",i=My("%"+o+"%",n),s=i.name,a=i.value,l=!1,f=i.alias;f&&(o=f[0],Iy(r,Py([0,1],f)));for(var u=1,h=!0;u<r.length;u+=1){var d=r[u],c=Lo(d,0,1),p=Lo(d,-1);if((c==='"'||c==="'"||c==="`"||p==='"'||p==="'"||p==="`")&&c!==p)throw new On("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(l=!0),o+="."+d,s="%"+o+"%",No(Qr,s))a=Qr[s];else if(a!=null){if(!(d in a)){if(!n)throw new Tn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Kr&&u+1>=r.length){var m=Kr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=No(a,d),a=a[d];h&&!l&&(Qr[s]=a)}}return a},qd={exports:{}};(function(e){var t=wu,n=Su,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var d=i(t,o,arguments);if(s&&a){var c=s(d,"length");c.configurable&&a(d,"length",{value:1+l(0,h.length-(arguments.length-1))})}return d};var f=function(){return i(t,r,arguments)};a?a(e.exports,"apply",{value:f}):e.exports.apply=f})(qd);var Fy=qd.exports,Gd=Su,Wd=Fy,Uy=Wd(Gd("String.prototype.indexOf")),Dy=function(t,n){var r=Gd(t,!!n);return typeof r=="function"&&Uy(t,".prototype.")>-1?Wd(r):r};const $y={},jy=Object.freeze(Object.defineProperty({__proto__:null,default:$y},Symbol.toStringTag,{value:"Module"})),Hy=Wi(jy);var Tu=typeof Map=="function"&&Map.prototype,ja=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ko=Tu&&ja&&typeof ja.get=="function"?ja.get:null,Wc=Tu&&Map.prototype.forEach,Ou=typeof Set=="function"&&Set.prototype,Ha=Object.getOwnPropertyDescriptor&&Ou?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=Ou&&Ha&&typeof Ha.get=="function"?Ha.get:null,Vc=Ou&&Set.prototype.forEach,qy=typeof WeakMap=="function"&&WeakMap.prototype,Fi=qy?WeakMap.prototype.has:null,Gy=typeof WeakSet=="function"&&WeakSet.prototype,Ui=Gy?WeakSet.prototype.has:null,Wy=typeof WeakRef=="function"&&WeakRef.prototype,zc=Wy?WeakRef.prototype.deref:null,Vy=Boolean.prototype.valueOf,zy=Object.prototype.toString,Yy=Function.prototype.toString,Ky=String.prototype.match,xu=String.prototype.slice,gr=String.prototype.replace,Qy=String.prototype.toUpperCase,Yc=String.prototype.toLowerCase,Vd=RegExp.prototype.test,Kc=Array.prototype.concat,Ut=Array.prototype.join,Xy=Array.prototype.slice,Qc=Math.floor,qs=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qa=Object.getOwnPropertySymbols,Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",et=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xn||"symbol")?Symbol.toStringTag:null,zd=Object.prototype.propertyIsEnumerable,Xc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Jc(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vd.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Qc(-e):Qc(e);if(r!==e){var o=String(r),i=xu.call(t,o.length+1);return gr.call(o,n,"$&_")+"."+gr.call(gr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gr.call(t,n,"$&_")}var Ws=Hy,Zc=Ws.custom,el=Kd(Zc)?Zc:null,Jy=function e(t,n,r,o){var i=n||{};if(mr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(mr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=mr(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(mr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(mr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Xd(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Jc(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return a?Jc(t,f):f}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Vs(t)?"[Array]":"[Object]";var h=gv(i,r);if(typeof o>"u")o=[];else if(Qd(o,t)>=0)return"[Circular]";function d(Y,oe,K){if(oe&&(o=Xy.call(o),o.push(oe)),K){var k={depth:i.depth};return mr(i,"quoteStyle")&&(k.quoteStyle=i.quoteStyle),e(Y,k,r+1,o)}return e(Y,i,r+1,o)}if(typeof t=="function"&&!tl(t)){var c=sv(t),p=no(t,d);return"[Function"+(c?": "+c:" (anonymous)")+"]"+(p.length>0?" { "+Ut.call(p,", ")+" }":"")}if(Kd(t)){var m=xn?gr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Gs.call(t);return typeof t=="object"&&!xn?fi(m):m}if(hv(t)){for(var _="<"+Yc.call(String(t.nodeName)),T=t.attributes||[],E=0;E<T.length;E++)_+=" "+T[E].name+"="+Yd(Zy(T[E].value),"double",i);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Yc.call(String(t.nodeName))+">",_}if(Vs(t)){if(t.length===0)return"[]";var b=no(t,d);return h&&!mv(b)?"["+zs(b,h)+"]":"[ "+Ut.call(b,", ")+" ]"}if(tv(t)){var A=no(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!zd.call(t,"cause")?"{ ["+String(t)+"] "+Ut.call(Kc.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ut.call(A,", ")+" }"}if(typeof t=="object"&&s){if(el&&typeof t[el]=="function"&&Ws)return Ws(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(uv(t)){var w=[];return Wc&&Wc.call(t,function(Y,oe){w.push(d(oe,t,!0)+" => "+d(Y,t))}),rl("Map",ko.call(t),w,h)}if(fv(t)){var N=[];return Vc&&Vc.call(t,function(Y){N.push(d(Y,t))}),rl("Set",Bo.call(t),N,h)}if(cv(t))return Ga("WeakMap");if(dv(t))return Ga("WeakSet");if(lv(t))return Ga("WeakRef");if(nv(t))return fi(d(Number(t)));if(ov(t))return fi(d(qs.call(t)));if(iv(t))return fi(Vy.call(t));if(rv(t))return fi(d(String(t)));if(!ev(t)&&!tl(t)){var F=no(t,d),M=Xc?Xc(t)===Object.prototype:t instanceof Object||t.constructor===Object,q=t instanceof Object?"":"null prototype",W=!M&&et&&Object(t)===t&&et in t?xu.call(Er(t),8,-1):q?"Object":"",V=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",j=V+(W||q?"["+Ut.call(Kc.call([],W||[],q||[]),": ")+"] ":"");return F.length===0?j+"{}":h?j+"{"+zs(F,h)+"}":j+"{ "+Ut.call(F,", ")+" }"}return String(t)};function Yd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Zy(e){return gr.call(String(e),/"/g,""")}function Vs(e){return Er(e)==="[object Array]"&&(!et||!(typeof e=="object"&&et in e))}function ev(e){return Er(e)==="[object Date]"&&(!et||!(typeof e=="object"&&et in e))}function tl(e){return Er(e)==="[object RegExp]"&&(!et||!(typeof e=="object"&&et in e))}function tv(e){return Er(e)==="[object Error]"&&(!et||!(typeof e=="object"&&et in e))}function rv(e){return Er(e)==="[object String]"&&(!et||!(typeof e=="object"&&et in e))}function nv(e){return Er(e)==="[object Number]"&&(!et||!(typeof e=="object"&&et in e))}function iv(e){return Er(e)==="[object Boolean]"&&(!et||!(typeof e=="object"&&et in e))}function Kd(e){if(xn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Gs)return!1;try{return Gs.call(e),!0}catch{}return!1}function ov(e){if(!e||typeof e!="object"||!qs)return!1;try{return qs.call(e),!0}catch{}return!1}var av=Object.prototype.hasOwnProperty||function(e){return e in this};function mr(e,t){return av.call(e,t)}function Er(e){return zy.call(e)}function sv(e){if(e.name)return e.name;var t=Ky.call(Yy.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Qd(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function uv(e){if(!ko||!e||typeof e!="object")return!1;try{ko.call(e);try{Bo.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function cv(e){if(!Fi||!e||typeof e!="object")return!1;try{Fi.call(e,Fi);try{Ui.call(e,Ui)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function lv(e){if(!zc||!e||typeof e!="object")return!1;try{return zc.call(e),!0}catch{}return!1}function fv(e){if(!Bo||!e||typeof e!="object")return!1;try{Bo.call(e);try{ko.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function dv(e){if(!Ui||!e||typeof e!="object")return!1;try{Ui.call(e,Ui);try{Fi.call(e,Fi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hv(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Xd(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Xd(xu.call(e,0,t.maxStringLength),t)+r}var o=gr.call(gr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,pv);return Yd(o,"single",t)}function pv(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Qy.call(t.toString(16))}function fi(e){return"Object("+e+")"}function Ga(e){return e+" { ? }"}function rl(e,t,n,r){var o=r?zs(n,r):Ut.call(n,", ");return e+" ("+t+") {"+o+"}"}function mv(e){for(var t=0;t<e.length;t++)if(Qd(e[t],`
|
|
26
26
|
`)>=0)return!1;return!0}function gv(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ut.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ut.call(Array(t+1),n)}}function zs(e,t){if(e.length===0)return"";var n=`
|
|
27
27
|
`+t.prev+t.base;return n+Ut.call(e,","+n)+`
|
|
28
|
-
`+t.prev}function no(e,t){var n=Vs(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=mr(e,o)?t(e[o],e):""}var i=typeof qa=="function"?qa(e):[],s;if(xn){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)mr(e,l)&&(n&&String(Number(l))===l&&l<e.length||xn&&s["$"+l]instanceof Symbol||(Vd.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof qa=="function")for(var f=0;f<i.length;f++)zd.call(e,i[f])&&r.push("["+t(i[f])+"]: "+t(e[i[f]],e));return r}var Au=Su,In=Dy,yv=Jy,vv=Au("%TypeError%"),io=Au("%WeakMap%",!0),oo=Au("%Map%",!0),Ev=In("WeakMap.prototype.get",!0),_v=In("WeakMap.prototype.set",!0),bv=In("WeakMap.prototype.has",!0),wv=In("Map.prototype.get",!0),Sv=In("Map.prototype.set",!0),Tv=In("Map.prototype.has",!0),Cu=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Ov=function(e,t){var n=Cu(e,t);return n&&n.value},xv=function(e,t,n){var r=Cu(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Av=function(e,t){return!!Cu(e,t)},Cv=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new vv("Side channel does not contain "+yv(i))},get:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Ev(t,i)}else if(oo){if(n)return wv(n,i)}else if(r)return Ov(r,i)},has:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return bv(t,i)}else if(oo){if(n)return Tv(n,i)}else if(r)return Av(r,i);return!1},set:function(i,s){io&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new io),_v(t,i,s)):oo?(n||(n=new oo),Sv(n,i,s)):(r||(r={key:{},next:null}),xv(r,i,s))}};return o},Rv=String.prototype.replace,Pv=/%20/g,Wa={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ru={default:Wa.RFC3986,formatters:{RFC1738:function(e){return Rv.call(e,Pv,"+")},RFC3986:function(e){return String(e)}},RFC1738:Wa.RFC1738,RFC3986:Wa.RFC3986},Iv=Ru,Va=Object.prototype.hasOwnProperty,Vr=Array.isArray,Bt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Nv=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Vr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Jd=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Lv=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Vr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Va.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Vr(t)&&!Vr(n)&&(o=Jd(t,r)),Vr(t)&&Vr(n)?(n.forEach(function(i,s){if(Va.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Va.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},kv=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Bv=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Mv=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var f=s.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===Iv.RFC1738&&(f===40||f===41)){a+=s.charAt(l);continue}if(f<128){a=a+Bt[f];continue}if(f<2048){a=a+(Bt[192|f>>6]+Bt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Bt[224|f>>12]+Bt[128|f>>6&63]+Bt[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|s.charCodeAt(l)&1023),a+=Bt[240|f>>18]+Bt[128|f>>12&63]+Bt[128|f>>6&63]+Bt[128|f&63]}return a},Fv=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var f=a[l],u=s[f];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:f}),r.push(u))}return Nv(n),t},Uv=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Dv=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},$v=function(t,n){return[].concat(t,n)},jv=function(t,n){if(Vr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Zd={arrayToObject:Jd,assign:kv,combine:$v,compact:Fv,decode:Bv,encode:Mv,isBuffer:Dv,isRegExp:Uv,maybeMap:jv,merge:Lv},eh=Cv,Co=Zd,Di=Ru,Hv=Object.prototype.hasOwnProperty,nl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},tr=Array.isArray,qv=Array.prototype.push,th=function(e,t){qv.apply(e,tr(t)?t:[t])},Gv=Date.prototype.toISOString,il=Di.default,Ze={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Co.encode,encodeValuesOnly:!1,format:il,formatter:Di.formatters[il],indices:!1,serializeDate:function(t){return Gv.call(t)},skipNulls:!1,strictNullHandling:!1},Wv=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},za={},Vv=function e(t,n,r,o,i,s,a,l,f,u,h,d,c,p,m,_){for(var T=t,E=_,b=0,A=!1;(E=E.get(za))!==void 0&&!A;){var w=E.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");A=!0}typeof E.get(za)>"u"&&(b=0)}if(typeof l=="function"?T=l(n,T):T instanceof Date?T=h(T):r==="comma"&&tr(T)&&(T=Co.maybeMap(T,function(k){return k instanceof Date?h(k):k})),T===null){if(i)return a&&!p?a(n,Ze.encoder,m,"key",d):n;T=""}if(Wv(T)||Co.isBuffer(T)){if(a){var N=p?n:a(n,Ze.encoder,m,"key",d);return[c(N)+"="+c(a(T,Ze.encoder,m,"value",d))]}return[c(n)+"="+c(String(T))]}var F=[];if(typeof T>"u")return F;var M;if(r==="comma"&&tr(T))p&&a&&(T=Co.maybeMap(T,a)),M=[{value:T.length>0?T.join(",")||null:void 0}];else if(tr(l))M=l;else{var W=Object.keys(T);M=f?W.sort(f):W}for(var q=o&&tr(T)&&T.length===1?n+"[]":n,V=0;V<M.length;++V){var j=M[V],Y=typeof j=="object"&&typeof j.value<"u"?j.value:T[j];if(!(s&&Y===null)){var oe=tr(T)?typeof r=="function"?r(q,j):q:q+(u?"."+j:"["+j+"]");_.set(t,b);var K=eh();K.set(za,_),th(F,e(Y,oe,r,o,i,s,r==="comma"&&p&&tr(T)?null:a,l,f,u,h,d,c,p,m,K))}}return F},zv=function(t){if(!t)return Ze;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ze.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Di.default;if(typeof t.format<"u"){if(!Hv.call(Di.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Di.formatters[r],i=Ze.filter;return(typeof t.filter=="function"||tr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ze.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ze.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ze.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ze.encode,encoder:typeof t.encoder=="function"?t.encoder:Ze.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ze.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ze.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ze.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},Yv=function(e,t){var n=e,r=zv(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):tr(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in nl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=nl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=eh(),h=0;h<o.length;++h){var d=o[h];r.skipNulls&&n[d]===null||th(s,Vv(n[d],d,l,f,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var c=s.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),c.length>0?p+c:""},An=Zd,Ys=Object.prototype.hasOwnProperty,Kv=Array.isArray,Ge={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:An.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Qv=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},rh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xv="utf8=%26%2310003%3B",Jv="utf8=%E2%9C%93",Zv=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,f=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Jv?f="utf-8":s[l]===Xv&&(f="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],h=u.indexOf("]="),d=h===-1?u.indexOf("="):h+1,c,p;d===-1?(c=n.decoder(u,Ge.decoder,f,"key"),p=n.strictNullHandling?null:""):(c=n.decoder(u.slice(0,d),Ge.decoder,f,"key"),p=An.maybeMap(rh(u.slice(d+1),n),function(m){return n.decoder(m,Ge.decoder,f,"value")})),p&&n.interpretNumericEntities&&f==="iso-8859-1"&&(p=Qv(p)),u.indexOf("[]=")>-1&&(p=Kv(p)?[p]:p),Ys.call(r,c)?r[c]=An.combine(r[c],p):r[c]=p}return r},e0=function(e,t,n,r){for(var o=r?t:rh(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(f)&&a!==l&&String(f)===l&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(s=[],s[f]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},t0=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),f=l?i.slice(0,l.index):i,u=[];if(f){if(!r.plainObjects&&Ys.call(Object.prototype,f)&&!r.allowPrototypes)return;u.push(f)}for(var h=0;r.depth>0&&(l=a.exec(i))!==null&&h<r.depth;){if(h+=1,!r.plainObjects&&Ys.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),e0(u,n,r,o)}},r0=function(t){if(!t)return Ge;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ge.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ge.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ge.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ge.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ge.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ge.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ge.comma,decoder:typeof t.decoder=="function"?t.decoder:Ge.decoder,delimiter:typeof t.delimiter=="string"||An.isRegExp(t.delimiter)?t.delimiter:Ge.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ge.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ge.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ge.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ge.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ge.strictNullHandling}},n0=function(e,t){var n=r0(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Zv(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=t0(a,r[a],n,typeof e=="string");o=An.merge(o,l,n)}return n.allowSparse===!0?o:An.compact(o)},i0=Yv,o0=n0,a0=Ru,s0={formats:a0,parse:o0,stringify:i0};const u0=jt(s0);var c0="[object String]",l0=Object.prototype,f0=l0.toString,d0=Array.isArray;function h0(e){return!!e&&typeof e=="object"}function p0(e){return typeof e=="string"||!d0(e)&&h0(e)&&f0.call(e)==c0}var m0=p0;const ol=jt(m0);var Pu={exports:{}};class nh extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const g0=({limit:e,interval:t,strict:n})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const r=new Map;let o=0,i=0;function s(){const u=Date.now();return u-o>t?(i=1,o=u,0):(i<e?i++:(o+=t,i=1),o-u)}const a=[];function l(){const u=Date.now();if(a.length<e)return a.push(u),0;const h=a.shift()+t;return u>=h?(a.push(u),0):(a.push(h),h-u)}const f=n?l:s;return u=>{const h=function(...d){if(!h.isEnabled)return(async()=>u.apply(this,d))();let c;return new Promise((p,m)=>{c=setTimeout(()=>{p(u.apply(this,d)),r.delete(c)},f()),r.set(c,m)})};return h.abort=()=>{for(const d of r.keys())clearTimeout(d),r.get(d)(new nh);r.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};Pu.exports=g0;Pu.exports.AbortError=nh;var y0=Pu.exports;const v0=jt(y0);var E0="[object Object]";function _0(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function b0(e,t){return function(n){return e(t(n))}}var w0=Function.prototype,ih=Object.prototype,oh=w0.toString,S0=ih.hasOwnProperty,T0=oh.call(Object),O0=ih.toString,x0=b0(Object.getPrototypeOf,Object);function A0(e){return!!e&&typeof e=="object"}function C0(e){if(!A0(e)||O0.call(e)!=E0||_0(e))return!1;var t=x0(e);if(t===null)return!0;var n=S0.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&oh.call(n)==T0}var R0=C0;const ao=jt(R0);function P0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){f=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw o}}return a}}function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(r){I0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Qs(){Qs=function(o,i){return new n(o,void 0,i)};var e=RegExp.prototype,t=new WeakMap;function n(o,i,s){var a=new RegExp(o,i);return t.set(a,s||t.get(o)),Mo(a,n.prototype)}function r(o,i){var s=t.get(i);return Object.keys(s).reduce(function(a,l){var f=s[l];if(typeof f=="number")a[l]=o[f];else{for(var u=0;o[f[u]]===void 0&&u+1<f.length;)u++;a[l]=o[f[u]]}return a},Object.create(null))}return N0(n,RegExp),n.prototype.exec=function(o){var i=e.exec.call(this,o);if(i){i.groups=r(i,this);var s=i.indices;s&&(s.groups=r(s,this))}return i},n.prototype[Symbol.replace]=function(o,i){if(typeof i=="string"){var s=t.get(this);return e[Symbol.replace].call(this,o,i.replace(/\$<([^>]+)>/g,function(l,f){var u=s[f];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof i=="function"){var a=this;return e[Symbol.replace].call(this,o,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(r(l,a)),i.apply(this,l)})}return e[Symbol.replace].call(this,o,i)},Qs.apply(this,arguments)}function I0(e,t,n){return t=U0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(e,t){if(typeof t!="function"&&t!==null)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&&Mo(e,t)}function Mo(e,t){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Mo(e,t)}function L0(e,t){return k0(e)||P0(e,t)||ah(e,t)||B0()}function k0(e){if(Array.isArray(e))return e}function ah(e,t){if(e){if(typeof e=="string")return sl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(e,t)}}function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
`+t.prev}function no(e,t){var n=Vs(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=mr(e,o)?t(e[o],e):""}var i=typeof qa=="function"?qa(e):[],s;if(xn){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)mr(e,l)&&(n&&String(Number(l))===l&&l<e.length||xn&&s["$"+l]instanceof Symbol||(Vd.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof qa=="function")for(var f=0;f<i.length;f++)zd.call(e,i[f])&&r.push("["+t(i[f])+"]: "+t(e[i[f]],e));return r}var Au=Su,In=Dy,yv=Jy,vv=Au("%TypeError%"),io=Au("%WeakMap%",!0),oo=Au("%Map%",!0),Ev=In("WeakMap.prototype.get",!0),_v=In("WeakMap.prototype.set",!0),bv=In("WeakMap.prototype.has",!0),wv=In("Map.prototype.get",!0),Sv=In("Map.prototype.set",!0),Tv=In("Map.prototype.has",!0),Cu=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Ov=function(e,t){var n=Cu(e,t);return n&&n.value},xv=function(e,t,n){var r=Cu(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Av=function(e,t){return!!Cu(e,t)},Cv=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new vv("Side channel does not contain "+yv(i))},get:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Ev(t,i)}else if(oo){if(n)return wv(n,i)}else if(r)return Ov(r,i)},has:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return bv(t,i)}else if(oo){if(n)return Tv(n,i)}else if(r)return Av(r,i);return!1},set:function(i,s){io&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new io),_v(t,i,s)):oo?(n||(n=new oo),Sv(n,i,s)):(r||(r={key:{},next:null}),xv(r,i,s))}};return o},Rv=String.prototype.replace,Pv=/%20/g,Wa={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ru={default:Wa.RFC3986,formatters:{RFC1738:function(e){return Rv.call(e,Pv,"+")},RFC3986:function(e){return String(e)}},RFC1738:Wa.RFC1738,RFC3986:Wa.RFC3986},Iv=Ru,Va=Object.prototype.hasOwnProperty,Vr=Array.isArray,Bt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Nv=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Vr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Jd=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Lv=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Vr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Va.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Vr(t)&&!Vr(n)&&(o=Jd(t,r)),Vr(t)&&Vr(n)?(n.forEach(function(i,s){if(Va.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Va.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},kv=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Bv=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Mv=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var f=s.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===Iv.RFC1738&&(f===40||f===41)){a+=s.charAt(l);continue}if(f<128){a=a+Bt[f];continue}if(f<2048){a=a+(Bt[192|f>>6]+Bt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Bt[224|f>>12]+Bt[128|f>>6&63]+Bt[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|s.charCodeAt(l)&1023),a+=Bt[240|f>>18]+Bt[128|f>>12&63]+Bt[128|f>>6&63]+Bt[128|f&63]}return a},Fv=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var f=a[l],u=s[f];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:f}),r.push(u))}return Nv(n),t},Uv=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Dv=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},$v=function(t,n){return[].concat(t,n)},jv=function(t,n){if(Vr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Zd={arrayToObject:Jd,assign:kv,combine:$v,compact:Fv,decode:Bv,encode:Mv,isBuffer:Dv,isRegExp:Uv,maybeMap:jv,merge:Lv},eh=Cv,Co=Zd,Di=Ru,Hv=Object.prototype.hasOwnProperty,nl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},tr=Array.isArray,qv=Array.prototype.push,th=function(e,t){qv.apply(e,tr(t)?t:[t])},Gv=Date.prototype.toISOString,il=Di.default,Ze={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Co.encode,encodeValuesOnly:!1,format:il,formatter:Di.formatters[il],indices:!1,serializeDate:function(t){return Gv.call(t)},skipNulls:!1,strictNullHandling:!1},Wv=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},za={},Vv=function e(t,n,r,o,i,s,a,l,f,u,h,d,c,p,m,_){for(var T=t,E=_,b=0,A=!1;(E=E.get(za))!==void 0&&!A;){var w=E.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");A=!0}typeof E.get(za)>"u"&&(b=0)}if(typeof l=="function"?T=l(n,T):T instanceof Date?T=h(T):r==="comma"&&tr(T)&&(T=Co.maybeMap(T,function(k){return k instanceof Date?h(k):k})),T===null){if(i)return a&&!p?a(n,Ze.encoder,m,"key",d):n;T=""}if(Wv(T)||Co.isBuffer(T)){if(a){var N=p?n:a(n,Ze.encoder,m,"key",d);return[c(N)+"="+c(a(T,Ze.encoder,m,"value",d))]}return[c(n)+"="+c(String(T))]}var F=[];if(typeof T>"u")return F;var M;if(r==="comma"&&tr(T))p&&a&&(T=Co.maybeMap(T,a)),M=[{value:T.length>0?T.join(",")||null:void 0}];else if(tr(l))M=l;else{var q=Object.keys(T);M=f?q.sort(f):q}for(var W=o&&tr(T)&&T.length===1?n+"[]":n,V=0;V<M.length;++V){var j=M[V],Y=typeof j=="object"&&typeof j.value<"u"?j.value:T[j];if(!(s&&Y===null)){var oe=tr(T)?typeof r=="function"?r(W,j):W:W+(u?"."+j:"["+j+"]");_.set(t,b);var K=eh();K.set(za,_),th(F,e(Y,oe,r,o,i,s,r==="comma"&&p&&tr(T)?null:a,l,f,u,h,d,c,p,m,K))}}return F},zv=function(t){if(!t)return Ze;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Ze.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Di.default;if(typeof t.format<"u"){if(!Hv.call(Di.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Di.formatters[r],i=Ze.filter;return(typeof t.filter=="function"||tr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ze.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ze.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ze.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ze.encode,encoder:typeof t.encoder=="function"?t.encoder:Ze.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ze.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ze.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ze.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},Yv=function(e,t){var n=e,r=zv(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):tr(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in nl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=nl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=eh(),h=0;h<o.length;++h){var d=o[h];r.skipNulls&&n[d]===null||th(s,Vv(n[d],d,l,f,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,u))}var c=s.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),c.length>0?p+c:""},An=Zd,Ys=Object.prototype.hasOwnProperty,Kv=Array.isArray,Ge={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:An.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Qv=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},rh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xv="utf8=%26%2310003%3B",Jv="utf8=%E2%9C%93",Zv=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,f=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Jv?f="utf-8":s[l]===Xv&&(f="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],h=u.indexOf("]="),d=h===-1?u.indexOf("="):h+1,c,p;d===-1?(c=n.decoder(u,Ge.decoder,f,"key"),p=n.strictNullHandling?null:""):(c=n.decoder(u.slice(0,d),Ge.decoder,f,"key"),p=An.maybeMap(rh(u.slice(d+1),n),function(m){return n.decoder(m,Ge.decoder,f,"value")})),p&&n.interpretNumericEntities&&f==="iso-8859-1"&&(p=Qv(p)),u.indexOf("[]=")>-1&&(p=Kv(p)?[p]:p),Ys.call(r,c)?r[c]=An.combine(r[c],p):r[c]=p}return r},e0=function(e,t,n,r){for(var o=r?t:rh(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(f)&&a!==l&&String(f)===l&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(s=[],s[f]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},t0=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),f=l?i.slice(0,l.index):i,u=[];if(f){if(!r.plainObjects&&Ys.call(Object.prototype,f)&&!r.allowPrototypes)return;u.push(f)}for(var h=0;r.depth>0&&(l=a.exec(i))!==null&&h<r.depth;){if(h+=1,!r.plainObjects&&Ys.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),e0(u,n,r,o)}},r0=function(t){if(!t)return Ge;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Ge.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ge.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ge.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ge.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ge.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ge.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ge.comma,decoder:typeof t.decoder=="function"?t.decoder:Ge.decoder,delimiter:typeof t.delimiter=="string"||An.isRegExp(t.delimiter)?t.delimiter:Ge.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ge.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ge.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ge.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ge.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ge.strictNullHandling}},n0=function(e,t){var n=r0(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Zv(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=t0(a,r[a],n,typeof e=="string");o=An.merge(o,l,n)}return n.allowSparse===!0?o:An.compact(o)},i0=Yv,o0=n0,a0=Ru,s0={formats:a0,parse:o0,stringify:i0};const u0=jt(s0);var c0="[object String]",l0=Object.prototype,f0=l0.toString,d0=Array.isArray;function h0(e){return!!e&&typeof e=="object"}function p0(e){return typeof e=="string"||!d0(e)&&h0(e)&&f0.call(e)==c0}var m0=p0;const ol=jt(m0);var Pu={exports:{}};class nh extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const g0=({limit:e,interval:t,strict:n})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const r=new Map;let o=0,i=0;function s(){const u=Date.now();return u-o>t?(i=1,o=u,0):(i<e?i++:(o+=t,i=1),o-u)}const a=[];function l(){const u=Date.now();if(a.length<e)return a.push(u),0;const h=a.shift()+t;return u>=h?(a.push(u),0):(a.push(h),h-u)}const f=n?l:s;return u=>{const h=function(...d){if(!h.isEnabled)return(async()=>u.apply(this,d))();let c;return new Promise((p,m)=>{c=setTimeout(()=>{p(u.apply(this,d)),r.delete(c)},f()),r.set(c,m)})};return h.abort=()=>{for(const d of r.keys())clearTimeout(d),r.get(d)(new nh);r.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};Pu.exports=g0;Pu.exports.AbortError=nh;var y0=Pu.exports;const v0=jt(y0);var E0="[object Object]";function _0(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function b0(e,t){return function(n){return e(t(n))}}var w0=Function.prototype,ih=Object.prototype,oh=w0.toString,S0=ih.hasOwnProperty,T0=oh.call(Object),O0=ih.toString,x0=b0(Object.getPrototypeOf,Object);function A0(e){return!!e&&typeof e=="object"}function C0(e){if(!A0(e)||O0.call(e)!=E0||_0(e))return!1;var t=x0(e);if(t===null)return!0;var n=S0.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&oh.call(n)==T0}var R0=C0;const ao=jt(R0);function P0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){f=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw o}}return a}}function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(r){I0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Qs(){Qs=function(o,i){return new n(o,void 0,i)};var e=RegExp.prototype,t=new WeakMap;function n(o,i,s){var a=new RegExp(o,i);return t.set(a,s||t.get(o)),Mo(a,n.prototype)}function r(o,i){var s=t.get(i);return Object.keys(s).reduce(function(a,l){var f=s[l];if(typeof f=="number")a[l]=o[f];else{for(var u=0;o[f[u]]===void 0&&u+1<f.length;)u++;a[l]=o[f[u]]}return a},Object.create(null))}return N0(n,RegExp),n.prototype.exec=function(o){var i=e.exec.call(this,o);if(i){i.groups=r(i,this);var s=i.indices;s&&(s.groups=r(s,this))}return i},n.prototype[Symbol.replace]=function(o,i){if(typeof i=="string"){var s=t.get(this);return e[Symbol.replace].call(this,o,i.replace(/\$<([^>]+)>/g,function(l,f){var u=s[f];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof i=="function"){var a=this;return e[Symbol.replace].call(this,o,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(r(l,a)),i.apply(this,l)})}return e[Symbol.replace].call(this,o,i)},Qs.apply(this,arguments)}function I0(e,t,n){return t=U0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(e,t){if(typeof t!="function"&&t!==null)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&&Mo(e,t)}function Mo(e,t){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Mo(e,t)}function L0(e,t){return k0(e)||P0(e,t)||ah(e,t)||B0()}function k0(e){if(Array.isArray(e))return e}function ah(e,t){if(e){if(typeof e=="string")return sl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(e,t)}}function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
29
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ah(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
30
30
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,a;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function F0(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function U0(e){var t=F0(e,"string");return typeof t=="symbol"?t:String(t)}function D0(){return typeof process<"u"&&!process.browser}function $0(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function j0(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function H0(){return window}function Xs(){}var Js=Qs(/(\d+)(%)/,{value:1});function Ya(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,n=t;if(Js.test(e)){var r,o=(r=e.match(Js))===null||r===void 0?void 0:r.groups;if(o&&o.value){var i=parseInt(o.value)/100;n=Math.round(t*i)}}return Math.min(30,Math.max(1,n))}function ul(e,t){return t("info","Throttle request to ".concat(e,"/s")),v0({limit:e,interval:1e3,strict:!1})}var q0=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",n=e.defaults.logHandler,r=n===void 0?Xs:n,o=ol(t)?Ya(t):Ya("auto",t),i=ul(o,r),s=!1,a=e.interceptors.request.use(function(f){return i(function(){return f})()},function(f){return Promise.reject(f)}),l=e.interceptors.response.use(function(f){if(!s&&ol(t)&&(t==="auto"||Js.test(t))&&f.headers&&f.headers["x-contentful-ratelimit-second-limit"]){var u=parseInt(f.headers["x-contentful-ratelimit-second-limit"]),h=Ya(t,u);h!==o&&(a&&e.interceptors.request.eject(a),o=h,i=ul(h,r),a=e.interceptors.request.use(function(d){return i(function(){return d})()},function(d){return Promise.reject(d)})),s=!0}return f},function(f){return Promise.reject(f)});return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(l)}},G0=function(t){return new Promise(function(n){setTimeout(n,t)})},W0=function(t){return Math.pow(Math.SQRT2,t)};function V0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=e.defaults,r=n.responseLogger,o=r===void 0?Xs:r,i=n.requestLogger,s=i===void 0?Xs:i;e.interceptors.request.use(function(a){return s(a),a},function(a){return s(a),Promise.reject(a)}),e.interceptors.response.use(function(a){return o(a),a},function(a){var l=a.response,f=a.config;if(o(a),!f||!e.defaults.retryOnError)return Promise.reject(a);var u=f.attempts||1;if(u>t)return a.attempts=f.attempts,Promise.reject(a);var h=null,d=W0(u);return l?l.status>=500&&l.status<600?h="Server ".concat(l.status):l.status===429&&(h="Rate limit",l.headers&&a.response.headers["x-contentful-ratelimit-reset"]&&(d=l.headers["x-contentful-ratelimit-reset"])):h="Connection",h?(d=Math.floor(d*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(h," error occurred. Waiting for ").concat(d," ms before retrying...")),f.attempts=u+1,delete f.httpAgent,delete f.httpsAgent,G0(d).then(function(){return e(f)})):Promise.reject(a)})}function z0(e,t){e.interceptors.request.use(function(n){return t().then(function(r){return n.headers=wn(wn({},n.headers),{},{Authorization:"Bearer ".concat(r)}),n})})}var Y0=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function sh(e,t){var n={insecure:!1,retryOnError:!0,logHandler:function(m,_){if(m==="error"&&_){var T=[_.name,_.message].filter(function(E){return E}).join(" - ");console.error("[error] ".concat(T)),console.error(_);return}console.log("[".concat(m,"] ").concat(_))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},r=wn(wn({},n),t);if(!r.accessToken){var o=new TypeError("Expected parameter accessToken");throw r.logHandler("error",o),o}var i=r.insecure?"http":"https",s=r.space?"".concat(r.space,"/"):"",a=r.defaultHostname,l=r.insecure?80:443;if(r.host&&Y0.test(r.host)){var f=r.host.split(":");if(f.length===2){var u=L0(f,2);a=u[0],l=u[1]}else a=f[0]}r.basePath&&(r.basePath="/".concat(r.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(i,"://").concat(a,":").concat(l).concat(r.basePath,"/spaces/").concat(s);!r.headers.Authorization&&typeof r.accessToken!="function"&&(r.headers.Authorization="Bearer "+r.accessToken);var d={baseURL:h,headers:r.headers,httpAgent:r.httpAgent,httpsAgent:r.httpsAgent,paramsSerializer:u0.stringify,proxy:r.proxy,timeout:r.timeout,adapter:r.adapter,maxContentLength:r.maxContentLength,maxBodyLength:r.maxBodyLength,logHandler:r.logHandler,responseLogger:r.responseLogger,requestLogger:r.requestLogger,retryOnError:r.retryOnError},c=e.create(d);return c.httpClientParams=t,c.cloneWithNewParams=function(p){return sh(e,wn(wn({},yr(t)),p))},r.onBeforeRequest&&c.interceptors.request.use(r.onBeforeRequest),typeof r.accessToken=="function"&&z0(c,r.accessToken),r.throttle&&q0(c,r.throttle),V0(c,r.retryLimit),r.onError&&c.interceptors.response.use(function(p){return p},r.onError),c}function K0(e){var t=e.query,n={};return delete t.resolveLinks,n.params=yr(t),n}function Q0(e,t){if(!(t in e)){var n=new Error;throw n.name="PropertyMissing",n.message="Required property ".concat(t,` missing from:
|
|
31
31
|
|
|
32
32
|
`).concat(JSON.stringify(e),`
|
|
33
33
|
|
|
34
|
-
`),n}return!0}function uh(e){var t=Object.getOwnPropertyNames(e),n=M0(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o];i&&Ks(i)==="object"&&uh(i)}}catch(s){n.e(s)}finally{n.f()}return Object.freeze(e)}function X0(e){return uh(e.sys||{}),e}function cl(){var e=H0();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],o=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":i.indexOf(n)!==-1?"iOS":o.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function J0(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}function Z0(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{$0()?(i=cl(),o.push("platform ReactNative")):D0()?(i=J0(),o.push("platform node.js/".concat(j0()))):(i=cl(),o.push("platform browser"))}catch{i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter(function(s){return s!==""}).join("; "),";")}function eE(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return yr(this)}})}function tE(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var o="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(o)}if(!ao(n)||!ao(t))throw e;var i=n==null?void 0:n.data,s={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};ao(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),i&&ao(i)&&("requestId"in i&&(s.requestId=i.requestId||"UNKNOWN"),"message"in i&&(s.message=i.message||""),"details"in i&&(s.details=i.details||{}),"sys"in i&&"id"in i.sys&&(r=i.sys.id));var a=new Error;a.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var l;a.message=(l=s==null?void 0:s.message)!==null&&l!==void 0?l:""}throw a}const rE=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:sh,createRequestConfig:K0,enforceObjPath:Q0,errorHandler:tE,freezeSys:X0,getUserAgentHeader:Z0,toPlainObject:eE},Symbol.toStringTag,{value:"Module"})),Ht=Wi(rE);var so={},di={},uo={},ll;function nE(){if(ll)return uo;ll=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.wrapSpace=t;var e=Ht;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return uo}var hi={},Ka={exports:{}},fl;function Nn(){return fl||(fl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){var n=Function.prototype.toString,r=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,f=Object.prototype,u=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",c=typeof WeakMap=="function",p=function(){if(c)return function(){return new WeakMap};var F=function(){function M(){this._keys=[],this._values=[]}return M.prototype.has=function(W){return!!~this._keys.indexOf(W)},M.prototype.get=function(W){return this._values[this._keys.indexOf(W)]},M.prototype.set=function(W,q){this._keys.push(W),this._values.push(q)},M}();return function(){return new F}}(),m=function(F,M){var W=F.__proto__||l(F);if(!W)return r(null);var q=W.constructor;if(q===M.Object)return W===M.Object.prototype?{}:r(W);if(~n.call(q).indexOf("[native code]"))try{return new q}catch{}return r(W)},_=function(F,M,W,q){var V=m(F,M);q.set(F,V);for(var j in F)u.call(F,j)&&(V[j]=W(F[j],q));if(d)for(var Y=a(F),oe=0,K=Y.length,k=void 0;oe<K;++oe)k=Y[oe],h.call(F,k)&&(V[k]=W(F[k],q));return V},T=function(F,M,W,q){var V=m(F,M);q.set(F,V);for(var j=d?s(F).concat(a(F)):s(F),Y=0,oe=j.length,K=void 0,k=void 0;Y<oe;++Y)if(K=j[Y],K!=="callee"&&K!=="caller")if(k=i(F,K),k){!k.get&&!k.set&&(k.value=W(F[K],q));try{o(V,K,k)}catch{V[K]=k.value}}else V[K]=W(F[K],q);return V},E=function(F){var M="";return F.global&&(M+="g"),F.ignoreCase&&(M+="i"),F.multiline&&(M+="m"),F.unicode&&(M+="u"),F.sticky&&(M+="y"),M},b=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function N(F,M){var W=!!(M&&M.isStrict),q=M&&M.realm||w,V=W?T:_,j=function(Y,oe){if(!Y||typeof Y!="object")return Y;if(oe.has(Y))return oe.get(Y);var K=Y.__proto__||A(Y),k=K&&K.constructor;if(!k||k===q.Object)return V(Y,q,j,oe);var z;if(b(Y)){if(W)return T(Y,q,j,oe);z=new k,oe.set(Y,z);for(var J=0,de=Y.length;J<de;++J)z[J]=j(Y[J],oe);return z}if(Y instanceof q.Date)return new k(Y.getTime());if(Y instanceof q.RegExp)return z=new k(Y.source,Y.flags||E(Y)),z.lastIndex=Y.lastIndex,z;if(q.Map&&Y instanceof q.Map)return z=new k,oe.set(Y,z),Y.forEach(function(X,ee){z.set(ee,j(X,oe))}),z;if(q.Set&&Y instanceof q.Set)return z=new k,oe.set(Y,z),Y.forEach(function(X){z.add(j(X,oe))}),z;if(q.Blob&&Y instanceof q.Blob)return Y.slice(0,Y.size,Y.type);if(q.Buffer&&q.Buffer.isBuffer(Y))return z=q.Buffer.allocUnsafe?q.Buffer.allocUnsafe(Y.length):new k(Y.length),oe.set(Y,z),Y.copy(z),z;if(q.ArrayBuffer){if(q.ArrayBuffer.isView(Y))return z=new k(Y.buffer.slice(0)),oe.set(Y,z),z;if(Y instanceof q.ArrayBuffer)return z=Y.slice(0),oe.set(Y,z),z}return typeof Y.then=="function"||Y instanceof Error||q.WeakMap&&Y instanceof q.WeakMap||q.WeakSet&&Y instanceof q.WeakSet?Y:V(Y,q,j,oe)};return j(F,p())}return N.default=N,N.strict=function(M,W){return N(M,{isStrict:!0,realm:W?W.realm:void 0})},N})}(Ka)),Ka.exports}var co={},lo={exports:{}},dl;function iE(){return dl||(dl=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(o,i,s,a){return JSON.stringify(o,r(i,a),s)}function r(o,i){var s=[],a=[];return i==null&&(i=function(l,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(l,f){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,l):a.push(l),~s.indexOf(f)&&(f=i.call(this,l,f))}else s.push(f);return o==null?f:o.call(this,l,f)}}}(lo,lo.exports)),lo.exports}var hl;function ch(){if(hl)return co;hl=1,Object.defineProperty(co,"__esModule",{value:!0}),co.default=n;var e=t(iE());function t(r){return r&&r.__esModule?r:{default:r}}function n(r){return Object.defineProperty(r,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,o,i,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return co}var oE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aE=function(){function e(t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var a=t[Symbol.iterator](),l;!(o=(l=a.next()).done)&&(r.push(l.value),!(n&&r.length===n));o=!0);}catch(f){i=!0,s=f}finally{try{!o&&a.return&&a.return()}finally{if(i)throw s}}return r}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function pi(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var ji={},sE=function(t){return t&&t.sys&&t.sys.type==="Link"},uE=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},cE=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},pl=function(t,n){var r=n.entryId,o=n.linkType,i=n.spaceId,s=n.environmentId;return i&&s?t.get(i+"!"+s+"!"+o+"!"+r):t.get(o+"!"+r)},lE=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),o=aE(r,4);o[0];var i=o[1],s=o[2],a=s===void 0?"master":s,l=o[3];return{spaceId:i,environmentId:a,entryId:l}}},fE=function(t,n){var r=n.sys,o=r.type,i=r.linkType;if(o==="ResourceLink"){var s=n.sys.urn,a=lE(s),l=a.spaceId,f=a.environmentId,u=a.entryId,h=i.split(":")[1];return pl(t,{linkType:h,entryId:u,spaceId:l,environmentId:f})||ji}var d=n.sys.id;return pl(t,{linkType:i,entryId:d})||ji},dE=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==ji});for(var n in t)t[n]===ji&&delete t[n];return t},hE=function e(t,n,r,o){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":oE(t))==="object"){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=dE(t))}return t},pE=function(t,n,r){var o=fE(t,n);return o===ji?r?o:n:o},mE=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(o){return n.indexOf(o)!==-1});return r.reduce(function(o,i){return o[i]=t[i],o},{})},gE=function(t,n){if(n=n||{},!t.items)return[];var r=yr(t),o=Object.keys(r.includes||{}).reduce(function(a,l){return[].concat(pi(a),pi(t.includes[l]))},[]),i=[].concat(pi(r.items),pi(o)).filter(function(a){return!!a.sys}),s=new Map(i.reduce(function(a,l){var f=cE(l.sys).map(function(u){return[u,l]});return a.push.apply(a,pi(f)),a},[]));return i.forEach(function(a){var l=mE(a,n.itemEntryPoints);Object.assign(a,hE(l,function(f){return sE(f)||uE(f)},function(f){return pE(s,f,n.removeUnresolved)},n.removeUnresolved))}),r.items};const yE=Object.freeze(Object.defineProperty({__proto__:null,default:gE},Symbol.toStringTag,{value:"Module"})),lh=Wi(yE);var ml;function vE(){if(ml)return hi;ml=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.wrapEntry=i,hi.wrapEntryCollection=s;var e=o(Nn()),t=Ht,n=o(ch()),r=o(lh);function o(a){return a&&a.__esModule?a:{default:a}}function i(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,l){let{resolveLinks:f,removeUnresolved:u}=l;const h=(0,n.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,r.default)(h,{removeUnresolved:u,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return hi}var mi={},gl;function EE(){if(gl)return mi;gl=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.wrapAsset=r,mi.wrapAssetCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return mi}var fo={},yl;function _E(){if(yl)return fo;yl=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.wrapAssetKey=r;var e=n(Nn()),t=Ht;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return fo}var gi={},vl;function bE(){if(vl)return gi;vl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.wrapContentType=r,gi.wrapContentTypeCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return gi}var yi={},El;function wE(){if(El)return yi;El=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.wrapLocale=r,yi.wrapLocaleCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return yi}var vi={},_l;function SE(){if(_l)return vi;_l=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapTag=r,vi.wrapTagCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return vi}var bl;function TE(){if(bl)return di;bl=1,Object.defineProperty(di,"__esModule",{value:!0}),di.default=void 0;var e=l(nE()),t=l(vE()),n=l(EE()),r=l(_E()),o=l(bE()),i=l(wE()),s=l(SE());function a(u){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(c){return c?d:h})(u)}function l(u,h){if(!h&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var d=a(h);if(d&&d.has(u))return d.get(u);var c={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in u)if(m!=="default"&&Object.prototype.hasOwnProperty.call(u,m)){var _=p?Object.getOwnPropertyDescriptor(u,m):null;_&&(_.get||_.set)?Object.defineProperty(c,m,_):c[m]=u[m]}return c.default=u,d&&d.set(u,c),c}var f={space:e,entry:t,asset:n,assetKey:r,contentType:o,locale:i,tag:s};return di.default=f,di}var ho={},wl;function OE(){if(wl)return ho;wl=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=a;var e=Ht,t=r(lh),n=r(ch());function r(h){return h&&h.__esModule?h:{default:h}}function o(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function i(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?o(Object(c),!0).forEach(function(p){s(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):o(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function s(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}async function a(h,d){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:_,paginate:T}=i(i({},p),c),b=await f(h,[],d,{paginate:T});m&&(b.items=(0,t.default)(b,{removeUnresolved:_,itemEntryPoints:["fields"]}));const A=l(b.items);return b.nextSyncToken&&(A.nextSyncToken=b.nextSyncToken),b.nextPageToken&&(A.nextPageToken=b.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(A)))}function l(h){const d=c=>(p,m)=>(m.sys.type===c&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,c,p){let{paginate:m}=p;c.nextSyncToken&&(c.sync_token=c.nextSyncToken,delete c.nextSyncToken),c.nextPageToken&&(c.sync_token=c.nextPageToken,delete c.nextPageToken),c.sync_token&&(delete c.initial,delete c.type,delete c.content_type,delete c.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:c}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete c.initial,c.sync_token=u(T.nextPageUrl),f(h,d,c,{paginate:m})):{items:d,nextPageToken:u(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:u(T.nextSyncUrl)}:{items:[]}}function u(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return ho}var po={},Sl;function xE(){if(Sl)return po;Sl=1,Object.defineProperty(po,"__esModule",{value:!0}),po.default=r;function e(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),s.push.apply(s,a)}return s}function t(o){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?e(Object(s),!0).forEach(function(a){n(o,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(s,a))})}return o}function n(o,i,s){return i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}function r(o){if(!o.select)return o;const i=Array.isArray(o.select)?o.select:o.select.split(","),s=new Set(i);return s.has("sys")?o:(s.add("sys.id"),s.add("sys.type"),t(t({},o),{},{select:[...s].join(",")}))}return po}var En={},Tl;function AE(){if(Tl)return En;Tl=1,Object.defineProperty(En,"__esModule",{value:!0}),En.ValidationError=void 0,En.default=t;class e extends Error{constructor(r,o){super(`Invalid "${r}" provided, `+o),this.name="ValidationError"}}En.ValidationError=e;function t(n,r,o){if(o=o||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(o.maximum&&r>o.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${o.maximum})`);if(o.now&&r<o.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${o.now}`)}return En}var Ol;function CE(){if(Ol)return so;Ol=1,Object.defineProperty(so,"__esModule",{value:!0}),so.default=u;var e=Ht,t=i(TE()),n=i(OE()),r=i(xE()),o=i(AE());function i(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function a(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?s(Object(c),!0).forEach(function(p){l(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):s(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function l(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}const f=48*60*60;function u(h){let{http:d,getGlobalOptions:c}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:E}=t.default.entry,{wrapAsset:b,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:N}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:M}=t.default.locale,W=Q=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:Q,environment:c().environment,space:c().space},re};async function q(){Ve(d);try{const Q=await d.get("/");return p(Q.data)}catch(Q){(0,e.errorHandler)(Q)}}async function V(Q){ce(d);try{const re=await d.get(`content_types/${Q}`);return m(re.data)}catch(re){(0,e.errorHandler)(re)}}async function j(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("content_types",(0,e.createRequestConfig)({query:Q}));return _(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Q)throw W(Q);try{const Pe=await this.getEntries(a({"sys.id":Q},re));if(Pe.items.length>0)return T(Pe.items[0]);throw W(Q)}catch(Pe){(0,e.errorHandler)(Pe)}}async function oe(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);const{resolveLinks:re,removeUnresolved:Pe}=c(Q);Q=(0,r.default)(Q);try{const xe=await d.get("entries",(0,e.createRequestConfig)({query:Q}));return E(xe.data,{resolveLinks:re,removeUnresolved:Pe})}catch(xe){(0,e.errorHandler)(xe)}}async function K(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ce(d),re=(0,r.default)(re);try{const Pe=await d.get(`assets/${Q}`,(0,e.createRequestConfig)({query:re}));return b(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function k(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("assets",(0,e.createRequestConfig)({query:Q}));return A(re.data)}catch(re){(0,e.errorHandler)(re)}}async function z(Q){ce(d);try{const re=await d.get(`tags/${Q}`);return w(re.data)}catch(re){(0,e.errorHandler)(re)}}async function J(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("tags",(0,e.createRequestConfig)({query:Q}));return N(re.data)}catch(re){(0,e.errorHandler)(re)}}async function de(Q){ce(d);try{const re=Math.floor(Date.now()/1e3),Pe=re+f;(0,o.default)("expiresAt",Q,{maximum:Pe,now:re});const xe={expiresAt:Q},at=await d.post("asset_keys",xe);return F(at.data)}catch(re){(0,e.errorHandler)(re)}}async function X(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("locales",(0,e.createRequestConfig)({query:Q}));return M(re.data)}catch(re){(0,e.errorHandler)(re)}}async function ee(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:xe}=c(Q);return ce(d),(0,n.default)(d,Q,a({resolveLinks:Pe,removeUnresolved:xe},re))}function ue(Q){const{resolveLinks:re,removeUnresolved:Pe}=c({});return E(Q,{resolveLinks:re,removeUnresolved:Pe})}function ce(Q){Q.defaults.baseURL=c().environmentBaseUrl}function Ve(Q){Q.defaults.baseURL=c().spaceBaseUrl}return{getSpace:q,getContentType:V,getContentTypes:j,getEntry:Y,getEntries:oe,getAsset:K,getAssets:k,getTag:z,getTags:J,createAssetKey:de,getLocales:X,parseEntries:ue,sync:ee}}return so}var mo={},xl;function RE(){if(xl)return mo;xl=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return mo}var Al;function PE(){if(Al)return to;Al=1,Object.defineProperty(to,"__esModule",{value:!0}),to.createClient=l;var e=o(Ud()),t=Ht,n=o(CE()),r=o(RE());function o(f){return f&&f.__esModule?f:{default:f}}function i(f,u){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);u&&(d=d.filter(function(c){return Object.getOwnPropertyDescriptor(f,c).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};u%2?i(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,u,h){return u in f?Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[u]=h,f}function l(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const c=(0,t.createHttpClient)(e.default,h),p=(0,r.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:c.defaults.baseURL,environmentBaseUrl:`${c.defaults.baseURL}environments/${h.environment}`});return c.defaults.baseURL=p().environmentBaseUrl,(0,n.default)({http:c,getGlobalOptions:p})}return to}var Qa={},Xa,Cl;function IE(){return Cl||(Cl=1,Xa=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Xa}var Ja,Rl;function NE(){if(Rl)return Ja;Rl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var l=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],r(l),r(f))}function o(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],l=1;l<a.length;l++)s=r(a,l).join(""),a=s.match(t)||[];return s}}function i(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},l=n.exec(s);l;){try{a[l[0]]=decodeURIComponent(l[0])}catch{var f=o(l[0]);f!==l[0]&&(a[l[0]]=f)}l=n.exec(s)}a["%C2"]="�";for(var u=Object.keys(a),h=0;h<u.length;h++){var d=u[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return Ja=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return i(s)}},Ja}var Za,Pl;function LE(){return Pl||(Pl=1,Za=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}),Za}var es,Il;function kE(){return Il||(Il=1,es=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?t.indexOf(s)!==-1:t(s,a,e))&&(n[s]=a)}return n}),es}var Nl;function BE(){return Nl||(Nl=1,function(e){const t=IE(),n=NE(),r=LE(),o=kE(),i=E=>E==null,s=Symbol("encodeFragmentIdentifier");function a(E){switch(E.arrayFormat){case"index":return b=>(A,w)=>{const N=A.length;return w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[",N,"]"].join("")]:[...A,[u(b,E),"[",u(N,E),"]=",u(w,E)].join("")]};case"bracket":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[]"].join("")]:[...A,[u(b,E),"[]=",u(w,E)].join("")];case"colon-list-separator":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),":list="].join("")]:[...A,[u(b,E),":list=",u(w,E)].join("")];case"comma":case"separator":case"bracket-separator":{const b=E.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,N)=>N===void 0||E.skipNull&&N===null||E.skipEmptyString&&N===""?w:(N=N===null?"":N,w.length===0?[[u(A,E),b,u(N,E)].join("")]:[[w,u(N,E)].join(E.arrayFormatSeparator)])}default:return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,u(b,E)]:[...A,[u(b,E),"=",u(w,E)].join("")]}}function l(E){let b;switch(E.arrayFormat){case"index":return(A,w,N)=>{if(b=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!b){N[A]=w;return}N[A]===void 0&&(N[A]={}),N[A][b[1]]=w};case"bracket":return(A,w,N)=>{if(b=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"colon-list-separator":return(A,w,N)=>{if(b=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"comma":case"separator":return(A,w,N)=>{const F=typeof w=="string"&&w.includes(E.arrayFormatSeparator),M=typeof w=="string"&&!F&&h(w,E).includes(E.arrayFormatSeparator);w=M?h(w,E):w;const W=F||M?w.split(E.arrayFormatSeparator).map(q=>h(q,E)):w===null?w:h(w,E);N[A]=W};case"bracket-separator":return(A,w,N)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){N[A]=w&&h(w,E);return}const M=w===null?[]:w.split(E.arrayFormatSeparator).map(W=>h(W,E));if(N[A]===void 0){N[A]=M;return}N[A]=[].concat(N[A],M)};default:return(A,w,N)=>{if(N[A]===void 0){N[A]=w;return}N[A]=[].concat(N[A],w)}}}function f(E){if(typeof E!="string"||E.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(E,b){return b.encode?b.strict?t(E):encodeURIComponent(E):E}function h(E,b){return b.decode?n(E):E}function d(E){return Array.isArray(E)?E.sort():typeof E=="object"?d(Object.keys(E)).sort((b,A)=>Number(b)-Number(A)).map(b=>E[b]):E}function c(E){const b=E.indexOf("#");return b!==-1&&(E=E.slice(0,b)),E}function p(E){let b="";const A=E.indexOf("#");return A!==-1&&(b=E.slice(A)),b}function m(E){E=c(E);const b=E.indexOf("?");return b===-1?"":E.slice(b+1)}function _(E,b){return b.parseNumbers&&!Number.isNaN(Number(E))&&typeof E=="string"&&E.trim()!==""?E=Number(E):b.parseBooleans&&E!==null&&(E.toLowerCase()==="true"||E.toLowerCase()==="false")&&(E=E.toLowerCase()==="true"),E}function T(E,b){b=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},b),f(b.arrayFormatSeparator);const A=l(b),w=Object.create(null);if(typeof E!="string"||(E=E.trim().replace(/^[?#&]/,""),!E))return w;for(const N of E.split("&")){if(N==="")continue;let[F,M]=r(b.decode?N.replace(/\+/g," "):N,"=");M=M===void 0?null:["comma","separator","bracket-separator"].includes(b.arrayFormat)?M:h(M,b),A(h(F,b),M,w)}for(const N of Object.keys(w)){const F=w[N];if(typeof F=="object"&&F!==null)for(const M of Object.keys(F))F[M]=_(F[M],b);else w[N]=_(F,b)}return b.sort===!1?w:(b.sort===!0?Object.keys(w).sort():Object.keys(w).sort(b.sort)).reduce((N,F)=>{const M=w[F];return M&&typeof M=="object"&&!Array.isArray(M)?N[F]=d(M):N[F]=M,N},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(E,b)=>{if(!E)return"";b=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},b),f(b.arrayFormatSeparator);const A=M=>b.skipNull&&i(E[M])||b.skipEmptyString&&E[M]==="",w=a(b),N={};for(const M of Object.keys(E))A(M)||(N[M]=E[M]);const F=Object.keys(N);return b.sort!==!1&&F.sort(b.sort),F.map(M=>{const W=E[M];return W===void 0?"":W===null?u(M,b):Array.isArray(W)?W.length===0&&b.arrayFormat==="bracket-separator"?u(M,b)+"[]":W.reduce(w(M),[]).join("&"):u(M,b)+"="+u(W,b)}).filter(M=>M.length>0).join("&")},e.parseUrl=(E,b)=>{b=Object.assign({decode:!0},b);const[A,w]=r(E,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(E),b)},b&&b.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,b)}:{})},e.stringifyUrl=(E,b)=>{b=Object.assign({encode:!0,strict:!0,[s]:!0},b);const A=c(E.url).split("?")[0]||"",w=e.extract(E.url),N=e.parse(w,{sort:!1}),F=Object.assign(N,E.query);let M=e.stringify(F,b);M&&(M=`?${M}`);let W=p(E.url);return E.fragmentIdentifier&&(W=`#${b[s]?u(E.fragmentIdentifier,b):E.fragmentIdentifier}`),`${A}${M}${W}`},e.pick=(E,b,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:N,fragmentIdentifier:F}=e.parseUrl(E,A);return e.stringifyUrl({url:w,query:o(N,b),fragmentIdentifier:F},A)},e.exclude=(E,b,A)=>{const w=Array.isArray(b)?N=>!b.includes(N):(N,F)=>!b(N,F);return e.pick(E,w,A)}}(Qa)),Qa}var Ll;function ME(){return Ll||(Ll=1,function(e,t){(function(n,r){e.exports=r(PE(),BE())})(ae,function(n,r){return function(){var o={897:function(l){l.exports=n},48:function(l){l.exports=r}},i={};function s(l){var f=i[l];if(f!==void 0)return f.exports;var u=i[l]={exports:{}};return o[l](u,u.exports,s),u.exports}s.d=function(l,f){for(var u in f)s.o(f,u)&&!s.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:f[u]})},s.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return oe},getEntry:function(){return Y},setContext:function(){return m}});var l=s(897),f=s(48),u={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:c}}=u;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:c.CDN,space:d};const m=({apiKey:K,environment:k,isPreview:z=!1,location:J,previewKey:de,space:X=null})=>{p.apiKey=K,p.previewKey=de,p.environment=(ee=>{if(!ee)throw new Error("Cannot map environment: Environment not defined");if(!h[ee])throw new Error(`Cannot map environment: No mapping found for environment ${ee}`);return h[ee]})(k),p.isPreview=z||(ee=>{let ue=!1;if(ee&&ee.search){const ce=(0,f.parse)(ee.search);ue=ce.isPreview&&ce.isPreview==="true"}return ue})(J),p.space=X||d},_=(K=!1)=>{const{apiKey:k,environment:z,isPreview:J,previewKey:de,space:X}=p;return J===!0||K===!0?{accessToken:de,environment:z,host:c.PREVIEW,space:X}:{accessToken:k,environment:z,host:c.CDN,space:X}},T=K=>typeof K=="object"&&K!==null,E=K=>Array.isArray(K)&&K.length,b=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:k,sys:z}=K;if(!k)throw new Error("Cannot flatten fields");let J={...k};if(T(z)){const{contentType:de,createdAt:X,updatedAt:ee}=z;de&&Object.assign(J,{contentType:de.sys.id}),X&&Object.assign(J,{createdAt:X}),ee&&Object.assign(J,{updatedAt:ee})}return J},{CONTENTFUL:{LOCALES:A}}=u,w=(K,k)=>T(K)&&((z,J)=>Object.prototype.hasOwnProperty.call(z,J))(K,k),N=(K,k)=>{const z=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(k);return w(K,z)?K[z]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",M=(K,k,z)=>{const{title:J,file:de}=b(K);if(!de)throw new Error("Cannot flatten asset");const{contentType:X,fileName:ee,url:ue,details:ce}=N(de,k);if(!ue)throw new Error("Cannot flatten asset");return z?{description:J||ee,height:ce&&ce.image&&ce.image.height,type:X,url:ue,width:ce&&ce.image&&ce.image.width}:ue},W=K=>T(K)&&K.sys&&K.sys.type==="Entry",q=(K,k,z)=>{const J={},de=((X,ee)=>{const ue={};for(const[ce,Ve]of Object.entries(X))ue[ce]=N(Ve,ee);return ue})(b(K),k);for(const[X,ee]of Object.entries(de))F(ee)?J[X]=M(ee,k,z):W(ee)?J[X]=q(ee,k,z):E(ee)?J[X]=ee.map(ue=>F(ue)?M(ue,k,z):W(ue)?q(ue,k,z):ue):J[X]=ee;return J},V=({items:K})=>{if(!E(K))throw new Error("Cannot read items");return K},j=async(K,k)=>{const z=_(k);return await(await(0,l.createClient)(z)).getEntries(K)},Y=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?q(ue[0],X,ee):ue[0]})(await j(K,z),{...K,...k}),oe=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?((ce,Ve,Q)=>ce.map(re=>q(re,Ve,Q)))(ue,X,ee):ue})(await j(K,z),{...K,...k})}(),a}()})}(oa)),oa.exports}var ts={exports:{}},rs={exports:{}},ns={exports:{}},is={exports:{}},kl;function Iu(){return kl||(kl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){function n(m){return!isNaN(parseFloat(m))&&isFinite(m)}function r(m){return m.charAt(0).toUpperCase()+m.substring(1)}function o(m){return function(){return this[m]}}var i=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],l=["args"],f=["evalOrigin"],u=i.concat(s,a,l,f);function h(m){if(m)for(var _=0;_<u.length;_++)m[u[_]]!==void 0&&this["set"+r(u[_])](m[u[_]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",_=this.getLineNumber()||"",T=this.getColumnNumber()||"",E=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+_+":"+T+")":"[eval]:"+_+":"+T:E?E+" ("+m+":"+_+":"+T+")":m+":"+_+":"+T}},h.fromString=function(_){var T=_.indexOf("("),E=_.lastIndexOf(")"),b=_.substring(0,T),A=_.substring(T+1,E).split(","),w=_.substring(E+1);if(w.indexOf("@")===0)var N=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=N[1],M=N[2],W=N[3];return new h({functionName:b,args:A||void 0,fileName:F,lineNumber:M||void 0,columnNumber:W||void 0})};for(var d=0;d<i.length;d++)h.prototype["get"+r(i[d])]=o(i[d]),h.prototype["set"+r(i[d])]=function(m){return function(_){this[m]=!!_}}(i[d]);for(var c=0;c<s.length;c++)h.prototype["get"+r(s[c])]=o(s[c]),h.prototype["set"+r(s[c])]=function(m){return function(_){if(!n(_))throw new TypeError(m+" must be a Number");this[m]=Number(_)}}(s[c]);for(var p=0;p<a.length;p++)h.prototype["get"+r(a[p])]=o(a[p]),h.prototype["set"+r(a[p])]=function(m){return function(_){this[m]=String(_)}}(a[p]);return h})}(is)),is.exports}var Bl;function FE(){return Bl||(Bl=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(r){var o=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace<"u"||typeof l["opera#sourceloc"]<"u")return this.parseOpera(l);if(l.stack&&l.stack.match(i))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,u=f.exec(l.replace(/[()]/g,""));return[u[1],u[2]||void 0,u[3]||void 0]},parseV8OrIE:function(l){var f=l.stack.split(`
|
|
34
|
+
`),n}return!0}function uh(e){var t=Object.getOwnPropertyNames(e),n=M0(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o];i&&Ks(i)==="object"&&uh(i)}}catch(s){n.e(s)}finally{n.f()}return Object.freeze(e)}function X0(e){return uh(e.sys||{}),e}function cl(){var e=H0();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],o=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":i.indexOf(n)!==-1?"iOS":o.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function J0(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}function Z0(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{$0()?(i=cl(),o.push("platform ReactNative")):D0()?(i=J0(),o.push("platform node.js/".concat(j0()))):(i=cl(),o.push("platform browser"))}catch{i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter(function(s){return s!==""}).join("; "),";")}function eE(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return yr(this)}})}function tE(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var o="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(o)}if(!ao(n)||!ao(t))throw e;var i=n==null?void 0:n.data,s={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};ao(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),i&&ao(i)&&("requestId"in i&&(s.requestId=i.requestId||"UNKNOWN"),"message"in i&&(s.message=i.message||""),"details"in i&&(s.details=i.details||{}),"sys"in i&&"id"in i.sys&&(r=i.sys.id));var a=new Error;a.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var l;a.message=(l=s==null?void 0:s.message)!==null&&l!==void 0?l:""}throw a}const rE=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:sh,createRequestConfig:K0,enforceObjPath:Q0,errorHandler:tE,freezeSys:X0,getUserAgentHeader:Z0,toPlainObject:eE},Symbol.toStringTag,{value:"Module"})),Ht=Wi(rE);var so={},di={},uo={},ll;function nE(){if(ll)return uo;ll=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.wrapSpace=t;var e=Ht;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return uo}var hi={},Ka={exports:{}},fl;function Nn(){return fl||(fl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){var n=Function.prototype.toString,r=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,f=Object.prototype,u=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",c=typeof WeakMap=="function",p=function(){if(c)return function(){return new WeakMap};var F=function(){function M(){this._keys=[],this._values=[]}return M.prototype.has=function(q){return!!~this._keys.indexOf(q)},M.prototype.get=function(q){return this._values[this._keys.indexOf(q)]},M.prototype.set=function(q,W){this._keys.push(q),this._values.push(W)},M}();return function(){return new F}}(),m=function(F,M){var q=F.__proto__||l(F);if(!q)return r(null);var W=q.constructor;if(W===M.Object)return q===M.Object.prototype?{}:r(q);if(~n.call(W).indexOf("[native code]"))try{return new W}catch{}return r(q)},_=function(F,M,q,W){var V=m(F,M);W.set(F,V);for(var j in F)u.call(F,j)&&(V[j]=q(F[j],W));if(d)for(var Y=a(F),oe=0,K=Y.length,k=void 0;oe<K;++oe)k=Y[oe],h.call(F,k)&&(V[k]=q(F[k],W));return V},T=function(F,M,q,W){var V=m(F,M);W.set(F,V);for(var j=d?s(F).concat(a(F)):s(F),Y=0,oe=j.length,K=void 0,k=void 0;Y<oe;++Y)if(K=j[Y],K!=="callee"&&K!=="caller")if(k=i(F,K),k){!k.get&&!k.set&&(k.value=q(F[K],W));try{o(V,K,k)}catch{V[K]=k.value}}else V[K]=q(F[K],W);return V},E=function(F){var M="";return F.global&&(M+="g"),F.ignoreCase&&(M+="i"),F.multiline&&(M+="m"),F.unicode&&(M+="u"),F.sticky&&(M+="y"),M},b=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function N(F,M){var q=!!(M&&M.isStrict),W=M&&M.realm||w,V=q?T:_,j=function(Y,oe){if(!Y||typeof Y!="object")return Y;if(oe.has(Y))return oe.get(Y);var K=Y.__proto__||A(Y),k=K&&K.constructor;if(!k||k===W.Object)return V(Y,W,j,oe);var z;if(b(Y)){if(q)return T(Y,W,j,oe);z=new k,oe.set(Y,z);for(var J=0,de=Y.length;J<de;++J)z[J]=j(Y[J],oe);return z}if(Y instanceof W.Date)return new k(Y.getTime());if(Y instanceof W.RegExp)return z=new k(Y.source,Y.flags||E(Y)),z.lastIndex=Y.lastIndex,z;if(W.Map&&Y instanceof W.Map)return z=new k,oe.set(Y,z),Y.forEach(function(X,ee){z.set(ee,j(X,oe))}),z;if(W.Set&&Y instanceof W.Set)return z=new k,oe.set(Y,z),Y.forEach(function(X){z.add(j(X,oe))}),z;if(W.Blob&&Y instanceof W.Blob)return Y.slice(0,Y.size,Y.type);if(W.Buffer&&W.Buffer.isBuffer(Y))return z=W.Buffer.allocUnsafe?W.Buffer.allocUnsafe(Y.length):new k(Y.length),oe.set(Y,z),Y.copy(z),z;if(W.ArrayBuffer){if(W.ArrayBuffer.isView(Y))return z=new k(Y.buffer.slice(0)),oe.set(Y,z),z;if(Y instanceof W.ArrayBuffer)return z=Y.slice(0),oe.set(Y,z),z}return typeof Y.then=="function"||Y instanceof Error||W.WeakMap&&Y instanceof W.WeakMap||W.WeakSet&&Y instanceof W.WeakSet?Y:V(Y,W,j,oe)};return j(F,p())}return N.default=N,N.strict=function(M,q){return N(M,{isStrict:!0,realm:q?q.realm:void 0})},N})}(Ka)),Ka.exports}var co={},lo={exports:{}},dl;function iE(){return dl||(dl=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(o,i,s,a){return JSON.stringify(o,r(i,a),s)}function r(o,i){var s=[],a=[];return i==null&&(i=function(l,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(l,f){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,l):a.push(l),~s.indexOf(f)&&(f=i.call(this,l,f))}else s.push(f);return o==null?f:o.call(this,l,f)}}}(lo,lo.exports)),lo.exports}var hl;function ch(){if(hl)return co;hl=1,Object.defineProperty(co,"__esModule",{value:!0}),co.default=n;var e=t(iE());function t(r){return r&&r.__esModule?r:{default:r}}function n(r){return Object.defineProperty(r,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,o,i,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return co}var oE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aE=function(){function e(t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var a=t[Symbol.iterator](),l;!(o=(l=a.next()).done)&&(r.push(l.value),!(n&&r.length===n));o=!0);}catch(f){i=!0,s=f}finally{try{!o&&a.return&&a.return()}finally{if(i)throw s}}return r}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function pi(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var ji={},sE=function(t){return t&&t.sys&&t.sys.type==="Link"},uE=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},cE=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},pl=function(t,n){var r=n.entryId,o=n.linkType,i=n.spaceId,s=n.environmentId;return i&&s?t.get(i+"!"+s+"!"+o+"!"+r):t.get(o+"!"+r)},lE=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),o=aE(r,4);o[0];var i=o[1],s=o[2],a=s===void 0?"master":s,l=o[3];return{spaceId:i,environmentId:a,entryId:l}}},fE=function(t,n){var r=n.sys,o=r.type,i=r.linkType;if(o==="ResourceLink"){var s=n.sys.urn,a=lE(s),l=a.spaceId,f=a.environmentId,u=a.entryId,h=i.split(":")[1];return pl(t,{linkType:h,entryId:u,spaceId:l,environmentId:f})||ji}var d=n.sys.id;return pl(t,{linkType:i,entryId:d})||ji},dE=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==ji});for(var n in t)t[n]===ji&&delete t[n];return t},hE=function e(t,n,r,o){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":oE(t))==="object"){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=dE(t))}return t},pE=function(t,n,r){var o=fE(t,n);return o===ji?r?o:n:o},mE=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(o){return n.indexOf(o)!==-1});return r.reduce(function(o,i){return o[i]=t[i],o},{})},gE=function(t,n){if(n=n||{},!t.items)return[];var r=yr(t),o=Object.keys(r.includes||{}).reduce(function(a,l){return[].concat(pi(a),pi(t.includes[l]))},[]),i=[].concat(pi(r.items),pi(o)).filter(function(a){return!!a.sys}),s=new Map(i.reduce(function(a,l){var f=cE(l.sys).map(function(u){return[u,l]});return a.push.apply(a,pi(f)),a},[]));return i.forEach(function(a){var l=mE(a,n.itemEntryPoints);Object.assign(a,hE(l,function(f){return sE(f)||uE(f)},function(f){return pE(s,f,n.removeUnresolved)},n.removeUnresolved))}),r.items};const yE=Object.freeze(Object.defineProperty({__proto__:null,default:gE},Symbol.toStringTag,{value:"Module"})),lh=Wi(yE);var ml;function vE(){if(ml)return hi;ml=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.wrapEntry=i,hi.wrapEntryCollection=s;var e=o(Nn()),t=Ht,n=o(ch()),r=o(lh);function o(a){return a&&a.__esModule?a:{default:a}}function i(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,l){let{resolveLinks:f,removeUnresolved:u}=l;const h=(0,n.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,r.default)(h,{removeUnresolved:u,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return hi}var mi={},gl;function EE(){if(gl)return mi;gl=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.wrapAsset=r,mi.wrapAssetCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return mi}var fo={},yl;function _E(){if(yl)return fo;yl=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.wrapAssetKey=r;var e=n(Nn()),t=Ht;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return fo}var gi={},vl;function bE(){if(vl)return gi;vl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.wrapContentType=r,gi.wrapContentTypeCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return gi}var yi={},El;function wE(){if(El)return yi;El=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.wrapLocale=r,yi.wrapLocaleCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return yi}var vi={},_l;function SE(){if(_l)return vi;_l=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapTag=r,vi.wrapTagCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return vi}var bl;function TE(){if(bl)return di;bl=1,Object.defineProperty(di,"__esModule",{value:!0}),di.default=void 0;var e=l(nE()),t=l(vE()),n=l(EE()),r=l(_E()),o=l(bE()),i=l(wE()),s=l(SE());function a(u){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(c){return c?d:h})(u)}function l(u,h){if(!h&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var d=a(h);if(d&&d.has(u))return d.get(u);var c={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in u)if(m!=="default"&&Object.prototype.hasOwnProperty.call(u,m)){var _=p?Object.getOwnPropertyDescriptor(u,m):null;_&&(_.get||_.set)?Object.defineProperty(c,m,_):c[m]=u[m]}return c.default=u,d&&d.set(u,c),c}var f={space:e,entry:t,asset:n,assetKey:r,contentType:o,locale:i,tag:s};return di.default=f,di}var ho={},wl;function OE(){if(wl)return ho;wl=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=a;var e=Ht,t=r(lh),n=r(ch());function r(h){return h&&h.__esModule?h:{default:h}}function o(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function i(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?o(Object(c),!0).forEach(function(p){s(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):o(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function s(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}async function a(h,d){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:_,paginate:T}=i(i({},p),c),b=await f(h,[],d,{paginate:T});m&&(b.items=(0,t.default)(b,{removeUnresolved:_,itemEntryPoints:["fields"]}));const A=l(b.items);return b.nextSyncToken&&(A.nextSyncToken=b.nextSyncToken),b.nextPageToken&&(A.nextPageToken=b.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(A)))}function l(h){const d=c=>(p,m)=>(m.sys.type===c&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,c,p){let{paginate:m}=p;c.nextSyncToken&&(c.sync_token=c.nextSyncToken,delete c.nextSyncToken),c.nextPageToken&&(c.sync_token=c.nextPageToken,delete c.nextPageToken),c.sync_token&&(delete c.initial,delete c.type,delete c.content_type,delete c.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:c}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete c.initial,c.sync_token=u(T.nextPageUrl),f(h,d,c,{paginate:m})):{items:d,nextPageToken:u(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:u(T.nextSyncUrl)}:{items:[]}}function u(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return ho}var po={},Sl;function xE(){if(Sl)return po;Sl=1,Object.defineProperty(po,"__esModule",{value:!0}),po.default=r;function e(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),s.push.apply(s,a)}return s}function t(o){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?e(Object(s),!0).forEach(function(a){n(o,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(s,a))})}return o}function n(o,i,s){return i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}function r(o){if(!o.select)return o;const i=Array.isArray(o.select)?o.select:o.select.split(","),s=new Set(i);return s.has("sys")?o:(s.add("sys.id"),s.add("sys.type"),t(t({},o),{},{select:[...s].join(",")}))}return po}var En={},Tl;function AE(){if(Tl)return En;Tl=1,Object.defineProperty(En,"__esModule",{value:!0}),En.ValidationError=void 0,En.default=t;class e extends Error{constructor(r,o){super(`Invalid "${r}" provided, `+o),this.name="ValidationError"}}En.ValidationError=e;function t(n,r,o){if(o=o||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(o.maximum&&r>o.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${o.maximum})`);if(o.now&&r<o.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${o.now}`)}return En}var Ol;function CE(){if(Ol)return so;Ol=1,Object.defineProperty(so,"__esModule",{value:!0}),so.default=u;var e=Ht,t=i(TE()),n=i(OE()),r=i(xE()),o=i(AE());function i(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function a(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?s(Object(c),!0).forEach(function(p){l(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):s(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function l(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}const f=48*60*60;function u(h){let{http:d,getGlobalOptions:c}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:E}=t.default.entry,{wrapAsset:b,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:N}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:M}=t.default.locale,q=Q=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:Q,environment:c().environment,space:c().space},re};async function W(){Ve(d);try{const Q=await d.get("/");return p(Q.data)}catch(Q){(0,e.errorHandler)(Q)}}async function V(Q){ce(d);try{const re=await d.get(`content_types/${Q}`);return m(re.data)}catch(re){(0,e.errorHandler)(re)}}async function j(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("content_types",(0,e.createRequestConfig)({query:Q}));return _(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Q)throw q(Q);try{const Pe=await this.getEntries(a({"sys.id":Q},re));if(Pe.items.length>0)return T(Pe.items[0]);throw q(Q)}catch(Pe){(0,e.errorHandler)(Pe)}}async function oe(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);const{resolveLinks:re,removeUnresolved:Pe}=c(Q);Q=(0,r.default)(Q);try{const xe=await d.get("entries",(0,e.createRequestConfig)({query:Q}));return E(xe.data,{resolveLinks:re,removeUnresolved:Pe})}catch(xe){(0,e.errorHandler)(xe)}}async function K(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ce(d),re=(0,r.default)(re);try{const Pe=await d.get(`assets/${Q}`,(0,e.createRequestConfig)({query:re}));return b(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function k(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("assets",(0,e.createRequestConfig)({query:Q}));return A(re.data)}catch(re){(0,e.errorHandler)(re)}}async function z(Q){ce(d);try{const re=await d.get(`tags/${Q}`);return w(re.data)}catch(re){(0,e.errorHandler)(re)}}async function J(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("tags",(0,e.createRequestConfig)({query:Q}));return N(re.data)}catch(re){(0,e.errorHandler)(re)}}async function de(Q){ce(d);try{const re=Math.floor(Date.now()/1e3),Pe=re+f;(0,o.default)("expiresAt",Q,{maximum:Pe,now:re});const xe={expiresAt:Q},at=await d.post("asset_keys",xe);return F(at.data)}catch(re){(0,e.errorHandler)(re)}}async function X(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("locales",(0,e.createRequestConfig)({query:Q}));return M(re.data)}catch(re){(0,e.errorHandler)(re)}}async function ee(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:xe}=c(Q);return ce(d),(0,n.default)(d,Q,a({resolveLinks:Pe,removeUnresolved:xe},re))}function ue(Q){const{resolveLinks:re,removeUnresolved:Pe}=c({});return E(Q,{resolveLinks:re,removeUnresolved:Pe})}function ce(Q){Q.defaults.baseURL=c().environmentBaseUrl}function Ve(Q){Q.defaults.baseURL=c().spaceBaseUrl}return{getSpace:W,getContentType:V,getContentTypes:j,getEntry:Y,getEntries:oe,getAsset:K,getAssets:k,getTag:z,getTags:J,createAssetKey:de,getLocales:X,parseEntries:ue,sync:ee}}return so}var mo={},xl;function RE(){if(xl)return mo;xl=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return mo}var Al;function PE(){if(Al)return to;Al=1,Object.defineProperty(to,"__esModule",{value:!0}),to.createClient=l;var e=o(Ud()),t=Ht,n=o(CE()),r=o(RE());function o(f){return f&&f.__esModule?f:{default:f}}function i(f,u){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);u&&(d=d.filter(function(c){return Object.getOwnPropertyDescriptor(f,c).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};u%2?i(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,u,h){return u in f?Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[u]=h,f}function l(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const c=(0,t.createHttpClient)(e.default,h),p=(0,r.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:c.defaults.baseURL,environmentBaseUrl:`${c.defaults.baseURL}environments/${h.environment}`});return c.defaults.baseURL=p().environmentBaseUrl,(0,n.default)({http:c,getGlobalOptions:p})}return to}var Qa={},Xa,Cl;function IE(){return Cl||(Cl=1,Xa=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Xa}var Ja,Rl;function NE(){if(Rl)return Ja;Rl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var l=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],r(l),r(f))}function o(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],l=1;l<a.length;l++)s=r(a,l).join(""),a=s.match(t)||[];return s}}function i(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},l=n.exec(s);l;){try{a[l[0]]=decodeURIComponent(l[0])}catch{var f=o(l[0]);f!==l[0]&&(a[l[0]]=f)}l=n.exec(s)}a["%C2"]="�";for(var u=Object.keys(a),h=0;h<u.length;h++){var d=u[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return Ja=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return i(s)}},Ja}var Za,Pl;function LE(){return Pl||(Pl=1,Za=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}),Za}var es,Il;function kE(){return Il||(Il=1,es=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?t.indexOf(s)!==-1:t(s,a,e))&&(n[s]=a)}return n}),es}var Nl;function BE(){return Nl||(Nl=1,function(e){const t=IE(),n=NE(),r=LE(),o=kE(),i=E=>E==null,s=Symbol("encodeFragmentIdentifier");function a(E){switch(E.arrayFormat){case"index":return b=>(A,w)=>{const N=A.length;return w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[",N,"]"].join("")]:[...A,[u(b,E),"[",u(N,E),"]=",u(w,E)].join("")]};case"bracket":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[]"].join("")]:[...A,[u(b,E),"[]=",u(w,E)].join("")];case"colon-list-separator":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),":list="].join("")]:[...A,[u(b,E),":list=",u(w,E)].join("")];case"comma":case"separator":case"bracket-separator":{const b=E.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,N)=>N===void 0||E.skipNull&&N===null||E.skipEmptyString&&N===""?w:(N=N===null?"":N,w.length===0?[[u(A,E),b,u(N,E)].join("")]:[[w,u(N,E)].join(E.arrayFormatSeparator)])}default:return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,u(b,E)]:[...A,[u(b,E),"=",u(w,E)].join("")]}}function l(E){let b;switch(E.arrayFormat){case"index":return(A,w,N)=>{if(b=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!b){N[A]=w;return}N[A]===void 0&&(N[A]={}),N[A][b[1]]=w};case"bracket":return(A,w,N)=>{if(b=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"colon-list-separator":return(A,w,N)=>{if(b=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"comma":case"separator":return(A,w,N)=>{const F=typeof w=="string"&&w.includes(E.arrayFormatSeparator),M=typeof w=="string"&&!F&&h(w,E).includes(E.arrayFormatSeparator);w=M?h(w,E):w;const q=F||M?w.split(E.arrayFormatSeparator).map(W=>h(W,E)):w===null?w:h(w,E);N[A]=q};case"bracket-separator":return(A,w,N)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){N[A]=w&&h(w,E);return}const M=w===null?[]:w.split(E.arrayFormatSeparator).map(q=>h(q,E));if(N[A]===void 0){N[A]=M;return}N[A]=[].concat(N[A],M)};default:return(A,w,N)=>{if(N[A]===void 0){N[A]=w;return}N[A]=[].concat(N[A],w)}}}function f(E){if(typeof E!="string"||E.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(E,b){return b.encode?b.strict?t(E):encodeURIComponent(E):E}function h(E,b){return b.decode?n(E):E}function d(E){return Array.isArray(E)?E.sort():typeof E=="object"?d(Object.keys(E)).sort((b,A)=>Number(b)-Number(A)).map(b=>E[b]):E}function c(E){const b=E.indexOf("#");return b!==-1&&(E=E.slice(0,b)),E}function p(E){let b="";const A=E.indexOf("#");return A!==-1&&(b=E.slice(A)),b}function m(E){E=c(E);const b=E.indexOf("?");return b===-1?"":E.slice(b+1)}function _(E,b){return b.parseNumbers&&!Number.isNaN(Number(E))&&typeof E=="string"&&E.trim()!==""?E=Number(E):b.parseBooleans&&E!==null&&(E.toLowerCase()==="true"||E.toLowerCase()==="false")&&(E=E.toLowerCase()==="true"),E}function T(E,b){b=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},b),f(b.arrayFormatSeparator);const A=l(b),w=Object.create(null);if(typeof E!="string"||(E=E.trim().replace(/^[?#&]/,""),!E))return w;for(const N of E.split("&")){if(N==="")continue;let[F,M]=r(b.decode?N.replace(/\+/g," "):N,"=");M=M===void 0?null:["comma","separator","bracket-separator"].includes(b.arrayFormat)?M:h(M,b),A(h(F,b),M,w)}for(const N of Object.keys(w)){const F=w[N];if(typeof F=="object"&&F!==null)for(const M of Object.keys(F))F[M]=_(F[M],b);else w[N]=_(F,b)}return b.sort===!1?w:(b.sort===!0?Object.keys(w).sort():Object.keys(w).sort(b.sort)).reduce((N,F)=>{const M=w[F];return M&&typeof M=="object"&&!Array.isArray(M)?N[F]=d(M):N[F]=M,N},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(E,b)=>{if(!E)return"";b=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},b),f(b.arrayFormatSeparator);const A=M=>b.skipNull&&i(E[M])||b.skipEmptyString&&E[M]==="",w=a(b),N={};for(const M of Object.keys(E))A(M)||(N[M]=E[M]);const F=Object.keys(N);return b.sort!==!1&&F.sort(b.sort),F.map(M=>{const q=E[M];return q===void 0?"":q===null?u(M,b):Array.isArray(q)?q.length===0&&b.arrayFormat==="bracket-separator"?u(M,b)+"[]":q.reduce(w(M),[]).join("&"):u(M,b)+"="+u(q,b)}).filter(M=>M.length>0).join("&")},e.parseUrl=(E,b)=>{b=Object.assign({decode:!0},b);const[A,w]=r(E,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(E),b)},b&&b.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,b)}:{})},e.stringifyUrl=(E,b)=>{b=Object.assign({encode:!0,strict:!0,[s]:!0},b);const A=c(E.url).split("?")[0]||"",w=e.extract(E.url),N=e.parse(w,{sort:!1}),F=Object.assign(N,E.query);let M=e.stringify(F,b);M&&(M=`?${M}`);let q=p(E.url);return E.fragmentIdentifier&&(q=`#${b[s]?u(E.fragmentIdentifier,b):E.fragmentIdentifier}`),`${A}${M}${q}`},e.pick=(E,b,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:N,fragmentIdentifier:F}=e.parseUrl(E,A);return e.stringifyUrl({url:w,query:o(N,b),fragmentIdentifier:F},A)},e.exclude=(E,b,A)=>{const w=Array.isArray(b)?N=>!b.includes(N):(N,F)=>!b(N,F);return e.pick(E,w,A)}}(Qa)),Qa}var Ll;function ME(){return Ll||(Ll=1,function(e,t){(function(n,r){e.exports=r(PE(),BE())})(ae,function(n,r){return function(){var o={897:function(l){l.exports=n},48:function(l){l.exports=r}},i={};function s(l){var f=i[l];if(f!==void 0)return f.exports;var u=i[l]={exports:{}};return o[l](u,u.exports,s),u.exports}s.d=function(l,f){for(var u in f)s.o(f,u)&&!s.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:f[u]})},s.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return oe},getEntry:function(){return Y},setContext:function(){return m}});var l=s(897),f=s(48),u={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:c}}=u;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:c.CDN,space:d};const m=({apiKey:K,environment:k,isPreview:z=!1,location:J,previewKey:de,space:X=null})=>{p.apiKey=K,p.previewKey=de,p.environment=(ee=>{if(!ee)throw new Error("Cannot map environment: Environment not defined");if(!h[ee])throw new Error(`Cannot map environment: No mapping found for environment ${ee}`);return h[ee]})(k),p.isPreview=z||(ee=>{let ue=!1;if(ee&&ee.search){const ce=(0,f.parse)(ee.search);ue=ce.isPreview&&ce.isPreview==="true"}return ue})(J),p.space=X||d},_=(K=!1)=>{const{apiKey:k,environment:z,isPreview:J,previewKey:de,space:X}=p;return J===!0||K===!0?{accessToken:de,environment:z,host:c.PREVIEW,space:X}:{accessToken:k,environment:z,host:c.CDN,space:X}},T=K=>typeof K=="object"&&K!==null,E=K=>Array.isArray(K)&&K.length,b=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:k,sys:z}=K;if(!k)throw new Error("Cannot flatten fields");let J={...k};if(T(z)){const{contentType:de,createdAt:X,updatedAt:ee}=z;de&&Object.assign(J,{contentType:de.sys.id}),X&&Object.assign(J,{createdAt:X}),ee&&Object.assign(J,{updatedAt:ee})}return J},{CONTENTFUL:{LOCALES:A}}=u,w=(K,k)=>T(K)&&((z,J)=>Object.prototype.hasOwnProperty.call(z,J))(K,k),N=(K,k)=>{const z=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(k);return w(K,z)?K[z]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",M=(K,k,z)=>{const{title:J,file:de}=b(K);if(!de)throw new Error("Cannot flatten asset");const{contentType:X,fileName:ee,url:ue,details:ce}=N(de,k);if(!ue)throw new Error("Cannot flatten asset");return z?{description:J||ee,height:ce&&ce.image&&ce.image.height,type:X,url:ue,width:ce&&ce.image&&ce.image.width}:ue},q=K=>T(K)&&K.sys&&K.sys.type==="Entry",W=(K,k,z)=>{const J={},de=((X,ee)=>{const ue={};for(const[ce,Ve]of Object.entries(X))ue[ce]=N(Ve,ee);return ue})(b(K),k);for(const[X,ee]of Object.entries(de))F(ee)?J[X]=M(ee,k,z):q(ee)?J[X]=W(ee,k,z):E(ee)?J[X]=ee.map(ue=>F(ue)?M(ue,k,z):q(ue)?W(ue,k,z):ue):J[X]=ee;return J},V=({items:K})=>{if(!E(K))throw new Error("Cannot read items");return K},j=async(K,k)=>{const z=_(k);return await(await(0,l.createClient)(z)).getEntries(K)},Y=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?W(ue[0],X,ee):ue[0]})(await j(K,z),{...K,...k}),oe=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?((ce,Ve,Q)=>ce.map(re=>W(re,Ve,Q)))(ue,X,ee):ue})(await j(K,z),{...K,...k})}(),a}()})}(oa)),oa.exports}var ts={exports:{}},rs={exports:{}},ns={exports:{}},is={exports:{}},kl;function Iu(){return kl||(kl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){function n(m){return!isNaN(parseFloat(m))&&isFinite(m)}function r(m){return m.charAt(0).toUpperCase()+m.substring(1)}function o(m){return function(){return this[m]}}var i=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],l=["args"],f=["evalOrigin"],u=i.concat(s,a,l,f);function h(m){if(m)for(var _=0;_<u.length;_++)m[u[_]]!==void 0&&this["set"+r(u[_])](m[u[_]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",_=this.getLineNumber()||"",T=this.getColumnNumber()||"",E=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+_+":"+T+")":"[eval]:"+_+":"+T:E?E+" ("+m+":"+_+":"+T+")":m+":"+_+":"+T}},h.fromString=function(_){var T=_.indexOf("("),E=_.lastIndexOf(")"),b=_.substring(0,T),A=_.substring(T+1,E).split(","),w=_.substring(E+1);if(w.indexOf("@")===0)var N=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=N[1],M=N[2],q=N[3];return new h({functionName:b,args:A||void 0,fileName:F,lineNumber:M||void 0,columnNumber:q||void 0})};for(var d=0;d<i.length;d++)h.prototype["get"+r(i[d])]=o(i[d]),h.prototype["set"+r(i[d])]=function(m){return function(_){this[m]=!!_}}(i[d]);for(var c=0;c<s.length;c++)h.prototype["get"+r(s[c])]=o(s[c]),h.prototype["set"+r(s[c])]=function(m){return function(_){if(!n(_))throw new TypeError(m+" must be a Number");this[m]=Number(_)}}(s[c]);for(var p=0;p<a.length;p++)h.prototype["get"+r(a[p])]=o(a[p]),h.prototype["set"+r(a[p])]=function(m){return function(_){this[m]=String(_)}}(a[p]);return h})}(is)),is.exports}var Bl;function FE(){return Bl||(Bl=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(r){var o=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace<"u"||typeof l["opera#sourceloc"]<"u")return this.parseOpera(l);if(l.stack&&l.stack.match(i))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,u=f.exec(l.replace(/[()]/g,""));return[u[1],u[2]||void 0,u[3]||void 0]},parseV8OrIE:function(l){var f=l.stack.split(`
|
|
35
35
|
`).filter(function(u){return!!u.match(i)},this);return f.map(function(u){u.indexOf("(eval ")>-1&&(u=u.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var h=u.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=h.match(/ (\(.+\)$)/);h=d?h.replace(d[0],""):h;var c=this.extractLocation(d?d[1]:h),p=d&&h||void 0,m=["eval","<anonymous>"].indexOf(c[0])>-1?void 0:c[0];return new r({functionName:p,fileName:m,lineNumber:c[1],columnNumber:c[2],source:u})},this)},parseFFOrSafari:function(l){var f=l.stack.split(`
|
|
36
36
|
`).filter(function(u){return!u.match(s)},this);return f.map(function(u){if(u.indexOf(" > eval")>-1&&(u=u.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),u.indexOf("@")===-1&&u.indexOf(":")===-1)return new r({functionName:u});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=u.match(h),c=d&&d[1]?d[1]:void 0,p=this.extractLocation(u.replace(h,""));return new r({functionName:c,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:u})},this)},parseOpera:function(l){return!l.stacktrace||l.message.indexOf(`
|
|
37
37
|
`)>-1&&l.message.split(`
|
|
@@ -39,7 +39,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
39
39
|
`).length?this.parseOpera9(l):l.stack?this.parseOpera11(l):this.parseOpera10(l)},parseOpera9:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)/i,u=l.message.split(`
|
|
40
40
|
`),h=[],d=2,c=u.length;d<c;d+=2){var p=f.exec(u[d]);p&&h.push(new r({fileName:p[2],lineNumber:p[1],source:u[d]}))}return h},parseOpera10:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,u=l.stacktrace.split(`
|
|
41
41
|
`),h=[],d=0,c=u.length;d<c;d+=2){var p=f.exec(u[d]);p&&h.push(new r({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:u[d]}))}return h},parseOpera11:function(l){var f=l.stack.split(`
|
|
42
|
-
`).filter(function(u){return!!u.match(o)&&!u.match(/^Error created at/)},this);return f.map(function(u){var h=u.split("@"),d=this.extractLocation(h.pop()),c=h.shift()||"",p=c.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;c.match(/\(([^)]*)\)/)&&(m=c.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new r({functionName:p,args:_,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:u})},this)}}})}(ns)),ns.exports}var os={exports:{}},Ml;function UE(){return Ml||(Ml=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(n){return{backtrace:function(o){var i=[],s=10;typeof o=="object"&&typeof o.maxStackSize=="number"&&(s=o.maxStackSize);for(var a=arguments.callee;a&&i.length<s&&a.arguments;){for(var l=new Array(a.arguments.length),f=0;f<l.length;++f)l[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?i.push(new n({functionName:RegExp.$1||void 0,args:l})):i.push(new n({args:l}));try{a=a.caller}catch{break}}return i}}})}(os)),os.exports}var as={exports:{}},Ei={},ss={},Fl;function fh(){return Fl||(Fl=1,function(e){function t(E,b,A){if(b in E)return E[b];if(arguments.length===3)return A;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function o(E){var b=E.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(E){var b="";return E.scheme&&(b+=E.scheme+":"),b+="//",E.auth&&(b+=E.auth+"@"),E.host&&(b+=E.host),E.port&&(b+=":"+E.port),E.path&&(b+=E.path),b}e.urlGenerate=i;function s(E){var b=E,A=o(E);if(A){if(!A.path)return E;b=A.path}for(var w=e.isAbsolute(b),N=b.split(/\/+/),F,M=0,W=N.length-1;W>=0;W--)F=N[W],F==="."?N.splice(W,1):F===".."?M++:M>0&&(F===""?(N.splice(W+1,M),M=0):(N.splice(W,2),M--));return b=N.join("/"),b===""&&(b=w?"/":"."),A?(A.path=b,i(A)):b}e.normalize=s;function a(E,b){E===""&&(E="."),b===""&&(b=".");var A=o(b),w=o(E);if(w&&(E=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),i(A);if(A||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,i(w);var N=b.charAt(0)==="/"?b:s(E.replace(/\/+$/,"")+"/"+b);return w?(w.path=N,i(w)):N}e.join=a,e.isAbsolute=function(E){return E.charAt(0)==="/"||!!E.match(n)};function l(E,b){E===""&&(E="."),E=E.replace(/\/$/,"");for(var A=0;b.indexOf(E+"/")!==0;){var w=E.lastIndexOf("/");if(w<0||(E=E.slice(0,w),E.match(/^([^\/]+:\/)?\/*$/)))return b;++A}return Array(A+1).join("../")+b.substr(E.length+1)}e.relative=l;var f=function(){var E=Object.create(null);return!("__proto__"in E)}();function u(E){return E}function h(E){return c(E)?"$"+E:E}e.toSetString=f?u:h;function d(E){return c(E)?E.slice(1):E}e.fromSetString=f?u:d;function c(E){if(!E)return!1;var b=E.length;if(b<9||E.charCodeAt(b-1)!==95||E.charCodeAt(b-2)!==95||E.charCodeAt(b-3)!==111||E.charCodeAt(b-4)!==116||E.charCodeAt(b-5)!==111||E.charCodeAt(b-6)!==114||E.charCodeAt(b-7)!==112||E.charCodeAt(b-8)!==95||E.charCodeAt(b-9)!==95)return!1;for(var A=b-10;A>=0;A--)if(E.charCodeAt(A)!==36)return!1;return!0}function p(E,b,A){var w=E.source-b.source;return w!==0||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0||A)||(w=E.generatedColumn-b.generatedColumn,w!==0)||(w=E.generatedLine-b.generatedLine,w!==0)?w:E.name-b.name}e.compareByOriginalPositions=p;function m(E,b,A){var w=E.generatedLine-b.generatedLine;return w!==0||(w=E.generatedColumn-b.generatedColumn,w!==0||A)||(w=E.source-b.source,w!==0)||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0)?w:E.name-b.name}e.compareByGeneratedPositionsDeflated=m;function _(E,b){return E===b?0:E>b?1:-1}function T(E,b){var A=E.generatedLine-b.generatedLine;return A!==0||(A=E.generatedColumn-b.generatedColumn,A!==0)||(A=_(E.source,b.source),A!==0)||(A=E.originalLine-b.originalLine,A!==0)||(A=E.originalColumn-b.originalColumn,A!==0)?A:_(E.name,b.name)}e.compareByGeneratedPositionsInflated=T}(ss)),ss}var us={},Ul;function DE(){return Ul||(Ul=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,o,i,s,a){var l=Math.floor((r-n)/2)+n,f=s(o,i[l],!0);return f===0?l:f>0?r-l>1?t(l,r,o,i,s,a):a==e.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-n>1?t(n,l,o,i,s,a):a==e.LEAST_UPPER_BOUND?l:n<0?-1:n}e.search=function(r,o,i,s){if(o.length===0)return-1;var a=t(-1,o.length,r,o,i,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&i(o[a],o[a-1],!0)===0;)--a;return a}}(us)),us}var cs={},Dl;function $E(){if(Dl)return cs;Dl=1;var e=fh(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(o,i){for(var s=new n,a=0,l=o.length;a<l;a++)s.add(o[a],i);return s},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var s=e.toSetString(o),a=t.call(this._set,s),l=this._array.length;(!a||i)&&this._array.push(o),a||(this._set[s]=l)},n.prototype.has=function(o){var i=e.toSetString(o);return t.call(this._set,i)},n.prototype.indexOf=function(o){var i=e.toSetString(o);if(t.call(this._set,i))return this._set[i];throw new Error('"'+o+'" is not in the set.')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},n.prototype.toArray=function(){return this._array.slice()},cs.ArraySet=n,cs}var go={},yo={},$l;function jE(){if($l)return yo;$l=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return yo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},yo.decode=function(t){var n=65,r=90,o=97,i=122,s=48,a=57,l=43,f=47,u=26,h=52;return n<=t&&t<=r?t-n:o<=t&&t<=i?t-o+u:s<=t&&t<=a?t-s+h:t==l?62:t==f?63:-1},yo}var jl;function HE(){if(jl)return go;jl=1;var e=jE(),t=5,n=1<<t,r=n-1,o=n;function i(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var l=(a&1)===1,f=a>>1;return l?-f:f}return go.encode=function(l){var f="",u,h=i(l);do u=h&r,h>>>=t,h>0&&(u|=o),f+=e.encode(u);while(h>0);return f},go.decode=function(l,f,u){var h=l.length,d=0,c=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(l.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+l.charAt(f-1));p=!!(m&o),m&=r,d=d+(m<<c),c+=t}while(p);u.value=s(d),u.rest=f},go}var ls={},Hl;function qE(){if(Hl)return ls;Hl=1;function e(r,o,i){var s=r[o];r[o]=r[i],r[i]=s}function t(r,o){return Math.round(r+Math.random()*(o-r))}function n(r,o,i,s){if(i<s){var a=t(i,s),l=i-1;e(r,a,s);for(var f=r[s],u=i;u<s;u++)o(r[u],f)<=0&&(l+=1,e(r,l,u));e(r,l+1,u);var h=l+1;n(r,o,i,h-1),n(r,o,h+1,s)}}return ls.quickSort=function(r,o){n(r,o,0,r.length-1)},ls}var ql;function GE(){if(ql)return Ei;ql=1;var e=fh(),t=DE(),n=$E().ArraySet,r=HE(),o=qE().quickSort;function i(f){var u=f;return typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,""))),u.sections!=null?new l(u):new s(u)}i.fromSourceMap=function(f){return s.fromSourceMap(f)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(u,h){var d=u.charAt(h);return d===";"||d===","},i.prototype._parseMappings=function(u,h){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(u,h,d){var c=h||null,p=d||i.GENERATED_ORDER,m;switch(p){case i.GENERATED_ORDER:m=this._generatedMappings;break;case i.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;m.map(function(T){var E=T.source===null?null:this._sources.at(T.source);return E!=null&&_!=null&&(E=e.join(_,E)),{source:E,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(u,c)},i.prototype.allGeneratedPositionsFor=function(u){var h=e.getArg(u,"line"),d={source:e.getArg(u,"source"),originalLine:h,originalColumn:e.getArg(u,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var c=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(u.column===void 0)for(var _=m.originalLine;m&&m.originalLine===_;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return c},Ei.SourceMapConsumer=i;function s(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sources"),c=e.getArg(u,"names",[]),p=e.getArg(u,"sourceRoot",null),m=e.getArg(u,"sourcesContent",null),_=e.getArg(u,"mappings"),T=e.getArg(u,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(E){return p&&e.isAbsolute(p)&&e.isAbsolute(E)?e.relative(p,E):E}),this._names=n.fromArray(c.map(String),!0),this._sources=n.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=_,this.file=T}s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.fromSourceMap=function(u){var h=Object.create(s.prototype),d=h._names=n.fromArray(u._names.toArray(),!0),c=h._sources=n.fromArray(u._sources.toArray(),!0);h.sourceRoot=u._sourceRoot,h.sourcesContent=u._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=u._file;for(var p=u._mappings.toArray().slice(),m=h.__generatedMappings=[],_=h.__originalMappings=[],T=0,E=p.length;T<E;T++){var b=p[T],A=new a;A.generatedLine=b.generatedLine,A.generatedColumn=b.generatedColumn,b.source&&(A.source=c.indexOf(b.source),A.originalLine=b.originalLine,A.originalColumn=b.originalColumn,b.name&&(A.name=d.indexOf(b.name)),_.push(A)),m.push(A)}return o(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(u,h){for(var d=1,c=0,p=0,m=0,_=0,T=0,E=u.length,b=0,A={},w={},N=[],F=[],M,W,q,V,j;b<E;)if(u.charAt(b)===";")d++,b++,c=0;else if(u.charAt(b)===",")b++;else{for(M=new a,M.generatedLine=d,V=b;V<E&&!this._charIsMappingSeparator(u,V);V++);if(W=u.slice(b,V),q=A[W],q)b+=W.length;else{for(q=[];b<V;)r.decode(u,b,w),j=w.value,b=w.rest,q.push(j);if(q.length===2)throw new Error("Found a source, but no line and column");if(q.length===3)throw new Error("Found a source and line, but no column");A[W]=q}M.generatedColumn=c+q[0],c=M.generatedColumn,q.length>1&&(M.source=_+q[1],_+=q[1],M.originalLine=p+q[2],p=M.originalLine,M.originalLine+=1,M.originalColumn=m+q[3],m=M.originalColumn,q.length>4&&(M.name=T+q[4],T+=q[4])),F.push(M),typeof M.originalLine=="number"&&N.push(M)}o(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,o(N,e.compareByOriginalPositions),this.__originalMappings=N},s.prototype._findMapping=function(u,h,d,c,p,m){if(u[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+u[d]);if(u[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+u[c]);return t.search(u,h,p,m)},s.prototype.computeColumnSpans=function(){for(var u=0;u<this._generatedMappings.length;++u){var h=this._generatedMappings[u];if(u+1<this._generatedMappings.length){var d=this._generatedMappings[u+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(d>=0){var c=this._generatedMappings[d];if(c.generatedLine===h.generatedLine){var p=e.getArg(c,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(c,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(c,"originalLine",null),column:e.getArg(c,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(u){return u==null}):!1},s.prototype.sourceContentFor=function(u,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(u=e.relative(this.sourceRoot,u)),this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var c=u.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!d.path||d.path=="/")&&this._sources.has("/"+u))return this.sourcesContent[this._sources.indexOf("/"+u)]}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(u){var h=e.getArg(u,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(u,"line"),originalColumn:e.getArg(u,"column")},c=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(c>=0){var p=this._originalMappings[c];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ei.BasicSourceMapConsumer=s;function l(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new n,this._names=new n;var c={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),_=e.getArg(m,"line"),T=e.getArg(m,"column");if(_<c.line||_===c.line&&T<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=m,{generatedOffset:{generatedLine:_+1,generatedColumn:T+1},consumer:new i(e.getArg(p,"map"))}})}return l.prototype=Object.create(i.prototype),l.prototype.constructor=i,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var f=[],u=0;u<this._sections.length;u++)for(var h=0;h<this._sections[u].consumer.sources.length;h++)f.push(this._sections[u].consumer.sources[h]);return f}}),l.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=t.search(h,this._sections,function(p,m){var _=p.generatedLine-m.generatedOffset.generatedLine;return _||p.generatedColumn-m.generatedOffset.generatedColumn}),c=this._sections[d];return c?c.consumer.originalPositionFor({line:h.generatedLine-(c.generatedOffset.generatedLine-1),column:h.generatedColumn-(c.generatedOffset.generatedLine===h.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:u.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(u){return u.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(u,h){for(var d=0;d<this._sections.length;d++){var c=this._sections[d],p=c.consumer.sourceContentFor(u,!0);if(p)return p}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(u){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(u,"source"))!==-1){var c=d.consumer.generatedPositionFor(u);if(c){var p={line:c.line+(d.generatedOffset.generatedLine-1),column:c.column+(d.generatedOffset.generatedLine===c.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},l.prototype._parseMappings=function(u,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var c=this._sections[d],p=c.consumer._generatedMappings,m=0;m<p.length;m++){var _=p[m],T=c.consumer._sources.at(_.source);c.consumer.sourceRoot!==null&&(T=e.join(c.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var E=c.consumer._names.at(_.name);this._names.add(E),E=this._names.indexOf(E);var b={source:T,generatedLine:_.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(c.generatedOffset.generatedLine===_.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:E};this.__generatedMappings.push(b),typeof b.originalLine=="number"&&this.__originalMappings.push(b)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},Ei.IndexedSourceMapConsumer=l,Ei}var Gl;function WE(){return Gl||(Gl=1,function(e,t){(function(n,r){e.exports=r(GE(),Iu())})(ae,function(n,r){function o(d){return new Promise(function(c,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?c(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function i(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,c){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
|
|
42
|
+
`).filter(function(u){return!!u.match(o)&&!u.match(/^Error created at/)},this);return f.map(function(u){var h=u.split("@"),d=this.extractLocation(h.pop()),c=h.shift()||"",p=c.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;c.match(/\(([^)]*)\)/)&&(m=c.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new r({functionName:p,args:_,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:u})},this)}}})}(ns)),ns.exports}var os={exports:{}},Ml;function UE(){return Ml||(Ml=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(n){return{backtrace:function(o){var i=[],s=10;typeof o=="object"&&typeof o.maxStackSize=="number"&&(s=o.maxStackSize);for(var a=arguments.callee;a&&i.length<s&&a.arguments;){for(var l=new Array(a.arguments.length),f=0;f<l.length;++f)l[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?i.push(new n({functionName:RegExp.$1||void 0,args:l})):i.push(new n({args:l}));try{a=a.caller}catch{break}}return i}}})}(os)),os.exports}var as={exports:{}},Ei={},ss={},Fl;function fh(){return Fl||(Fl=1,function(e){function t(E,b,A){if(b in E)return E[b];if(arguments.length===3)return A;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function o(E){var b=E.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(E){var b="";return E.scheme&&(b+=E.scheme+":"),b+="//",E.auth&&(b+=E.auth+"@"),E.host&&(b+=E.host),E.port&&(b+=":"+E.port),E.path&&(b+=E.path),b}e.urlGenerate=i;function s(E){var b=E,A=o(E);if(A){if(!A.path)return E;b=A.path}for(var w=e.isAbsolute(b),N=b.split(/\/+/),F,M=0,q=N.length-1;q>=0;q--)F=N[q],F==="."?N.splice(q,1):F===".."?M++:M>0&&(F===""?(N.splice(q+1,M),M=0):(N.splice(q,2),M--));return b=N.join("/"),b===""&&(b=w?"/":"."),A?(A.path=b,i(A)):b}e.normalize=s;function a(E,b){E===""&&(E="."),b===""&&(b=".");var A=o(b),w=o(E);if(w&&(E=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),i(A);if(A||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,i(w);var N=b.charAt(0)==="/"?b:s(E.replace(/\/+$/,"")+"/"+b);return w?(w.path=N,i(w)):N}e.join=a,e.isAbsolute=function(E){return E.charAt(0)==="/"||!!E.match(n)};function l(E,b){E===""&&(E="."),E=E.replace(/\/$/,"");for(var A=0;b.indexOf(E+"/")!==0;){var w=E.lastIndexOf("/");if(w<0||(E=E.slice(0,w),E.match(/^([^\/]+:\/)?\/*$/)))return b;++A}return Array(A+1).join("../")+b.substr(E.length+1)}e.relative=l;var f=function(){var E=Object.create(null);return!("__proto__"in E)}();function u(E){return E}function h(E){return c(E)?"$"+E:E}e.toSetString=f?u:h;function d(E){return c(E)?E.slice(1):E}e.fromSetString=f?u:d;function c(E){if(!E)return!1;var b=E.length;if(b<9||E.charCodeAt(b-1)!==95||E.charCodeAt(b-2)!==95||E.charCodeAt(b-3)!==111||E.charCodeAt(b-4)!==116||E.charCodeAt(b-5)!==111||E.charCodeAt(b-6)!==114||E.charCodeAt(b-7)!==112||E.charCodeAt(b-8)!==95||E.charCodeAt(b-9)!==95)return!1;for(var A=b-10;A>=0;A--)if(E.charCodeAt(A)!==36)return!1;return!0}function p(E,b,A){var w=E.source-b.source;return w!==0||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0||A)||(w=E.generatedColumn-b.generatedColumn,w!==0)||(w=E.generatedLine-b.generatedLine,w!==0)?w:E.name-b.name}e.compareByOriginalPositions=p;function m(E,b,A){var w=E.generatedLine-b.generatedLine;return w!==0||(w=E.generatedColumn-b.generatedColumn,w!==0||A)||(w=E.source-b.source,w!==0)||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0)?w:E.name-b.name}e.compareByGeneratedPositionsDeflated=m;function _(E,b){return E===b?0:E>b?1:-1}function T(E,b){var A=E.generatedLine-b.generatedLine;return A!==0||(A=E.generatedColumn-b.generatedColumn,A!==0)||(A=_(E.source,b.source),A!==0)||(A=E.originalLine-b.originalLine,A!==0)||(A=E.originalColumn-b.originalColumn,A!==0)?A:_(E.name,b.name)}e.compareByGeneratedPositionsInflated=T}(ss)),ss}var us={},Ul;function DE(){return Ul||(Ul=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,o,i,s,a){var l=Math.floor((r-n)/2)+n,f=s(o,i[l],!0);return f===0?l:f>0?r-l>1?t(l,r,o,i,s,a):a==e.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-n>1?t(n,l,o,i,s,a):a==e.LEAST_UPPER_BOUND?l:n<0?-1:n}e.search=function(r,o,i,s){if(o.length===0)return-1;var a=t(-1,o.length,r,o,i,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&i(o[a],o[a-1],!0)===0;)--a;return a}}(us)),us}var cs={},Dl;function $E(){if(Dl)return cs;Dl=1;var e=fh(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(o,i){for(var s=new n,a=0,l=o.length;a<l;a++)s.add(o[a],i);return s},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var s=e.toSetString(o),a=t.call(this._set,s),l=this._array.length;(!a||i)&&this._array.push(o),a||(this._set[s]=l)},n.prototype.has=function(o){var i=e.toSetString(o);return t.call(this._set,i)},n.prototype.indexOf=function(o){var i=e.toSetString(o);if(t.call(this._set,i))return this._set[i];throw new Error('"'+o+'" is not in the set.')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},n.prototype.toArray=function(){return this._array.slice()},cs.ArraySet=n,cs}var go={},yo={},$l;function jE(){if($l)return yo;$l=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return yo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},yo.decode=function(t){var n=65,r=90,o=97,i=122,s=48,a=57,l=43,f=47,u=26,h=52;return n<=t&&t<=r?t-n:o<=t&&t<=i?t-o+u:s<=t&&t<=a?t-s+h:t==l?62:t==f?63:-1},yo}var jl;function HE(){if(jl)return go;jl=1;var e=jE(),t=5,n=1<<t,r=n-1,o=n;function i(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var l=(a&1)===1,f=a>>1;return l?-f:f}return go.encode=function(l){var f="",u,h=i(l);do u=h&r,h>>>=t,h>0&&(u|=o),f+=e.encode(u);while(h>0);return f},go.decode=function(l,f,u){var h=l.length,d=0,c=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(l.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+l.charAt(f-1));p=!!(m&o),m&=r,d=d+(m<<c),c+=t}while(p);u.value=s(d),u.rest=f},go}var ls={},Hl;function qE(){if(Hl)return ls;Hl=1;function e(r,o,i){var s=r[o];r[o]=r[i],r[i]=s}function t(r,o){return Math.round(r+Math.random()*(o-r))}function n(r,o,i,s){if(i<s){var a=t(i,s),l=i-1;e(r,a,s);for(var f=r[s],u=i;u<s;u++)o(r[u],f)<=0&&(l+=1,e(r,l,u));e(r,l+1,u);var h=l+1;n(r,o,i,h-1),n(r,o,h+1,s)}}return ls.quickSort=function(r,o){n(r,o,0,r.length-1)},ls}var ql;function GE(){if(ql)return Ei;ql=1;var e=fh(),t=DE(),n=$E().ArraySet,r=HE(),o=qE().quickSort;function i(f){var u=f;return typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,""))),u.sections!=null?new l(u):new s(u)}i.fromSourceMap=function(f){return s.fromSourceMap(f)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(u,h){var d=u.charAt(h);return d===";"||d===","},i.prototype._parseMappings=function(u,h){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(u,h,d){var c=h||null,p=d||i.GENERATED_ORDER,m;switch(p){case i.GENERATED_ORDER:m=this._generatedMappings;break;case i.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;m.map(function(T){var E=T.source===null?null:this._sources.at(T.source);return E!=null&&_!=null&&(E=e.join(_,E)),{source:E,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(u,c)},i.prototype.allGeneratedPositionsFor=function(u){var h=e.getArg(u,"line"),d={source:e.getArg(u,"source"),originalLine:h,originalColumn:e.getArg(u,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var c=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(u.column===void 0)for(var _=m.originalLine;m&&m.originalLine===_;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return c},Ei.SourceMapConsumer=i;function s(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sources"),c=e.getArg(u,"names",[]),p=e.getArg(u,"sourceRoot",null),m=e.getArg(u,"sourcesContent",null),_=e.getArg(u,"mappings"),T=e.getArg(u,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(E){return p&&e.isAbsolute(p)&&e.isAbsolute(E)?e.relative(p,E):E}),this._names=n.fromArray(c.map(String),!0),this._sources=n.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=_,this.file=T}s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.fromSourceMap=function(u){var h=Object.create(s.prototype),d=h._names=n.fromArray(u._names.toArray(),!0),c=h._sources=n.fromArray(u._sources.toArray(),!0);h.sourceRoot=u._sourceRoot,h.sourcesContent=u._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=u._file;for(var p=u._mappings.toArray().slice(),m=h.__generatedMappings=[],_=h.__originalMappings=[],T=0,E=p.length;T<E;T++){var b=p[T],A=new a;A.generatedLine=b.generatedLine,A.generatedColumn=b.generatedColumn,b.source&&(A.source=c.indexOf(b.source),A.originalLine=b.originalLine,A.originalColumn=b.originalColumn,b.name&&(A.name=d.indexOf(b.name)),_.push(A)),m.push(A)}return o(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(u,h){for(var d=1,c=0,p=0,m=0,_=0,T=0,E=u.length,b=0,A={},w={},N=[],F=[],M,q,W,V,j;b<E;)if(u.charAt(b)===";")d++,b++,c=0;else if(u.charAt(b)===",")b++;else{for(M=new a,M.generatedLine=d,V=b;V<E&&!this._charIsMappingSeparator(u,V);V++);if(q=u.slice(b,V),W=A[q],W)b+=q.length;else{for(W=[];b<V;)r.decode(u,b,w),j=w.value,b=w.rest,W.push(j);if(W.length===2)throw new Error("Found a source, but no line and column");if(W.length===3)throw new Error("Found a source and line, but no column");A[q]=W}M.generatedColumn=c+W[0],c=M.generatedColumn,W.length>1&&(M.source=_+W[1],_+=W[1],M.originalLine=p+W[2],p=M.originalLine,M.originalLine+=1,M.originalColumn=m+W[3],m=M.originalColumn,W.length>4&&(M.name=T+W[4],T+=W[4])),F.push(M),typeof M.originalLine=="number"&&N.push(M)}o(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,o(N,e.compareByOriginalPositions),this.__originalMappings=N},s.prototype._findMapping=function(u,h,d,c,p,m){if(u[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+u[d]);if(u[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+u[c]);return t.search(u,h,p,m)},s.prototype.computeColumnSpans=function(){for(var u=0;u<this._generatedMappings.length;++u){var h=this._generatedMappings[u];if(u+1<this._generatedMappings.length){var d=this._generatedMappings[u+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(d>=0){var c=this._generatedMappings[d];if(c.generatedLine===h.generatedLine){var p=e.getArg(c,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(c,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(c,"originalLine",null),column:e.getArg(c,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(u){return u==null}):!1},s.prototype.sourceContentFor=function(u,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(u=e.relative(this.sourceRoot,u)),this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var c=u.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!d.path||d.path=="/")&&this._sources.has("/"+u))return this.sourcesContent[this._sources.indexOf("/"+u)]}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(u){var h=e.getArg(u,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(u,"line"),originalColumn:e.getArg(u,"column")},c=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(c>=0){var p=this._originalMappings[c];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ei.BasicSourceMapConsumer=s;function l(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new n,this._names=new n;var c={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),_=e.getArg(m,"line"),T=e.getArg(m,"column");if(_<c.line||_===c.line&&T<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=m,{generatedOffset:{generatedLine:_+1,generatedColumn:T+1},consumer:new i(e.getArg(p,"map"))}})}return l.prototype=Object.create(i.prototype),l.prototype.constructor=i,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var f=[],u=0;u<this._sections.length;u++)for(var h=0;h<this._sections[u].consumer.sources.length;h++)f.push(this._sections[u].consumer.sources[h]);return f}}),l.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=t.search(h,this._sections,function(p,m){var _=p.generatedLine-m.generatedOffset.generatedLine;return _||p.generatedColumn-m.generatedOffset.generatedColumn}),c=this._sections[d];return c?c.consumer.originalPositionFor({line:h.generatedLine-(c.generatedOffset.generatedLine-1),column:h.generatedColumn-(c.generatedOffset.generatedLine===h.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:u.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(u){return u.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(u,h){for(var d=0;d<this._sections.length;d++){var c=this._sections[d],p=c.consumer.sourceContentFor(u,!0);if(p)return p}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(u){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(u,"source"))!==-1){var c=d.consumer.generatedPositionFor(u);if(c){var p={line:c.line+(d.generatedOffset.generatedLine-1),column:c.column+(d.generatedOffset.generatedLine===c.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},l.prototype._parseMappings=function(u,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var c=this._sections[d],p=c.consumer._generatedMappings,m=0;m<p.length;m++){var _=p[m],T=c.consumer._sources.at(_.source);c.consumer.sourceRoot!==null&&(T=e.join(c.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var E=c.consumer._names.at(_.name);this._names.add(E),E=this._names.indexOf(E);var b={source:T,generatedLine:_.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(c.generatedOffset.generatedLine===_.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:E};this.__generatedMappings.push(b),typeof b.originalLine=="number"&&this.__originalMappings.push(b)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},Ei.IndexedSourceMapConsumer=l,Ei}var Gl;function WE(){return Gl||(Gl=1,function(e,t){(function(n,r){e.exports=r(GE(),Iu())})(ae,function(n,r){function o(d){return new Promise(function(c,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?c(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function i(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,c){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
|
|
43
43
|
`),_="",T=Math.min(c,20),E=0;E<T;++E){var b=m[c-E-1],A=b.indexOf("//");if(A>=0&&(b=b.substr(0,A)),b){_=b+_;for(var w=p.length,N=0;N<w;N++){var F=p[N].exec(_);if(F&&F[1])return F[1]}}}}function l(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function f(d){if(typeof d!="object")throw new TypeError("Given StackFrame is not an object");if(typeof d.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof d.lineNumber!="number"||d.lineNumber%1!==0||d.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof d.columnNumber!="number"||d.columnNumber%1!==0||d.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function u(d){for(var c=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,p,m;m=c.exec(d);)p=m[1];if(p)return p;throw new Error("sourceMappingURL not found")}function h(d,c,p){return new Promise(function(m,_){var T=c.originalPositionFor({line:d.lineNumber,column:d.columnNumber});if(T.source){var E=c.sourceContentFor(T.source);E&&(p[T.source]=E),m(new r({functionName:T.name||d.functionName,args:d.args,fileName:T.source,lineNumber:T.line,columnNumber:T.column}))}else _(new Error("Could not get original source for given stackframe and source map"))})}return function d(c){if(!(this instanceof d))return new d(c);c=c||{},this.sourceCache=c.sourceCache||{},this.sourceMapConsumerCache=c.sourceMapConsumerCache||{},this.ajax=c.ajax||o,this._atob=c.atob||i,this._get=function(m){return new Promise((function(_,T){var E=m.substr(0,5)==="data:";if(this.sourceCache[m])_(this.sourceCache[m]);else if(c.offline&&!E)T(new Error("Cannot make network requests in offline mode"));else if(E){var b=/^data:application\/json;([\w=:"-]+;)*base64,/,A=m.match(b);if(A){var w=A[0].length,N=m.substr(w),F=this._atob(N);this.sourceCache[m]=F,_(F)}else T(new Error("The encoding of the inline sourcemap is not supported"))}else{var M=this.ajax(m,{method:"get"});this.sourceCache[m]=M,M.then(_,T)}}).bind(this))},this._getSourceMapConsumer=function(m,_){return new Promise((function(T){if(this.sourceMapConsumerCache[m])T(this.sourceMapConsumerCache[m]);else{var E=new Promise((function(b,A){return this._get(m).then(function(w){typeof w=="string"&&(w=s(w.replace(/^\)\]\}'/,""))),typeof w.sourceRoot>"u"&&(w.sourceRoot=_),b(new n.SourceMapConsumer(w))}).catch(A)}).bind(this));this.sourceMapConsumerCache[m]=E,T(E)}}).bind(this))},this.pinpoint=function(m){return new Promise((function(_,T){this.getMappedLocation(m).then((function(E){function b(){_(E)}this.findFunctionName(E).then(_,b).catch(b)}).bind(this),T)}).bind(this))},this.findFunctionName=function(m){return new Promise((function(_,T){f(m),this._get(m.fileName).then(function(b){var A=m.lineNumber,w=m.columnNumber,N=a(b,A);_(N?new r({functionName:N,args:m.args,fileName:m.fileName,lineNumber:A,columnNumber:w}):m)},T).catch(T)}).bind(this))},this.getMappedLocation=function(m){return new Promise((function(_,T){l(),f(m);var E=this.sourceCache,b=m.fileName;this._get(b).then((function(A){var w=u(A),N=w.substr(0,5)==="data:",F=b.substring(0,b.lastIndexOf("/")+1);return w[0]!=="/"&&!N&&!/^https?:\/\/|^\/\//i.test(w)&&(w=F+w),this._getSourceMapConsumer(w,F).then(function(M){return h(m,M,E).then(_).catch(function(){_(m)})})}).bind(this),T).catch(T)}).bind(this))}}})}(as)),as.exports}var Wl;function VE(){return Wl||(Wl=1,function(e,t){(function(n,r){e.exports=r(FE(),UE(),WE())})(ae,function(r,o,i){var s={filter:function(h){return(h.functionName||"").indexOf("StackTrace$$")===-1&&(h.functionName||"").indexOf("ErrorStackParser$$")===-1&&(h.functionName||"").indexOf("StackTraceGPS$$")===-1&&(h.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},a=function(){try{throw new Error}catch(d){return d}};function l(h,d){var c={};return[h,d].forEach(function(p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(c[m]=p[m]);return c}),c}function f(h){return h.stack||h["opera#sourceloc"]}function u(h,d){return typeof d=="function"?h.filter(d):h}return{get:function(d){var c=a();return f(c)?this.fromError(c,d):this.generateArtificially(d)},getSync:function(d){d=l(s,d);var c=a(),p=f(c)?r.parse(c):o.backtrace(d);return u(p,d.filter)},fromError:function(d,c){c=l(s,c);var p=new i(c);return new Promise((function(m){var _=u(r.parse(d),c.filter);m(Promise.all(_.map(function(T){return new Promise(function(E){function b(){E(T)}p.pinpoint(T).then(E,b).catch(b)})})))}).bind(this))},generateArtificially:function(d){d=l(s,d);var c=o.backtrace(d);return typeof d.filter=="function"&&(c=c.filter(d.filter)),Promise.resolve(c)},instrument:function(d,c,p,m){if(typeof d!="function")throw new Error("Cannot instrument non-function object");if(typeof d.__stacktraceOriginalFn=="function")return d;var _=(function(){try{return this.get().then(c,p).catch(p),d.apply(m||this,arguments)}catch(E){throw f(E)&&this.fromError(E).then(c,p).catch(p),E}}).bind(this);return _.__stacktraceOriginalFn=d,_},deinstrument:function(d){if(typeof d!="function")throw new Error("Cannot de-instrument non-function object");return typeof d.__stacktraceOriginalFn=="function"?d.__stacktraceOriginalFn:d},report:function(d,c,p,m){return new Promise(function(_,T){var E=new XMLHttpRequest;if(E.onerror=T,E.onreadystatechange=function(){E.readyState===4&&(E.status>=200&&E.status<400?_(E.responseText):T(new Error("POST to "+c+" failed with status: "+E.status)))},E.open("post",c),E.setRequestHeader("Content-Type","application/json"),m&&typeof m.headers=="object"){var b=m.headers;for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&E.setRequestHeader(A,b[A])}var w={stack:d};p!=null&&(w.message=p),E.send(JSON.stringify(w))})}}})}(rs)),rs.exports}var fs,Vl;function zE(){if(Vl)return fs;Vl=1;var e=VE(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",n=function(){};n.prototype.start=function(s){if(!s.key&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!s.projectId&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=s.customReportingFunction,this.apiKey=s.key,this.projectId=s.projectId,this.targetUrl=s.targetUrl,this.context=s.context||{},this.serviceContext={service:s.service||"web"},s.version&&(this.serviceContext.version=s.version),this.reportUncaughtExceptions=s.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=s.reportUnhandledPromiseRejections!==!1,this.disabled=!!s.disabled,r(this)};function r(s){var a=function(){};if(s.reportUncaughtExceptions){var l=window.onerror||a;window.onerror=function(u,h,d,c,p){return p&&s.report(p).catch(a),l(u,h,d,c,p),!0}}if(s.reportUnhandledPromiseRejections){var f=window.onunhandledrejection||a;window.onunhandledrejection=function(u){return u&&s.report(u.reason).catch(a),f(u.reason),!0}}}n.prototype.report=function(s,a){if(this.disabled)return Promise.resolve(null);if(!s)return Promise.reject(new Error("no error to report"));a=a||{};var l={};l.serviceContext=this.serviceContext,l.context=this.context,l.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var f=0;if(typeof s=="string"||s instanceof String){try{throw new Error(s)}catch(d){s=d}f=a.skipLocalFrames||1}var u=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,h=this.customReportingFunction;return o(s,f).then(function(d){return l.message=d,h?h(l):i(u,l)})};function o(s,a){return e.fromError(s).then(function(l){for(var f=[s.toString()],u=a;u<l.length;u++)f.push([" at ",l[u].getFunctionName()||"<anonymous>"," (",l[u].getFileName(),":",l[u].getLineNumber(),":",l[u].getColumnNumber(),")"].join(""));return f.join(`
|
|
44
44
|
`)},function(l){return["Error extracting stack trace: ",l,`
|
|
45
45
|
`,s.toString(),`
|
|
@@ -53,12 +53,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
53
53
|
f.parentNode.insertBefore(j,f);
|
|
54
54
|
})(window,document,'script','`+f+"','"+s+"');",_=this.dataLayer(l,f);return{iframe:p,script:m,dataLayerVar:_}},dataLayer:function(i,s){return`
|
|
55
55
|
window.`+s+" = window."+s+` || [];
|
|
56
|
-
window.`+s+".push("+JSON.stringify(i)+")"}};return hs=r,hs}var ps,Ql;function XE(){if(Ql)return ps;Ql=1;var e=QE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={dataScript:function(i){var s=document.createElement("script");return s.innerHTML=i,s},gtm:function(i){var s=t.default.tags(i),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},l=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:l,dataScript:f}},initialize:function(i){var s=i.gtmId,a=i.events,l=a===void 0?{}:a,f=i.dataLayer,u=i.dataLayerName,h=u===void 0?"dataLayer":u,d=i.auth,c=d===void 0?"":d,p=i.preview,m=p===void 0?"":p,_=this.gtm({id:s,events:l,dataLayer:f||void 0,dataLayerName:h,auth:c,preview:m});f&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(i){var s=i.dataLayer,a=i.dataLayerName,l=a===void 0?"dataLayer":a;if(window[l])return window[l].push(s);var f=t.default.dataLayer(s,l),u=this.dataScript(f);document.head.insertBefore(u,document.head.childNodes[0])}};return ps=r,ps}var ms,Xl;function JE(){if(Xl)return ms;Xl=1;var e=XE(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return ms=t.default,ms}var Jl;function ZE(){return Jl||(Jl=1,function(e,t){(function(n,r){e.exports=r(JE())})(ae,function(n){return function(){var r={273:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{setContext:function(){return u},setupGTM:function(){return d}});var a=i(273),l=i.n(a);let f=null;const u=({configs:c,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!c)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!c[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:c,environment:p})}`);f=c[p]},h=()=>f,d=()=>{const c=h();l().initialize({gtmId:c.id})}}(),s}()})}(ds)),ds.exports}var dh=202,hh=502,ph=400,mh=409,gh=100,yh=201,vh=417,e_=424,Eh=403,_h=504,bh=410,wh=505,Sh=418,Th=419,Oh=507,xh=500,Ah=411,Ch=423,Rh=420,Ph=405,Ih=301,Nh=302,Lh=207,kh=300,Bh=511,Mh=204,Fh=203,Uh=406,Dh=404,$h=501,jh=304,Hh=200,qh=206,Gh=402,Wh=308,Vh=412,zh=428,Yh=102,Kh=407,Qh=431,Xh=408,Jh=413,Zh=414,ep=416,tp=205,rp=303,np=503,ip=101,op=307,ap=429,sp=401,up=422,cp=415,lp=305;const t_={ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTI_STATUS:Lh,MULTIPLE_CHOICES:kh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NO_CONTENT:Mh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,RESET_CONTENT:tp,SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp};var r_={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},n_={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function fp(e){var t=r_[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function dp(e){var t=n_[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var hp=fp,Zs;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(Zs||(Zs={}));var eu;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(eu||(eu={}));var Fo=globalThis&&globalThis.__assign||function(){return Fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Fo.apply(this,arguments)};const i_=Fo(Fo({},t_),{getStatusCode:dp,getStatusText:hp}),o_=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FAILED_DEPENDENCY:e_,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTIPLE_CHOICES:kh,MULTI_STATUS:Lh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,NO_CONTENT:Mh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,RESET_CONTENT:tp,get ReasonPhrases(){return eu},SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,get StatusCodes(){return Zs},TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp,default:i_,getReasonPhrase:fp,getStatusCode:dp,getStatusText:hp},Symbol.toStringTag,{value:"Module"})),a_=Wi(o_);var Eo={exports:{}},_i={},gs={},bi={},wi={},Ur={},Si={},ys={},Dr={},Xt={},Zl;function Nu(){if(Zl)return Xt;Zl=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ERROR_PACKET=Xt.PACKET_TYPES_REVERSE=Xt.PACKET_TYPES=void 0;const e=Object.create(null);Xt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Xt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return Xt.ERROR_PACKET=n,Xt}var ef;function s_(){if(ef)return Dr;ef=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.encodePacket=Dr.encodePacketToBinary=void 0;const e=Nu(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,o=({type:f,data:u},h,d)=>t&&u instanceof Blob?h?d(u):i(u,d):n&&(u instanceof ArrayBuffer||r(u))?h?d(u):i(new Blob([u]),d):d(e.PACKET_TYPES[f]+(u||""));Dr.encodePacket=o;const i=(f,u)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];u("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function l(f,u){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(u);if(n&&(f.data instanceof ArrayBuffer||r(f.data)))return u(s(f.data));o(f,!1,h=>{a||(a=new TextEncoder),u(a.encode(h))})}return Dr.encodePacketToBinary=l,Dr}var Ti={},$r={},tf;function u_(){if(tf)return $r;tf=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.decode=$r.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let o=0;o<e.length;o++)t[e.charCodeAt(o)]=o;const n=o=>{let i=new Uint8Array(o),s,a=i.length,l="";for(s=0;s<a;s+=3)l+=e[i[s]>>2],l+=e[(i[s]&3)<<4|i[s+1]>>4],l+=e[(i[s+1]&15)<<2|i[s+2]>>6],l+=e[i[s+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};$r.encode=n;const r=o=>{let i=o.length*.75,s=o.length,a,l=0,f,u,h,d;o[o.length-1]==="="&&(i--,o[o.length-2]==="="&&i--);const c=new ArrayBuffer(i),p=new Uint8Array(c);for(a=0;a<s;a+=4)f=t[o.charCodeAt(a)],u=t[o.charCodeAt(a+1)],h=t[o.charCodeAt(a+2)],d=t[o.charCodeAt(a+3)],p[l++]=f<<2|u>>4,p[l++]=(u&15)<<4|h>>2,p[l++]=(h&3)<<6|d&63;return c};return $r.decode=r,$r}var rf;function c_(){if(rf)return Ti;rf=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.decodePacket=void 0;const e=Nu(),t=u_(),n=typeof ArrayBuffer=="function",r=(s,a)=>{if(typeof s!="string")return{type:"message",data:i(s,a)};const l=s.charAt(0);return l==="b"?{type:"message",data:o(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[l]?s.length>1?{type:e.PACKET_TYPES_REVERSE[l],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[l]}:e.ERROR_PACKET};Ti.decodePacket=r;const o=(s,a)=>{if(n){const l=(0,t.decode)(s);return i(l,a)}else return{base64:!0,data:s}},i=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return Ti}var nf;function zi(){return nf||(nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=s_();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=c_();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Nu(),o=String.fromCharCode(30),i=(d,c)=>{const p=d.length,m=new Array(p);let _=0;d.forEach((T,E)=>{(0,t.encodePacket)(T,!1,b=>{m[E]=b,++_===p&&c(m.join(o))})})};e.encodePayload=i;const s=(d,c)=>{const p=d.split(o),m=[];for(let _=0;_<p.length;_++){const T=(0,n.decodePacket)(p[_],c);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,c){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let _;if(m<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,m);else if(m<65536){_=new Uint8Array(3);const T=new DataView(_.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{_=new Uint8Array(9);const T=new DataView(_.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(_[0]|=128),c.enqueue(_),c.enqueue(p)})}})}e.createPacketEncoderStream=a;let l;function f(d){return d.reduce((c,p)=>c+p.length,0)}function u(d,c){if(d[0].length===c)return d.shift();const p=new Uint8Array(c);let m=0;for(let _=0;_<c;_++)p[_]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,c){l||(l=new TextDecoder);const p=[];let m=0,_=-1,T=!1;return new TransformStream({transform(E,b){for(p.push(E);;){if(m===0){if(f(p)<1)break;const A=u(p,1);T=(A[0]&128)===128,_=A[0]&127,_<126?m=3:_===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=u(p,2);_=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=u(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),N=w.getUint32(0);if(N>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}_=N*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<_)break;const A=u(p,_);b.enqueue((0,n.decodePacket)(T?A:l.decode(A),c)),m=0}if(_===0||_>d){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(ys)),ys}function ot(e){if(e)return l_(e)}function l_(e){for(var t in ot.prototype)e[t]=ot.prototype[t];return e}ot.prototype.on=ot.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ot.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ot.prototype.off=ot.prototype.removeListener=ot.prototype.removeAllListeners=ot.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ot.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};ot.prototype.emitReserved=ot.prototype.emit;ot.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ot.prototype.hasListeners=function(e){return!!this.listeners(e).length};const f_=Object.freeze(Object.defineProperty({__proto__:null,Emitter:ot},Symbol.toStringTag,{value:"Module"})),Ln=Wi(f_);var Jt={},Oi={},of;function Wo(){return of||(of=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.globalThisShim=void 0,Oi.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Oi}var af;function Yi(){if(af)return Jt;af=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.byteLength=Jt.installTimerFunctions=Jt.pick=void 0;const e=Wo();function t(l,...f){return f.reduce((u,h)=>(l.hasOwnProperty(h)&&(u[h]=l[h]),u),{})}Jt.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function o(l,f){f.useNativeTimers?(l.setTimeoutFn=n.bind(e.globalThisShim),l.clearTimeoutFn=r.bind(e.globalThisShim)):(l.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),l.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}Jt.installTimerFunctions=o;const i=1.33;function s(l){return typeof l=="string"?a(l):Math.ceil((l.byteLength||l.size)*i)}Jt.byteLength=s;function a(l){let f=0,u=0;for(let h=0,d=l.length;h<d;h++)f=l.charCodeAt(h),f<128?u+=1:f<2048?u+=2:f<55296||f>=57344?u+=3:(h++,u+=4);return u}return Jt}var _o={exports:{}},vs,sf;function d_(){if(sf)return vs;sf=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;vs=function(u,h){h=h||{};var d=typeof u;if(d==="string"&&u.length>0)return s(u);if(d==="number"&&isFinite(u))return h.long?l(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(h){var d=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*o;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*n;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(u){var h=Math.abs(u);return h>=r?Math.round(u/r)+"d":h>=n?Math.round(u/n)+"h":h>=t?Math.round(u/t)+"m":h>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var h=Math.abs(u);return h>=r?f(u,h,r,"day"):h>=n?f(u,h,n,"hour"):h>=t?f(u,h,t,"minute"):h>=e?f(u,h,e,"second"):u+" ms"}function f(u,h,d,c){var p=h>=d*1.5;return Math.round(u/d)+" "+c+(p?"s":"")}return vs}var Es,uf;function h_(){if(uf)return Es;uf=1;function e(t){r.debug=r,r.default=r,r.coerce=f,r.disable=s,r.enable=i,r.enabled=a,r.humanize=d_(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let d=0;for(let c=0;c<h.length;c++)d=(d<<5)-d+h.charCodeAt(c),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=n;function r(h){let d,c=null,p,m;function _(...T){if(!_.enabled)return;const E=_,b=Number(new Date),A=b-(d||b);E.diff=A,E.prev=d,E.curr=b,d=b,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,M)=>{if(F==="%%")return"%";w++;const W=r.formatters[M];if(typeof W=="function"){const q=T[w];F=W.call(E,q),T.splice(w,1),w--}return F}),r.formatArgs.call(E,T),(E.log||r.log).apply(E,T)}return _.namespace=h,_.useColors=r.useColors(),_.color=r.selectColor(h),_.extend=o,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>c!==null?c:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:T=>{c=T}}),typeof r.init=="function"&&r.init(_),_}function o(h,d){const c=r(this.namespace+(typeof d>"u"?":":d)+h);return c.log=this.log,c}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d;const c=(typeof h=="string"?h:"").split(/[\s,]+/),p=c.length;for(d=0;d<p;d++)c[d]&&(h=c[d].replace(/\*/g,".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.slice(1)+"$")):r.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...r.names.map(l),...r.skips.map(l).map(d=>"-"+d)].join(",");return r.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,c;for(d=0,c=r.skips.length;d<c;d++)if(r.skips[d].test(h))return!1;for(d=0,c=r.names.length;d<c;d++)if(r.names[d].test(h))return!0;return!1}function l(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Es=e,Es}var cf;function qt(){return cf||(cf=1,function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;l.splice(1,0,f,"color: inherit");let u=0,h=0;l[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(u++,d==="%c"&&(h=u))}),l.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function o(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function s(){try{return localStorage}catch{}}e.exports=h_()(t);const{formatters:a}=e.exports;a.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(_o,_o.exports)),_o.exports}var jr={},lf;function pp(){if(lf)return jr;lf=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.decode=jr.encode=void 0;function e(n){let r="";for(let o in n)n.hasOwnProperty(o)&&(r.length&&(r+="&"),r+=encodeURIComponent(o)+"="+encodeURIComponent(n[o]));return r}jr.encode=e;function t(n){let r={},o=n.split("&");for(let i=0,s=o.length;i<s;i++){let a=o[i].split("=");r[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return r}return jr.decode=t,jr}var ff;function Vo(){if(ff)return Si;ff=1;var e=ae&&ae.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Si,"__esModule",{value:!0}),Si.Transport=void 0;const t=zi(),n=Ln,r=Yi(),o=e(qt()),i=pp(),s=(0,o.default)("engine.io-client:transport");class a extends Error{constructor(u,h,d){super(u),this.description=h,this.context=d,this.type="TransportError"}}class l extends n.Emitter{constructor(u){super(),this.writable=!1,(0,r.installTimerFunctions)(this,u),this.opts=u,this.query=u.query,this.socket=u.socket}onError(u,h,d){return super.emitReserved("error",new a(u,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(u){this.readyState==="open"?this.write(u):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(u){const h=(0,t.decodePacket)(u,this.socket.binaryType);this.onPacket(h)}onPacket(u){super.emitReserved("packet",u)}onClose(u){this.readyState="closed",super.emitReserved("close",u)}pause(u){}createUri(u,h={}){return u+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const u=this.opts.hostname;return u.indexOf(":")===-1?u:"["+u+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(u){const h=(0,i.encode)(u);return h.length?"?"+h:""}}return Si.Transport=l,Si}var Zt={},df;function mp(){if(df)return Zt;df=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.yeast=Zt.decode=Zt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,o=0,i;function s(f){let u="";do u=e[f%t]+u,f=Math.floor(f/t);while(f>0);return u}Zt.encode=s;function a(f){let u=0;for(o=0;o<f.length;o++)u=u*t+n[f.charAt(o)];return u}Zt.decode=a;function l(){const f=s(+new Date);return f!==i?(r=0,i=f):f+"."+s(r++)}for(Zt.yeast=l;o<t;o++)n[e[o]]=o;return Zt}var Hr={},xi={},hf;function p_(){if(hf)return xi;hf=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return xi.hasCORS=e,xi}var pf;function m_(){if(pf)return Hr;pf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.createCookieJar=Hr.XHR=void 0;const e=p_(),t=Wo();function n(o){const i=o.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||e.hasCORS))return new XMLHttpRequest}catch{}if(!i)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Hr.XHR=n;function r(){}return Hr.createCookieJar=r,Hr}var mf;function g_(){if(mf)return Ur;mf=1;var e=ae&&ae.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.Request=Ur.Polling=void 0;const t=Vo(),n=e(qt()),r=mp(),o=zi(),i=m_(),s=Ln,a=Yi(),l=Wo(),f=(0,n.default)("engine.io-client:polling");function u(){}const h=function(){return new i.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const E=location.protocol==="https:";let b=location.port;b||(b=E?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||b!==_.port}const T=_&&_.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,i.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let E=0;this.polling&&(f("we are currently polling - waiting to pause"),E++,this.once("pollComplete",function(){f("pre-pause polling complete"),--E||T()})),this.writable||(f("we are currently writing - waiting to pause"),E++,this.once("drain",function(){f("pre-pause writing complete"),--E||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){f("polling got data %s",_);const T=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};(0,o.decodePayload)(_,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),_()):(f("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,o.encodePayload)(_,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(_,T)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new c(this.uri(),_)}doWrite(_,T){const E=this.request({method:"POST",data:_});E.on("success",T),E.on("error",(b,A)=>{this.onError("xhr post error",b,A)})}doPoll(){f("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(T,E)=>{this.onError("xhr poll error",T,E)}),this.pollXhr=_}}Ur.Polling=d;class c extends s.Emitter{constructor(_,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=_,this.data=T.data!==void 0?T.data:null,this.create()}create(){var _;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const E=this.xhr=new i.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),E.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let b in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(b)&&E.setRequestHeader(b,this.opts.extraHeaders[b])}}catch{}if(this.method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(E),"withCredentials"in E&&(E.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(E.timeout=this.opts.requestTimeout),E.onreadystatechange=()=>{var b;E.readyState===3&&((b=this.opts.cookieJar)===null||b===void 0||b.parseCookies(E)),E.readyState===4&&(E.status===200||E.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof E.status=="number"?E.status:0)},0))},f("xhr data %s",this.data),E.send(this.data)}catch(b){this.setTimeoutFn(()=>{this.onError(b)},0);return}typeof document<"u"&&(this.index=c.requestsCount++,c.requests[this.index]=this)}onError(_){this.emitReserved("error",_,this.xhr),this.cleanup(!0)}cleanup(_){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=u,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete c.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ur.Request=c,c.requestsCount=0,c.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in l.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in c.requests)c.requests.hasOwnProperty(m)&&c.requests[m].abort()}return Ur}var Ai={},Ct={},gf;function zo(){if(gf)return Ct;gf=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.defaultBinaryType=Ct.usingBrowserWebSocket=Ct.WebSocket=Ct.nextTick=void 0;const e=Wo();return Ct.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),Ct.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Ct.usingBrowserWebSocket=!0,Ct.defaultBinaryType="arraybuffer",Ct}var yf;function y_(){if(yf)return Ai;yf=1;var e=ae&&ae.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.WS=void 0;const t=Vo(),n=mp(),r=Yi(),o=zo(),i=e(qt()),s=zi(),a=(0,i.default)("engine.io-client:websocket"),l=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,c=l?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=o.usingBrowserWebSocket&&!l?d?new o.WebSocket(h,d):new o.WebSocket(h):new o.WebSocket(h,d,c)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const c=h[d],p=d===h.length-1;(0,s.encodePacket)(c,this.supportsBinary,m=>{const _={};o.usingBrowserWebSocket||(c.options&&(_.compress=c.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{o.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,_)}catch{a("websocket closed before onclose event")}p&&(0,o.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!o.WebSocket}}return Ai.WS=f,Ai}var Ci={},vf;function v_(){if(vf)return Ci;vf=1;var e=ae&&ae.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.WT=void 0;const t=Vo(),n=zo(),r=zi(),i=(0,e(qt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{i("transport closed gracefully"),this.onClose()}).catch(l=>{i("transport closed due to %s",l),this.onError("webtransport error",l)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(l=>{const f=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=l.readable.pipeThrough(f).getReader(),h=(0,r.createPacketEncoderStream)();h.readable.pipeTo(l.writable),this.writer=h.writable.getWriter();const d=()=>{u.read().then(({done:p,value:m})=>{if(p){i("session is closed");return}i("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{i("an error occurred while reading: %s",p)})};d();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this.writer.write(c).then(()=>this.onOpen())})}))}write(l){this.writable=!1;for(let f=0;f<l.length;f++){const u=l[f],h=f===l.length-1;this.writer.write(u).then(()=>{h&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this.transport)===null||l===void 0||l.close()}}return Ci.WT=s,Ci}var Ef;function gp(){if(Ef)return wi;Ef=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.transports=void 0;const e=g_(),t=y_(),n=v_();return wi.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},wi}var Ri={},_f;function yp(){if(_f)return Ri;_f=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function n(i){const s=i,a=i.indexOf("["),l=i.indexOf("]");a!=-1&&l!=-1&&(i=i.substring(0,a)+i.substring(a,l).replace(/:/g,";")+i.substring(l,i.length));let f=e.exec(i||""),u={},h=14;for(;h--;)u[t[h]]=f[h]||"";return a!=-1&&l!=-1&&(u.source=s,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=r(u,u.path),u.queryKey=o(u,u.query),u}Ri.parse=n;function r(i,s){const a=/\/{2,9}/g,l=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&l.splice(0,1),s.slice(-1)=="/"&&l.splice(l.length-1,1),l}function o(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,f,u){f&&(a[f]=u)}),a}return Ri}var bf;function E_(){if(bf)return bi;bf=1;var e=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.Socket=void 0;const t=gp(),n=Yi(),r=pp(),o=yp(),i=e(qt()),s=Ln,a=zi(),l=zo(),f=(0,i.default)("engine.io-client:socket");class u extends s.Emitter{constructor(d,c={}){super(),this.binaryType=l.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(c=d,d=null),d?(d=(0,o.parse)(d),c.hostname=d.host,c.secure=d.protocol==="https"||d.protocol==="wss",c.port=d.port,d.query&&(c.query=d.query)):c.host&&(c.hostname=(0,o.parse)(c.host).host),(0,n.installTimerFunctions)(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=c.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,r.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(d){f('creating transport "%s"',d);const c=Object.assign({},this.opts.query);c.EIO=a.protocol,c.transport=d,this.id&&(c.sid=this.id);const p=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&u.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(c){f("error while creating transport: %s",c),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",c=>this.onClose("transport close",c))}probe(d){f('probing transport "%s"',d);let c=this.createTransport(d),p=!1;u.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),c.send([{type:"ping",data:"probe"}]),c.once("packet",N=>{if(!p)if(N.type==="pong"&&N.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;u.priorWebsocketSuccess=c.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=c.name,this.emitReserved("upgradeError",F)}}))};function _(){p||(p=!0,w(),c.close(),c=null)}const T=N=>{const F=new Error("probe error: "+N);F.transport=c.name,_(),f('probe transport "%s" failed because of error: %s',d,N),this.emitReserved("upgradeError",F)};function E(){T("transport closed")}function b(){T("socket closed")}function A(N){c&&N.name!==c.name&&(f('"%s" works - aborting "%s"',N.name,c.name),_())}const w=()=>{c.removeListener("open",m),c.removeListener("error",T),c.removeListener("close",E),this.off("close",b),this.off("upgrading",A)};c.once("open",m),c.once("error",T),c.once("close",E),this.once("close",b),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||c.open()},200):c.open()}onOpen(){if(f("socket open"),this.readyState="open",u.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const c=this.upgrades.length;for(;d<c;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const c=new Error("server error");c.code=d.data,this.onError(c);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(c+=(0,n.byteLength)(m)),p>0&&c>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);c+=2}return f("payload size is %d (max: %d)",c,this.maxPayload),this.writeBuffer}write(d,c,p){return this.sendPacket("message",d,c,p),this}send(d,c,p){return this.sendPacket("message",d,c,p),this}sendPacket(d,c,p,m){if(typeof c=="function"&&(m=c,c=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const _={type:d,data:c,options:p};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),d()},p=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),u.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,c){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,c),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const c=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&c.push(d[p]);return c}}return bi.Socket=u,u.protocol=a.protocol,bi}var wf;function vp(){return wf||(wf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=E_();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Vo();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=gp();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Yi();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=yp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var s=zo();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(gs)),gs}var Sf;function __(){if(Sf)return _i;Sf=1;var e=ae&&ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_i,"__esModule",{value:!0}),_i.url=void 0;const t=vp(),r=e(qt()).default("socket.io-client:url");function o(i,s="",a){let l=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(r("protocol-less url %s",i),typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),r("parse %s",i),l=t.parse(i)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const u=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+u+":"+l.port+s,l.href=l.protocol+"://"+u+(a&&a.port===l.port?"":":"+l.port),l}return _i.url=o,_i}var Pi={},Ii={},_s={},qr={},Gr={},Tf;function Ep(){if(Tf)return Gr;Tf=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.hasBinary=Gr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",o=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function i(a){return e&&(a instanceof ArrayBuffer||t(a))||r&&a instanceof Blob||o&&a instanceof File}Gr.isBinary=i;function s(a,l){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,u=a.length;f<u;f++)if(s(a[f]))return!0;return!1}if(i(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return Gr.hasBinary=s,Gr}var Of;function b_(){if(Of)return qr;Of=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.reconstructPacket=qr.deconstructPacket=void 0;const e=Ep();function t(i){const s=[],a=i.data,l=i;return l.data=n(a,s),l.attachments=s.length,{packet:l,buffers:s}}qr.deconstructPacket=t;function n(i,s){if(!i)return i;if((0,e.isBinary)(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let l=0;l<i.length;l++)a[l]=n(i[l],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a[l]=n(i[l],s));return a}return i}function r(i,s){return i.data=o(i.data,s),delete i.attachments,i}qr.reconstructPacket=r;function o(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=o(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=o(i[a],s));return i}return qr}var xf;function Lu(){return xf||(xf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Ln,n=b_(),r=Ep(),i=(0,qt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class l{constructor(c){this.replacer=c}encode(c){return i("encoding packet %j",c),(c.type===a.EVENT||c.type===a.ACK)&&(0,r.hasBinary)(c)?this.encodeAsBinary({type:c.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:c.nsp,data:c.data,id:c.id}):[this.encodeAsString(c)]}encodeAsString(c){let p=""+c.type;return(c.type===a.BINARY_EVENT||c.type===a.BINARY_ACK)&&(p+=c.attachments+"-"),c.nsp&&c.nsp!=="/"&&(p+=c.nsp+","),c.id!=null&&(p+=c.id),c.data!=null&&(p+=JSON.stringify(c.data,this.replacer)),i("encoded %j as %s",c,p),p}encodeAsBinary(c){const p=(0,n.deconstructPacket)(c),m=this.encodeAsString(p.packet),_=p.buffers;return _.unshift(m),_}}e.Encoder=l;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class u extends t.Emitter{constructor(c){super(),this.reviver=c}add(c){let p;if(typeof c=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(c);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,r.isBinary)(c)||c.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(c),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+c)}decodeString(c){let p=0;const m={type:Number(c.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;c.charAt(++p)!=="-"&&p!=c.length;);const E=c.substring(T,p);if(E!=Number(E)||c.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(E)}if(c.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(c.charAt(p)===","||p===c.length););m.nsp=c.substring(T,p)}else m.nsp="/";const _=c.charAt(p+1);if(_!==""&&Number(_)==_){const T=p+1;for(;++p;){const E=c.charAt(p);if(E==null||Number(E)!=E){--p;break}if(p===c.length)break}m.id=Number(c.substring(T,p+1))}if(c.charAt(++p)){const T=this.tryParse(c.substr(p));if(u.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return i("decoded %s as %j",c,m),m}tryParse(c){try{return JSON.parse(c,this.reviver)}catch{return!1}}static isPayloadValid(c,p){switch(c){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class h{constructor(c){this.packet=c,this.buffers=[],this.reconPack=c}takeBinaryData(c){if(this.buffers.push(c),this.buffers.length===this.reconPack.attachments){const p=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(_s)),_s}var Ni={},Af;function _p(){if(Af)return Ni;Af=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Ni.on=e,Ni}var Cf;function bp(){if(Cf)return Ii;Cf=1;var e=ae&&ae.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.Socket=void 0;const t=Lu(),n=_p(),r=Ln,i=e(qt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends r.Emitter{constructor(f,u,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=u,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[n.on(f,"open",this.onopen.bind(this)),n.on(f,"packet",this.onpacket.bind(this)),n.on(f,"error",this.onerror.bind(this)),n.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...u){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(u.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(u),this;const h={type:t.PacketType.EVENT,data:u};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof u[u.length-1]=="function"){const p=this.ids++;i("emitting packet with ack id %d",p);const m=u.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?i("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,u){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=u;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(i("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));i("event with ack id %d has timed out after %d ms",f,d),u.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(c),u.apply(this,[null,...p])}}emitWithAck(f,...u){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,c)=>{u.push((p,m)=>h?p?c(p):d(m):d(p)),this.emit(f,...u)})}_addToQueue(f){let u;typeof f[f.length-1]=="function"&&(u=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...c)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(i("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),u&&u(d)):(i("packet [%d] was successfully sent",h.id),this._queue.shift(),u&&u(null,...c)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(i("draining queue"),!this.connected||this._queue.length===0)return;const u=this._queue[0];if(u.pending&&!f){i("packet [%d] has already been sent and is waiting for an ack",u.id);return}u.pending=!0,u.tryCount++,i("sending packet [%d] (try n°%d)",u.id,u.tryCount),this.flags=u.flags,this.emit.apply(this,u.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){i("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,u){i("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,u)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const u=f.data||[];i("emitting event %j",u),f.id!=null&&(i("attaching ack callback to event"),u.push(this.ack(f.id))),this.connected?this.emitEvent(u):this.receiveBuffer.push(Object.freeze(u))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const u=this._anyListeners.slice();for(const h of u)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const u=this;let h=!1;return function(...d){h||(h=!0,i("sending ack %j",d),u.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const u=this.acks[f.id];typeof u=="function"?(i("calling ack %s with %j",f.id,f.data),u.apply(this,f.data),delete this.acks[f.id]):i("bad ack %s",f.id)}onconnect(f,u){i("socket connected with id %s",f),this.id=f,this.recovered=u&&this._pid===u,this._pid=u,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){i("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(i("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const u=this._anyListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const u=this._anyOutgoingListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const u=this._anyOutgoingListeners.slice();for(const h of u)h.apply(this,f.data)}}}return Ii.Socket=a,Ii}var Li={},Rf;function w_(){if(Rf)return Li;Rf=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Li.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=Math.floor(n*10)&1?t+r:t-r}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Li}var Pf;function S_(){if(Pf)return Pi;Pf=1;var e=ae&&ae.__createBinding||(Object.create?function(c,p,m,_){_===void 0&&(_=m),Object.defineProperty(c,_,{enumerable:!0,get:function(){return p[m]}})}:function(c,p,m,_){_===void 0&&(_=m),c[_]=p[m]}),t=ae&&ae.__setModuleDefault||(Object.create?function(c,p){Object.defineProperty(c,"default",{enumerable:!0,value:p})}:function(c,p){c.default=p}),n=ae&&ae.__importStar||function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var m in c)m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)&&e(p,c,m);return t(p,c),p},r=ae&&ae.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Manager=void 0;const o=vp(),i=bp(),s=n(Lu()),a=_p(),l=w_(),f=Ln,h=r(qt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var _;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,o.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((_=m.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new o.Socket(this.uri,this.opts);const m=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){_.onopen(),p&&p()}),E=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},b=a.on(m,"error",E);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),E(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(b),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){o.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let _=this.nsps[p];return _?this._autoConnect&&!_.active&&_.connect():(_=new i.Socket(this,p,m),this.nsps[p]=_),_}_destroy(p){const m=Object.keys(this.nsps);for(const _ of m)if(this.nsps[_].active){h("socket %s is still active, skipping close",_);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let _=0;_<m.length;_++)this.engine.write(m[_],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return Pi.Manager=d,Pi}var If;function T_(){return If||(If=1,function(e,t){var n=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=__(),o=S_();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=bp();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=n(qt()).default("socket.io-client"),l={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const c=r.url(h,d.path||"/socket.io"),p=c.source,m=c.id,_=c.path,T=l[m]&&_ in l[m].nsps,E=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let b;return E?(a("ignoring socket cache for %s",p),b=new o.Manager(p,d)):(l[m]||(a("new io instance for %s",p),l[m]=new o.Manager(p,d)),b=l[m]),c.query&&!d.query&&(d.query=c.queryKey),b.socket(c.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:o.Manager,Socket:i.Socket,io:f,connect:f});var u=Lu();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=f}(Eo,Eo.exports)),Eo.exports}var bs={},ki={},Nf;function O_(){if(Nf)return ki;Nf=1,ki.byteLength=a,ki.toByteArray=f,ki.fromByteArray=d;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(c){var p=c.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=p);var _=m===p?0:4-m%4;return[m,_]}function a(c){var p=s(c),m=p[0],_=p[1];return(m+_)*3/4-_}function l(c,p,m){return(p+m)*3/4-m}function f(c){var p,m=s(c),_=m[0],T=m[1],E=new n(l(c,_,T)),b=0,A=T>0?_-4:_,w;for(w=0;w<A;w+=4)p=t[c.charCodeAt(w)]<<18|t[c.charCodeAt(w+1)]<<12|t[c.charCodeAt(w+2)]<<6|t[c.charCodeAt(w+3)],E[b++]=p>>16&255,E[b++]=p>>8&255,E[b++]=p&255;return T===2&&(p=t[c.charCodeAt(w)]<<2|t[c.charCodeAt(w+1)]>>4,E[b++]=p&255),T===1&&(p=t[c.charCodeAt(w)]<<10|t[c.charCodeAt(w+1)]<<4|t[c.charCodeAt(w+2)]>>2,E[b++]=p>>8&255,E[b++]=p&255),E}function u(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function h(c,p,m){for(var _,T=[],E=p;E<m;E+=3)_=(c[E]<<16&16711680)+(c[E+1]<<8&65280)+(c[E+2]&255),T.push(u(_));return T.join("")}function d(c){for(var p,m=c.length,_=m%3,T=[],E=16383,b=0,A=m-_;b<A;b+=E)T.push(h(c,b,b+E>A?A:b+E));return _===1?(p=c[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):_===2&&(p=(c[m-2]<<8)+c[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return ki}var bo={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Lf;function x_(){return Lf||(Lf=1,bo.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,f=l>>1,u=-7,h=n?o-1:0,d=n?-1:1,c=e[t+h];for(h+=d,i=c&(1<<-u)-1,c>>=-u,u+=a;u>0;i=i*256+e[t+h],h+=d,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+e[t+h],h+=d,u-=8);if(i===0)i=1-f;else{if(i===l)return s?NaN:(c?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-f}return(c?-1:1)*s*Math.pow(2,i-r)},bo.write=function(e,t,n,r,o,i){var s,a,l,f=i*8-o-1,u=(1<<f)-1,h=u>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:i-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,o),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+c]=a&255,c+=p,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;e[n+c]=s&255,c+=p,s/=256,f-=8);e[n+c-p]|=m*128}),bo}/*!
|
|
56
|
+
window.`+s+".push("+JSON.stringify(i)+")"}};return hs=r,hs}var ps,Ql;function XE(){if(Ql)return ps;Ql=1;var e=QE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={dataScript:function(i){var s=document.createElement("script");return s.innerHTML=i,s},gtm:function(i){var s=t.default.tags(i),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},l=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:l,dataScript:f}},initialize:function(i){var s=i.gtmId,a=i.events,l=a===void 0?{}:a,f=i.dataLayer,u=i.dataLayerName,h=u===void 0?"dataLayer":u,d=i.auth,c=d===void 0?"":d,p=i.preview,m=p===void 0?"":p,_=this.gtm({id:s,events:l,dataLayer:f||void 0,dataLayerName:h,auth:c,preview:m});f&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(i){var s=i.dataLayer,a=i.dataLayerName,l=a===void 0?"dataLayer":a;if(window[l])return window[l].push(s);var f=t.default.dataLayer(s,l),u=this.dataScript(f);document.head.insertBefore(u,document.head.childNodes[0])}};return ps=r,ps}var ms,Xl;function JE(){if(Xl)return ms;Xl=1;var e=XE(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return ms=t.default,ms}var Jl;function ZE(){return Jl||(Jl=1,function(e,t){(function(n,r){e.exports=r(JE())})(ae,function(n){return function(){var r={273:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{setContext:function(){return u},setupGTM:function(){return d}});var a=i(273),l=i.n(a);let f=null;const u=({configs:c,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!c)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!c[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:c,environment:p})}`);f=c[p]},h=()=>f,d=()=>{const c=h();l().initialize({gtmId:c.id})}}(),s}()})}(ds)),ds.exports}var dh=202,hh=502,ph=400,mh=409,gh=100,yh=201,vh=417,e_=424,Eh=403,_h=504,bh=410,wh=505,Sh=418,Th=419,Oh=507,xh=500,Ah=411,Ch=423,Rh=420,Ph=405,Ih=301,Nh=302,Lh=207,kh=300,Bh=511,Mh=204,Fh=203,Uh=406,Dh=404,$h=501,jh=304,Hh=200,qh=206,Gh=402,Wh=308,Vh=412,zh=428,Yh=102,Kh=407,Qh=431,Xh=408,Jh=413,Zh=414,ep=416,tp=205,rp=303,np=503,ip=101,op=307,ap=429,sp=401,up=422,cp=415,lp=305;const t_={ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTI_STATUS:Lh,MULTIPLE_CHOICES:kh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NO_CONTENT:Mh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,RESET_CONTENT:tp,SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp};var r_={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},n_={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function fp(e){var t=r_[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function dp(e){var t=n_[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var hp=fp,Zs;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(Zs||(Zs={}));var eu;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(eu||(eu={}));var Fo=globalThis&&globalThis.__assign||function(){return Fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Fo.apply(this,arguments)};const i_=Fo(Fo({},t_),{getStatusCode:dp,getStatusText:hp}),o_=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FAILED_DEPENDENCY:e_,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTIPLE_CHOICES:kh,MULTI_STATUS:Lh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,NO_CONTENT:Mh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,RESET_CONTENT:tp,get ReasonPhrases(){return eu},SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,get StatusCodes(){return Zs},TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp,default:i_,getReasonPhrase:fp,getStatusCode:dp,getStatusText:hp},Symbol.toStringTag,{value:"Module"})),a_=Wi(o_);var Eo={exports:{}},_i={},gs={},bi={},wi={},Ur={},Si={},ys={},Dr={},Xt={},Zl;function Nu(){if(Zl)return Xt;Zl=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ERROR_PACKET=Xt.PACKET_TYPES_REVERSE=Xt.PACKET_TYPES=void 0;const e=Object.create(null);Xt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Xt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return Xt.ERROR_PACKET=n,Xt}var ef;function s_(){if(ef)return Dr;ef=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.encodePacket=Dr.encodePacketToBinary=void 0;const e=Nu(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,o=({type:f,data:u},h,d)=>t&&u instanceof Blob?h?d(u):i(u,d):n&&(u instanceof ArrayBuffer||r(u))?h?d(u):i(new Blob([u]),d):d(e.PACKET_TYPES[f]+(u||""));Dr.encodePacket=o;const i=(f,u)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];u("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function l(f,u){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(u);if(n&&(f.data instanceof ArrayBuffer||r(f.data)))return u(s(f.data));o(f,!1,h=>{a||(a=new TextEncoder),u(a.encode(h))})}return Dr.encodePacketToBinary=l,Dr}var Ti={},$r={},tf;function u_(){if(tf)return $r;tf=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.decode=$r.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let o=0;o<e.length;o++)t[e.charCodeAt(o)]=o;const n=o=>{let i=new Uint8Array(o),s,a=i.length,l="";for(s=0;s<a;s+=3)l+=e[i[s]>>2],l+=e[(i[s]&3)<<4|i[s+1]>>4],l+=e[(i[s+1]&15)<<2|i[s+2]>>6],l+=e[i[s+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};$r.encode=n;const r=o=>{let i=o.length*.75,s=o.length,a,l=0,f,u,h,d;o[o.length-1]==="="&&(i--,o[o.length-2]==="="&&i--);const c=new ArrayBuffer(i),p=new Uint8Array(c);for(a=0;a<s;a+=4)f=t[o.charCodeAt(a)],u=t[o.charCodeAt(a+1)],h=t[o.charCodeAt(a+2)],d=t[o.charCodeAt(a+3)],p[l++]=f<<2|u>>4,p[l++]=(u&15)<<4|h>>2,p[l++]=(h&3)<<6|d&63;return c};return $r.decode=r,$r}var rf;function c_(){if(rf)return Ti;rf=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.decodePacket=void 0;const e=Nu(),t=u_(),n=typeof ArrayBuffer=="function",r=(s,a)=>{if(typeof s!="string")return{type:"message",data:i(s,a)};const l=s.charAt(0);return l==="b"?{type:"message",data:o(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[l]?s.length>1?{type:e.PACKET_TYPES_REVERSE[l],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[l]}:e.ERROR_PACKET};Ti.decodePacket=r;const o=(s,a)=>{if(n){const l=(0,t.decode)(s);return i(l,a)}else return{base64:!0,data:s}},i=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return Ti}var nf;function zi(){return nf||(nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=s_();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=c_();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Nu(),o=String.fromCharCode(30),i=(d,c)=>{const p=d.length,m=new Array(p);let _=0;d.forEach((T,E)=>{(0,t.encodePacket)(T,!1,b=>{m[E]=b,++_===p&&c(m.join(o))})})};e.encodePayload=i;const s=(d,c)=>{const p=d.split(o),m=[];for(let _=0;_<p.length;_++){const T=(0,n.decodePacket)(p[_],c);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,c){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let _;if(m<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,m);else if(m<65536){_=new Uint8Array(3);const T=new DataView(_.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{_=new Uint8Array(9);const T=new DataView(_.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(_[0]|=128),c.enqueue(_),c.enqueue(p)})}})}e.createPacketEncoderStream=a;let l;function f(d){return d.reduce((c,p)=>c+p.length,0)}function u(d,c){if(d[0].length===c)return d.shift();const p=new Uint8Array(c);let m=0;for(let _=0;_<c;_++)p[_]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,c){l||(l=new TextDecoder);const p=[];let m=0,_=-1,T=!1;return new TransformStream({transform(E,b){for(p.push(E);;){if(m===0){if(f(p)<1)break;const A=u(p,1);T=(A[0]&128)===128,_=A[0]&127,_<126?m=3:_===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=u(p,2);_=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=u(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),N=w.getUint32(0);if(N>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}_=N*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<_)break;const A=u(p,_);b.enqueue((0,n.decodePacket)(T?A:l.decode(A),c)),m=0}if(_===0||_>d){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(ys)),ys}function ot(e){if(e)return l_(e)}function l_(e){for(var t in ot.prototype)e[t]=ot.prototype[t];return e}ot.prototype.on=ot.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ot.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ot.prototype.off=ot.prototype.removeListener=ot.prototype.removeAllListeners=ot.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ot.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};ot.prototype.emitReserved=ot.prototype.emit;ot.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ot.prototype.hasListeners=function(e){return!!this.listeners(e).length};const f_=Object.freeze(Object.defineProperty({__proto__:null,Emitter:ot},Symbol.toStringTag,{value:"Module"})),Ln=Wi(f_);var Jt={},Oi={},of;function Wo(){return of||(of=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.globalThisShim=void 0,Oi.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Oi}var af;function Yi(){if(af)return Jt;af=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.byteLength=Jt.installTimerFunctions=Jt.pick=void 0;const e=Wo();function t(l,...f){return f.reduce((u,h)=>(l.hasOwnProperty(h)&&(u[h]=l[h]),u),{})}Jt.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function o(l,f){f.useNativeTimers?(l.setTimeoutFn=n.bind(e.globalThisShim),l.clearTimeoutFn=r.bind(e.globalThisShim)):(l.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),l.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}Jt.installTimerFunctions=o;const i=1.33;function s(l){return typeof l=="string"?a(l):Math.ceil((l.byteLength||l.size)*i)}Jt.byteLength=s;function a(l){let f=0,u=0;for(let h=0,d=l.length;h<d;h++)f=l.charCodeAt(h),f<128?u+=1:f<2048?u+=2:f<55296||f>=57344?u+=3:(h++,u+=4);return u}return Jt}var _o={exports:{}},vs,sf;function d_(){if(sf)return vs;sf=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;vs=function(u,h){h=h||{};var d=typeof u;if(d==="string"&&u.length>0)return s(u);if(d==="number"&&isFinite(u))return h.long?l(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(h){var d=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*o;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*n;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(u){var h=Math.abs(u);return h>=r?Math.round(u/r)+"d":h>=n?Math.round(u/n)+"h":h>=t?Math.round(u/t)+"m":h>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var h=Math.abs(u);return h>=r?f(u,h,r,"day"):h>=n?f(u,h,n,"hour"):h>=t?f(u,h,t,"minute"):h>=e?f(u,h,e,"second"):u+" ms"}function f(u,h,d,c){var p=h>=d*1.5;return Math.round(u/d)+" "+c+(p?"s":"")}return vs}var Es,uf;function h_(){if(uf)return Es;uf=1;function e(t){r.debug=r,r.default=r,r.coerce=f,r.disable=s,r.enable=i,r.enabled=a,r.humanize=d_(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let d=0;for(let c=0;c<h.length;c++)d=(d<<5)-d+h.charCodeAt(c),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=n;function r(h){let d,c=null,p,m;function _(...T){if(!_.enabled)return;const E=_,b=Number(new Date),A=b-(d||b);E.diff=A,E.prev=d,E.curr=b,d=b,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,M)=>{if(F==="%%")return"%";w++;const q=r.formatters[M];if(typeof q=="function"){const W=T[w];F=q.call(E,W),T.splice(w,1),w--}return F}),r.formatArgs.call(E,T),(E.log||r.log).apply(E,T)}return _.namespace=h,_.useColors=r.useColors(),_.color=r.selectColor(h),_.extend=o,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>c!==null?c:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:T=>{c=T}}),typeof r.init=="function"&&r.init(_),_}function o(h,d){const c=r(this.namespace+(typeof d>"u"?":":d)+h);return c.log=this.log,c}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d;const c=(typeof h=="string"?h:"").split(/[\s,]+/),p=c.length;for(d=0;d<p;d++)c[d]&&(h=c[d].replace(/\*/g,".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.slice(1)+"$")):r.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...r.names.map(l),...r.skips.map(l).map(d=>"-"+d)].join(",");return r.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,c;for(d=0,c=r.skips.length;d<c;d++)if(r.skips[d].test(h))return!1;for(d=0,c=r.names.length;d<c;d++)if(r.names[d].test(h))return!0;return!1}function l(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Es=e,Es}var cf;function qt(){return cf||(cf=1,function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;l.splice(1,0,f,"color: inherit");let u=0,h=0;l[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(u++,d==="%c"&&(h=u))}),l.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function o(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function s(){try{return localStorage}catch{}}e.exports=h_()(t);const{formatters:a}=e.exports;a.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(_o,_o.exports)),_o.exports}var jr={},lf;function pp(){if(lf)return jr;lf=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.decode=jr.encode=void 0;function e(n){let r="";for(let o in n)n.hasOwnProperty(o)&&(r.length&&(r+="&"),r+=encodeURIComponent(o)+"="+encodeURIComponent(n[o]));return r}jr.encode=e;function t(n){let r={},o=n.split("&");for(let i=0,s=o.length;i<s;i++){let a=o[i].split("=");r[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return r}return jr.decode=t,jr}var ff;function Vo(){if(ff)return Si;ff=1;var e=ae&&ae.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Si,"__esModule",{value:!0}),Si.Transport=void 0;const t=zi(),n=Ln,r=Yi(),o=e(qt()),i=pp(),s=(0,o.default)("engine.io-client:transport");class a extends Error{constructor(u,h,d){super(u),this.description=h,this.context=d,this.type="TransportError"}}class l extends n.Emitter{constructor(u){super(),this.writable=!1,(0,r.installTimerFunctions)(this,u),this.opts=u,this.query=u.query,this.socket=u.socket}onError(u,h,d){return super.emitReserved("error",new a(u,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(u){this.readyState==="open"?this.write(u):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(u){const h=(0,t.decodePacket)(u,this.socket.binaryType);this.onPacket(h)}onPacket(u){super.emitReserved("packet",u)}onClose(u){this.readyState="closed",super.emitReserved("close",u)}pause(u){}createUri(u,h={}){return u+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const u=this.opts.hostname;return u.indexOf(":")===-1?u:"["+u+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(u){const h=(0,i.encode)(u);return h.length?"?"+h:""}}return Si.Transport=l,Si}var Zt={},df;function mp(){if(df)return Zt;df=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.yeast=Zt.decode=Zt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,o=0,i;function s(f){let u="";do u=e[f%t]+u,f=Math.floor(f/t);while(f>0);return u}Zt.encode=s;function a(f){let u=0;for(o=0;o<f.length;o++)u=u*t+n[f.charAt(o)];return u}Zt.decode=a;function l(){const f=s(+new Date);return f!==i?(r=0,i=f):f+"."+s(r++)}for(Zt.yeast=l;o<t;o++)n[e[o]]=o;return Zt}var Hr={},xi={},hf;function p_(){if(hf)return xi;hf=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return xi.hasCORS=e,xi}var pf;function m_(){if(pf)return Hr;pf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.createCookieJar=Hr.XHR=void 0;const e=p_(),t=Wo();function n(o){const i=o.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||e.hasCORS))return new XMLHttpRequest}catch{}if(!i)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Hr.XHR=n;function r(){}return Hr.createCookieJar=r,Hr}var mf;function g_(){if(mf)return Ur;mf=1;var e=ae&&ae.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.Request=Ur.Polling=void 0;const t=Vo(),n=e(qt()),r=mp(),o=zi(),i=m_(),s=Ln,a=Yi(),l=Wo(),f=(0,n.default)("engine.io-client:polling");function u(){}const h=function(){return new i.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const E=location.protocol==="https:";let b=location.port;b||(b=E?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||b!==_.port}const T=_&&_.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,i.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let E=0;this.polling&&(f("we are currently polling - waiting to pause"),E++,this.once("pollComplete",function(){f("pre-pause polling complete"),--E||T()})),this.writable||(f("we are currently writing - waiting to pause"),E++,this.once("drain",function(){f("pre-pause writing complete"),--E||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){f("polling got data %s",_);const T=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};(0,o.decodePayload)(_,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),_()):(f("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,o.encodePayload)(_,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(_,T)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new c(this.uri(),_)}doWrite(_,T){const E=this.request({method:"POST",data:_});E.on("success",T),E.on("error",(b,A)=>{this.onError("xhr post error",b,A)})}doPoll(){f("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(T,E)=>{this.onError("xhr poll error",T,E)}),this.pollXhr=_}}Ur.Polling=d;class c extends s.Emitter{constructor(_,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=_,this.data=T.data!==void 0?T.data:null,this.create()}create(){var _;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const E=this.xhr=new i.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),E.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let b in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(b)&&E.setRequestHeader(b,this.opts.extraHeaders[b])}}catch{}if(this.method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(E),"withCredentials"in E&&(E.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(E.timeout=this.opts.requestTimeout),E.onreadystatechange=()=>{var b;E.readyState===3&&((b=this.opts.cookieJar)===null||b===void 0||b.parseCookies(E)),E.readyState===4&&(E.status===200||E.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof E.status=="number"?E.status:0)},0))},f("xhr data %s",this.data),E.send(this.data)}catch(b){this.setTimeoutFn(()=>{this.onError(b)},0);return}typeof document<"u"&&(this.index=c.requestsCount++,c.requests[this.index]=this)}onError(_){this.emitReserved("error",_,this.xhr),this.cleanup(!0)}cleanup(_){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=u,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete c.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ur.Request=c,c.requestsCount=0,c.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in l.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in c.requests)c.requests.hasOwnProperty(m)&&c.requests[m].abort()}return Ur}var Ai={},Ct={},gf;function zo(){if(gf)return Ct;gf=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.defaultBinaryType=Ct.usingBrowserWebSocket=Ct.WebSocket=Ct.nextTick=void 0;const e=Wo();return Ct.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),Ct.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Ct.usingBrowserWebSocket=!0,Ct.defaultBinaryType="arraybuffer",Ct}var yf;function y_(){if(yf)return Ai;yf=1;var e=ae&&ae.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.WS=void 0;const t=Vo(),n=mp(),r=Yi(),o=zo(),i=e(qt()),s=zi(),a=(0,i.default)("engine.io-client:websocket"),l=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,c=l?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=o.usingBrowserWebSocket&&!l?d?new o.WebSocket(h,d):new o.WebSocket(h):new o.WebSocket(h,d,c)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const c=h[d],p=d===h.length-1;(0,s.encodePacket)(c,this.supportsBinary,m=>{const _={};o.usingBrowserWebSocket||(c.options&&(_.compress=c.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{o.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,_)}catch{a("websocket closed before onclose event")}p&&(0,o.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!o.WebSocket}}return Ai.WS=f,Ai}var Ci={},vf;function v_(){if(vf)return Ci;vf=1;var e=ae&&ae.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.WT=void 0;const t=Vo(),n=zo(),r=zi(),i=(0,e(qt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{i("transport closed gracefully"),this.onClose()}).catch(l=>{i("transport closed due to %s",l),this.onError("webtransport error",l)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(l=>{const f=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=l.readable.pipeThrough(f).getReader(),h=(0,r.createPacketEncoderStream)();h.readable.pipeTo(l.writable),this.writer=h.writable.getWriter();const d=()=>{u.read().then(({done:p,value:m})=>{if(p){i("session is closed");return}i("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{i("an error occurred while reading: %s",p)})};d();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this.writer.write(c).then(()=>this.onOpen())})}))}write(l){this.writable=!1;for(let f=0;f<l.length;f++){const u=l[f],h=f===l.length-1;this.writer.write(u).then(()=>{h&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this.transport)===null||l===void 0||l.close()}}return Ci.WT=s,Ci}var Ef;function gp(){if(Ef)return wi;Ef=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.transports=void 0;const e=g_(),t=y_(),n=v_();return wi.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},wi}var Ri={},_f;function yp(){if(_f)return Ri;_f=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function n(i){const s=i,a=i.indexOf("["),l=i.indexOf("]");a!=-1&&l!=-1&&(i=i.substring(0,a)+i.substring(a,l).replace(/:/g,";")+i.substring(l,i.length));let f=e.exec(i||""),u={},h=14;for(;h--;)u[t[h]]=f[h]||"";return a!=-1&&l!=-1&&(u.source=s,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=r(u,u.path),u.queryKey=o(u,u.query),u}Ri.parse=n;function r(i,s){const a=/\/{2,9}/g,l=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&l.splice(0,1),s.slice(-1)=="/"&&l.splice(l.length-1,1),l}function o(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,f,u){f&&(a[f]=u)}),a}return Ri}var bf;function E_(){if(bf)return bi;bf=1;var e=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.Socket=void 0;const t=gp(),n=Yi(),r=pp(),o=yp(),i=e(qt()),s=Ln,a=zi(),l=zo(),f=(0,i.default)("engine.io-client:socket");class u extends s.Emitter{constructor(d,c={}){super(),this.binaryType=l.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(c=d,d=null),d?(d=(0,o.parse)(d),c.hostname=d.host,c.secure=d.protocol==="https"||d.protocol==="wss",c.port=d.port,d.query&&(c.query=d.query)):c.host&&(c.hostname=(0,o.parse)(c.host).host),(0,n.installTimerFunctions)(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=c.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,r.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(d){f('creating transport "%s"',d);const c=Object.assign({},this.opts.query);c.EIO=a.protocol,c.transport=d,this.id&&(c.sid=this.id);const p=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&u.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(c){f("error while creating transport: %s",c),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",c=>this.onClose("transport close",c))}probe(d){f('probing transport "%s"',d);let c=this.createTransport(d),p=!1;u.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),c.send([{type:"ping",data:"probe"}]),c.once("packet",N=>{if(!p)if(N.type==="pong"&&N.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;u.priorWebsocketSuccess=c.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=c.name,this.emitReserved("upgradeError",F)}}))};function _(){p||(p=!0,w(),c.close(),c=null)}const T=N=>{const F=new Error("probe error: "+N);F.transport=c.name,_(),f('probe transport "%s" failed because of error: %s',d,N),this.emitReserved("upgradeError",F)};function E(){T("transport closed")}function b(){T("socket closed")}function A(N){c&&N.name!==c.name&&(f('"%s" works - aborting "%s"',N.name,c.name),_())}const w=()=>{c.removeListener("open",m),c.removeListener("error",T),c.removeListener("close",E),this.off("close",b),this.off("upgrading",A)};c.once("open",m),c.once("error",T),c.once("close",E),this.once("close",b),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||c.open()},200):c.open()}onOpen(){if(f("socket open"),this.readyState="open",u.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const c=this.upgrades.length;for(;d<c;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const c=new Error("server error");c.code=d.data,this.onError(c);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(c+=(0,n.byteLength)(m)),p>0&&c>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);c+=2}return f("payload size is %d (max: %d)",c,this.maxPayload),this.writeBuffer}write(d,c,p){return this.sendPacket("message",d,c,p),this}send(d,c,p){return this.sendPacket("message",d,c,p),this}sendPacket(d,c,p,m){if(typeof c=="function"&&(m=c,c=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const _={type:d,data:c,options:p};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),d()},p=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),u.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,c){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,c),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const c=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&c.push(d[p]);return c}}return bi.Socket=u,u.protocol=a.protocol,bi}var wf;function vp(){return wf||(wf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=E_();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Vo();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=gp();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Yi();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=yp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var s=zo();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(gs)),gs}var Sf;function __(){if(Sf)return _i;Sf=1;var e=ae&&ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_i,"__esModule",{value:!0}),_i.url=void 0;const t=vp(),r=e(qt()).default("socket.io-client:url");function o(i,s="",a){let l=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(r("protocol-less url %s",i),typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),r("parse %s",i),l=t.parse(i)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const u=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+u+":"+l.port+s,l.href=l.protocol+"://"+u+(a&&a.port===l.port?"":":"+l.port),l}return _i.url=o,_i}var Pi={},Ii={},_s={},qr={},Gr={},Tf;function Ep(){if(Tf)return Gr;Tf=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.hasBinary=Gr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",o=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function i(a){return e&&(a instanceof ArrayBuffer||t(a))||r&&a instanceof Blob||o&&a instanceof File}Gr.isBinary=i;function s(a,l){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,u=a.length;f<u;f++)if(s(a[f]))return!0;return!1}if(i(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return Gr.hasBinary=s,Gr}var Of;function b_(){if(Of)return qr;Of=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.reconstructPacket=qr.deconstructPacket=void 0;const e=Ep();function t(i){const s=[],a=i.data,l=i;return l.data=n(a,s),l.attachments=s.length,{packet:l,buffers:s}}qr.deconstructPacket=t;function n(i,s){if(!i)return i;if((0,e.isBinary)(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let l=0;l<i.length;l++)a[l]=n(i[l],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a[l]=n(i[l],s));return a}return i}function r(i,s){return i.data=o(i.data,s),delete i.attachments,i}qr.reconstructPacket=r;function o(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=o(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=o(i[a],s));return i}return qr}var xf;function Lu(){return xf||(xf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Ln,n=b_(),r=Ep(),i=(0,qt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class l{constructor(c){this.replacer=c}encode(c){return i("encoding packet %j",c),(c.type===a.EVENT||c.type===a.ACK)&&(0,r.hasBinary)(c)?this.encodeAsBinary({type:c.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:c.nsp,data:c.data,id:c.id}):[this.encodeAsString(c)]}encodeAsString(c){let p=""+c.type;return(c.type===a.BINARY_EVENT||c.type===a.BINARY_ACK)&&(p+=c.attachments+"-"),c.nsp&&c.nsp!=="/"&&(p+=c.nsp+","),c.id!=null&&(p+=c.id),c.data!=null&&(p+=JSON.stringify(c.data,this.replacer)),i("encoded %j as %s",c,p),p}encodeAsBinary(c){const p=(0,n.deconstructPacket)(c),m=this.encodeAsString(p.packet),_=p.buffers;return _.unshift(m),_}}e.Encoder=l;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class u extends t.Emitter{constructor(c){super(),this.reviver=c}add(c){let p;if(typeof c=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(c);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,r.isBinary)(c)||c.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(c),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+c)}decodeString(c){let p=0;const m={type:Number(c.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;c.charAt(++p)!=="-"&&p!=c.length;);const E=c.substring(T,p);if(E!=Number(E)||c.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(E)}if(c.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(c.charAt(p)===","||p===c.length););m.nsp=c.substring(T,p)}else m.nsp="/";const _=c.charAt(p+1);if(_!==""&&Number(_)==_){const T=p+1;for(;++p;){const E=c.charAt(p);if(E==null||Number(E)!=E){--p;break}if(p===c.length)break}m.id=Number(c.substring(T,p+1))}if(c.charAt(++p)){const T=this.tryParse(c.substr(p));if(u.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return i("decoded %s as %j",c,m),m}tryParse(c){try{return JSON.parse(c,this.reviver)}catch{return!1}}static isPayloadValid(c,p){switch(c){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class h{constructor(c){this.packet=c,this.buffers=[],this.reconPack=c}takeBinaryData(c){if(this.buffers.push(c),this.buffers.length===this.reconPack.attachments){const p=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(_s)),_s}var Ni={},Af;function _p(){if(Af)return Ni;Af=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Ni.on=e,Ni}var Cf;function bp(){if(Cf)return Ii;Cf=1;var e=ae&&ae.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.Socket=void 0;const t=Lu(),n=_p(),r=Ln,i=e(qt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends r.Emitter{constructor(f,u,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=u,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[n.on(f,"open",this.onopen.bind(this)),n.on(f,"packet",this.onpacket.bind(this)),n.on(f,"error",this.onerror.bind(this)),n.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...u){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(u.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(u),this;const h={type:t.PacketType.EVENT,data:u};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof u[u.length-1]=="function"){const p=this.ids++;i("emitting packet with ack id %d",p);const m=u.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?i("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,u){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=u;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(i("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));i("event with ack id %d has timed out after %d ms",f,d),u.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(c),u.apply(this,[null,...p])}}emitWithAck(f,...u){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,c)=>{u.push((p,m)=>h?p?c(p):d(m):d(p)),this.emit(f,...u)})}_addToQueue(f){let u;typeof f[f.length-1]=="function"&&(u=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...c)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(i("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),u&&u(d)):(i("packet [%d] was successfully sent",h.id),this._queue.shift(),u&&u(null,...c)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(i("draining queue"),!this.connected||this._queue.length===0)return;const u=this._queue[0];if(u.pending&&!f){i("packet [%d] has already been sent and is waiting for an ack",u.id);return}u.pending=!0,u.tryCount++,i("sending packet [%d] (try n°%d)",u.id,u.tryCount),this.flags=u.flags,this.emit.apply(this,u.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){i("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,u){i("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,u)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const u=f.data||[];i("emitting event %j",u),f.id!=null&&(i("attaching ack callback to event"),u.push(this.ack(f.id))),this.connected?this.emitEvent(u):this.receiveBuffer.push(Object.freeze(u))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const u=this._anyListeners.slice();for(const h of u)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const u=this;let h=!1;return function(...d){h||(h=!0,i("sending ack %j",d),u.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const u=this.acks[f.id];typeof u=="function"?(i("calling ack %s with %j",f.id,f.data),u.apply(this,f.data),delete this.acks[f.id]):i("bad ack %s",f.id)}onconnect(f,u){i("socket connected with id %s",f),this.id=f,this.recovered=u&&this._pid===u,this._pid=u,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){i("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(i("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const u=this._anyListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const u=this._anyOutgoingListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const u=this._anyOutgoingListeners.slice();for(const h of u)h.apply(this,f.data)}}}return Ii.Socket=a,Ii}var Li={},Rf;function w_(){if(Rf)return Li;Rf=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Li.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=Math.floor(n*10)&1?t+r:t-r}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Li}var Pf;function S_(){if(Pf)return Pi;Pf=1;var e=ae&&ae.__createBinding||(Object.create?function(c,p,m,_){_===void 0&&(_=m),Object.defineProperty(c,_,{enumerable:!0,get:function(){return p[m]}})}:function(c,p,m,_){_===void 0&&(_=m),c[_]=p[m]}),t=ae&&ae.__setModuleDefault||(Object.create?function(c,p){Object.defineProperty(c,"default",{enumerable:!0,value:p})}:function(c,p){c.default=p}),n=ae&&ae.__importStar||function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var m in c)m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)&&e(p,c,m);return t(p,c),p},r=ae&&ae.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Manager=void 0;const o=vp(),i=bp(),s=n(Lu()),a=_p(),l=w_(),f=Ln,h=r(qt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var _;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,o.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((_=m.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new o.Socket(this.uri,this.opts);const m=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){_.onopen(),p&&p()}),E=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},b=a.on(m,"error",E);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),E(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(b),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){o.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let _=this.nsps[p];return _?this._autoConnect&&!_.active&&_.connect():(_=new i.Socket(this,p,m),this.nsps[p]=_),_}_destroy(p){const m=Object.keys(this.nsps);for(const _ of m)if(this.nsps[_].active){h("socket %s is still active, skipping close",_);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let _=0;_<m.length;_++)this.engine.write(m[_],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return Pi.Manager=d,Pi}var If;function T_(){return If||(If=1,function(e,t){var n=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=__(),o=S_();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=bp();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=n(qt()).default("socket.io-client"),l={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const c=r.url(h,d.path||"/socket.io"),p=c.source,m=c.id,_=c.path,T=l[m]&&_ in l[m].nsps,E=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let b;return E?(a("ignoring socket cache for %s",p),b=new o.Manager(p,d)):(l[m]||(a("new io instance for %s",p),l[m]=new o.Manager(p,d)),b=l[m]),c.query&&!d.query&&(d.query=c.queryKey),b.socket(c.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:o.Manager,Socket:i.Socket,io:f,connect:f});var u=Lu();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=f}(Eo,Eo.exports)),Eo.exports}var bs={},ki={},Nf;function O_(){if(Nf)return ki;Nf=1,ki.byteLength=a,ki.toByteArray=f,ki.fromByteArray=d;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(c){var p=c.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=p);var _=m===p?0:4-m%4;return[m,_]}function a(c){var p=s(c),m=p[0],_=p[1];return(m+_)*3/4-_}function l(c,p,m){return(p+m)*3/4-m}function f(c){var p,m=s(c),_=m[0],T=m[1],E=new n(l(c,_,T)),b=0,A=T>0?_-4:_,w;for(w=0;w<A;w+=4)p=t[c.charCodeAt(w)]<<18|t[c.charCodeAt(w+1)]<<12|t[c.charCodeAt(w+2)]<<6|t[c.charCodeAt(w+3)],E[b++]=p>>16&255,E[b++]=p>>8&255,E[b++]=p&255;return T===2&&(p=t[c.charCodeAt(w)]<<2|t[c.charCodeAt(w+1)]>>4,E[b++]=p&255),T===1&&(p=t[c.charCodeAt(w)]<<10|t[c.charCodeAt(w+1)]<<4|t[c.charCodeAt(w+2)]>>2,E[b++]=p>>8&255,E[b++]=p&255),E}function u(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function h(c,p,m){for(var _,T=[],E=p;E<m;E+=3)_=(c[E]<<16&16711680)+(c[E+1]<<8&65280)+(c[E+2]&255),T.push(u(_));return T.join("")}function d(c){for(var p,m=c.length,_=m%3,T=[],E=16383,b=0,A=m-_;b<A;b+=E)T.push(h(c,b,b+E>A?A:b+E));return _===1?(p=c[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):_===2&&(p=(c[m-2]<<8)+c[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return ki}var bo={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Lf;function x_(){return Lf||(Lf=1,bo.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,f=l>>1,u=-7,h=n?o-1:0,d=n?-1:1,c=e[t+h];for(h+=d,i=c&(1<<-u)-1,c>>=-u,u+=a;u>0;i=i*256+e[t+h],h+=d,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+e[t+h],h+=d,u-=8);if(i===0)i=1-f;else{if(i===l)return s?NaN:(c?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-f}return(c?-1:1)*s*Math.pow(2,i-r)},bo.write=function(e,t,n,r,o,i){var s,a,l,f=i*8-o-1,u=(1<<f)-1,h=u>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:i-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,o),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+c]=a&255,c+=p,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;e[n+c]=s&255,c+=p,s/=256,f-=8);e[n+c-p]|=m*128}),bo}/*!
|
|
57
57
|
* The buffer module from node.js, for the browser.
|
|
58
58
|
*
|
|
59
59
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
60
60
|
* @license MIT
|
|
61
|
-
*/var kf;function A_(){return kf||(kf=1,function(e){const t=O_(),n=x_(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>o)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return l(S,g,v)}a.poolSize=8192;function l(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if($e(S,ArrayBuffer)||S&&$e(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(S,SharedArrayBuffer)||S&&$e(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=S.valueOf&&S.valueOf();if(x!=null&&x!==S)return a.from(x,g,v);const P=_(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return l(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function u(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return u(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=b(S,g)|0;let x=s(v);const P=x.write(S,g);return P!==v&&(x=x.slice(0,P)),x}function c(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let x=0;x<g;x+=1)v[x]=S[x]&255;return v}function p(S){if($e(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return c(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let x;return g===void 0&&v===void 0?x=new Uint8Array(S):v===void 0?x=new Uint8Array(S,g):x=new Uint8Array(S,g,v),Object.setPrototypeOf(x,a.prototype),x}function _(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||St(S.length)?s(0):c(S);if(S.type==="Buffer"&&Array.isArray(S.data))return c(S.data)}function T(S){if(S>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return S|0}function E(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),$e(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let x=g.length,P=v.length;for(let U=0,H=Math.min(x,P);U<H;++U)if(g[U]!==v[U]){x=g[U],P=v[U];break}return x<P?-1:P<x?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let x;if(v===void 0)for(v=0,x=0;x<g.length;++x)v+=g[x].length;const P=a.allocUnsafe(v);let U=0;for(x=0;x<g.length;++x){let H=g[x];if($e(H,Uint8Array))U+H.length>P.length?(a.isBuffer(H)||(H=a.from(H)),H.copy(P,U)):Uint8Array.prototype.set.call(P,H,U);else if(a.isBuffer(H))H.copy(P,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=H.length}return P};function b(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||$e(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&v===0)return 0;let P=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Rt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return wt(S).length;default:if(P)return x?-1:Rt(S).length;g=(""+g).toLowerCase(),P=!0}}a.byteLength=b;function A(S,g,v){let x=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,g,v);case"utf8":case"utf-8":return oe(this,g,v);case"ascii":return z(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,g,v);default:if(x)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const x=S[g];S[g]=S[v],S[v]=x}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?oe(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,v,x,P,U){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),x===void 0&&(x=g?g.length:0),P===void 0&&(P=0),U===void 0&&(U=this.length),v<0||x>g.length||P<0||U>this.length)throw new RangeError("out of range index");if(P>=U&&v>=x)return 0;if(P>=U)return-1;if(v>=x)return 1;if(v>>>=0,x>>>=0,P>>>=0,U>>>=0,this===g)return 0;let H=U-P,le=x-v;const be=Math.min(H,le),we=this.slice(P,U),Se=g.slice(v,x);for(let he=0;he<be;++he)if(we[he]!==Se[he]){H=we[he],le=Se[he];break}return H<le?-1:le<H?1:0};function N(S,g,v,x,P){if(S.length===0)return-1;if(typeof v=="string"?(x=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,St(v)&&(v=P?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(P)return-1;v=S.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,x)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,x,P);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,x,P);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,x,P){let U=1,H=S.length,le=g.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(S.length<2||g.length<2)return-1;U=2,H/=2,le/=2,v/=2}function be(Se,he){return U===1?Se[he]:Se.readUInt16BE(he*U)}let we;if(P){let Se=-1;for(we=v;we<H;we++)if(be(S,we)===be(g,Se===-1?0:we-Se)){if(Se===-1&&(Se=we),we-Se+1===le)return Se*U}else Se!==-1&&(we-=we-Se),Se=-1}else for(v+le>H&&(v=H-le),we=v;we>=0;we--){let Se=!0;for(let he=0;he<le;he++)if(be(S,we+he)!==be(g,he)){Se=!1;break}if(Se)return we}return-1}a.prototype.includes=function(g,v,x){return this.indexOf(g,v,x)!==-1},a.prototype.indexOf=function(g,v,x){return N(this,g,v,x,!0)},a.prototype.lastIndexOf=function(g,v,x){return N(this,g,v,x,!1)};function M(S,g,v,x){v=Number(v)||0;const P=S.length-v;x?(x=Number(x),x>P&&(x=P)):x=P;const U=g.length;x>U/2&&(x=U/2);let H;for(H=0;H<x;++H){const le=parseInt(g.substr(H*2,2),16);if(St(le))return H;S[v+H]=le}return H}function W(S,g,v,x){return gt(Rt(g,S.length-v),S,v,x)}function q(S,g,v,x){return gt(mt(g),S,v,x)}function V(S,g,v,x){return gt(wt(g),S,v,x)}function j(S,g,v,x){return gt(br(g,S.length-v),S,v,x)}a.prototype.write=function(g,v,x,P){if(v===void 0)P="utf8",x=this.length,v=0;else if(x===void 0&&typeof v=="string")P=v,x=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(x)?(x=x>>>0,P===void 0&&(P="utf8")):(P=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const U=this.length-v;if((x===void 0||x>U)&&(x=U),g.length>0&&(x<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let H=!1;for(;;)switch(P){case"hex":return M(this,g,v,x);case"utf8":case"utf-8":return W(this,g,v,x);case"ascii":case"latin1":case"binary":return q(this,g,v,x);case"base64":return V(this,g,v,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,g,v,x);default:if(H)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),H=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function oe(S,g,v){v=Math.min(S.length,v);const x=[];let P=g;for(;P<v;){const U=S[P];let H=null,le=U>239?4:U>223?3:U>191?2:1;if(P+le<=v){let be,we,Se,he;switch(le){case 1:U<128&&(H=U);break;case 2:be=S[P+1],(be&192)===128&&(he=(U&31)<<6|be&63,he>127&&(H=he));break;case 3:be=S[P+1],we=S[P+2],(be&192)===128&&(we&192)===128&&(he=(U&15)<<12|(be&63)<<6|we&63,he>2047&&(he<55296||he>57343)&&(H=he));break;case 4:be=S[P+1],we=S[P+2],Se=S[P+3],(be&192)===128&&(we&192)===128&&(Se&192)===128&&(he=(U&15)<<18|(be&63)<<12|(we&63)<<6|Se&63,he>65535&&he<1114112&&(H=he))}}H===null?(H=65533,le=1):H>65535&&(H-=65536,x.push(H>>>10&1023|55296),H=56320|H&1023),x.push(H),P+=le}return k(x)}const K=4096;function k(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",x=0;for(;x<g;)v+=String.fromCharCode.apply(String,S.slice(x,x+=K));return v}function z(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]&127);return x}function J(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]);return x}function de(S,g,v){const x=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>x)&&(v=x);let P="";for(let U=g;U<v;++U)P+=tt[S[U]];return P}function X(S,g,v){const x=S.slice(g,v);let P="";for(let U=0;U<x.length-1;U+=2)P+=String.fromCharCode(x[U]+x[U+1]*256);return P}a.prototype.slice=function(g,v){const x=this.length;g=~~g,v=v===void 0?x:~~v,g<0?(g+=x,g<0&&(g=0)):g>x&&(g=x),v<0?(v+=x,v<0&&(v=0)):v>x&&(v=x),v<g&&(v=g);const P=this.subarray(g,v);return Object.setPrototypeOf(P,a.prototype),P};function ee(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g+--v],U=1;for(;v>0&&(U*=256);)P+=this[g+--v]*U;return P},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,U=this[++g]+this[++g]*2**8+this[++g]*2**16+x*2**24;return BigInt(P)+(BigInt(U)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],U=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x;return(BigInt(P)<<BigInt(32))+BigInt(U)}),a.prototype.readIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return U*=128,P>=U&&(P-=Math.pow(2,8*v)),P},a.prototype.readIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=v,U=1,H=this[g+--P];for(;P>0&&(U*=256);)H+=this[g+--P]*U;return U*=128,H>=U&&(H-=Math.pow(2,8*v)),H},a.prototype.readInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g]|this[g+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g+1]|this[g]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(x<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(P)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!1,52,8)};function ue(S,g,v,x,P,U){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>P||g<U)throw new RangeError('"value" argument is out of bounds');if(v+x>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=1,H=0;for(this[v]=g&255;++H<x&&(U*=256);)this[v+H]=g/U&255;return v+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=x-1,H=1;for(this[v+U]=g&255;--U>=0&&(H*=256);)this[v+U]=g/H&255;return v+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function ce(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,v}function Ve(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v+7]=U,U=U>>8,S[v+6]=U,U=U>>8,S[v+5]=U,U=U>>8,S[v+4]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=H,H=H>>8,S[v+2]=H,H=H>>8,S[v+1]=H,H=H>>8,S[v]=H,v+8}a.prototype.writeBigUInt64LE=Ye(function(g,v=0){return ce(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ye(function(g,v=0){return Ve(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=0,H=1,le=0;for(this[v]=g&255;++U<x&&(H*=256);)g<0&&le===0&&this[v+U-1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=x-1,H=1,le=0;for(this[v+U]=g&255;--U>=0&&(H*=256);)g<0&&le===0&&this[v+U+1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ye(function(g,v=0){return ce(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ye(function(g,v=0){return Ve(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(S,g,v,x,P,U){if(v+x>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,4),n.write(S,g,v,x,23,4),v+4}a.prototype.writeFloatLE=function(g,v,x){return re(this,g,v,!0,x)},a.prototype.writeFloatBE=function(g,v,x){return re(this,g,v,!1,x)};function Pe(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,8),n.write(S,g,v,x,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,x){return Pe(this,g,v,!0,x)},a.prototype.writeDoubleBE=function(g,v,x){return Pe(this,g,v,!1,x)},a.prototype.copy=function(g,v,x,P){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(x||(x=0),!P&&P!==0&&(P=this.length),v>=g.length&&(v=g.length),v||(v=0),P>0&&P<x&&(P=x),P===x||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),g.length-v<P-x&&(P=g.length-v+x);const U=P-x;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,x,P):Uint8Array.prototype.set.call(g,this.subarray(x,P),v),U},a.prototype.fill=function(g,v,x,P){if(typeof g=="string"){if(typeof v=="string"?(P=v,v=0,x=this.length):typeof x=="string"&&(P=x,x=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(g.length===1){const H=g.charCodeAt(0);(P==="utf8"&&H<128||P==="latin1")&&(g=H)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<x)throw new RangeError("Out of range index");if(x<=v)return this;v=v>>>0,x=x===void 0?this.length:x>>>0,g||(g=0);let U;if(typeof g=="number")for(U=v;U<x;++U)this[U]=g;else{const H=a.isBuffer(g)?g:a.from(g,P),le=H.length;if(le===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(U=0;U<x-v;++U)this[U+v]=H[U%le]}return this};const xe={};function at(S,g,v){xe[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}at("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),at("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),at("ERR_OUT_OF_RANGE",function(S,g,v){let x=`The value of "${S}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=ct(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=ct(P)),P+="n"),x+=` It must be ${g}. Received ${P}`,x},RangeError);function ct(S){let g="",v=S.length;const x=S[0]==="-"?1:0;for(;v>=x+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function _t(S,g,v){ze(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&De(g,S.length-(v+1))}function te(S,g,v,x,P,U){if(S>v||S<g){const H=typeof g=="bigint"?"n":"";let le;throw U>3?g===0||g===BigInt(0)?le=`>= 0${H} and < 2${H} ** ${(U+1)*8}${H}`:le=`>= -(2${H} ** ${(U+1)*8-1}${H}) and < 2 ** ${(U+1)*8-1}${H}`:le=`>= ${g}${H} and <= ${v}${H}`,new xe.ERR_OUT_OF_RANGE("value",le,S)}_t(x,P,U)}function ze(S,g){if(typeof S!="number")throw new xe.ERR_INVALID_ARG_TYPE(g,"number",S)}function De(S,g,v){throw Math.floor(S)!==S?(ze(S,v),new xe.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const bt=/[^+/0-9A-Za-z-_]/g;function Gt(S){if(S=S.split("=")[0],S=S.trim().replace(bt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Rt(S,g){g=g||1/0;let v;const x=S.length;let P=null;const U=[];for(let H=0;H<x;++H){if(v=S.charCodeAt(H),v>55295&&v<57344){if(!P){if(v>56319){(g-=3)>-1&&U.push(239,191,189);continue}else if(H+1===x){(g-=3)>-1&&U.push(239,191,189);continue}P=v;continue}if(v<56320){(g-=3)>-1&&U.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(g-=3)>-1&&U.push(239,191,189);if(P=null,v<128){if((g-=1)<0)break;U.push(v)}else if(v<2048){if((g-=2)<0)break;U.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;U.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;U.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return U}function mt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function br(S,g){let v,x,P;const U=[];for(let H=0;H<S.length&&!((g-=2)<0);++H)v=S.charCodeAt(H),x=v>>8,P=v%256,U.push(P),U.push(x);return U}function wt(S){return t.toByteArray(Gt(S))}function gt(S,g,v,x){let P;for(P=0;P<x&&!(P+v>=g.length||P>=S.length);++P)g[P+v]=S[P];return P}function $e(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function St(S){return S!==S}const tt=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const x=v*16;for(let P=0;P<16;++P)g[x+P]=S[v]+S[P]}return g}();function Ye(S){return typeof BigInt>"u"?wr:S}function wr(){throw new Error("BigInt not supported")}}(bs)),bs}(function(e,t){(function(n,r){e.exports=r(ME(),YE(),ZE(),Ud(),a_,T_(),A_())})(ae,function(n,r,o,i,s,a,l){return function(){var f={809:function(c){c.exports=n},30:function(c){c.exports=r},36:function(c){c.exports=o},300:function(c){c.exports=i},408:function(c){c.exports=l},25:function(c){c.exports=s},130:function(c){c.exports=a}},u={};function h(c){var p=u[c];if(p!==void 0)return p.exports;var m=u[c]={exports:{}};return f[c](m,m.exports,h),m.exports}h.n=function(c){var p=c&&c.__esModule?function(){return c.default}:function(){return c};return h.d(p,{a:p}),p},h.d=function(c,p){for(var m in p)h.o(p,m)&&!h.o(c,m)&&Object.defineProperty(c,m,{enumerable:!0,get:p[m]})},h.o=function(c,p){return Object.prototype.hasOwnProperty.call(c,p)},h.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return k},auth:function(){return ee},buildAnswer:function(){return sg},buildCarouselCard:function(){return ag},buildQuestion:function(){return Me},carouselCards:function(){return yn},contentInteraction:function(){return Ye},decodeBase64:function(){return cg},default:function(){return lg},editorialPages:function(){return $},features:function(){return v},getEntries:function(){return c.getEntries},getEntry:function(){return c.getEntry},management:function(){return Tr},payments:function(){return Ar},people:function(){return It},peopleEngagement:function(){return cr},qaQuestions:function(){return Qe},reportError:function(){return p.reportError},search:function(){return mn}});var c=h(809),p=h(30),m=h(36),_={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:T,LOCALHOST:E,STAGING:b,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:N}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:M}}=_;let W={emailIds:{}};var q=h(300),V=h.n(q);const j=async I=>{try{const{message:B,response:L,request:D}=I;let Z=B;return L?Z+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:D&&(Z+=" - The request was made but no response was received"),console.warn(Z),await(0,p.reportError)(new Error(Z)),Z}catch(B){return console.warn(`Cannot handle error: ${B.message}`),B.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:oe,CERTIFICATES:K}}}}=_;var k={certificates:{create:async(I,B)=>{let L=[];try{const{data:D}=await V().post(`${Y}${oe}/${I}${K}`,B);D&&(L=D)}catch(D){await j(D)}return L}}};const{APIS:{AUTH_API:{BASE_URL:z,ENDPOINTS:{USER_PASSWORD:J,USERS:de}}},USERS:{MYSELF:X}}=_;var ee={userPassword:{update:async I=>{let B=null;try{B=await V().put(`${z}${de}/${X}${J}`,I)}catch(L){B={message:(((L||{}).response||{}).data||{}).message},await j(L)}return B}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ue,ENDPOINTS:{ANSWERS:ce,QUESTIONS:Ve,LIKES:Q}}}}=_,re=`${ue}${Ve}`;var Pe={create:async({questionSlug:I},B)=>{try{await V().post(`${re}/${encodeURIComponent(I)}${ce}`,B)}catch(L){const D=await j(L);throw new Error(D)}},remove:async({questionSlug:I,answerSlug:B})=>{try{await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`)}catch(L){const D=await j(L);throw new Error(D)}},update:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().put(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},unlike:async({questionSlug:I,answerSlug:B})=>{try{return await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:xe,ENDPOINTS:{QUESTIONS:at}}}}=_,ct=`${xe}${at}`;var _t={create:async I=>{try{return await V().post(ct,I)}catch(B){const L=await j(B);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await V().delete(`${ct}/${encodeURIComponent(I)}`)}catch(B){const L=await j(B);throw new Error(L)}},update:async({questionSlug:I},B)=>{try{return await V().put(`${ct}/${encodeURIComponent(I)}`,B)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:te,ENDPOINTS:{REPLIES:ze,ANSWERS:De,QUESTIONS:bt,LIKES:Gt}}}}=_,Rt=`${te}${bt}`,mt=({questionSlug:I,answerSlug:B,replySlug:L},D=!1)=>{let Z=`${Rt}/${encodeURIComponent(I)}${De}/${encodeURIComponent(B)}${ze}`;return L&&(Z=`${Z}/${encodeURIComponent(L)}`,D&&(Z=`${Z}${Gt}`)),Z};var br={create:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(mt({questionSlug:I,answerSlug:B}),L)}catch(D){const Z=await j(D);throw new Error(Z)}},update:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{return await V().put(mt({questionSlug:I,answerSlug:B,replySlug:L}),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},remove:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L}))}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{await V().post(mt({questionSlug:I,answerSlug:B,replySlug:L},!0),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},unlike:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L},!0))}catch(D){const Z=await j(D);throw new Error(Z)}},getReplyUrl:mt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:wt,ENDPOINTS:{QUESTIONS:gt,ANSWERS:$e,LIKES:St}}}}=_,tt=`${wt}${gt}`;var Ye={answers:Pe,questions:_t,replies:br,likes:{create:async(I,B)=>{try{return await V().post(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}},remove:async(I,B)=>{try{return await V().delete(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}}}};const{APIS:{FEATURES_API:{BASE_URL:wr,ENDPOINTS:{FLAGS:S}}}}=_,g=`${wr}${S}`;var v={flags:{read:async I=>{let B=null;try{const{data:L}=await V().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(B=L)}catch(L){await j(L)}return B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:x,ENDPOINTS:{ACCOUNTS:P}}}}=_;var U={create:async I=>{try{await V().post(`${x}${P}`,I)}catch(B){throw await j(B),B}},read:async I=>{let B=null;try{({data:B}=await V().get(`${x}${P}/${encodeURIComponent(I)}`))}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${x}${P}/${encodeURIComponent(I)}`,B)}catch(L){throw await j(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:H,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=_;var be={create:async I=>{try{await V().post(`${H}${le}`,I)}catch(B){throw await j(B),B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:we,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=_;var he={create:async I=>{try{await V().post(`${we}${Se}`,I)}catch(B){const L=await j(B);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:lt,ENDPOINTS:{LOGINS:ir,LOGIN_PASSWORDLESS:Sr}}}}=_,Wt=`${lt}${ir}`;var Tr={accounts:U,bulkEnrolments:be,eventRegistrations:he,passwordless:{update:async I=>{try{await V().put(`${Wt}/${encodeURIComponent(I)}${Sr}`)}catch(B){throw await j(B),B}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Vt,ENDPOINTS:{PRODUCTS:Or}}}}=_,xr=`${Vt}${Or}`;var Ar={products:{list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(xr,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Pt,ENDPOINTS:{BULK_ENROLMENTS:nn}}}}=_;var Tt={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Pt}${nn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}},Fn=h(25);const{OK:Un,MULTIPLE_CHOICES:Dn,NOT_FOUND:on,FORBIDDEN:Cr}=Fn.StatusCodes,Fe=I=>I>=Un&&I<Dn||I===Cr||I===on,{APIS:{PEOPLE_API:{BASE_URL_V2:Rr,ENDPOINTS:{USERS:Pr}}}}=_,zt=async I=>{let B=null;try{const{data:L}=await V().get(`${Rr}${Pr}/${encodeURIComponent(I)}`,{validateStatus:Fe});L&&L.id&&(B=L)}catch(L){await j(L)}return B},an=async I=>{let B=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(Z=>`ids=${encodeURIComponent(Z)}`).join("&"),D=await V().get(`${Rr}${Pr}?${L}`,{validateStatus:Fe});D&&D.length&&(B=D)}catch(L){await j(L)}return B};var $n={read:zt,update:async(I,B)=>{let L=!1;try{const{data:D}=await V().put(`${Rr}${Pr}/${encodeURIComponent(I)}`,B);L=!(!D||!D.id)}catch(D){await j(D)}return L},list:an};const{APIS:{PEOPLE_API:{BASE_URL_V2:je,ENDPOINTS:{USERS:jn,USER_LIKES:Hn}}},USERS:{MYSELF:qn}}=_,Gn=`${je}${jn}/${qn}${Hn}`,Ir=async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Gn,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B};var Je={list:Ir},Wn={authors:{readQuestionAuthors:async(I,B,L)=>{try{if(I.author=await zt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((Z,Te)=>new Date(Te.updatedAt)-new Date(Z.updatedAt)),I.totalAnswers=I.answers.length;let D=I.answers;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.answers.slice(Z,Z+L.limit)}for(let Z of D){Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}I.answers=D}else I.answers||(I.answers=[]);return I}catch(D){throw await j(D),new Error(`Cannot read authors for question: ${D.message}`)}},readAuthors:async(I=[])=>{let B=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await zt(I[0]);L&&B.push(L)}else if(I&&I.length>1){const L=await an(I);L&&L.length>0&&(B=L)}}catch(L){throw await j(L),new Error(`Cannot read authors: ${L.message}`)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL:Vn,ENDPOINTS:{REGISTRATIONS:zn}}}}=_;var Yn={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Vn}${zn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Kn,ENDPOINTS:{USERS:or,USER_COURSES:sn}}},USERS:{MYSELF:ar}}=_,st=`${Kn}${or}/${ar}${sn}`;var Nr={create:async I=>{try{await V().post(st,I)}catch(B){await j(B)}},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(st,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${st}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Qn,ENDPOINTS:{USERS:Xn,USER_EVENTS:Jn}}},USERS:{MYSELF:Zn}}=_,ei=`${Qn}${Xn}/${Zn}${Jn}`;var sr={list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ei,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Lr,ENDPOINTS:{USERS:Yt,USER_LESSONS:un}}},USERS:{MYSELF:cn}}=_,ln=`${Lr}${Yt}/${cn}${un}`;var ti={create:async I=>{let B=null;try{B=await V().post(ln,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ln,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ri,ENDPOINTS:{USERS:ni,USER_PRODUCTS:kr}}},USERS:{MYSELF:ii}}=_,Br=`${ri}${ni}/${ii}${kr}`;var Kt={create:async I=>{let B=null;try{B=await V().post(Br,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Br,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${Br}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ft,ENDPOINTS:{USERS:Ot,USER_RATINGS:xt}}},USERS:{MYSELF:oi}}=_,dt=`${ft}${Ot}/${oi}${xt}`;var It={bulkEnrolments:Tt,handlers:Wn,registrations:Yn,users:$n,userCourses:Nr,userEvents:sr,userLessons:ti,userLikes:Je,userProducts:Kt,userRatings:{create:async I=>{let B=null;try{const{data:L}=await V().post(dt,I);L!=null&&L.id&&(B=L)}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${dt}/${I}`,B)}catch(L){await j(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:ai,ENDPOINTS:{ENQUIRY_EMAILS:si}}}}=_;var ui={create:async I=>{let B=null;try{const{data:L}=await V().post(`${ai}${si}`,I);L&&(B=L)}catch(L){await j(L)}return B}},fn={forms:{sendEnquiryEmails:async I=>{let B=null;try{const{emailIds:L}=W;B=await cr.emails.create({...L,...I})}catch(L){await j(L)}return B}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Ke,ENDPOINTS:{USERS:dn,USER_PROPERTIES:hn}}},USERS:{MYSELF:ur}}=_;var cr={emails:ui,handlers:fn,userProperties:{update:async(I,B)=>{try{await V().put(`${Ke}${dn}/${ur}${hn}/${I}`,B)}catch(L){await j(L)}}}},lr=h(130);const{APIS:{SEARCH_API:{BASE_URL:ci,ENDPOINTS:{SEARCH:pn}}}}=_,Mr=`${ci}${pn}`;var mn={ask:async I=>{try{let B=null;const{data:L}=await V().get(Mr,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(B=L),B}catch(B){const L=await j(B);throw new Error(L)}},stream:(I,B,L)=>{const D=(0,lr.io)(void 0,{path:"/api/search-api/web-sockets"});function Z(){D.emit("search",{question:I})}function Te(Be){L(Be),Ne(),D.disconnect()}function Ne(){D.off("connect",Z),D.off("update",B),D.off("result",Te)}return D.on("connect",Z),D.on("update",B),D.on("result",Te),Ne}};const{CONTENTFUL:yt}=_,{CARD_TYPES:Fr}=yt.CAROUSELS;var yn={read:async(I,B)=>{try{if(!B||!B.sys||!B.sys.id)throw new Error("Invalid link to card");if(!I||!Fr[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:D}=Fr[I];return await(0,c.getEntry)({content_type:I,"sys.id":B.sys.id,include:L,select:D},{assetDetails:!0})}catch(L){throw await j(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:li}=_,{INCLUDE:y,SELECT:O,TYPE:R}=li.EDITORIAL_PAGES;var $={read:async I=>{try{return await(0,c.getEntry)({content_type:R,"fields.slug":I,include:y,select:O})}catch(B){throw await j(B),new Error(`Cannot read editorial page: ${B.message}`)}}};const{CONTENTFUL:fe}=_,{TYPE:ie,ORDER:pe,SELECT:me,SKIP:ke,LIMIT:_e,INCLUDE:He}=fe.QUESTIONS;var Qe={read:async I=>{try{return await(0,c.getEntry)({content_type:ie,"fields.slug":I,include:2,select:me})}catch(B){throw await j(B),new Error(`Cannot read question: ${B.message}`)}},list:async(I={})=>{try{return await(0,c.getEntries)({content_type:ie,include:He,limit:_e,order:pe,select:me,skip:ke,...I})}catch(B){throw await j(B),new Error(`Cannot list questions: ${B.message}`)}}},Me=async(I,B,L={ignoreAnswersAuthors:!1})=>{try{let D={};return D=await Qe.read(I),D=await It.handlers.authors.readQuestionAuthors(D,B,L),D}catch(D){throw await j(D),new Error(`Cannot build question: ${D.message}`)}};const{ARTICLES:{TYPE:qe},COURSES:{TYPE:Ue},EVENTS:{TYPE:Nt},LISTS:{TYPE:At},QUESTIONS:{TYPE:Qt},LEARNING_HUB:{TYPE:Ji}}=_.CONTENTFUL,Lt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,fr={[qe]:async I=>{const{authorIds:B,authorTag:L,image:D,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}=I,ht=await It.handlers.authors.readAuthors(B),kt=ht&&ht.length?ht:L?[L]:null;return{banner:Lt(D),contributors:kt,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}},[Ue]:async(I,B)=>{const{banner:L,freeCourse:D,partnershipDetails:Z,slug:Te,title:Ne,registered:Be}=I,ht={banner:Lt(L),slug:Te,title:Ne,pill:D?"free":"premium",registered:!!Be};if(Z){const{partners:kt}=Z;ht.partner=kt&&kt.length&&Z.partners[0]}if(Be===void 0&&B){const[kt]=await It.userProducts.list({courseSlug:Te,isEnrolled:!0,scope:"active"});ht.registered=!!kt}return ht},[Nt]:async(I,B)=>{const{bannerImage:L,defaultStartDate:D,isEventOngoing:Z,slug:Te,speakers:Ne,title:Be,registered:ht}=I,kt=new Date(D),fg=!!kt&&kt<new Date;if(Ne&&Ne.length)for(const Zi of Ne)Zi.image=(na=Zi.image)&&na.url?`${na.url}?w=100&h=100&fit=thumb&f=center`:null;var na;const rc={banner:Lt(L),dateHasPassed:fg,title:Be,slug:Te,isOngoingEvent:Z,contributors:Ne,startDate:kt,registered:!!ht};if(ht===void 0&&B){const[Zi]=await It.userEvents.list({eventSlug:Te});rc.registered=!!Zi}return rc},[At]:async I=>{const{hero:B,slug:L,title:D}=I;return{banner:Lt(B),slug:L,title:D}},[Qt]:async I=>{const{answers:B,authorId:L,createdAt:D,slug:Z,title:Te}=I;let Ne=null;if(L){const Be=await It.users.read(L);Be&&(Ne=Be)}return{answers:B&&B.length?B.length:0,contributors:Ne?[Ne]:[],createdAt:D,slug:Z,title:Te}},[Ji]:I=>{const{bannerSection:B,customLabel:L,slug:D,title:Z}=I;return{banner:Lt(B.image),slug:D,title:Z,customLabel:L}},people:I=>{const{id:B,name:L,jobTitle:D,location:Z,image:Te}=I;return{profile:Te,slug:B,title:L,text:D,secondaryText:Z}}};var ag=async({contentType:I,...B}={},L)=>{try{if(!fr[I])throw new Error("Content type not supported");if(typeof fr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&B.sys&&B.sys.type&&B.sys.type==="Link"&&(B=await yn.read(I,B)),{contentType:I,...await fr[I](B,L)}}catch(D){throw await j(D),new Error(`Cannot build carousel card: ${D.message}`)}},sg=async(I,B,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((Z,Te)=>new Date(Z.createdAt)-new Date(Te.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let D=I.replies;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.replies.slice(Z,Z+L.limit)}for(const Z of D){if(Z.authorId===I.authorId){Z.author=I.author,Z.userLiked=!1;continue}Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}return I.replies=D,I}catch(D){throw await j(D),new Error(`Cannot build replies for answer: ${D.message}`)}},ug=h(408);const cg=I=>I&&ug.Buffer.from(I,"base64").toString("ascii");function lg({contentContext:I=null,errorsContext:B=null,gtmContext:L=null,origin:D}){try{const Z=(Te=>{let Ne=null;Te?Ne=Te:typeof window<"u"&&(Ne=window.origin||window.location.origin),Ne||new Error("Cannot select environment: Website not defined");let Be=null;const ht=Ne.match(b);return ht?Be=ht[1].split(A)[0]:Ne===T?Be=w:Ne.includes(E)&&(Be=N),Be||new Error(`Cannot select environment: No rule for website ${Ne}`),Be})(D);return I&&(0,c.setContext)(Object.assign({},I,{environment:Z})),B&&(0,p.setContext)(Object.assign({},B,{environment:Z})),L&&((0,m.setContext)(Object.assign({},L,{environment:Z})),(0,m.setupGTM)()),(({environment:Te})=>{const Ne=(Be=>{if(!Be)throw new Error("Cannot map environment: Environment not defined");if(!F[Be])throw new Error(`Cannot map environment: No mapping found for environment ${Be}`);return F[Be]})(Te);W.emailIds=M[Ne]})(Object.assign({},{environment:Z})),Z}catch(Z){console.warn(`Cannot load SDK: ${Z.message}`)}}}(),d}()})})(Rd);var C_=Rd.exports;const Bi={Off:"off",On:"on",Cookie:"cookie"},R_=e=>{const[t]=Cd(),[n,r]=G.useState(null),[o,i]=G.useState(!1),[s,a]=G.useState(Bi.Off);return G.useEffect(()=>{e&&C_.features.flags.read(e).then(l=>{a(l.featureState),r(null)}).catch(l=>{a(Bi.Off),r(l)})},[e]),G.useEffect(()=>{switch(s){case Bi.Off:i(!1);break;case Bi.On:i(!0);break;case Bi.Cookie:i(!!t[`feature-${e}`]);break;default:i(!1)}},[s,t]),{isFeatureActive:o,error:n}};function P_(e,t,n){var r=this,o=G.useRef(null),i=G.useRef(0),s=G.useRef(null),a=G.useRef([]),l=G.useRef(),f=G.useRef(),u=G.useRef(e),h=G.useRef(!0);G.useEffect(function(){u.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var c=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,m="maxWait"in n,_=m?Math.max(+n.maxWait||0,t):null;G.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=G.useMemo(function(){var E=function(M){var W=a.current,q=l.current;return a.current=l.current=null,i.current=M,f.current=u.current.apply(q,W)},b=function(M,W){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(M):setTimeout(M,W)},A=function(M){if(!h.current)return!1;var W=M-o.current;return!o.current||W>=t||W<0||m&&M-i.current>=_},w=function(M){return s.current=null,p&&a.current?E(M):(a.current=l.current=null,f.current)},N=function M(){var W=Date.now();if(A(W))return w(W);if(h.current){var q=t-(W-o.current),V=m?Math.min(q,_-(W-i.current)):q;b(M,V)}},F=function(){var M=Date.now(),W=A(M);if(a.current=[].slice.call(arguments),l.current=r,o.current=M,W){if(!s.current&&h.current)return i.current=o.current,b(N,t),c?E(o.current):f.current;if(m)return b(N,t),E(o.current)}return s.current||b(N,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,a.current=o.current=l.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[c,m,t,_,p,d]);return T}function wp(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return P_(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}let ws;const Ki=(e=!0,t=!1)=>{if(!e)return;const[n,r]=G.useState(0)||[!1,()=>{}];G.useEffect(()=>(i(),window.addEventListener("resize",s),()=>{clearTimeout(ws),s.flush(),window.removeEventListener("resize",s)}),[]);const o=()=>window.innerWidth,i=()=>{r(o())},s=wp(()=>{o()!==n&&(t&&(clearTimeout(ws),document.body.classList.add("is-resizing"),ws=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),i())},500,{leading:!0});return n},Sp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[o,i]=G.useState({current:0,past:0})||[!1,()=>{}],[s,a]=G.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];G.useEffect(()=>(l(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const l=()=>{const u=window.scrollY,h=o.current,d=u-h,c=d>0?"down":"up";if(i({current:u,past:h}),c==="down"){u>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},f=wp(()=>{l()},250);return o};var Uo={exports:{}};Uo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",f="[object Error]",u="[object Function]",h="[object GeneratorFunction]",d="[object Map]",c="[object Number]",p="[object Object]",m="[object Promise]",_="[object RegExp]",T="[object Set]",E="[object String]",b="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",M="[object Float64Array]",W="[object Int8Array]",q="[object Int16Array]",V="[object Int32Array]",j="[object Uint8Array]",Y="[object Uint8ClampedArray]",oe="[object Uint16Array]",K="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,z=/\w*$/,J=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,X={};X[i]=X[s]=X[w]=X[N]=X[a]=X[l]=X[F]=X[M]=X[W]=X[q]=X[V]=X[d]=X[c]=X[p]=X[_]=X[T]=X[E]=X[b]=X[j]=X[Y]=X[oe]=X[K]=!0,X[f]=X[u]=X[A]=!1;var ee=typeof ae=="object"&&ae&&ae.Object===Object&&ae,ue=typeof self=="object"&&self&&self.Object===Object&&self,ce=ee||ue||Function("return this")(),Ve=t&&!t.nodeType&&t,Q=Ve&&!0&&e&&!e.nodeType&&e,re=Q&&Q.exports===Ve;function Pe(y,O){return y.set(O[0],O[1]),y}function xe(y,O){return y.add(O),y}function at(y,O){for(var R=-1,$=y?y.length:0;++R<$&&O(y[R],R,y)!==!1;);return y}function ct(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function _t(y,O,R,$){var fe=-1,ie=y?y.length:0;for($&&ie&&(R=y[++fe]);++fe<ie;)R=O(R,y[fe],fe,y);return R}function te(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function ze(y,O){return y==null?void 0:y[O]}function De(y){var O=!1;if(y!=null&&typeof y.toString!="function")try{O=!!(y+"")}catch{}return O}function bt(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function Gt(y,O){return function(R){return y(O(R))}}function Rt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var mt=Array.prototype,br=Function.prototype,wt=Object.prototype,gt=ce["__core-js_shared__"],$e=function(){var y=/[^.]+$/.exec(gt&>.keys&>.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),St=br.toString,tt=wt.hasOwnProperty,Ye=wt.toString,wr=RegExp("^"+St.call(tt).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=re?ce.Buffer:void 0,g=ce.Symbol,v=ce.Uint8Array,x=Gt(Object.getPrototypeOf,Object),P=Object.create,U=wt.propertyIsEnumerable,H=mt.splice,le=Object.getOwnPropertySymbols,be=S?S.isBuffer:void 0,we=Gt(Object.keys,Object),Se=ft(ce,"DataView"),he=ft(ce,"Map"),lt=ft(ce,"Promise"),ir=ft(ce,"Set"),Sr=ft(ce,"WeakMap"),Wt=ft(Object,"create"),Tr=Ke(Se),Vt=Ke(he),Or=Ke(lt),xr=Ke(ir),Ar=Ke(Sr),Pt=g?g.prototype:void 0,nn=Pt?Pt.valueOf:void 0;function Tt(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Fn(){this.__data__=Wt?Wt(null):{}}function Un(y){return this.has(y)&&delete this.__data__[y]}function Dn(y){var O=this.__data__;if(Wt){var R=O[y];return R===r?void 0:R}return tt.call(O,y)?O[y]:void 0}function on(y){var O=this.__data__;return Wt?O[y]!==void 0:tt.call(O,y)}function Cr(y,O){var R=this.__data__;return R[y]=Wt&&O===void 0?r:O,this}Tt.prototype.clear=Fn,Tt.prototype.delete=Un,Tt.prototype.get=Dn,Tt.prototype.has=on,Tt.prototype.set=Cr;function Fe(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=[]}function Pr(y){var O=this.__data__,R=ar(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():H.call(O,R,1),!0}function zt(y){var O=this.__data__,R=ar(O,y);return R<0?void 0:O[R][1]}function an(y){return ar(this.__data__,y)>-1}function $n(y,O){var R=this.__data__,$=ar(R,y);return $<0?R.push([y,O]):R[$][1]=O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__={hash:new Tt,map:new(he||Fe),string:new Tt}}function Hn(y){return Kt(this,y).delete(y)}function qn(y){return Kt(this,y).get(y)}function Gn(y){return Kt(this,y).has(y)}function Ir(y,O){return Kt(this,y).set(y,O),this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){this.__data__=new Fe(y)}function Wn(){this.__data__=new Fe}function Vn(y){return this.__data__.delete(y)}function zn(y){return this.__data__.get(y)}function Yn(y){return this.__data__.has(y)}function Kn(y,O){var R=this.__data__;if(R instanceof Fe){var $=R.__data__;if(!he||$.length<n-1)return $.push([y,O]),this;R=this.__data__=new je($)}return R.set(y,O),this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y,O){var R=cr(y)||ur(y)?te(y.length,String):[],$=R.length,fe=!!$;for(var ie in y)(O||tt.call(y,ie))&&!(fe&&(ie=="length"||ai(ie,$)))&&R.push(ie);return R}function sn(y,O,R){var $=y[O];(!(tt.call(y,O)&&hn($,R))||R===void 0&&!(O in y))&&(y[O]=R)}function ar(y,O){for(var R=y.length;R--;)if(hn(y[R][0],O))return R;return-1}function st(y,O){return y&&kr(O,gn(O),y)}function Nr(y,O,R,$,fe,ie,pe){var me;if($&&(me=ie?$(y,fe,ie,pe):$(y)),me!==void 0)return me;if(!yt(y))return y;var ke=cr(y);if(ke){if(me=oi(y),!O)return ni(y,me)}else{var _e=xt(y),He=_e==u||_e==h;if(pn(y))return sr(y,O);if(_e==p||_e==i||He&&!ie){if(De(y))return ie?y:{};if(me=dt(He?{}:y),!O)return ii(y,st(me,y))}else{if(!X[_e])return ie?y:{};me=It(y,_e,Nr,O)}}pe||(pe=new Je);var Qe=pe.get(y);if(Qe)return Qe;if(pe.set(y,me),!ke)var Me=R?Br(y):gn(y);return at(Me||y,function(qe,Ue){Me&&(Ue=qe,qe=y[Ue]),sn(me,Ue,Nr(qe,O,R,$,Ue,y,pe))}),me}function Qn(y){return yt(y)?P(y):{}}function Xn(y,O,R){var $=O(y);return cr(y)?$:ct($,R(y))}function Jn(y){return Ye.call(y)}function Zn(y){if(!yt(y)||ui(y))return!1;var O=Mr(y)||De(y)?wr:J;return O.test(Ke(y))}function ei(y){if(!fn(y))return we(y);var O=[];for(var R in Object(y))tt.call(y,R)&&R!="constructor"&&O.push(R);return O}function sr(y,O){if(O)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Lr(y){var O=new y.constructor(y.byteLength);return new v(O).set(new v(y)),O}function Yt(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function un(y,O,R){var $=O?R(bt(y),!0):bt(y);return _t($,Pe,new y.constructor)}function cn(y){var O=new y.constructor(y.source,z.exec(y));return O.lastIndex=y.lastIndex,O}function ln(y,O,R){var $=O?R(Rt(y),!0):Rt(y);return _t($,xe,new y.constructor)}function ti(y){return nn?Object(nn.call(y)):{}}function ri(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ni(y,O){var R=-1,$=y.length;for(O||(O=Array($));++R<$;)O[R]=y[R];return O}function kr(y,O,R,$){R||(R={});for(var fe=-1,ie=O.length;++fe<ie;){var pe=O[fe],me=$?$(R[pe],y[pe],pe,R,y):void 0;sn(R,pe,me===void 0?y[pe]:me)}return R}function ii(y,O){return kr(y,Ot(y),O)}function Br(y){return Xn(y,gn,Ot)}function Kt(y,O){var R=y.__data__;return si(O)?R[typeof O=="string"?"string":"hash"]:R.map}function ft(y,O){var R=ze(y,O);return Zn(R)?R:void 0}var Ot=le?Gt(le,Object):yn,xt=Jn;(Se&&xt(new Se(new ArrayBuffer(1)))!=N||he&&xt(new he)!=d||lt&&xt(lt.resolve())!=m||ir&&xt(new ir)!=T||Sr&&xt(new Sr)!=A)&&(xt=function(y){var O=Ye.call(y),R=O==p?y.constructor:void 0,$=R?Ke(R):void 0;if($)switch($){case Tr:return N;case Vt:return d;case Or:return m;case xr:return T;case Ar:return A}return O});function oi(y){var O=y.length,R=y.constructor(O);return O&&typeof y[0]=="string"&&tt.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function dt(y){return typeof y.constructor=="function"&&!fn(y)?Qn(x(y)):{}}function It(y,O,R,$){var fe=y.constructor;switch(O){case w:return Lr(y);case a:case l:return new fe(+y);case N:return Yt(y,$);case F:case M:case W:case q:case V:case j:case Y:case oe:case K:return ri(y,$);case d:return un(y,$,R);case c:case E:return new fe(y);case _:return cn(y);case T:return ln(y,$,R);case b:return ti(y)}}function ai(y,O){return O=O??o,!!O&&(typeof y=="number"||de.test(y))&&y>-1&&y%1==0&&y<O}function si(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function ui(y){return!!$e&&$e in y}function fn(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||wt;return y===R}function Ke(y){if(y!=null){try{return St.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y){return Nr(y,!0,!0)}function hn(y,O){return y===O||y!==y&&O!==O}function ur(y){return ci(y)&&tt.call(y,"callee")&&(!U.call(y,"callee")||Ye.call(y)==i)}var cr=Array.isArray;function lr(y){return y!=null&&mn(y.length)&&!Mr(y)}function ci(y){return Fr(y)&&lr(y)}var pn=be||li;function Mr(y){var O=yt(y)?Ye.call(y):"";return O==u||O==h}function mn(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function yt(y){var O=typeof y;return!!y&&(O=="object"||O=="function")}function Fr(y){return!!y&&typeof y=="object"}function gn(y){return lr(y)?or(y):ei(y)}function yn(){return[]}function li(){return!1}e.exports=dn})(Uo,Uo.exports);var I_=Uo.exports;const N_=jt(I_);var L_="Expected a function",Tp="__lodash_hash_undefined__",Op=1/0,k_=9007199254740991,B_="[object Function]",M_="[object GeneratorFunction]",F_="[object Symbol]",U_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D_=/^\w*$/,$_=/^\./,j_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H_=/[\\^$.*+?()[\]{}|]/g,q_=/\\(\\)?/g,G_=/^\[object .+?Constructor\]$/,W_=/^(?:0|[1-9]\d*)$/,V_=typeof ae=="object"&&ae&&ae.Object===Object&&ae,z_=typeof self=="object"&&self&&self.Object===Object&&self,ku=V_||z_||Function("return this")();function Y_(e,t){return e==null?void 0:e[t]}function K_(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Q_=Array.prototype,X_=Function.prototype,xp=Object.prototype,Ss=ku["__core-js_shared__"],Bf=function(){var e=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ap=X_.toString,Yo=xp.hasOwnProperty,Cp=xp.toString,J_=RegExp("^"+Ap.call(Yo).replace(H_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mf=ku.Symbol,Z_=Q_.splice,eb=Rp(ku,"Map"),Hi=Rp(Object,"create"),Ff=Mf?Mf.prototype:void 0,Uf=Ff?Ff.toString:void 0;function Xr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function tb(){this.__data__=Hi?Hi(null):{}}function rb(e){return this.has(e)&&delete this.__data__[e]}function nb(e){var t=this.__data__;if(Hi){var n=t[e];return n===Tp?void 0:n}return Yo.call(t,e)?t[e]:void 0}function ib(e){var t=this.__data__;return Hi?t[e]!==void 0:Yo.call(t,e)}function ob(e,t){var n=this.__data__;return n[e]=Hi&&t===void 0?Tp:t,this}Xr.prototype.clear=tb;Xr.prototype.delete=rb;Xr.prototype.get=nb;Xr.prototype.has=ib;Xr.prototype.set=ob;function kn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ab(){this.__data__=[]}function sb(e){var t=this.__data__,n=Ko(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Z_.call(t,n,1),!0}function ub(e){var t=this.__data__,n=Ko(t,e);return n<0?void 0:t[n][1]}function cb(e){return Ko(this.__data__,e)>-1}function lb(e,t){var n=this.__data__,r=Ko(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}kn.prototype.clear=ab;kn.prototype.delete=sb;kn.prototype.get=ub;kn.prototype.has=cb;kn.prototype.set=lb;function en(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fb(){this.__data__={hash:new Xr,map:new(eb||kn),string:new Xr}}function db(e){return Qo(this,e).delete(e)}function hb(e){return Qo(this,e).get(e)}function pb(e){return Qo(this,e).has(e)}function mb(e,t){return Qo(this,e).set(e,t),this}en.prototype.clear=fb;en.prototype.delete=db;en.prototype.get=hb;en.prototype.has=pb;en.prototype.set=mb;function gb(e,t,n){var r=e[t];(!(Yo.call(e,t)&&Pp(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function Ko(e,t){for(var n=e.length;n--;)if(Pp(e[n][0],t))return n;return-1}function yb(e){if(!Do(e)||Tb(e))return!1;var t=Cb(e)||K_(e)?J_:G_;return t.test(Ab(e))}function vb(e,t,n,r){if(!Do(e))return e;t=wb(t,e)?[t]:_b(t);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var l=xb(t[o]),f=n;if(o!=s){var u=a[l];f=r?r(u,l,a):void 0,f===void 0&&(f=Do(u)?u:bb(t[o+1])?[]:{})}gb(a,l,f),a=a[l]}return e}function Eb(e){if(typeof e=="string")return e;if(Mu(e))return Uf?Uf.call(e):"";var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function _b(e){return Ip(e)?e:Ob(e)}function Qo(e,t){var n=e.__data__;return Sb(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Rp(e,t){var n=Y_(e,t);return yb(n)?n:void 0}function bb(e,t){return t=t??k_,!!t&&(typeof e=="number"||W_.test(e))&&e>-1&&e%1==0&&e<t}function wb(e,t){if(Ip(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Mu(e)?!0:D_.test(e)||!U_.test(e)||t!=null&&e in Object(t)}function Sb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Tb(e){return!!Bf&&Bf in e}var Ob=Bu(function(e){e=Pb(e);var t=[];return $_.test(e)&&t.push(""),e.replace(j_,function(n,r,o,i){t.push(o?i.replace(q_,"$1"):r||n)}),t});function xb(e){if(typeof e=="string"||Mu(e))return e;var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function Ab(e){if(e!=null){try{return Ap.call(e)}catch{}try{return e+""}catch{}}return""}function Bu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(L_);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Bu.Cache||en),n}Bu.Cache=en;function Pp(e,t){return e===t||e!==e&&t!==t}var Ip=Array.isArray;function Cb(e){var t=Do(e)?Cp.call(e):"";return t==B_||t==M_}function Do(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Rb(e){return!!e&&typeof e=="object"}function Mu(e){return typeof e=="symbol"||Rb(e)&&Cp.call(e)==F_}function Pb(e){return e==null?"":Eb(e)}function Ib(e,t,n){return e==null?e:vb(e,t,n)}var Nb=Ib;const Lb=jt(Nb),kb=(e,t)=>{Array.isArray(t)||(t=[t]);const n=N_(e);return t.forEach(({type:r,value:o})=>{Lb(n,r,o)}),n},Np=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Lp=(e,t,n)=>{let r=n.mobile;for(const o in t){const i=parseInt(String(t[o]));if(e>=i)r=n[i];else if(e<i)break}return r},Df=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Bb=e=>{let i;try{i=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=i/36e5,a=Math.floor(i/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const l=Math.floor(a/7);return l<=52?{path:"weeks",number:l}:{path:"years",number:Math.floor(a/365)}},Mb=e=>new Promise(t=>setTimeout(t,e)),Fu={apolitical:"Apolitical",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members (coming soon)",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_delete:"Delete",discussion_delete_deleting:"Deleting...",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_action_answer:"answer",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_answer_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_answer_likes_like:"Like this answer",discussion_answer_likes_unlike:"Unlike answer",discussion_reply_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_reply_likes_like:"Like this reply",discussion_reply_likes_unlike:"Unlike reply",discussion_thread_reply_button:"Reply",discussion_thread_report_subject:"Report a post on Apolitical",discussion_thread_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
|
|
61
|
+
*/var kf;function A_(){return kf||(kf=1,function(e){const t=O_(),n=x_(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>o)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return l(S,g,v)}a.poolSize=8192;function l(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if($e(S,ArrayBuffer)||S&&$e(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(S,SharedArrayBuffer)||S&&$e(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=S.valueOf&&S.valueOf();if(x!=null&&x!==S)return a.from(x,g,v);const P=_(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return l(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function u(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return u(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=b(S,g)|0;let x=s(v);const P=x.write(S,g);return P!==v&&(x=x.slice(0,P)),x}function c(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let x=0;x<g;x+=1)v[x]=S[x]&255;return v}function p(S){if($e(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return c(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let x;return g===void 0&&v===void 0?x=new Uint8Array(S):v===void 0?x=new Uint8Array(S,g):x=new Uint8Array(S,g,v),Object.setPrototypeOf(x,a.prototype),x}function _(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||St(S.length)?s(0):c(S);if(S.type==="Buffer"&&Array.isArray(S.data))return c(S.data)}function T(S){if(S>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return S|0}function E(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),$e(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let x=g.length,P=v.length;for(let U=0,H=Math.min(x,P);U<H;++U)if(g[U]!==v[U]){x=g[U],P=v[U];break}return x<P?-1:P<x?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let x;if(v===void 0)for(v=0,x=0;x<g.length;++x)v+=g[x].length;const P=a.allocUnsafe(v);let U=0;for(x=0;x<g.length;++x){let H=g[x];if($e(H,Uint8Array))U+H.length>P.length?(a.isBuffer(H)||(H=a.from(H)),H.copy(P,U)):Uint8Array.prototype.set.call(P,H,U);else if(a.isBuffer(H))H.copy(P,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=H.length}return P};function b(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||$e(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&v===0)return 0;let P=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Rt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return wt(S).length;default:if(P)return x?-1:Rt(S).length;g=(""+g).toLowerCase(),P=!0}}a.byteLength=b;function A(S,g,v){let x=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,g,v);case"utf8":case"utf-8":return oe(this,g,v);case"ascii":return z(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,g,v);default:if(x)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const x=S[g];S[g]=S[v],S[v]=x}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?oe(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,v,x,P,U){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),x===void 0&&(x=g?g.length:0),P===void 0&&(P=0),U===void 0&&(U=this.length),v<0||x>g.length||P<0||U>this.length)throw new RangeError("out of range index");if(P>=U&&v>=x)return 0;if(P>=U)return-1;if(v>=x)return 1;if(v>>>=0,x>>>=0,P>>>=0,U>>>=0,this===g)return 0;let H=U-P,le=x-v;const be=Math.min(H,le),we=this.slice(P,U),Se=g.slice(v,x);for(let he=0;he<be;++he)if(we[he]!==Se[he]){H=we[he],le=Se[he];break}return H<le?-1:le<H?1:0};function N(S,g,v,x,P){if(S.length===0)return-1;if(typeof v=="string"?(x=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,St(v)&&(v=P?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(P)return-1;v=S.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,x)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,x,P);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,x,P);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,x,P){let U=1,H=S.length,le=g.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(S.length<2||g.length<2)return-1;U=2,H/=2,le/=2,v/=2}function be(Se,he){return U===1?Se[he]:Se.readUInt16BE(he*U)}let we;if(P){let Se=-1;for(we=v;we<H;we++)if(be(S,we)===be(g,Se===-1?0:we-Se)){if(Se===-1&&(Se=we),we-Se+1===le)return Se*U}else Se!==-1&&(we-=we-Se),Se=-1}else for(v+le>H&&(v=H-le),we=v;we>=0;we--){let Se=!0;for(let he=0;he<le;he++)if(be(S,we+he)!==be(g,he)){Se=!1;break}if(Se)return we}return-1}a.prototype.includes=function(g,v,x){return this.indexOf(g,v,x)!==-1},a.prototype.indexOf=function(g,v,x){return N(this,g,v,x,!0)},a.prototype.lastIndexOf=function(g,v,x){return N(this,g,v,x,!1)};function M(S,g,v,x){v=Number(v)||0;const P=S.length-v;x?(x=Number(x),x>P&&(x=P)):x=P;const U=g.length;x>U/2&&(x=U/2);let H;for(H=0;H<x;++H){const le=parseInt(g.substr(H*2,2),16);if(St(le))return H;S[v+H]=le}return H}function q(S,g,v,x){return gt(Rt(g,S.length-v),S,v,x)}function W(S,g,v,x){return gt(mt(g),S,v,x)}function V(S,g,v,x){return gt(wt(g),S,v,x)}function j(S,g,v,x){return gt(br(g,S.length-v),S,v,x)}a.prototype.write=function(g,v,x,P){if(v===void 0)P="utf8",x=this.length,v=0;else if(x===void 0&&typeof v=="string")P=v,x=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(x)?(x=x>>>0,P===void 0&&(P="utf8")):(P=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const U=this.length-v;if((x===void 0||x>U)&&(x=U),g.length>0&&(x<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let H=!1;for(;;)switch(P){case"hex":return M(this,g,v,x);case"utf8":case"utf-8":return q(this,g,v,x);case"ascii":case"latin1":case"binary":return W(this,g,v,x);case"base64":return V(this,g,v,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,g,v,x);default:if(H)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),H=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function oe(S,g,v){v=Math.min(S.length,v);const x=[];let P=g;for(;P<v;){const U=S[P];let H=null,le=U>239?4:U>223?3:U>191?2:1;if(P+le<=v){let be,we,Se,he;switch(le){case 1:U<128&&(H=U);break;case 2:be=S[P+1],(be&192)===128&&(he=(U&31)<<6|be&63,he>127&&(H=he));break;case 3:be=S[P+1],we=S[P+2],(be&192)===128&&(we&192)===128&&(he=(U&15)<<12|(be&63)<<6|we&63,he>2047&&(he<55296||he>57343)&&(H=he));break;case 4:be=S[P+1],we=S[P+2],Se=S[P+3],(be&192)===128&&(we&192)===128&&(Se&192)===128&&(he=(U&15)<<18|(be&63)<<12|(we&63)<<6|Se&63,he>65535&&he<1114112&&(H=he))}}H===null?(H=65533,le=1):H>65535&&(H-=65536,x.push(H>>>10&1023|55296),H=56320|H&1023),x.push(H),P+=le}return k(x)}const K=4096;function k(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",x=0;for(;x<g;)v+=String.fromCharCode.apply(String,S.slice(x,x+=K));return v}function z(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]&127);return x}function J(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]);return x}function de(S,g,v){const x=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>x)&&(v=x);let P="";for(let U=g;U<v;++U)P+=tt[S[U]];return P}function X(S,g,v){const x=S.slice(g,v);let P="";for(let U=0;U<x.length-1;U+=2)P+=String.fromCharCode(x[U]+x[U+1]*256);return P}a.prototype.slice=function(g,v){const x=this.length;g=~~g,v=v===void 0?x:~~v,g<0?(g+=x,g<0&&(g=0)):g>x&&(g=x),v<0?(v+=x,v<0&&(v=0)):v>x&&(v=x),v<g&&(v=g);const P=this.subarray(g,v);return Object.setPrototypeOf(P,a.prototype),P};function ee(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g+--v],U=1;for(;v>0&&(U*=256);)P+=this[g+--v]*U;return P},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,U=this[++g]+this[++g]*2**8+this[++g]*2**16+x*2**24;return BigInt(P)+(BigInt(U)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],U=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x;return(BigInt(P)<<BigInt(32))+BigInt(U)}),a.prototype.readIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return U*=128,P>=U&&(P-=Math.pow(2,8*v)),P},a.prototype.readIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=v,U=1,H=this[g+--P];for(;P>0&&(U*=256);)H+=this[g+--P]*U;return U*=128,H>=U&&(H-=Math.pow(2,8*v)),H},a.prototype.readInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g]|this[g+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g+1]|this[g]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(x<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(P)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!1,52,8)};function ue(S,g,v,x,P,U){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>P||g<U)throw new RangeError('"value" argument is out of bounds');if(v+x>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=1,H=0;for(this[v]=g&255;++H<x&&(U*=256);)this[v+H]=g/U&255;return v+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=x-1,H=1;for(this[v+U]=g&255;--U>=0&&(H*=256);)this[v+U]=g/H&255;return v+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function ce(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,v}function Ve(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v+7]=U,U=U>>8,S[v+6]=U,U=U>>8,S[v+5]=U,U=U>>8,S[v+4]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=H,H=H>>8,S[v+2]=H,H=H>>8,S[v+1]=H,H=H>>8,S[v]=H,v+8}a.prototype.writeBigUInt64LE=Ye(function(g,v=0){return ce(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ye(function(g,v=0){return Ve(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=0,H=1,le=0;for(this[v]=g&255;++U<x&&(H*=256);)g<0&&le===0&&this[v+U-1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=x-1,H=1,le=0;for(this[v+U]=g&255;--U>=0&&(H*=256);)g<0&&le===0&&this[v+U+1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ye(function(g,v=0){return ce(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ye(function(g,v=0){return Ve(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(S,g,v,x,P,U){if(v+x>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,4),n.write(S,g,v,x,23,4),v+4}a.prototype.writeFloatLE=function(g,v,x){return re(this,g,v,!0,x)},a.prototype.writeFloatBE=function(g,v,x){return re(this,g,v,!1,x)};function Pe(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,8),n.write(S,g,v,x,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,x){return Pe(this,g,v,!0,x)},a.prototype.writeDoubleBE=function(g,v,x){return Pe(this,g,v,!1,x)},a.prototype.copy=function(g,v,x,P){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(x||(x=0),!P&&P!==0&&(P=this.length),v>=g.length&&(v=g.length),v||(v=0),P>0&&P<x&&(P=x),P===x||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),g.length-v<P-x&&(P=g.length-v+x);const U=P-x;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,x,P):Uint8Array.prototype.set.call(g,this.subarray(x,P),v),U},a.prototype.fill=function(g,v,x,P){if(typeof g=="string"){if(typeof v=="string"?(P=v,v=0,x=this.length):typeof x=="string"&&(P=x,x=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(g.length===1){const H=g.charCodeAt(0);(P==="utf8"&&H<128||P==="latin1")&&(g=H)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<x)throw new RangeError("Out of range index");if(x<=v)return this;v=v>>>0,x=x===void 0?this.length:x>>>0,g||(g=0);let U;if(typeof g=="number")for(U=v;U<x;++U)this[U]=g;else{const H=a.isBuffer(g)?g:a.from(g,P),le=H.length;if(le===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(U=0;U<x-v;++U)this[U+v]=H[U%le]}return this};const xe={};function at(S,g,v){xe[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}at("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),at("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),at("ERR_OUT_OF_RANGE",function(S,g,v){let x=`The value of "${S}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=ct(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=ct(P)),P+="n"),x+=` It must be ${g}. Received ${P}`,x},RangeError);function ct(S){let g="",v=S.length;const x=S[0]==="-"?1:0;for(;v>=x+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function _t(S,g,v){ze(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&De(g,S.length-(v+1))}function te(S,g,v,x,P,U){if(S>v||S<g){const H=typeof g=="bigint"?"n":"";let le;throw U>3?g===0||g===BigInt(0)?le=`>= 0${H} and < 2${H} ** ${(U+1)*8}${H}`:le=`>= -(2${H} ** ${(U+1)*8-1}${H}) and < 2 ** ${(U+1)*8-1}${H}`:le=`>= ${g}${H} and <= ${v}${H}`,new xe.ERR_OUT_OF_RANGE("value",le,S)}_t(x,P,U)}function ze(S,g){if(typeof S!="number")throw new xe.ERR_INVALID_ARG_TYPE(g,"number",S)}function De(S,g,v){throw Math.floor(S)!==S?(ze(S,v),new xe.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const bt=/[^+/0-9A-Za-z-_]/g;function Gt(S){if(S=S.split("=")[0],S=S.trim().replace(bt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Rt(S,g){g=g||1/0;let v;const x=S.length;let P=null;const U=[];for(let H=0;H<x;++H){if(v=S.charCodeAt(H),v>55295&&v<57344){if(!P){if(v>56319){(g-=3)>-1&&U.push(239,191,189);continue}else if(H+1===x){(g-=3)>-1&&U.push(239,191,189);continue}P=v;continue}if(v<56320){(g-=3)>-1&&U.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(g-=3)>-1&&U.push(239,191,189);if(P=null,v<128){if((g-=1)<0)break;U.push(v)}else if(v<2048){if((g-=2)<0)break;U.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;U.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;U.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return U}function mt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function br(S,g){let v,x,P;const U=[];for(let H=0;H<S.length&&!((g-=2)<0);++H)v=S.charCodeAt(H),x=v>>8,P=v%256,U.push(P),U.push(x);return U}function wt(S){return t.toByteArray(Gt(S))}function gt(S,g,v,x){let P;for(P=0;P<x&&!(P+v>=g.length||P>=S.length);++P)g[P+v]=S[P];return P}function $e(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function St(S){return S!==S}const tt=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const x=v*16;for(let P=0;P<16;++P)g[x+P]=S[v]+S[P]}return g}();function Ye(S){return typeof BigInt>"u"?wr:S}function wr(){throw new Error("BigInt not supported")}}(bs)),bs}(function(e,t){(function(n,r){e.exports=r(ME(),YE(),ZE(),Ud(),a_,T_(),A_())})(ae,function(n,r,o,i,s,a,l){return function(){var f={809:function(c){c.exports=n},30:function(c){c.exports=r},36:function(c){c.exports=o},300:function(c){c.exports=i},408:function(c){c.exports=l},25:function(c){c.exports=s},130:function(c){c.exports=a}},u={};function h(c){var p=u[c];if(p!==void 0)return p.exports;var m=u[c]={exports:{}};return f[c](m,m.exports,h),m.exports}h.n=function(c){var p=c&&c.__esModule?function(){return c.default}:function(){return c};return h.d(p,{a:p}),p},h.d=function(c,p){for(var m in p)h.o(p,m)&&!h.o(c,m)&&Object.defineProperty(c,m,{enumerable:!0,get:p[m]})},h.o=function(c,p){return Object.prototype.hasOwnProperty.call(c,p)},h.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return k},auth:function(){return ee},buildAnswer:function(){return sg},buildCarouselCard:function(){return ag},buildQuestion:function(){return Me},carouselCards:function(){return yn},contentInteraction:function(){return Ye},decodeBase64:function(){return cg},default:function(){return lg},editorialPages:function(){return $},features:function(){return v},getEntries:function(){return c.getEntries},getEntry:function(){return c.getEntry},management:function(){return Tr},payments:function(){return Ar},people:function(){return It},peopleEngagement:function(){return cr},qaQuestions:function(){return Qe},reportError:function(){return p.reportError},search:function(){return mn}});var c=h(809),p=h(30),m=h(36),_={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:T,LOCALHOST:E,STAGING:b,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:N}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:M}}=_;let q={emailIds:{}};var W=h(300),V=h.n(W);const j=async I=>{try{const{message:B,response:L,request:D}=I;let Z=B;return L?Z+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:D&&(Z+=" - The request was made but no response was received"),console.warn(Z),await(0,p.reportError)(new Error(Z)),Z}catch(B){return console.warn(`Cannot handle error: ${B.message}`),B.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:oe,CERTIFICATES:K}}}}=_;var k={certificates:{create:async(I,B)=>{let L=[];try{const{data:D}=await V().post(`${Y}${oe}/${I}${K}`,B);D&&(L=D)}catch(D){await j(D)}return L}}};const{APIS:{AUTH_API:{BASE_URL:z,ENDPOINTS:{USER_PASSWORD:J,USERS:de}}},USERS:{MYSELF:X}}=_;var ee={userPassword:{update:async I=>{let B=null;try{B=await V().put(`${z}${de}/${X}${J}`,I)}catch(L){B={message:(((L||{}).response||{}).data||{}).message},await j(L)}return B}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ue,ENDPOINTS:{ANSWERS:ce,QUESTIONS:Ve,LIKES:Q}}}}=_,re=`${ue}${Ve}`;var Pe={create:async({questionSlug:I},B)=>{try{await V().post(`${re}/${encodeURIComponent(I)}${ce}`,B)}catch(L){const D=await j(L);throw new Error(D)}},remove:async({questionSlug:I,answerSlug:B})=>{try{await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`)}catch(L){const D=await j(L);throw new Error(D)}},update:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().put(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},unlike:async({questionSlug:I,answerSlug:B})=>{try{return await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:xe,ENDPOINTS:{QUESTIONS:at}}}}=_,ct=`${xe}${at}`;var _t={create:async I=>{try{return await V().post(ct,I)}catch(B){const L=await j(B);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await V().delete(`${ct}/${encodeURIComponent(I)}`)}catch(B){const L=await j(B);throw new Error(L)}},update:async({questionSlug:I},B)=>{try{return await V().put(`${ct}/${encodeURIComponent(I)}`,B)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:te,ENDPOINTS:{REPLIES:ze,ANSWERS:De,QUESTIONS:bt,LIKES:Gt}}}}=_,Rt=`${te}${bt}`,mt=({questionSlug:I,answerSlug:B,replySlug:L},D=!1)=>{let Z=`${Rt}/${encodeURIComponent(I)}${De}/${encodeURIComponent(B)}${ze}`;return L&&(Z=`${Z}/${encodeURIComponent(L)}`,D&&(Z=`${Z}${Gt}`)),Z};var br={create:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(mt({questionSlug:I,answerSlug:B}),L)}catch(D){const Z=await j(D);throw new Error(Z)}},update:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{return await V().put(mt({questionSlug:I,answerSlug:B,replySlug:L}),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},remove:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L}))}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{await V().post(mt({questionSlug:I,answerSlug:B,replySlug:L},!0),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},unlike:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L},!0))}catch(D){const Z=await j(D);throw new Error(Z)}},getReplyUrl:mt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:wt,ENDPOINTS:{QUESTIONS:gt,ANSWERS:$e,LIKES:St}}}}=_,tt=`${wt}${gt}`;var Ye={answers:Pe,questions:_t,replies:br,likes:{create:async(I,B)=>{try{return await V().post(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}},remove:async(I,B)=>{try{return await V().delete(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}}}};const{APIS:{FEATURES_API:{BASE_URL:wr,ENDPOINTS:{FLAGS:S}}}}=_,g=`${wr}${S}`;var v={flags:{read:async I=>{let B=null;try{const{data:L}=await V().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(B=L)}catch(L){await j(L)}return B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:x,ENDPOINTS:{ACCOUNTS:P}}}}=_;var U={create:async I=>{try{await V().post(`${x}${P}`,I)}catch(B){throw await j(B),B}},read:async I=>{let B=null;try{({data:B}=await V().get(`${x}${P}/${encodeURIComponent(I)}`))}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${x}${P}/${encodeURIComponent(I)}`,B)}catch(L){throw await j(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:H,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=_;var be={create:async I=>{try{await V().post(`${H}${le}`,I)}catch(B){throw await j(B),B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:we,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=_;var he={create:async I=>{try{await V().post(`${we}${Se}`,I)}catch(B){const L=await j(B);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:lt,ENDPOINTS:{LOGINS:ir,LOGIN_PASSWORDLESS:Sr}}}}=_,Wt=`${lt}${ir}`;var Tr={accounts:U,bulkEnrolments:be,eventRegistrations:he,passwordless:{update:async I=>{try{await V().put(`${Wt}/${encodeURIComponent(I)}${Sr}`)}catch(B){throw await j(B),B}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Vt,ENDPOINTS:{PRODUCTS:Or}}}}=_,xr=`${Vt}${Or}`;var Ar={products:{list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(xr,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Pt,ENDPOINTS:{BULK_ENROLMENTS:nn}}}}=_;var Tt={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Pt}${nn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}},Fn=h(25);const{OK:Un,MULTIPLE_CHOICES:Dn,NOT_FOUND:on,FORBIDDEN:Cr}=Fn.StatusCodes,Fe=I=>I>=Un&&I<Dn||I===Cr||I===on,{APIS:{PEOPLE_API:{BASE_URL_V2:Rr,ENDPOINTS:{USERS:Pr}}}}=_,zt=async I=>{let B=null;try{const{data:L}=await V().get(`${Rr}${Pr}/${encodeURIComponent(I)}`,{validateStatus:Fe});L&&L.id&&(B=L)}catch(L){await j(L)}return B},an=async I=>{let B=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(Z=>`ids=${encodeURIComponent(Z)}`).join("&"),D=await V().get(`${Rr}${Pr}?${L}`,{validateStatus:Fe});D&&D.length&&(B=D)}catch(L){await j(L)}return B};var $n={read:zt,update:async(I,B)=>{let L=!1;try{const{data:D}=await V().put(`${Rr}${Pr}/${encodeURIComponent(I)}`,B);L=!(!D||!D.id)}catch(D){await j(D)}return L},list:an};const{APIS:{PEOPLE_API:{BASE_URL_V2:je,ENDPOINTS:{USERS:jn,USER_LIKES:Hn}}},USERS:{MYSELF:qn}}=_,Gn=`${je}${jn}/${qn}${Hn}`,Ir=async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Gn,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B};var Je={list:Ir},Wn={authors:{readQuestionAuthors:async(I,B,L)=>{try{if(I.author=await zt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((Z,Te)=>new Date(Te.updatedAt)-new Date(Z.updatedAt)),I.totalAnswers=I.answers.length;let D=I.answers;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.answers.slice(Z,Z+L.limit)}for(let Z of D){Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}I.answers=D}else I.answers||(I.answers=[]);return I}catch(D){throw await j(D),new Error(`Cannot read authors for question: ${D.message}`)}},readAuthors:async(I=[])=>{let B=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await zt(I[0]);L&&B.push(L)}else if(I&&I.length>1){const L=await an(I);L&&L.length>0&&(B=L)}}catch(L){throw await j(L),new Error(`Cannot read authors: ${L.message}`)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL:Vn,ENDPOINTS:{REGISTRATIONS:zn}}}}=_;var Yn={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Vn}${zn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Kn,ENDPOINTS:{USERS:or,USER_COURSES:sn}}},USERS:{MYSELF:ar}}=_,st=`${Kn}${or}/${ar}${sn}`;var Nr={create:async I=>{try{await V().post(st,I)}catch(B){await j(B)}},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(st,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${st}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Qn,ENDPOINTS:{USERS:Xn,USER_EVENTS:Jn}}},USERS:{MYSELF:Zn}}=_,ei=`${Qn}${Xn}/${Zn}${Jn}`;var sr={list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ei,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Lr,ENDPOINTS:{USERS:Yt,USER_LESSONS:un}}},USERS:{MYSELF:cn}}=_,ln=`${Lr}${Yt}/${cn}${un}`;var ti={create:async I=>{let B=null;try{B=await V().post(ln,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ln,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ri,ENDPOINTS:{USERS:ni,USER_PRODUCTS:kr}}},USERS:{MYSELF:ii}}=_,Br=`${ri}${ni}/${ii}${kr}`;var Kt={create:async I=>{let B=null;try{B=await V().post(Br,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Br,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${Br}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ft,ENDPOINTS:{USERS:Ot,USER_RATINGS:xt}}},USERS:{MYSELF:oi}}=_,dt=`${ft}${Ot}/${oi}${xt}`;var It={bulkEnrolments:Tt,handlers:Wn,registrations:Yn,users:$n,userCourses:Nr,userEvents:sr,userLessons:ti,userLikes:Je,userProducts:Kt,userRatings:{create:async I=>{let B=null;try{const{data:L}=await V().post(dt,I);L!=null&&L.id&&(B=L)}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${dt}/${I}`,B)}catch(L){await j(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:ai,ENDPOINTS:{ENQUIRY_EMAILS:si}}}}=_;var ui={create:async I=>{let B=null;try{const{data:L}=await V().post(`${ai}${si}`,I);L&&(B=L)}catch(L){await j(L)}return B}},fn={forms:{sendEnquiryEmails:async I=>{let B=null;try{const{emailIds:L}=q;B=await cr.emails.create({...L,...I})}catch(L){await j(L)}return B}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Ke,ENDPOINTS:{USERS:dn,USER_PROPERTIES:hn}}},USERS:{MYSELF:ur}}=_;var cr={emails:ui,handlers:fn,userProperties:{update:async(I,B)=>{try{await V().put(`${Ke}${dn}/${ur}${hn}/${I}`,B)}catch(L){await j(L)}}}},lr=h(130);const{APIS:{SEARCH_API:{BASE_URL:ci,ENDPOINTS:{SEARCH:pn}}}}=_,Mr=`${ci}${pn}`;var mn={ask:async I=>{try{let B=null;const{data:L}=await V().get(Mr,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(B=L),B}catch(B){const L=await j(B);throw new Error(L)}},stream:(I,B,L)=>{const D=(0,lr.io)(void 0,{path:"/api/search-api/web-sockets"});function Z(){D.emit("search",{question:I})}function Te(Be){L(Be),Ne(),D.disconnect()}function Ne(){D.off("connect",Z),D.off("update",B),D.off("result",Te)}return D.on("connect",Z),D.on("update",B),D.on("result",Te),Ne}};const{CONTENTFUL:yt}=_,{CARD_TYPES:Fr}=yt.CAROUSELS;var yn={read:async(I,B)=>{try{if(!B||!B.sys||!B.sys.id)throw new Error("Invalid link to card");if(!I||!Fr[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:D}=Fr[I];return await(0,c.getEntry)({content_type:I,"sys.id":B.sys.id,include:L,select:D},{assetDetails:!0})}catch(L){throw await j(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:li}=_,{INCLUDE:y,SELECT:O,TYPE:R}=li.EDITORIAL_PAGES;var $={read:async I=>{try{return await(0,c.getEntry)({content_type:R,"fields.slug":I,include:y,select:O})}catch(B){throw await j(B),new Error(`Cannot read editorial page: ${B.message}`)}}};const{CONTENTFUL:fe}=_,{TYPE:ie,ORDER:pe,SELECT:me,SKIP:ke,LIMIT:_e,INCLUDE:He}=fe.QUESTIONS;var Qe={read:async I=>{try{return await(0,c.getEntry)({content_type:ie,"fields.slug":I,include:2,select:me})}catch(B){throw await j(B),new Error(`Cannot read question: ${B.message}`)}},list:async(I={})=>{try{return await(0,c.getEntries)({content_type:ie,include:He,limit:_e,order:pe,select:me,skip:ke,...I})}catch(B){throw await j(B),new Error(`Cannot list questions: ${B.message}`)}}},Me=async(I,B,L={ignoreAnswersAuthors:!1})=>{try{let D={};return D=await Qe.read(I),D=await It.handlers.authors.readQuestionAuthors(D,B,L),D}catch(D){throw await j(D),new Error(`Cannot build question: ${D.message}`)}};const{ARTICLES:{TYPE:qe},COURSES:{TYPE:Ue},EVENTS:{TYPE:Nt},LISTS:{TYPE:At},QUESTIONS:{TYPE:Qt},LEARNING_HUB:{TYPE:Ji}}=_.CONTENTFUL,Lt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,fr={[qe]:async I=>{const{authorIds:B,authorTag:L,image:D,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}=I,ht=await It.handlers.authors.readAuthors(B),kt=ht&&ht.length?ht:L?[L]:null;return{banner:Lt(D),contributors:kt,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}},[Ue]:async(I,B)=>{const{banner:L,freeCourse:D,partnershipDetails:Z,slug:Te,title:Ne,registered:Be}=I,ht={banner:Lt(L),slug:Te,title:Ne,pill:D?"free":"premium",registered:!!Be};if(Z){const{partners:kt}=Z;ht.partner=kt&&kt.length&&Z.partners[0]}if(Be===void 0&&B){const[kt]=await It.userProducts.list({courseSlug:Te,isEnrolled:!0,scope:"active"});ht.registered=!!kt}return ht},[Nt]:async(I,B)=>{const{bannerImage:L,defaultStartDate:D,isEventOngoing:Z,slug:Te,speakers:Ne,title:Be,registered:ht}=I,kt=new Date(D),fg=!!kt&&kt<new Date;if(Ne&&Ne.length)for(const Zi of Ne)Zi.image=(na=Zi.image)&&na.url?`${na.url}?w=100&h=100&fit=thumb&f=center`:null;var na;const rc={banner:Lt(L),dateHasPassed:fg,title:Be,slug:Te,isOngoingEvent:Z,contributors:Ne,startDate:kt,registered:!!ht};if(ht===void 0&&B){const[Zi]=await It.userEvents.list({eventSlug:Te});rc.registered=!!Zi}return rc},[At]:async I=>{const{hero:B,slug:L,title:D}=I;return{banner:Lt(B),slug:L,title:D}},[Qt]:async I=>{const{answers:B,authorId:L,createdAt:D,slug:Z,title:Te}=I;let Ne=null;if(L){const Be=await It.users.read(L);Be&&(Ne=Be)}return{answers:B&&B.length?B.length:0,contributors:Ne?[Ne]:[],createdAt:D,slug:Z,title:Te}},[Ji]:I=>{const{bannerSection:B,customLabel:L,slug:D,title:Z}=I;return{banner:Lt(B.image),slug:D,title:Z,customLabel:L}},people:I=>{const{id:B,name:L,jobTitle:D,location:Z,image:Te}=I;return{profile:Te,slug:B,title:L,text:D,secondaryText:Z}}};var ag=async({contentType:I,...B}={},L)=>{try{if(!fr[I])throw new Error("Content type not supported");if(typeof fr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&B.sys&&B.sys.type&&B.sys.type==="Link"&&(B=await yn.read(I,B)),{contentType:I,...await fr[I](B,L)}}catch(D){throw await j(D),new Error(`Cannot build carousel card: ${D.message}`)}},sg=async(I,B,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((Z,Te)=>new Date(Z.createdAt)-new Date(Te.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let D=I.replies;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.replies.slice(Z,Z+L.limit)}for(const Z of D){if(Z.authorId===I.authorId){Z.author=I.author,Z.userLiked=!1;continue}Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}return I.replies=D,I}catch(D){throw await j(D),new Error(`Cannot build replies for answer: ${D.message}`)}},ug=h(408);const cg=I=>I&&ug.Buffer.from(I,"base64").toString("ascii");function lg({contentContext:I=null,errorsContext:B=null,gtmContext:L=null,origin:D}){try{const Z=(Te=>{let Ne=null;Te?Ne=Te:typeof window<"u"&&(Ne=window.origin||window.location.origin),Ne||new Error("Cannot select environment: Website not defined");let Be=null;const ht=Ne.match(b);return ht?Be=ht[1].split(A)[0]:Ne===T?Be=w:Ne.includes(E)&&(Be=N),Be||new Error(`Cannot select environment: No rule for website ${Ne}`),Be})(D);return I&&(0,c.setContext)(Object.assign({},I,{environment:Z})),B&&(0,p.setContext)(Object.assign({},B,{environment:Z})),L&&((0,m.setContext)(Object.assign({},L,{environment:Z})),(0,m.setupGTM)()),(({environment:Te})=>{const Ne=(Be=>{if(!Be)throw new Error("Cannot map environment: Environment not defined");if(!F[Be])throw new Error(`Cannot map environment: No mapping found for environment ${Be}`);return F[Be]})(Te);q.emailIds=M[Ne]})(Object.assign({},{environment:Z})),Z}catch(Z){console.warn(`Cannot load SDK: ${Z.message}`)}}}(),d}()})})(Rd);var C_=Rd.exports;const Bi={Off:"off",On:"on",Cookie:"cookie"},R_=e=>{const[t]=Cd(),[n,r]=G.useState(null),[o,i]=G.useState(!1),[s,a]=G.useState(Bi.Off);return G.useEffect(()=>{e&&C_.features.flags.read(e).then(l=>{a(l.featureState),r(null)}).catch(l=>{a(Bi.Off),r(l)})},[e]),G.useEffect(()=>{switch(s){case Bi.Off:i(!1);break;case Bi.On:i(!0);break;case Bi.Cookie:i(!!t[`feature-${e}`]);break;default:i(!1)}},[s,t]),{isFeatureActive:o,error:n}};function P_(e,t,n){var r=this,o=G.useRef(null),i=G.useRef(0),s=G.useRef(null),a=G.useRef([]),l=G.useRef(),f=G.useRef(),u=G.useRef(e),h=G.useRef(!0);G.useEffect(function(){u.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var c=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,m="maxWait"in n,_=m?Math.max(+n.maxWait||0,t):null;G.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=G.useMemo(function(){var E=function(M){var q=a.current,W=l.current;return a.current=l.current=null,i.current=M,f.current=u.current.apply(W,q)},b=function(M,q){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(M):setTimeout(M,q)},A=function(M){if(!h.current)return!1;var q=M-o.current;return!o.current||q>=t||q<0||m&&M-i.current>=_},w=function(M){return s.current=null,p&&a.current?E(M):(a.current=l.current=null,f.current)},N=function M(){var q=Date.now();if(A(q))return w(q);if(h.current){var W=t-(q-o.current),V=m?Math.min(W,_-(q-i.current)):W;b(M,V)}},F=function(){var M=Date.now(),q=A(M);if(a.current=[].slice.call(arguments),l.current=r,o.current=M,q){if(!s.current&&h.current)return i.current=o.current,b(N,t),c?E(o.current):f.current;if(m)return b(N,t),E(o.current)}return s.current||b(N,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,a.current=o.current=l.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[c,m,t,_,p,d]);return T}function wp(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return P_(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}let ws;const Ki=(e=!0,t=!1)=>{if(!e)return;const[n,r]=G.useState(0)||[!1,()=>{}];G.useEffect(()=>(i(),window.addEventListener("resize",s),()=>{clearTimeout(ws),s.flush(),window.removeEventListener("resize",s)}),[]);const o=()=>window.innerWidth,i=()=>{r(o())},s=wp(()=>{o()!==n&&(t&&(clearTimeout(ws),document.body.classList.add("is-resizing"),ws=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),i())},500,{leading:!0});return n},Sp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[o,i]=G.useState({current:0,past:0})||[!1,()=>{}],[s,a]=G.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];G.useEffect(()=>(l(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const l=()=>{const u=window.scrollY,h=o.current,d=u-h,c=d>0?"down":"up";if(i({current:u,past:h}),c==="down"){u>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},f=wp(()=>{l()},250);return o};var Uo={exports:{}};Uo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",f="[object Error]",u="[object Function]",h="[object GeneratorFunction]",d="[object Map]",c="[object Number]",p="[object Object]",m="[object Promise]",_="[object RegExp]",T="[object Set]",E="[object String]",b="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",M="[object Float64Array]",q="[object Int8Array]",W="[object Int16Array]",V="[object Int32Array]",j="[object Uint8Array]",Y="[object Uint8ClampedArray]",oe="[object Uint16Array]",K="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,z=/\w*$/,J=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,X={};X[i]=X[s]=X[w]=X[N]=X[a]=X[l]=X[F]=X[M]=X[q]=X[W]=X[V]=X[d]=X[c]=X[p]=X[_]=X[T]=X[E]=X[b]=X[j]=X[Y]=X[oe]=X[K]=!0,X[f]=X[u]=X[A]=!1;var ee=typeof ae=="object"&&ae&&ae.Object===Object&&ae,ue=typeof self=="object"&&self&&self.Object===Object&&self,ce=ee||ue||Function("return this")(),Ve=t&&!t.nodeType&&t,Q=Ve&&!0&&e&&!e.nodeType&&e,re=Q&&Q.exports===Ve;function Pe(y,O){return y.set(O[0],O[1]),y}function xe(y,O){return y.add(O),y}function at(y,O){for(var R=-1,$=y?y.length:0;++R<$&&O(y[R],R,y)!==!1;);return y}function ct(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function _t(y,O,R,$){var fe=-1,ie=y?y.length:0;for($&&ie&&(R=y[++fe]);++fe<ie;)R=O(R,y[fe],fe,y);return R}function te(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function ze(y,O){return y==null?void 0:y[O]}function De(y){var O=!1;if(y!=null&&typeof y.toString!="function")try{O=!!(y+"")}catch{}return O}function bt(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function Gt(y,O){return function(R){return y(O(R))}}function Rt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var mt=Array.prototype,br=Function.prototype,wt=Object.prototype,gt=ce["__core-js_shared__"],$e=function(){var y=/[^.]+$/.exec(gt&>.keys&>.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),St=br.toString,tt=wt.hasOwnProperty,Ye=wt.toString,wr=RegExp("^"+St.call(tt).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=re?ce.Buffer:void 0,g=ce.Symbol,v=ce.Uint8Array,x=Gt(Object.getPrototypeOf,Object),P=Object.create,U=wt.propertyIsEnumerable,H=mt.splice,le=Object.getOwnPropertySymbols,be=S?S.isBuffer:void 0,we=Gt(Object.keys,Object),Se=ft(ce,"DataView"),he=ft(ce,"Map"),lt=ft(ce,"Promise"),ir=ft(ce,"Set"),Sr=ft(ce,"WeakMap"),Wt=ft(Object,"create"),Tr=Ke(Se),Vt=Ke(he),Or=Ke(lt),xr=Ke(ir),Ar=Ke(Sr),Pt=g?g.prototype:void 0,nn=Pt?Pt.valueOf:void 0;function Tt(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Fn(){this.__data__=Wt?Wt(null):{}}function Un(y){return this.has(y)&&delete this.__data__[y]}function Dn(y){var O=this.__data__;if(Wt){var R=O[y];return R===r?void 0:R}return tt.call(O,y)?O[y]:void 0}function on(y){var O=this.__data__;return Wt?O[y]!==void 0:tt.call(O,y)}function Cr(y,O){var R=this.__data__;return R[y]=Wt&&O===void 0?r:O,this}Tt.prototype.clear=Fn,Tt.prototype.delete=Un,Tt.prototype.get=Dn,Tt.prototype.has=on,Tt.prototype.set=Cr;function Fe(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=[]}function Pr(y){var O=this.__data__,R=ar(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():H.call(O,R,1),!0}function zt(y){var O=this.__data__,R=ar(O,y);return R<0?void 0:O[R][1]}function an(y){return ar(this.__data__,y)>-1}function $n(y,O){var R=this.__data__,$=ar(R,y);return $<0?R.push([y,O]):R[$][1]=O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__={hash:new Tt,map:new(he||Fe),string:new Tt}}function Hn(y){return Kt(this,y).delete(y)}function qn(y){return Kt(this,y).get(y)}function Gn(y){return Kt(this,y).has(y)}function Ir(y,O){return Kt(this,y).set(y,O),this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){this.__data__=new Fe(y)}function Wn(){this.__data__=new Fe}function Vn(y){return this.__data__.delete(y)}function zn(y){return this.__data__.get(y)}function Yn(y){return this.__data__.has(y)}function Kn(y,O){var R=this.__data__;if(R instanceof Fe){var $=R.__data__;if(!he||$.length<n-1)return $.push([y,O]),this;R=this.__data__=new je($)}return R.set(y,O),this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y,O){var R=cr(y)||ur(y)?te(y.length,String):[],$=R.length,fe=!!$;for(var ie in y)(O||tt.call(y,ie))&&!(fe&&(ie=="length"||ai(ie,$)))&&R.push(ie);return R}function sn(y,O,R){var $=y[O];(!(tt.call(y,O)&&hn($,R))||R===void 0&&!(O in y))&&(y[O]=R)}function ar(y,O){for(var R=y.length;R--;)if(hn(y[R][0],O))return R;return-1}function st(y,O){return y&&kr(O,gn(O),y)}function Nr(y,O,R,$,fe,ie,pe){var me;if($&&(me=ie?$(y,fe,ie,pe):$(y)),me!==void 0)return me;if(!yt(y))return y;var ke=cr(y);if(ke){if(me=oi(y),!O)return ni(y,me)}else{var _e=xt(y),He=_e==u||_e==h;if(pn(y))return sr(y,O);if(_e==p||_e==i||He&&!ie){if(De(y))return ie?y:{};if(me=dt(He?{}:y),!O)return ii(y,st(me,y))}else{if(!X[_e])return ie?y:{};me=It(y,_e,Nr,O)}}pe||(pe=new Je);var Qe=pe.get(y);if(Qe)return Qe;if(pe.set(y,me),!ke)var Me=R?Br(y):gn(y);return at(Me||y,function(qe,Ue){Me&&(Ue=qe,qe=y[Ue]),sn(me,Ue,Nr(qe,O,R,$,Ue,y,pe))}),me}function Qn(y){return yt(y)?P(y):{}}function Xn(y,O,R){var $=O(y);return cr(y)?$:ct($,R(y))}function Jn(y){return Ye.call(y)}function Zn(y){if(!yt(y)||ui(y))return!1;var O=Mr(y)||De(y)?wr:J;return O.test(Ke(y))}function ei(y){if(!fn(y))return we(y);var O=[];for(var R in Object(y))tt.call(y,R)&&R!="constructor"&&O.push(R);return O}function sr(y,O){if(O)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Lr(y){var O=new y.constructor(y.byteLength);return new v(O).set(new v(y)),O}function Yt(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function un(y,O,R){var $=O?R(bt(y),!0):bt(y);return _t($,Pe,new y.constructor)}function cn(y){var O=new y.constructor(y.source,z.exec(y));return O.lastIndex=y.lastIndex,O}function ln(y,O,R){var $=O?R(Rt(y),!0):Rt(y);return _t($,xe,new y.constructor)}function ti(y){return nn?Object(nn.call(y)):{}}function ri(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ni(y,O){var R=-1,$=y.length;for(O||(O=Array($));++R<$;)O[R]=y[R];return O}function kr(y,O,R,$){R||(R={});for(var fe=-1,ie=O.length;++fe<ie;){var pe=O[fe],me=$?$(R[pe],y[pe],pe,R,y):void 0;sn(R,pe,me===void 0?y[pe]:me)}return R}function ii(y,O){return kr(y,Ot(y),O)}function Br(y){return Xn(y,gn,Ot)}function Kt(y,O){var R=y.__data__;return si(O)?R[typeof O=="string"?"string":"hash"]:R.map}function ft(y,O){var R=ze(y,O);return Zn(R)?R:void 0}var Ot=le?Gt(le,Object):yn,xt=Jn;(Se&&xt(new Se(new ArrayBuffer(1)))!=N||he&&xt(new he)!=d||lt&&xt(lt.resolve())!=m||ir&&xt(new ir)!=T||Sr&&xt(new Sr)!=A)&&(xt=function(y){var O=Ye.call(y),R=O==p?y.constructor:void 0,$=R?Ke(R):void 0;if($)switch($){case Tr:return N;case Vt:return d;case Or:return m;case xr:return T;case Ar:return A}return O});function oi(y){var O=y.length,R=y.constructor(O);return O&&typeof y[0]=="string"&&tt.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function dt(y){return typeof y.constructor=="function"&&!fn(y)?Qn(x(y)):{}}function It(y,O,R,$){var fe=y.constructor;switch(O){case w:return Lr(y);case a:case l:return new fe(+y);case N:return Yt(y,$);case F:case M:case q:case W:case V:case j:case Y:case oe:case K:return ri(y,$);case d:return un(y,$,R);case c:case E:return new fe(y);case _:return cn(y);case T:return ln(y,$,R);case b:return ti(y)}}function ai(y,O){return O=O??o,!!O&&(typeof y=="number"||de.test(y))&&y>-1&&y%1==0&&y<O}function si(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function ui(y){return!!$e&&$e in y}function fn(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||wt;return y===R}function Ke(y){if(y!=null){try{return St.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y){return Nr(y,!0,!0)}function hn(y,O){return y===O||y!==y&&O!==O}function ur(y){return ci(y)&&tt.call(y,"callee")&&(!U.call(y,"callee")||Ye.call(y)==i)}var cr=Array.isArray;function lr(y){return y!=null&&mn(y.length)&&!Mr(y)}function ci(y){return Fr(y)&&lr(y)}var pn=be||li;function Mr(y){var O=yt(y)?Ye.call(y):"";return O==u||O==h}function mn(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function yt(y){var O=typeof y;return!!y&&(O=="object"||O=="function")}function Fr(y){return!!y&&typeof y=="object"}function gn(y){return lr(y)?or(y):ei(y)}function yn(){return[]}function li(){return!1}e.exports=dn})(Uo,Uo.exports);var I_=Uo.exports;const N_=jt(I_);var L_="Expected a function",Tp="__lodash_hash_undefined__",Op=1/0,k_=9007199254740991,B_="[object Function]",M_="[object GeneratorFunction]",F_="[object Symbol]",U_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D_=/^\w*$/,$_=/^\./,j_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H_=/[\\^$.*+?()[\]{}|]/g,q_=/\\(\\)?/g,G_=/^\[object .+?Constructor\]$/,W_=/^(?:0|[1-9]\d*)$/,V_=typeof ae=="object"&&ae&&ae.Object===Object&&ae,z_=typeof self=="object"&&self&&self.Object===Object&&self,ku=V_||z_||Function("return this")();function Y_(e,t){return e==null?void 0:e[t]}function K_(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Q_=Array.prototype,X_=Function.prototype,xp=Object.prototype,Ss=ku["__core-js_shared__"],Bf=function(){var e=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ap=X_.toString,Yo=xp.hasOwnProperty,Cp=xp.toString,J_=RegExp("^"+Ap.call(Yo).replace(H_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mf=ku.Symbol,Z_=Q_.splice,eb=Rp(ku,"Map"),Hi=Rp(Object,"create"),Ff=Mf?Mf.prototype:void 0,Uf=Ff?Ff.toString:void 0;function Xr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function tb(){this.__data__=Hi?Hi(null):{}}function rb(e){return this.has(e)&&delete this.__data__[e]}function nb(e){var t=this.__data__;if(Hi){var n=t[e];return n===Tp?void 0:n}return Yo.call(t,e)?t[e]:void 0}function ib(e){var t=this.__data__;return Hi?t[e]!==void 0:Yo.call(t,e)}function ob(e,t){var n=this.__data__;return n[e]=Hi&&t===void 0?Tp:t,this}Xr.prototype.clear=tb;Xr.prototype.delete=rb;Xr.prototype.get=nb;Xr.prototype.has=ib;Xr.prototype.set=ob;function kn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ab(){this.__data__=[]}function sb(e){var t=this.__data__,n=Ko(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Z_.call(t,n,1),!0}function ub(e){var t=this.__data__,n=Ko(t,e);return n<0?void 0:t[n][1]}function cb(e){return Ko(this.__data__,e)>-1}function lb(e,t){var n=this.__data__,r=Ko(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}kn.prototype.clear=ab;kn.prototype.delete=sb;kn.prototype.get=ub;kn.prototype.has=cb;kn.prototype.set=lb;function en(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fb(){this.__data__={hash:new Xr,map:new(eb||kn),string:new Xr}}function db(e){return Qo(this,e).delete(e)}function hb(e){return Qo(this,e).get(e)}function pb(e){return Qo(this,e).has(e)}function mb(e,t){return Qo(this,e).set(e,t),this}en.prototype.clear=fb;en.prototype.delete=db;en.prototype.get=hb;en.prototype.has=pb;en.prototype.set=mb;function gb(e,t,n){var r=e[t];(!(Yo.call(e,t)&&Pp(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function Ko(e,t){for(var n=e.length;n--;)if(Pp(e[n][0],t))return n;return-1}function yb(e){if(!Do(e)||Tb(e))return!1;var t=Cb(e)||K_(e)?J_:G_;return t.test(Ab(e))}function vb(e,t,n,r){if(!Do(e))return e;t=wb(t,e)?[t]:_b(t);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var l=xb(t[o]),f=n;if(o!=s){var u=a[l];f=r?r(u,l,a):void 0,f===void 0&&(f=Do(u)?u:bb(t[o+1])?[]:{})}gb(a,l,f),a=a[l]}return e}function Eb(e){if(typeof e=="string")return e;if(Mu(e))return Uf?Uf.call(e):"";var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function _b(e){return Ip(e)?e:Ob(e)}function Qo(e,t){var n=e.__data__;return Sb(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Rp(e,t){var n=Y_(e,t);return yb(n)?n:void 0}function bb(e,t){return t=t??k_,!!t&&(typeof e=="number"||W_.test(e))&&e>-1&&e%1==0&&e<t}function wb(e,t){if(Ip(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Mu(e)?!0:D_.test(e)||!U_.test(e)||t!=null&&e in Object(t)}function Sb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Tb(e){return!!Bf&&Bf in e}var Ob=Bu(function(e){e=Pb(e);var t=[];return $_.test(e)&&t.push(""),e.replace(j_,function(n,r,o,i){t.push(o?i.replace(q_,"$1"):r||n)}),t});function xb(e){if(typeof e=="string"||Mu(e))return e;var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function Ab(e){if(e!=null){try{return Ap.call(e)}catch{}try{return e+""}catch{}}return""}function Bu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(L_);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Bu.Cache||en),n}Bu.Cache=en;function Pp(e,t){return e===t||e!==e&&t!==t}var Ip=Array.isArray;function Cb(e){var t=Do(e)?Cp.call(e):"";return t==B_||t==M_}function Do(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Rb(e){return!!e&&typeof e=="object"}function Mu(e){return typeof e=="symbol"||Rb(e)&&Cp.call(e)==F_}function Pb(e){return e==null?"":Eb(e)}function Ib(e,t,n){return e==null?e:vb(e,t,n)}var Nb=Ib;const Lb=jt(Nb),kb=(e,t)=>{Array.isArray(t)||(t=[t]);const n=N_(e);return t.forEach(({type:r,value:o})=>{Lb(n,r,o)}),n},Np=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Lp=(e,t,n)=>{let r=n.mobile;for(const o in t){const i=parseInt(String(t[o]));if(e>=i)r=n[i];else if(e<i)break}return r},Df=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Bb=e=>{let i;try{i=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=i/36e5,a=Math.floor(i/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const l=Math.floor(a/7);return l<=52?{path:"weeks",number:l}:{path:"years",number:Math.floor(a/365)}},Mb=e=>new Promise(t=>setTimeout(t,e)),Fu={apolitical:"Apolitical",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members (coming soon)",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_delete:"Delete",discussion_delete_deleting:"Deleting...",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_action_answer:"answer",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_answer_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_answer_likes_like:"Like this answer",discussion_answer_likes_unlike:"Unlike answer",discussion_reply_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_reply_likes_like:"Like this reply",discussion_reply_likes_unlike:"Unlike reply",discussion_thread_reply_button:"Reply",discussion_thread_report_subject:"Report a post on Apolitical",discussion_thread_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
|
|
62
62
|
|
|
63
63
|
Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
|
|
64
64
|
|
|
@@ -98,8 +98,8 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
98
98
|
`).every(i=>!Nm.some(s=>s.test(i))&&(r+=i+`
|
|
99
99
|
`,i.trim()));const o=r.trimEnd();return o==""?null:[r,o]}function _n(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function ad(e){return e.replace(aT,"$1")}function Po(e,t,n){const r=n._||!1,o=n.u||!1;n._=!0,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function yT(e,t,n){const r=n._||!1,o=n.u||!1;n._=!1,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function vT(e,t,n){return n._=!1,e(t,n)}const Rs=(e,t,n)=>({v:Po(t,e[1],n)});function Ps(){return{}}function Is(){return null}function ET(...e){return e.filter(Boolean).join(" ")}function Ns(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}var ve;function _T(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||hT,t.namedCodesToUnicode=t.namedCodesToUnicode?zr({},td,t.namedCodesToUnicode):td;const n=t.createElement||Oe.createElement;function r(c,p,...m){const _=Ns(t.overrides,`${c}.props`,{});return n(function(T,E){const b=Ns(E,T);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:Ns(E,`${T}.component`,T):T}(c,t.overrides),zr({},p,_,{className:ET(p==null?void 0:p.className,_.className)||void 0}),...m)}function o(c){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=GS.test(c)===!1);const m=u(f(p?c:`${c.trimEnd().replace(iT,"")}
|
|
100
100
|
|
|
101
|
-
`,{_:p}));for(;typeof m[m.length-1]=="string"&&!m[m.length-1].trim();)m.pop();if(t.wrapper===null)return m;const _=t.wrapper||(p?"span":"div");let T;if(m.length>1||t.forceWrapper)T=m;else{if(m.length===1)return T=m[0],typeof T=="string"?r("span",{key:"outer"},T):T;T=null}return Oe.createElement(_,{key:"outer"},T)}function i(c){const p=c.match(_S);return p?p.reduce(function(m,_,T){const E=_.indexOf("=");if(E!==-1){const b=function(F){return F.indexOf("-")!==-1&&F.match(kS)===null&&(F=F.replace(DS,function(M,
|
|
102
|
-
`},paragraph:{t:gT,i:ve.LOW,l:Rs,h:(c,p,m)=>r("p",{key:m.k},p(c.v,m))},ref:{t:hr($S),i:ve.MAX,l:c=>(a[c[1]]={B:c[2],F:c[4]},{}),h:Is},refImage:{t:pr(jS),i:ve.MAX,l:c=>({D:c[1]||void 0,P:c[2]}),h:(c,p,m)=>r("img",{key:m.k,alt:c.D,src:_n(a[c.P].B),title:a[c.P].F})},refLink:{t:hr(HS),i:ve.MAX,l:(c,p,m)=>({v:p(c[1],m),Z:p(c[0].replace(qS,"\\$1"),m),P:c[2]}),h:(c,p,m)=>a[c.P]?r("a",{key:m.k,href:_n(a[c.P].B),title:a[c.P].F},p(c.v,m)):r("span",{key:m.k},p(c.Z,m))},table:{t:er(bm),i:ve.HIGH,l:mT,h:(c,p,m)=>r("table",{key:m.k},r("thead",null,r("tr",null,c.L.map(function(_,T){return r("th",{key:T,style:od(c,T)},p(_,m))}))),r("tbody",null,c.A.map(function(_,T){return r("tr",{key:T},_.map(function(E,b){return r("td",{key:b,style:od(c,b)},p(E,m))}))})))},tableSeparator:{t:function(c,p){return p.$?(p._=!0,VS.exec(c)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Mi(nT),i:ve.MIN,l:c=>({v:c[0].replace(LS,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:c=>c.v},textBolded:{t:pr(JS),i:ve.MED,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("strong",{key:m.k},p(c.v,m))},textEmphasized:{t:pr(ZS),i:ve.LOW,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("em",{key:m.k},p(c.v,m))},textEscaped:{t:pr(rT),i:ve.HIGH,l:c=>({v:c[1],type:"text"})},textMarked:{t:pr(eT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("mark",{key:m.k},p(c.v,m))},textStrikethroughed:{t:pr(tT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("del",{key:m.k},p(c.v,m))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Mi(pu),i:ve.HIGH,l(c,p,m){const[,_]=c[3].match(oT),T=new RegExp(`^${_}`,"gm"),E=c[3].replace(T,""),b=(A=E,dT.some(M=>M.test(A))?vT:Po);var A;const w=c[1].toLowerCase(),N=ES.indexOf(w)!==-1;m.N=m.N||w==="a";const F=N?c[3]:b(p,E,m);return m.N=!1,{O:i(c[2]),v:F,G:N,H:N?w:c[1]}},h:(c,p,m)=>r(c.H,zr({key:m.k},c.O),c.G?c.v:p(c.v,m))},l.htmlSelfClosing={t:Mi(mu),i:ve.HIGH,l:c=>({O:i(c[2]||""),H:c[1]}),h:(c,p,m)=>r(c.H,zr({},c.O,{key:m.k}))});const f=function(c){let p=Object.keys(c);function m(_,T){let E=[],b="";for(;_;){let A=0;for(;A<p.length;){const w=p[A],N=c[w],F=N.t(_,T,b);if(F){const M=F[0];_=_.substring(M.length);const
|
|
101
|
+
`,{_:p}));for(;typeof m[m.length-1]=="string"&&!m[m.length-1].trim();)m.pop();if(t.wrapper===null)return m;const _=t.wrapper||(p?"span":"div");let T;if(m.length>1||t.forceWrapper)T=m;else{if(m.length===1)return T=m[0],typeof T=="string"?r("span",{key:"outer"},T):T;T=null}return Oe.createElement(_,{key:"outer"},T)}function i(c){const p=c.match(_S);return p?p.reduce(function(m,_,T){const E=_.indexOf("=");if(E!==-1){const b=function(F){return F.indexOf("-")!==-1&&F.match(kS)===null&&(F=F.replace(DS,function(M,q){return q.toUpperCase()})),F}(_.slice(0,E)).trim(),A=function(F){const M=F[0];return(M==='"'||M==="'")&&F.length>=2&&F[F.length-1]===M?F.slice(1,-1):F}(_.slice(E+1).trim()),w=ed[b]||b,N=m[w]=function(F,M){return F==="style"?M.split(/;\s?/).reduce(function(q,W){const V=W.slice(0,W.indexOf(":"));return q[V.replace(/(-[a-z])/g,j=>j[1].toUpperCase())]=W.slice(V.length+1).trim(),q},{}):F==="href"?_n(M):(M.match(BS)&&(M=M.slice(1,M.length-1)),M==="true"||M!=="false"&&M)}(b,A);typeof N=="string"&&(pu.test(N)||mu.test(N))&&(m[w]=Oe.cloneElement(o(N.trim()),{key:T}))}else _!=="style"&&(m[ed[_]||_]=!0);return m},{}):null}const s=[],a={},l={blockQuote:{t:er(pm),i:ve.HIGH,l:(c,p,m)=>({v:p(c[0].replace(SS,""),m)}),h:(c,p,m)=>r("blockquote",{key:m.k},p(c.v,m))},breakLine:{t:Mi(TS),i:ve.HIGH,l:Ps,h:(c,p,m)=>r("br",{key:m.k})},breakThematic:{t:er(OS),i:ve.HIGH,l:Ps,h:(c,p,m)=>r("hr",{key:m.k})},codeBlock:{t:er(gm),i:ve.MAX,l:c=>({v:c[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(c,p,m)=>r("pre",{key:m.k},r("code",zr({},c.O,{className:c.M?`lang-${c.M}`:""}),c.v))},codeFenced:{t:er(mm),i:ve.MAX,l:c=>({O:i(c[3]||""),v:c[4],M:c[2]||void 0,type:"codeBlock"})},codeInline:{t:pr(xS),i:ve.LOW,l:c=>({v:c[2]}),h:(c,p,m)=>r("code",{key:m.k},c.v)},footnote:{t:er(RS),i:ve.MAX,l:c=>(s.push({I:c[2],j:c[1]}),{}),h:Is},footnoteReference:{t:hr(PS),i:ve.HIGH,l:c=>({v:c[1],B:`#${t.slugify(c[1])}`}),h:(c,p,m)=>r("a",{key:m.k,href:_n(c.B)},r("sup",{key:m.k},c.v))},gfmTask:{t:hr(NS),i:ve.HIGH,l:c=>({R:c[1].toLowerCase()==="x"}),h:(c,p,m)=>r("input",{checked:c.R,key:m.k,readOnly:!0,type:"checkbox"})},heading:{t:er(t.enforceAtxHeadings?vm:ym),i:ve.HIGH,l:(c,p,m)=>({v:Po(p,c[2],m),T:t.slugify(c[2]),C:c[1].length}),h:(c,p,m)=>r(`h${c.C}`,{id:c.T,key:m.k},p(c.v,m))},headingSetext:{t:er(Em),i:ve.MAX,l:(c,p,m)=>({v:Po(p,c[1],m),C:c[2]==="="?1:2,type:"heading"})},htmlComment:{t:Mi(_m),i:ve.HIGH,l:()=>({}),h:Is},image:{t:pr(fT),i:ve.HIGH,l:c=>({D:c[1],B:ad(c[2]),F:c[3]}),h:(c,p,m)=>r("img",{key:m.k,alt:c.D||void 0,title:c.F||void 0,src:_n(c.B)})},link:{t:hr(lT),i:ve.LOW,l:(c,p,m)=>({v:yT(p,c[1],m),B:ad(c[2]),F:c[3]}),h:(c,p,m)=>r("a",{key:m.k,href:_n(c.B),title:c.F},p(c.v,m))},linkAngleBraceStyleDetector:{t:hr(US),i:ve.MAX,l:c=>({v:[{v:c[1],type:"text"}],B:c[1],type:"link"})},linkBareUrlDetector:{t:(c,p)=>p.N?null:hr(MS)(c,p),i:ve.MAX,l:c=>({v:[{v:c[1],type:"text"}],B:c[1],F:void 0,type:"link"})},linkMailtoDetector:{t:hr(FS),i:ve.MAX,l(c){let p=c[1],m=c[1];return bS.test(m)||(m="mailto:"+m),{v:[{v:p.replace("mailto:",""),type:"text"}],B:m,type:"link"}}},orderedList:nd(r,1),unorderedList:nd(r,2),newlineCoalescer:{t:er(AS),i:ve.LOW,l:Ps,h:()=>`
|
|
102
|
+
`},paragraph:{t:gT,i:ve.LOW,l:Rs,h:(c,p,m)=>r("p",{key:m.k},p(c.v,m))},ref:{t:hr($S),i:ve.MAX,l:c=>(a[c[1]]={B:c[2],F:c[4]},{}),h:Is},refImage:{t:pr(jS),i:ve.MAX,l:c=>({D:c[1]||void 0,P:c[2]}),h:(c,p,m)=>r("img",{key:m.k,alt:c.D,src:_n(a[c.P].B),title:a[c.P].F})},refLink:{t:hr(HS),i:ve.MAX,l:(c,p,m)=>({v:p(c[1],m),Z:p(c[0].replace(qS,"\\$1"),m),P:c[2]}),h:(c,p,m)=>a[c.P]?r("a",{key:m.k,href:_n(a[c.P].B),title:a[c.P].F},p(c.v,m)):r("span",{key:m.k},p(c.Z,m))},table:{t:er(bm),i:ve.HIGH,l:mT,h:(c,p,m)=>r("table",{key:m.k},r("thead",null,r("tr",null,c.L.map(function(_,T){return r("th",{key:T,style:od(c,T)},p(_,m))}))),r("tbody",null,c.A.map(function(_,T){return r("tr",{key:T},_.map(function(E,b){return r("td",{key:b,style:od(c,b)},p(E,m))}))})))},tableSeparator:{t:function(c,p){return p.$?(p._=!0,VS.exec(c)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Mi(nT),i:ve.MIN,l:c=>({v:c[0].replace(LS,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:c=>c.v},textBolded:{t:pr(JS),i:ve.MED,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("strong",{key:m.k},p(c.v,m))},textEmphasized:{t:pr(ZS),i:ve.LOW,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("em",{key:m.k},p(c.v,m))},textEscaped:{t:pr(rT),i:ve.HIGH,l:c=>({v:c[1],type:"text"})},textMarked:{t:pr(eT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("mark",{key:m.k},p(c.v,m))},textStrikethroughed:{t:pr(tT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("del",{key:m.k},p(c.v,m))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Mi(pu),i:ve.HIGH,l(c,p,m){const[,_]=c[3].match(oT),T=new RegExp(`^${_}`,"gm"),E=c[3].replace(T,""),b=(A=E,dT.some(M=>M.test(A))?vT:Po);var A;const w=c[1].toLowerCase(),N=ES.indexOf(w)!==-1;m.N=m.N||w==="a";const F=N?c[3]:b(p,E,m);return m.N=!1,{O:i(c[2]),v:F,G:N,H:N?w:c[1]}},h:(c,p,m)=>r(c.H,zr({key:m.k},c.O),c.G?c.v:p(c.v,m))},l.htmlSelfClosing={t:Mi(mu),i:ve.HIGH,l:c=>({O:i(c[2]||""),H:c[1]}),h:(c,p,m)=>r(c.H,zr({},c.O,{key:m.k}))});const f=function(c){let p=Object.keys(c);function m(_,T){let E=[],b="";for(;_;){let A=0;for(;A<p.length;){const w=p[A],N=c[w],F=N.t(_,T,b);if(F){const M=F[0];_=_.substring(M.length);const q=N.l(F,m,T);q.type==null&&(q.type=w),E.push(q),b=M;break}A++}}return E}return p.sort(function(_,T){let E=c[_].i,b=c[T].i;return E!==b?E-b:_<T?-1:1}),function(_,T){return m(function(E){return E.replace(CS,`
|
|
103
103
|
`).replace(IS,"").replace(WS," ")}(_),T)}}(l),u=(h=function(c){return function(p,m,_){return c[p.type].h(p,m,_)}}(l),function c(p,m={}){if(Array.isArray(p)){const _=m.k,T=[];let E=!1;for(let b=0;b<p.length;b++){m.k=b;const A=c(p[b],m),w=typeof A=="string";w&&E?T[T.length-1]+=A:A!==null&&T.push(A),E=w}return m.k=_,T}return h(p,c,m)});var h;const d=o(e);return s.length?r("div",null,d,r("footer",{key:"footer"},s.map(function(c){return r("div",{id:t.slugify(c.j),key:c.j},c.j,u(f(c.I,{_:!0})))}))):d}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(ve||(ve={}));const Zo=e=>{let{children:t,options:n}=e,r=function(o,i){if(o==null)return{};var s,a,l={},f=Object.keys(o);for(a=0;a<f.length;a++)i.indexOf(s=f[a])>=0||(l[s]=o[s]);return l}(e,vS);return Oe.cloneElement(_T(t,n),r)};const nr=({variant:e="primary",className:t="",children:n,...r})=>C.jsx("div",{className:se("highlighted-text-box",e,t),...r,children:n});const Lm=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let o=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Ki(i);if(i&&typeof n=="object"&&typeof s=="number"){const u=Object.assign({},n.breakpoints),h=Np(Object.keys(u));o=Lp(s,h,u)}const{breakpoints:a,text:l,...f}=n;return C.jsx(nr,{variant:"subtle",className:se("empty-state-box",e,r),children:C.jsxs(C.Fragment,{children:[t&&C.jsx(Zo,{options:{forceBlock:!0},children:t}),o&&typeof n=="object"&&C.jsx(ut,{...f,variant:n.variant?n.variant:"secondary",children:l})]})})};const gu=({children:e,...t})=>C.jsx("p",{...t,children:e}),km={q:gu,blockquote:gu};for(let e=1;e<=6;e++)km[`h${e}`]={component:gu,props:{className:"title"}};const Bm=({type:e="default",className:t="",heading:n=!1,children:r})=>C.jsxs("div",{className:se("helper-text-box text-small",e,t),children:[n&&C.jsx("p",{className:"title",children:n}),typeof r=="string"?C.jsx(Zo,{options:{wrapper:G.Fragment,forceBlock:!0,overrides:km},children:r}):C.jsx("p",{children:r})]});const bT=({className:e="",show:t=!1,hide:n=!1,text:r,children:o})=>{const i=Ie(),s=G.useRef(null),[a,l]=G.useState(""),[f,u]=G.useState("closed");G.useEffect(()=>{const c=s.current;if(c)return c.addEventListener("transitionend",h),()=>{c.removeEventListener("transitionend",h)}},[]),G.useEffect(()=>{if(!r||typeof r!="string")return;const c=r.split(`
|
|
104
104
|
`);l(c.length<3?`${r.substring(0,400)}...`:c.slice(0,3).join(`
|
|
105
|
-
`))},[r]),G.useEffect(()=>{f==="ready-to-close"&&u("closing")},[f]);const h=({propertyName:c})=>{c==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!r)return null;const d=["opening","open"].includes(f);return C.jsxs(nr,{variant:"subtle",className:se("hide-show-text-box",e),children:[C.jsxs("div",{ref:s,className:se("content",f),children:[C.jsx(Zo,{options:{forceBlock:!0},children:f==="closed"?a:r}),f!=="closed"&&o]}),C.jsx("p",{className:"cta",children:C.jsx(ut,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:se({"rotate-180":d}),onClick:()=>{u(d?"ready-to-close":"opening")},children:d?n||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},wT=()=>G.Fragment,ST=({children:e})=>C.jsx(nr,{variant:"secondary",children:e}),TT=["span","strong","h1","h2","h3","h4","h5","h6","p"],OT=({children:e})=>{const t=Ie();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(G.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of G.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&G.isValidElement(s)){const a=s.type;if(TT.includes(a)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const o=n?n.toString():"";return C.jsx(qu,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:r.map(i=>i)})},xT=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return C.jsx(nr,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return C.jsx(nr,{variant:"primary",children:e});case"pink-textbox":return C.jsx(nr,{variant:"tertiary",children:e});default:return C.jsx("div",{...t,children:e})}return C.jsx("div",{...t,children:e})},AT=e=>{const t=Ie(),n=Date.now().toString();let r="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?r="video":o.includes("riddle")||o.includes("sli.do")?r="poll":o.includes("padlet")&&(r="padlet"),C.jsxs(C.Fragment,{children:[C.jsx(it,{children:C.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),C.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),C.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},sd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},CT=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,o=!1;for(const i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&G.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||sd(i.props.children[0])==="button")&&(o=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!G.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&sd(r)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},C.jsx("p",{className:"center",children:C.jsx(ut,{variant:"primary",size:"medium",...n,children:r})})):C.jsx("a",{...n,children:r})};const Mm=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:G.Fragment,forceBlock:!0,overrides:{a:CT,CollapsibleSection:qu,TextBox:nr,CaseStudy:ST,style:wT,details:OT,div:xT,iframe:AT}};return C.jsx("div",{className:se("markdown-text",e),children:C.jsx(Zo,{options:{...r,...t},children:n})})};const RT=({className:e="",children:t})=>C.jsx("span",{className:se("pill",e),children:t});const PT=({progress:e=0,text:t=!1,className:n=""})=>{const r=Ie(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return C.jsx("span",{className:se(`progress-bar section-${o}`,n),style:i,children:C.jsx(it,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Fm=G.memo(PT);const Ls="loadingBlock_",IT=({progress:e=0,steps:t=!1,className:n=""})=>{const r=Ie();t||(t={0:{text:r.formatMessage({id:`${Ls}loading`})},75:{text:r.formatMessage({id:`${Ls}almostDone`})},100:{text:r.formatMessage({id:`${Ls}complete`})}});let o=null;const i=Object.keys(t);for(let a=0;a<i.length&&!(e<parseInt(i[a]));a++)o=i[a];const s=o&&t[o].icon?{"--icon":`url(${$o}icons/${t[o].icon}.svg)`}:{};return C.jsxs(nr,{className:se("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:s,children:[o&&C.jsx("span",{className:"step",children:t[o].text}),C.jsx(Fm,{progress:e})]})},NT=G.memo(IT);const vr=({element:e="div",className:t="",...n})=>C.jsx(Eu,{element:e,className:se("loading-placeholder",t),...n});const yu={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},Um=(e,t)=>e in yu?C.jsx("div",{className:e,children:yu[e].map((n,r)=>Um(n,r))},t):C.jsx(vr,{className:e},t),Dm=({layout:e="overview-page"})=>C.jsx("div",{className:se("loading-state",e),children:yu[e].map((t,n)=>Um(t,n))}),$m=e=>{const t=e&&e.toUpperCase().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},To=["#5AB6A3","#A2D7AF","#806056","#3962B3"],LT=e=>{const t=Math.ceil(26/To.length),n=$m(e).toLowerCase();if(n==="")return To[0];const r=n.charCodeAt(0)-96;for(let o=0;o<To.length;o++)if(r<=t*(o+1))return To[o]};const ud=256,ea=({className:e="",src:t="",name:n,alt:r,width:o=ud,height:i=ud,...s})=>{const[a,l]=G.useState(!1),f=G.useRef(null);return G.useEffect(()=>{const u=f.current;if(!u)return;const h=u.getContext("2d");if(!h)return;const d=o,c=i;typeof window<"u"&&window.devicePixelRatio&&(u.width=d*window.devicePixelRatio,u.height=c*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=LT(n),h.fillRect(0,0,d,c),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText($m(n),d/2,c/1.6)},[n]),C.jsxs("figure",{className:se("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&C.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:o,height:i}),(t===""||a)&&C.jsx("canvas",{ref:f})]})},Vu=e=>e==="apolitical"?{image:`${$o}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${$o}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id||e.slug}`,image:e.image&&e.image.thumbnail},kT=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const o=e!=="",i=t!=="",s=n!=="";if(!o&&!i&&!s)return"";const a=`${e}${o&&i?` — ${t}`:t}`;let l=`${a}${(o||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=a),l.length>r&&(l=hm(l,r)),l};const zu=({member:e="community",additionalContent:t=!1,gtmContext:n="member",gtmType:r="member-click",className:o=""})=>{const i=Ie(),s=Vu(e);s.name||(s.name=i.formatMessage({id:`member_${typeof e=="string"?e:"community"}`}));const{name:a,url:l,image:f}=s,u=kT(s),h=t&&t.createdAt?Bb(t.createdAt):!1;return C.jsx("div",{className:se("member text-medium",o),children:C.jsxs(kp,{href:l,gtmType:r,gtmContext:n,children:[C.jsx(ea,{name:a,src:f}),C.jsxs("p",{className:"details",children:[C.jsx("strong",{children:a}),t&&C.jsxs("span",{className:"additional-content",children:[t.createdAt&&h&&C.jsx("span",{className:"date",title:Df(t&&t.createdAt),"aria-label":Df(t&&t.createdAt),children:i.formatMessage({id:`dates_${h.path}`},{number:h.number})}),t.didEdit&&C.jsx("em",{children:i.formatMessage({id:"discussion_edited"})})]}),u&&C.jsx("small",{children:u})]})]})})};const cd={small:24,medium:48},jm=({element:e="div",contributors:t=[],styling:{showText:n,size:r,showGap:o,showPlaceholders:i}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:a=""})=>{const l=Ie();return t.length===0?null:G.createElement(e,{className:se("contributors",a,r,{"has-gap":o}),children:C.jsxs(C.Fragment,{children:[C.jsx("ul",{children:t.map((f,u)=>{let h,d="";if(u<s){const{name:c="",image:p=""}=Vu(f);if(i)return C.jsx(vr,{element:"li",className:"contributor"},u);h=C.jsx(ea,{name:c,src:p,width:cd[r||"medium"],height:cd[r||"medium"]})}else u===s&&(h=C.jsxs("small",{children:["+",t.length-s]}),d="number-left");return h?C.jsx("li",{className:se("contributor",d),children:h},u):null})}),n&&C.jsx("span",{className:"label",children:typeof n=="string"?n:t.length===1?typeof t[0]=="string"?l.formatMessage({id:`member_${t[0]}`}):hm(t[0].name||"",20):null})]})})},BT=({children:e,locale:t,messages:n})=>{const r=t||"en",o={...Ub[r],...n||{}};return C.jsx(pS,{locale:r,messages:o,children:e})},Bn=G.createContext(null),MT=({children:e,user:t})=>C.jsx(Bn.Provider,{value:t,children:e});const Hm=({isMember:e=!1,functions:{join:t,leave:n}={join:()=>{},leave:()=>{}}})=>{const r=Ie(),o=G.useContext(Bn),i=o&&typeof o.id=="string",[s,a]=G.useState(e);return C.jsx(ut,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s?{icon:"tick",position:"left"}:!1,onClick:async()=>{s?typeof n=="function"&&await n():typeof t=="function"&&await t(),a(!s)},className:"join-community-button",disabled:!i,children:r.formatMessage({id:`joinCommunityButton${s?"_member":""}`})})};const FT=({className:e="",...t})=>{const n=Ie();return C.jsxs("div",{className:se("community-details",e),children:[C.jsx(Hm,{...t}),C.jsxs("div",{className:"additional-details",children:[C.jsx("hr",{}),C.jsx("h3",{children:n.formatMessage({id:"communityDetails_members"})}),C.jsx(jm,{contributors:[{},{},{},{},{}],styling:{size:"medium",showGap:!0,showPlaceholders:!0},cutoff:5})]})]})},UT={showThread:!1,showForm:!1},Yu=G.createContext(UT),DT=({children:e})=>{const[t,n]=G.useState({showThread:!1,showForm:!1});return C.jsx(Yu.Provider,{value:{...t,updateConversation:n},children:e})};function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vu.apply(this,arguments)}function $T(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var jT=G.useLayoutEffect,HT=function(t){var n=Oe.useRef(t);return jT(function(){n.current=t}),n},ld=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},qT=function(t,n){var r=G.useRef();return G.useCallback(function(o){t.current=o,r.current&&ld(r.current,null),r.current=n,n&&ld(n,o)},[n])},fd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},GT=function(t){Object.keys(fd).forEach(function(n){t.style.setProperty(n,fd[n],"important")})},dd=GT,rt=null,hd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function WT(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),rt||(rt=document.createElement("textarea"),rt.setAttribute("tabindex","-1"),rt.setAttribute("aria-hidden","true"),dd(rt)),rt.parentNode===null&&document.body.appendChild(rt);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var c=d;rt.style[c]=s[c]}),dd(rt),rt.value=t;var l=hd(rt,e);rt.value=t,l=hd(rt,e),rt.value="x";var f=rt.scrollHeight-o,u=f*n;a==="border-box"&&(u=u+o+i),l=Math.max(u,l);var h=f*r;return a==="border-box"&&(h=h+o+i),l=Math.min(h,l),[l,f]}var pd=function(){},VT=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},zT=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],YT=!!document.documentElement.currentStyle,KT=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=VT(zT,n),o=r.boxSizing;if(o==="")return null;YT&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},QT=KT;function qm(e,t,n){var r=HT(n);Oe.useLayoutEffect(function(){var o=function(s){return r.current(s)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var XT=function(t){qm(window,"resize",t)},JT=function(t){qm(document.fonts,"loadingdone",t)},ZT=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],eO=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?pd:s,l=t.onHeightChange,f=l===void 0?pd:l,u=$T(t,ZT),h=u.value!==void 0,d=Oe.useRef(null),c=qT(d,n),p=Oe.useRef(0),m=Oe.useRef(),_=function(){var b=d.current,A=r&&m.current?m.current:QT(b);if(A){m.current=A;var w=WT(A,b.value||b.placeholder||"x",i,o),N=w[0],F=w[1];p.current!==N&&(p.current=N,b.style.setProperty("height",N+"px","important"),f(N,{rowHeight:F}))}},T=function(b){h||_(),a(b)};return Oe.useLayoutEffect(_),XT(_),JT(_),Oe.createElement("textarea",vu({},u,{onChange:T,ref:c}))},tO=Oe.forwardRef(eO);let Oo=null;const pt="discussion_form_",Gm=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1},inputRef:n,maxLength:r=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:s={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var M,W;const l=Ie(),f=G.useContext(Bn),[u,h]=G.useState(t.isEditing&&t.isEditing.text||""),[d,c]=G.useState(i.error||!1),[p,m]=G.useState(!1),_=G.useRef(null);if(n||(n=_),t.isLoading)return C.jsx(vr,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const T=q=>{const V=q.target.value;h(V);let j;!f||!f.id?j=dr(l.formatMessage,`${pt}error_loggedOut`,e.type,"action"):V.length>=r&&(j=`${pt}error_tooLong`),j?c(j):d&&c(!1)};let E=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const q=e.type==="response"?((M=e.slugs)==null?void 0:M.question)||"":((W=e.slugs)==null?void 0:W.answer)||"";q&&(E=`${E}-${q.slice(-15)}`)}const b=async q=>{var j;if(q.preventDefault(),q.stopPropagation(),w)return;Oo&&clearTimeout(Oo),m("submitting");const V=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await s.create({content:u});break;case"question":Y=await s.create({title:u,authorId:f&&f.id,...(j=s.props)==null?void 0:j.create});break;case"response":Y=await s.create({question:e.slugs.question},{body:u,authorId:f&&f.id,contentPath:V});break;case"reply":Y=await s.create({question:e.slugs.question,answer:e.slugs.answer},{body:u,authorId:f&&f.id,contentPath:V});break;default:break}await Mb(1e3),s.callback&&await s.callback(Y),Oo=setTimeout(()=>{h(""),m("submitted"),A()},500)}catch(Y){const oe=Y;let K=`${pt}error`;oe.message.includes("entry already exists")&&(K=dr(l.formatMessage,`${pt}error_alreadyExists`,e.type,"action")),oe.message.includes("429")?K=dr(l.formatMessage,`${pt}error_tooMany`,e.type,"action"):oe.message.includes("400")&&(K=`${pt}error`),c(K),A()}},A=()=>{Oo=setTimeout(()=>{c(!1),m(!1)},5e3)},w=!u||!$b(u),N=p==="submitting",F=[];return(t.isEditing&&!N||i.cancel)&&F.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:s.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!f||!f.id||!u),children:l.formatMessage({id:`${pt}cancel`})}),F.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:q=>{if(t.isEditing){m("submitting"),s.handleSaveEdit&&s.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}b(q)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!f||!f.id||w||N||t.isEditing&&u===t.isEditing.text,children:l.formatMessage({id:`${pt}${N?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),C.jsxs("form",{id:E,className:se("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[!t.isEditing&&["question"].includes(e.type)&&C.jsx("h2",{children:dr(l.formatMessage,`${pt}title`,e.type,"action")}),C.jsx(zu,{member:f||"community",gtmContext:a,gtmType:"profile-click"}),C.jsx(it,{element:"label",showOnFocus:!1,htmlFor:`${E}-input`,children:dr(l.formatMessage,`${pt}label`,e.type,"action")}),C.jsx(tO,{ref:n,id:`${E}-input`,name:e.type,placeholder:dr(l.formatMessage,`${pt}placeholder`,e.type,"action"),onChange:T,value:u,maxLength:r,"aria-invalid":!!d,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),C.jsx("small",{children:dr(l.formatMessage,`${pt}explainer`,e.type,"action",{a:q=>C.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",children:q})})}),p==="submitted"&&C.jsx(hu,{className:"success","data-testid":"success",children:dr(l.formatMessage,`${pt}success`,e.type,"action")}),d&&C.jsx(hu,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof d=="string"?d.includes(" ")?d:l.formatMessage({id:d},{action:l.formatMessage({id:`discussion_action_${e.type}`}),maxLength:r}):d}),C.jsx(Xo,{buttons:F})]})},rO=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}});let $i=!1;const ks=()=>{$i!==!1&&(clearTimeout($i),$i=!1)},Wm=({element:e="p",likes:t=0,isShort:n=!0,userLiked:r=!1,content:o={type:"reply",slugs:{}},canLike:i=!0,createLike:s=()=>{},deleteLike:a=()=>{}})=>{const l=Ie();G.useEffect(()=>{d(r)},[r]);const[f,u]=G.useState(t),[h,d]=G.useState(r),[c,p]=G.useState(!1),m=window.location.pathname,_=E=>{if(E.preventDefault(),E.stopPropagation(),$i)return ks(),!1;if(ks(),c||!i)return!1;$i=setTimeout(T,350)},T=async()=>{if(ks(),c||!i)return!1;let E=h?f-1:f+1;E<0&&(E=0),p(!0),u(E),d(!h);try{if(o&&o.slugs){const b=rO(o.slugs);h?await a(b):await s(b,{contentPath:m})}}catch{u(t),d(r)}finally{p(!1)}};return G.createElement(e,{className:se("likes-wrapper text-medium",{"show-spinner":c,"is-liked":h,disabled:!i}),onClick:_,children:C.jsxs(C.Fragment,{children:[C.jsx(ut,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:se({"do-animation":h&&!r}),screenreaderText:i?l.formatMessage({id:`discussion_${o.type}_likes_${h?"unlike":"like"}`}):!1,onClick:_,disabled:!i,"aria-hidden":!i,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),C.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:f})})]})})};var jo={exports:{}};jo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",c="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",T="[object Null]",E="[object Object]",b="[object Promise]",A="[object Proxy]",w="[object RegExp]",N="[object Set]",F="[object String]",M="[object Symbol]",W="[object Undefined]",q="[object WeakMap]",V="[object ArrayBuffer]",j="[object DataView]",Y="[object Float32Array]",oe="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",z="[object Int32Array]",J="[object Uint8Array]",de="[object Uint8ClampedArray]",X="[object Uint16Array]",ee="[object Uint32Array]",ue=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Q={};Q[Y]=Q[oe]=Q[K]=Q[k]=Q[z]=Q[J]=Q[de]=Q[X]=Q[ee]=!0,Q[a]=Q[l]=Q[V]=Q[u]=Q[j]=Q[h]=Q[d]=Q[c]=Q[m]=Q[_]=Q[E]=Q[w]=Q[N]=Q[F]=Q[q]=!1;var re=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Pe=typeof self=="object"&&self&&self.Object===Object&&self,xe=re||Pe||Function("return this")(),at=t&&!t.nodeType&&t,ct=at&&!0&&e&&!e.nodeType&&e,_t=ct&&ct.exports===at,te=_t&&re.process,ze=function(){try{return te&&te.binding&&te.binding("util")}catch{}}(),De=ze&&ze.isTypedArray;function bt(y,O){for(var R=-1,$=y==null?0:y.length,fe=0,ie=[];++R<$;){var pe=y[R];O(pe,R,y)&&(ie[fe++]=pe)}return ie}function Gt(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function Rt(y,O){for(var R=-1,$=y==null?0:y.length;++R<$;)if(O(y[R],R,y))return!0;return!1}function mt(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function br(y){return function(O){return y(O)}}function wt(y,O){return y.has(O)}function gt(y,O){return y==null?void 0:y[O]}function $e(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function St(y,O){return function(R){return y(O(R))}}function tt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var Ye=Array.prototype,wr=Function.prototype,S=Object.prototype,g=xe["__core-js_shared__"],v=wr.toString,x=S.hasOwnProperty,P=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),U=S.toString,H=RegExp("^"+v.call(x).replace(ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=_t?xe.Buffer:void 0,be=xe.Symbol,we=xe.Uint8Array,Se=S.propertyIsEnumerable,he=Ye.splice,lt=be?be.toStringTag:void 0,ir=Object.getOwnPropertySymbols,Sr=le?le.isBuffer:void 0,Wt=St(Object.keys,Object),Tr=Ot(xe,"DataView"),Vt=Ot(xe,"Map"),Or=Ot(xe,"Promise"),xr=Ot(xe,"Set"),Ar=Ot(xe,"WeakMap"),Pt=Ot(Object,"create"),nn=Ke(Tr),Tt=Ke(Vt),Fn=Ke(Or),Un=Ke(xr),Dn=Ke(Ar),on=be?be.prototype:void 0,Cr=on?on.valueOf:void 0;function Fe(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=Pt?Pt(null):{},this.size=0}function Pr(y){var O=this.has(y)&&delete this.__data__[y];return this.size-=O?1:0,O}function zt(y){var O=this.__data__;if(Pt){var R=O[y];return R===r?void 0:R}return x.call(O,y)?O[y]:void 0}function an(y){var O=this.__data__;return Pt?O[y]!==void 0:x.call(O,y)}function $n(y,O){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Pt&&O===void 0?r:O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__=[],this.size=0}function Hn(y){var O=this.__data__,R=sr(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():he.call(O,R,1),--this.size,!0}function qn(y){var O=this.__data__,R=sr(O,y);return R<0?void 0:O[R][1]}function Gn(y){return sr(this.__data__,y)>-1}function Ir(y,O){var R=this.__data__,$=sr(R,y);return $<0?(++this.size,R.push([y,O])):R[$][1]=O,this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Wn(){this.size=0,this.__data__={hash:new Fe,map:new(Vt||je),string:new Fe}}function Vn(y){var O=ft(this,y).delete(y);return this.size-=O?1:0,O}function zn(y){return ft(this,y).get(y)}function Yn(y){return ft(this,y).has(y)}function Kn(y,O){var R=ft(this,y),$=R.size;return R.set(y,O),this.size+=R.size==$?0:1,this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y){var O=-1,R=y==null?0:y.length;for(this.__data__=new Je;++O<R;)this.add(y[O])}function sn(y){return this.__data__.set(y,r),this}function ar(y){return this.__data__.has(y)}or.prototype.add=or.prototype.push=sn,or.prototype.has=ar;function st(y){var O=this.__data__=new je(y);this.size=O.size}function Nr(){this.__data__=new je,this.size=0}function Qn(y){var O=this.__data__,R=O.delete(y);return this.size=O.size,R}function Xn(y){return this.__data__.get(y)}function Jn(y){return this.__data__.has(y)}function Zn(y,O){var R=this.__data__;if(R instanceof je){var $=R.__data__;if(!Vt||$.length<n-1)return $.push([y,O]),this.size=++R.size,this;R=this.__data__=new Je($)}return R.set(y,O),this.size=R.size,this}st.prototype.clear=Nr,st.prototype.delete=Qn,st.prototype.get=Xn,st.prototype.has=Jn,st.prototype.set=Zn;function ei(y,O){var R=ur(y),$=!R&&hn(y),fe=!R&&!$&&lr(y),ie=!R&&!$&&!fe&&Fr(y),pe=R||$||fe||ie,me=pe?mt(y.length,String):[],ke=me.length;for(var _e in y)(O||x.call(y,_e))&&!(pe&&(_e=="length"||fe&&(_e=="offset"||_e=="parent")||ie&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||It(_e,ke)))&&me.push(_e);return me}function sr(y,O){for(var R=y.length;R--;)if(dn(y[R][0],O))return R;return-1}function Lr(y,O,R){var $=O(y);return ur(y)?$:Gt($,R(y))}function Yt(y){return y==null?y===void 0?W:T:lt&< in Object(y)?xt(y):fn(y)}function un(y){return yt(y)&&Yt(y)==a}function cn(y,O,R,$,fe){return y===O?!0:y==null||O==null||!yt(y)&&!yt(O)?y!==y&&O!==O:ln(y,O,R,$,cn,fe)}function ln(y,O,R,$,fe,ie){var pe=ur(y),me=ur(O),ke=pe?l:dt(y),_e=me?l:dt(O);ke=ke==a?E:ke,_e=_e==a?E:_e;var He=ke==E,Qe=_e==E,Me=ke==_e;if(Me&&lr(y)){if(!lr(O))return!1;pe=!0,He=!1}if(Me&&!He)return ie||(ie=new st),pe||Fr(y)?kr(y,O,R,$,fe,ie):ii(y,O,ke,R,$,fe,ie);if(!(R&o)){var qe=He&&x.call(y,"__wrapped__"),Ue=Qe&&x.call(O,"__wrapped__");if(qe||Ue){var Nt=qe?y.value():y,At=Ue?O.value():O;return ie||(ie=new st),fe(Nt,At,R,$,ie)}}return Me?(ie||(ie=new st),Br(y,O,R,$,fe,ie)):!1}function ti(y){if(!mn(y)||si(y))return!1;var O=pn(y)?H:ce;return O.test(Ke(y))}function ri(y){return yt(y)&&Mr(y.length)&&!!Q[Yt(y)]}function ni(y){if(!ui(y))return Wt(y);var O=[];for(var R in Object(y))x.call(y,R)&&R!="constructor"&&O.push(R);return O}function kr(y,O,R,$,fe,ie){var pe=R&o,me=y.length,ke=O.length;if(me!=ke&&!(pe&&ke>me))return!1;var _e=ie.get(y);if(_e&&ie.get(O))return _e==O;var He=-1,Qe=!0,Me=R&i?new or:void 0;for(ie.set(y,O),ie.set(O,y);++He<me;){var qe=y[He],Ue=O[He];if($)var Nt=pe?$(Ue,qe,He,O,y,ie):$(qe,Ue,He,y,O,ie);if(Nt!==void 0){if(Nt)continue;Qe=!1;break}if(Me){if(!Rt(O,function(At,Qt){if(!wt(Me,Qt)&&(qe===At||fe(qe,At,R,$,ie)))return Me.push(Qt)})){Qe=!1;break}}else if(!(qe===Ue||fe(qe,Ue,R,$,ie))){Qe=!1;break}}return ie.delete(y),ie.delete(O),Qe}function ii(y,O,R,$,fe,ie,pe){switch(R){case j:if(y.byteLength!=O.byteLength||y.byteOffset!=O.byteOffset)return!1;y=y.buffer,O=O.buffer;case V:return!(y.byteLength!=O.byteLength||!ie(new we(y),new we(O)));case u:case h:case _:return dn(+y,+O);case d:return y.name==O.name&&y.message==O.message;case w:case F:return y==O+"";case m:var me=$e;case N:var ke=$&o;if(me||(me=tt),y.size!=O.size&&!ke)return!1;var _e=pe.get(y);if(_e)return _e==O;$|=i,pe.set(y,O);var He=kr(me(y),me(O),$,fe,ie,pe);return pe.delete(y),He;case M:if(Cr)return Cr.call(y)==Cr.call(O)}return!1}function Br(y,O,R,$,fe,ie){var pe=R&o,me=Kt(y),ke=me.length,_e=Kt(O),He=_e.length;if(ke!=He&&!pe)return!1;for(var Qe=ke;Qe--;){var Me=me[Qe];if(!(pe?Me in O:x.call(O,Me)))return!1}var qe=ie.get(y);if(qe&&ie.get(O))return qe==O;var Ue=!0;ie.set(y,O),ie.set(O,y);for(var Nt=pe;++Qe<ke;){Me=me[Qe];var At=y[Me],Qt=O[Me];if($)var Ji=pe?$(Qt,At,Me,O,y,ie):$(At,Qt,Me,y,O,ie);if(!(Ji===void 0?At===Qt||fe(At,Qt,R,$,ie):Ji)){Ue=!1;break}Nt||(Nt=Me=="constructor")}if(Ue&&!Nt){var Lt=y.constructor,fr=O.constructor;Lt!=fr&&"constructor"in y&&"constructor"in O&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof fr=="function"&&fr instanceof fr)&&(Ue=!1)}return ie.delete(y),ie.delete(O),Ue}function Kt(y){return Lr(y,gn,oi)}function ft(y,O){var R=y.__data__;return ai(O)?R[typeof O=="string"?"string":"hash"]:R.map}function Ot(y,O){var R=gt(y,O);return ti(R)?R:void 0}function xt(y){var O=x.call(y,lt),R=y[lt];try{y[lt]=void 0;var $=!0}catch{}var fe=U.call(y);return $&&(O?y[lt]=R:delete y[lt]),fe}var oi=ir?function(y){return y==null?[]:(y=Object(y),bt(ir(y),function(O){return Se.call(y,O)}))}:yn,dt=Yt;(Tr&&dt(new Tr(new ArrayBuffer(1)))!=j||Vt&&dt(new Vt)!=m||Or&&dt(Or.resolve())!=b||xr&&dt(new xr)!=N||Ar&&dt(new Ar)!=q)&&(dt=function(y){var O=Yt(y),R=O==E?y.constructor:void 0,$=R?Ke(R):"";if($)switch($){case nn:return j;case Tt:return m;case Fn:return b;case Un:return N;case Dn:return q}return O});function It(y,O){return O=O??s,!!O&&(typeof y=="number"||Ve.test(y))&&y>-1&&y%1==0&&y<O}function ai(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function si(y){return!!P&&P in y}function ui(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||S;return y===R}function fn(y){return U.call(y)}function Ke(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y,O){return y===O||y!==y&&O!==O}var hn=un(function(){return arguments}())?un:function(y){return yt(y)&&x.call(y,"callee")&&!Se.call(y,"callee")},ur=Array.isArray;function cr(y){return y!=null&&Mr(y.length)&&!pn(y)}var lr=Sr||li;function ci(y,O){return cn(y,O)}function pn(y){if(!mn(y))return!1;var O=Yt(y);return O==c||O==p||O==f||O==A}function Mr(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function mn(y){var O=typeof y;return y!=null&&(O=="object"||O=="function")}function yt(y){return y!=null&&typeof y=="object"}var Fr=De?br(De):ri;function gn(y){return cr(y)?ei(y):ni(y)}function yn(){return[]}function li(){return!1}e.exports=ci})(jo,jo.exports);var nO=jo.exports;const iO=jt(nO),oO=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t},md="discussion_",aO=({content:e,isLoading:t=!1,originalAuthorId:n,functions:{content:{createContent:r,deleteContent:o,updateContent:i},likes:{createLike:s,deleteLike:a}},className:l,gtmContext:f="DiscussionAnswer",locale:u="en",children:h})=>{const d=Ie(),c=G.useContext(Bn),p=G.useContext(Yu),[m,_]=G.useState({body:e&&e.body||"",isEditing:!1,didEdit:e&&e.isEdited||!1}),[T,E]=G.useState("");if(G.useEffect(()=>{_({...m,body:e&&e.body||"",didEdit:e&&e.isEdited||!1})},[e.isEdited]),t||!e||e.type==="answer"&&(!e.slugs||!e.slugs.question))return C.jsx(vr,{className:"discussion-card discussion-post"});const{author:b,createdAt:A,likes:w=0,userLiked:N}=e,F=c&&c.id&&typeof b!="string"&&b.id&&b.id!==c.id||!1,M=async q=>{q||(q=""),E("");try{iO(q,m.body)||await i(oO(e.slugs),{body:q}),_({body:q,isEditing:!1,didEdit:!0})}catch{E(`${md}form_error`)}},W=()=>{p&&p.updateConversation&&p.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const V=`reply-form-${(e.type==="answer"?e.slug:e.slugs.answer||"").toLowerCase().slice(-15)}`,j=document.getElementById(V),Y=document.getElementById(`${V}-input`);Y&&Y.focus(),j&&j.scrollIntoView({behavior:"smooth"})},0)};return C.jsxs("div",{className:se("discussion-post",l),"data-testid":`discussion-${e.type}-thread`,children:[C.jsxs("div",{className:se("discussion-card",e.type,{editing:m.isEditing}),children:[!m.isEditing&&C.jsx(zu,{member:b,additionalContent:{createdAt:A,didEdit:m.didEdit},className:typeof b!="string"&&b.id===n?"highlighted":"",gtmContext:f,gtmType:"profile-click"}),m.isEditing?C.jsx(Gm,{content:{type:e.type,slugs:e.slugs},meta:{isLoading:t,isInWrapper:!0,isEditing:{text:m.body}},forceShow:{error:T!==""&&T!=="delete-error"?d.formatMessage({id:T},{action:d.formatMessage({id:`discussion_action_${e.type}`})}):!1},functions:{create:r,handleSaveEdit:M,handleCancel:()=>{E(""),_({...m,isEditing:!1})}},gtmContext:`${f}Form`}):C.jsx(Mm,{children:m.body}),!m.isEditing&&C.jsxs("ul",{className:se("actions",e.type),"data-testid":`${e.type}-actions`,children:[C.jsx(Wm,{element:"li",likes:w,isShort:!1,userLiked:N,content:{type:e.type,slugs:e.slugs},canLike:F,createLike:s,deleteLike:a,locale:u}),(e.type==="answer"||e.type==="reply")&&C.jsx("li",{children:C.jsx(ut,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:W,children:d.formatMessage({id:`${md}thread_reply_button`})})})]})]}),h]})};const xo="emailHelperTextBox_",sO=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const o=Ie(),[i,s]=G.useState({path:`${xo}default`,type:"default",link:{},mail:{},error:""}),[a,l]=G.useState(!1),f=G.useCallback(c=>{c.preventDefault(),c.stopPropagation();const p=m=>{s({path:`${xo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>f(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:m})};if(typeof r!="function"){p(o.formatMessage({id:`${xo}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{l(!1)})},[t,n,r]);G.useEffect(()=>{let c=xo,p="default",m={},_={};switch(e){case"gov":c+="autoApproved",p="success";break;case"nonGov":c+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":c+="pendingApproval",p="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":c+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>f(T),"data-testid":"send-verify-email-click"};break;case"exists":c+="emailAlreadyExists",p="error",m={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:c+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:c,type:p,link:m,mail:_})},[e]);const u={};return["link","mail"].forEach(c=>{u[c]=Object.keys(i[c]).length?p=>C.jsx("a",{...i[c],children:p}):p=>p}),C.jsx(Bm,{type:i.type,heading:a?!1:o.formatMessage({id:`${i.path}_title`}),children:a?C.jsxs(C.Fragment,{children:[C.jsx(vr,{element:"span"}),C.jsx(vr,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...u,strong:c=>C.jsx("strong",{children:c}),em:c=>C.jsx("em",{children:c}),br:C.jsxs(C.Fragment,{children:[C.jsx("br",{}),C.jsx("br",{})]}),error:i.error})})};const Ao="passwordRules_",Vm="isMoreThanEightCharacters",zm="includesNumberAndSymbol",Ym="includesLowerAndUppercase",uO={[Vm]:"8Characters",[zm]:"numberSymbol",[Ym]:"lowercaseUppercase"},cO=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=Ie();return C.jsxs("aside",{className:se("password-rules",t),children:[C.jsx("small",{children:n.formatMessage({id:`${Ao}intro`})}),C.jsx("ul",{children:[Vm,zm,Ym].map(r=>C.jsxs("li",{className:se({matches:e[r]}),children:[C.jsxs(it,{children:[n.formatMessage({id:`${Ao}rule_label`})," "]}),C.jsx("span",{children:n.formatMessage({id:`${Ao}rule_${uO[r]}`})}),!e[r]&&C.jsxs(it,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ao}notMet`})]})]},`rule-${r}`))})]})},lO=G.memo(cO);const fO=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:s=!1})=>{const a=Ie(),[l,f]=G.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const T=await n();f(E=>({...E,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(E=>({...E,setUp:!0,disabled:!0})),o(T)}};if(G.useEffect(()=>{s&&!l.setUp&&u()},[s]),!s)return C.jsx(vr,{className:"rating-placeholder"});const{id:h,rating:d,disabled:c}=l,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},_=async T=>{if(!(!h||c))try{f(E=>({...E,rating:T,disabled:!0})),await r({id:h,value:T})}catch(E){f(b=>({...b,rating:null})),o(E)}finally{f(E=>({...E,disabled:!1}))}};return C.jsxs("div",{className:se("rating",i),children:[C.jsx("span",{className:"label",children:m[d?"success":"text"]}),C.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const E=T+1;return C.jsx("li",{className:se({selected:d&&E<=d}),children:C.jsx(ut,{variant:"tertiary",size:"small",icon:{icon:`star${!d||E>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:E,total:t})}${E===1||E===t?` - ${m[E===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),_(E)},disabled:c})},`rating-${E}`)})})]})};const Km=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=n||{},l=Ie(),f=G.useRef(null);Io(()=>{!n||a||!s||f.current&&f.current.focus()},[s]);const u=h=>{if(h.preventDefault(),h.stopPropagation(),!(!f.current||!f.current.value||f.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(f.current.value)}`)};return C.jsx("form",{onSubmit:u,className:se("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:C.jsx("fieldset",{id:`${e}-form`,hidden:n?!s:!1,role:"search",children:C.jsxs("p",{children:[C.jsx(it,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),C.jsx("input",{ref:f,type:"search",id:e,name:e,defaultValue:r,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&u(h)}}),C.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),f.current&&f.current.value&&(f.current.value="")},children:C.jsx(it,{children:l.formatMessage({id:"search_clear"})})}),C.jsx("button",{className:"search",onClick:u,children:C.jsx(it,{children:l.formatMessage({id:"search_cta"})})})]})})})};const dO={"2-1":901},hO=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const o=Ki(!0);let i=r;return G.Children.count(r)===1&&(i=G.Children.toArray(r)[0],i.props&&(i=i.props.children)),C.jsx("section",{className:se("columns",`layout-${e}`,n),children:G.Children.map(i,(s,a)=>t!==!1&&a===t&&o&&o<dO[e]?null:s)})};const Bs="cookieBanner_",Ms=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Fs=new Date(Date.now()+12*30*24*60*60*1e3),Qm=()=>{const e=Ie(),[t,n,r]=Cd(Ms),[o,i]=G.useState(!t["apol-cookie-banner"]),s=()=>{Ms.forEach(u=>{n(u,!0,{path:"/",expires:Fs,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Fs}),Ms.forEach(u=>{if(u==="apol-cookie-banner"){n(u,!0,{path:"/",expires:Fs});return}r(u)}),i(!1)};if(!o)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:s,gtmType:"accepted-all"}],f=[];return l.forEach(u=>{f.push({variant:u.href?"tertiary":"primary",href:u.href,onClick:u.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${u.gtmType}-click`,children:e.formatMessage({id:`${Bs}buttons_${u.id}`})})}),C.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[C.jsx("h6",{children:e.formatMessage({id:`${Bs}title`})}),C.jsx("p",{children:e.formatMessage({id:`${Bs}text`})}),C.jsx(Xo,{buttons:f})]})};const pO=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:o=""})=>{const i=Ie(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[a,l]=G.useState(t?["all"]:[]),f=(u,h)=>{let d=[];a.includes(u)?d=a.filter(c=>c!==u):u==="all"?d=["all"]:n?d=[...a.filter(c=>c!=="all"),u]:d=[u],l(c=>(r&&typeof r=="function"&&r({current:d,previous:c}),d)),h&&typeof h=="function"&&h()};return C.jsx("ul",{className:se("filters",o),children:s.map(({id:u,text:h,disabled:d=!1,callback:c=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:h})}),C.jsx("li",{children:C.jsx("button",{className:se(u,{selected:a.includes(u)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(u,c)},...p,children:h})},u)})})};const Us=du({locale:"en",messages:Fu}),mO=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:o=!1,messages:i={button:Us.formatMessage({id:"loadMore_button"}),endOfFeed:Us.formatMessage({id:"loadMore_endOfFeed"}),error:Us.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[l,f]=G.useState(!1),[u,h]=G.useState(!1);if(t<=0||t<n*e)return null;const d=async c=>{try{await r(c)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return C.jsxs("footer",{className:se("load-more",s),children:[l&&C.jsx("p",{className:"error",children:i.error}),u?C.jsx("p",{children:i.endOfFeed}):C.jsx(ut,{variant:"secondary",icon:o,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};const Ku=({variant:e="default",version:t="default",className:n="",...r})=>C.jsx("p",{className:"logo-wrapper",children:C.jsx("a",{className:se("logo",e,t,n),href:"/home/",...r,children:C.jsx(it,{children:C.jsx(Yr,{id:"apolitical"})})})}),gd={default:"tags_",headerTopics:"header_topics_topics_"},Ds={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},gO={getTagDetails:e=>{if(e.includes("topic_")){if(e=Ds.topic[e.replace("topic_","")],e){const t=Gi.topics.topics[e].href;return t?{id:e,href:t,text:`${gd.headerTopics}${e}`}:null}return null}return Ds[e]?(e=Ds[e],{id:e,text:`${gd.default}${e}`}):null}};const yO=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:o="",gtmType:i="tag-click",gtmContext:s="tags"})=>{const a=Ie();if(!e||e.length<1)return null;const l=[];return e.forEach(f=>{if(!f)return;const u=gO.getTagDetails(f);u&&l.push(u)}),l.length<1?null:C.jsx("ul",{className:se("tags text-small",t,o,{"one-line":n}),children:l.map(f=>{const u=a.formatMessage({id:f.text});return C.jsx("li",{children:f.href&&r?C.jsx("a",{href:f.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":s,children:u}):u},f.id)})})},rr={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Sn="footer_",Ho="SiteFooter",yd=({group:e})=>{const t=rr[e].order||[];let n=!1;return"text"in rr[e]&&(n=rr[e].text),C.jsxs(G.Fragment,{children:[C.jsx("p",{className:"pre-title",children:C.jsx(Yr,{id:`${Sn}${e}`})}),Array.isArray(t)&&t.length>0&&C.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:o,gtmType:i}=rr[e][r],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),C.jsx("li",{children:C.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":i,...s,children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&C.jsx("dl",{className:"text-medium",children:n.order.map(r=>C.jsxs(G.Fragment,{children:[C.jsx("dt",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})}),C.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&C.jsx("address",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}_address`,values:{br:C.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&C.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Qu=()=>C.jsx("div",{id:"footer",children:C.jsxs("div",{className:"wrapper",children:[C.jsx(Eu,{element:"hr"}),C.jsx(Ku,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"logo-homepage-link"}),C.jsx("footer",{children:["platform","community","company","contact"].map(e=>C.jsxs("div",{className:"group",children:[C.jsx(yd,{group:e}),Object.keys(rr[e]).includes("child")&&C.jsx(yd,{group:rr[e].child})]},e))}),C.jsx("hr",{}),C.jsxs("div",{className:"sub-footer",children:[C.jsx("ul",{children:Array.isArray(rr.social.order)&&rr.social.order.map(e=>{const t=rr.social[e];return C.jsx("li",{className:e,children:C.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"social-click",children:C.jsx("span",{className:"hidden",children:C.jsx(Yr,{id:`${Sn}social_${e}`})})})},e)})}),C.jsx("small",{children:C.jsx(Yr,{id:`${Sn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});var vO="Expected a function",Xm="__lodash_hash_undefined__",Jm=1/0,EO="[object Function]",_O="[object GeneratorFunction]",bO="[object Symbol]",wO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SO=/^\w*$/,TO=/^\./,OO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xO=/[\\^$.*+?()[\]{}|]/g,AO=/\\(\\)?/g,CO=/^\[object .+?Constructor\]$/,RO=typeof ae=="object"&&ae&&ae.Object===Object&&ae,PO=typeof self=="object"&&self&&self.Object===Object&&self,Xu=RO||PO||Function("return this")();function IO(e,t){return e==null?void 0:e[t]}function NO(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var LO=Array.prototype,kO=Function.prototype,Zm=Object.prototype,$s=Xu["__core-js_shared__"],vd=function(){var e=/[^.]+$/.exec($s&&$s.keys&&$s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),eg=kO.toString,Ju=Zm.hasOwnProperty,tg=Zm.toString,BO=RegExp("^"+eg.call(Ju).replace(xO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ed=Xu.Symbol,MO=LO.splice,FO=rg(Xu,"Map"),qi=rg(Object,"create"),_d=Ed?Ed.prototype:void 0,bd=_d?_d.toString:void 0;function Zr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function UO(){this.__data__=qi?qi(null):{}}function DO(e){return this.has(e)&&delete this.__data__[e]}function $O(e){var t=this.__data__;if(qi){var n=t[e];return n===Xm?void 0:n}return Ju.call(t,e)?t[e]:void 0}function jO(e){var t=this.__data__;return qi?t[e]!==void 0:Ju.call(t,e)}function HO(e,t){var n=this.__data__;return n[e]=qi&&t===void 0?Xm:t,this}Zr.prototype.clear=UO;Zr.prototype.delete=DO;Zr.prototype.get=$O;Zr.prototype.has=jO;Zr.prototype.set=HO;function Mn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qO(){this.__data__=[]}function GO(e){var t=this.__data__,n=ta(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():MO.call(t,n,1),!0}function WO(e){var t=this.__data__,n=ta(t,e);return n<0?void 0:t[n][1]}function VO(e){return ta(this.__data__,e)>-1}function zO(e,t){var n=this.__data__,r=ta(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Mn.prototype.clear=qO;Mn.prototype.delete=GO;Mn.prototype.get=WO;Mn.prototype.has=VO;Mn.prototype.set=zO;function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function YO(){this.__data__={hash:new Zr,map:new(FO||Mn),string:new Zr}}function KO(e){return ra(this,e).delete(e)}function QO(e){return ra(this,e).get(e)}function XO(e){return ra(this,e).has(e)}function JO(e,t){return ra(this,e).set(e,t),this}rn.prototype.clear=YO;rn.prototype.delete=KO;rn.prototype.get=QO;rn.prototype.has=XO;rn.prototype.set=JO;function ta(e,t){for(var n=e.length;n--;)if(cx(e[n][0],t))return n;return-1}function ZO(e,t){t=nx(t,e)?[t]:rx(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[sx(t[n++])];return n&&n==r?e:void 0}function ex(e){if(!ig(e)||ox(e))return!1;var t=lx(e)||NO(e)?BO:CO;return t.test(ux(e))}function tx(e){if(typeof e=="string")return e;if(ec(e))return bd?bd.call(e):"";var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function rx(e){return ng(e)?e:ax(e)}function ra(e,t){var n=e.__data__;return ix(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rg(e,t){var n=IO(e,t);return ex(n)?n:void 0}function nx(e,t){if(ng(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ec(e)?!0:SO.test(e)||!wO.test(e)||t!=null&&e in Object(t)}function ix(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ox(e){return!!vd&&vd in e}var ax=Zu(function(e){e=dx(e);var t=[];return TO.test(e)&&t.push(""),e.replace(OO,function(n,r,o,i){t.push(o?i.replace(AO,"$1"):r||n)}),t});function sx(e){if(typeof e=="string"||ec(e))return e;var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function ux(e){if(e!=null){try{return eg.call(e)}catch{}try{return e+""}catch{}}return""}function Zu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(vO);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Zu.Cache||rn),n}Zu.Cache=rn;function cx(e,t){return e===t||e!==e&&t!==t}var ng=Array.isArray;function lx(e){var t=ig(e)?tg.call(e):"";return t==EO||t==_O}function ig(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function fx(e){return!!e&&typeof e=="object"}function ec(e){return typeof e=="symbol"||fx(e)&&tg.call(e)==bO}function dx(e){return e==null?"":tx(e)}function hx(e,t,n){var r=e==null?void 0:ZO(e,t);return r===void 0?n:r}var px=hx;const og=jt(px),Re={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=i=>{const s=`logged${e?"In":"Out"}`;return t>=n[i][s]};let o={};return["navigation","search"].forEach(i=>{o[i]=r(i)}),o},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(o=>o===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const o=Date.now();if(!t&&Re.handlerCalled[e]&&o-Re.handlerCalled[e]<500)return;Re.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(s=>{s===e||n[s]===!1||i.push({type:`menus.${s}`,value:!1})}),r(i)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const o=og(e[r],t);if(!(typeof o>"u")&&(!n||o[t]&&o[t].includes(n)||o.value&&o.value.includes(n)||o.toString().includes(n)))return e[r]}return e[0].children?Re.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:o})=>{if(!t.current||!t.current.children)return;const i=n?"desktop":"default";if(r[e][i]){r[e][i].focus();return}let s,a;switch(e){case"navigation":if(n){const l=Re.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Re.findFirstChild(l.children,"href")}else s=Re.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Re.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Re.findFirstChild(a.children,"href");break;default:return}s&&(o([{type:`focusElements.${e}.${i}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Re.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Re.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Re.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Re.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Gi={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},qo=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:o=()=>{},doTrack:i=null})=>{const s=Ie(),a=og(Gi,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,f=i===null?l?a.doTrack:!0:i,u=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let d=!1;if(a.href){let E=a.gtmType||`${e}-click`;if(E.includes(".")){const b=E.split("."),A=b[b.length-2];E=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}d={href:a.href,role:"menuitem"},f&&(d={...d,className:"gtm-trackable","data-gtm-event-type":E,"data-gtm-event-context":"HeaderButtons"}),u&&(d={...d,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const c=a.order&&a.order[0]&&a[a.order[0]],p=c&&a[a.order[0]].order,m=d&&typeof window<"u"&&window.location&&window.location.pathname===a.href;let _={},T={};if(c){const E=a.menuId||e,b={onClick:A=>Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]}),onFocus:()=>Re.events.onFocus({id:E}),onBlur:()=>Re.events.onBlur({id:E,callback:o}),onMouseLeave:()=>Re.events.onBlur({id:E,callback:o}),onMouseEnter:()=>Re.events.onMouseEnter({id:E,callback:o})};n&&(p&&(_={...b,onKeyPress:A=>{A.key==="Enter"&&Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[E],"aria-controls":E}),T={hidden:E in r?!r[E]:!0}),p||(T={...T,...b})}return C.jsxs("li",{className:se({[a.className]:a.className,"has-submenu":c,parent:p,active:m}),role:"none",..._,children:[d?G.createElement(u?ut:"a",d,s.formatMessage({id:h})):s.formatMessage({id:h}),a.order&&C.jsx("ul",{...T,children:a.order.map(E=>{if(!a[E])return null;const b={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:o,doTrack:l?f:null};return a[E].order?C.jsxs("li",{className:se({[a[E].className]:a[E].className}),children:[s.formatMessage({id:`${h}_${E}`}),C.jsx("ul",{children:a[E].order.map(A=>C.jsx(qo,{id:`${e}.${E}.${A}`,...b},A))})]},E):C.jsx(qo,{id:`${e}.${E}`,...b},E)})})]},e)};const mx={height:67,height_desktop:83},tc=()=>{const e=Ie(),t=G.useContext(Bn),n=Ki(!0,!0),r=t&&typeof t.id=="string",o=G.useMemo(()=>Re.getIsDesktopVersion(r,n),[r,n]),[i,s]=G.useReducer(kb,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:l,focusElements:f}=i;Sp({scrollPosition:mx[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!0,l,s)},scrollDown:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!1,l,s)}}});const u=(d,c)=>{Re.handleMenus({id:d,value:c,menus:l,dispatch:s})},h=G.useRef(null);return Io(()=>{l.navigation&&Re.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.navigation]),Io(()=>{l.account&&Re.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.account]),t&&t.isLoading?null:C.jsxs(C.Fragment,{children:[C.jsxs("nav",{id:"header",className:se({"logged-in":r,"logged-out":!r,visible:a}),children:[C.jsx(it,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),C.jsx(Ku,{}),!o.navigation&&C.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("navigation",!l.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":l.navigation,"aria-controls":"navigation",children:C.jsx(it,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),C.jsx("ul",{ref:h,id:"navigation",hidden:o.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!o.navigation&&l.account?"account":"default",children:Gi.order.map(d=>C.jsx(qo,{id:d,isLoggedIn:r,isDesktopVersion:o.navigation,menus:{navigation:l.navigation,account:l.account},callback:u},d))}),!o.search&&C.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:C.jsx(it,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),C.jsx(Km,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?C.jsxs("button",{className:"account-button",onClick:d=>Re.events.onClick(d,{id:"account",callback:u,isOpen:l.account}),onMouseEnter:()=>Re.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>Re.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[C.jsx(it,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),C.jsx(ea,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):C.jsx("ul",{className:"sign-in-buttons",children:Gi.buttons.order.map(d=>C.jsx(qo,{id:`buttons.${d}`},d))})]}),C.jsx("hr",{id:"content-of-page"}),C.jsx("div",{className:se("overlay",{open:l.navigation||l.account||!o.search&&l.search})})]})},gx=G.createContext(null),js={didCatch:!1,error:null};class yx extends G.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=js}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(js)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&vx(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(js)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(G.isValidElement(o))a=o;else if(typeof n=="function")a=n(l);else if(r)a=G.createElement(r,l);else throw s}return G.createElement(gx.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function vx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const Ex=()=>{const e=Ie();return C.jsxs(C.Fragment,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:C.jsx(Lm,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),C.jsx(Qu,{})]})},_x=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:o="",locale:i="en"})=>{const s=Db(e,{locale:i});return C.jsx(yx,{onError:t,fallback:C.jsx(Ex,{}),children:C.jsx(G.Suspense,{fallback:C.jsx(Dm,{layout:"overview-page"}),children:C.jsx("div",{id:"wrapper",className:se(o,{[r]:r!=="default"}),children:C.jsxs(Cg,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:s}),n&&C.jsx(Qu,{}),C.jsx(Qm,{})]})})})})};const bx=({children:e,className:t})=>C.jsx("section",{className:se("modal",t),children:typeof e=="string"?C.jsx("p",{children:e}):e});exports.ASSETS_BUCKET=$o;exports.Alert=hu;exports.BannerSection=zb;exports.Button=ut;exports.ButtonWrapper=Xo;exports.CollapsibleSection=qu;exports.Columns=hO;exports.CommunityDetails=FT;exports.Contributors=jm;exports.ConversationContext=Yu;exports.CookieBanner=Qm;exports.DiscussionConversation=DT;exports.DiscussionForm=Gm;exports.DiscussionLikes=Wm;exports.DiscussionPost=aO;exports.DownloadSection=qb;exports.EmailHelperTextBox=sO;exports.EmptyStateBox=Lm;exports.Filters=pO;exports.Footer=Qu;exports.FullWidthSection=Uu;exports.Header=tc;exports.HelperTextBox=Bm;exports.HiddenFromScreenReaders=Eu;exports.HideShowTextBox=bT;exports.HighlightedTextBox=nr;exports.IntlProvider=BT;exports.JoinButton=Hm;exports.Link=kp;exports.LoadMore=mO;exports.LoadingBlock=NT;exports.LoadingPlaceholder=vr;exports.LoadingState=Dm;exports.Logo=Ku;exports.LogoSection=Gb;exports.MarkdownText=Mm;exports.MarketingBox=Yb;exports.Member=zu;exports.Modal=bx;exports.NUMBER_OF_USERS=yS;exports.PageLayout=_x;exports.PasswordRules=lO;exports.Pill=RT;exports.ProfilePicture=ea;exports.ProgressBar=Fm;exports.Rating=fO;exports.ResponsiveImage=Bp;exports.SearchForm=Km;exports.Tags=yO;exports.UserContext=Bn;exports.UserProvider=MT;exports.VisuallyHidden=it;exports.getMember=Vu;exports.headerData=Gi;exports.useEffectAfterMount=Io;exports.useFeatureFlag=R_;exports.useScreenWidth=Ki;exports.useScrollListener=Sp;
|
|
105
|
+
`))},[r]),G.useEffect(()=>{f==="ready-to-close"&&u("closing")},[f]);const h=({propertyName:c})=>{c==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!r)return null;const d=["opening","open"].includes(f);return C.jsxs(nr,{variant:"subtle",className:se("hide-show-text-box",e),children:[C.jsxs("div",{ref:s,className:se("content",f),children:[C.jsx(Zo,{options:{forceBlock:!0},children:f==="closed"?a:r}),f!=="closed"&&o]}),C.jsx("p",{className:"cta",children:C.jsx(ut,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:se({"rotate-180":d}),onClick:()=>{u(d?"ready-to-close":"opening")},children:d?n||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},wT=()=>G.Fragment,ST=({children:e})=>C.jsx(nr,{variant:"secondary",children:e}),TT=["span","strong","h1","h2","h3","h4","h5","h6","p"],OT=({children:e})=>{const t=Ie();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(G.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of G.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&G.isValidElement(s)){const a=s.type;if(TT.includes(a)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const o=n?n.toString():"";return C.jsx(qu,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:r.map(i=>i)})},xT=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return C.jsx(nr,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return C.jsx(nr,{variant:"primary",children:e});case"pink-textbox":return C.jsx(nr,{variant:"tertiary",children:e});default:return C.jsx("div",{...t,children:e})}return C.jsx("div",{...t,children:e})},AT=e=>{const t=Ie(),n=Date.now().toString();let r="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?r="video":o.includes("riddle")||o.includes("sli.do")?r="poll":o.includes("padlet")&&(r="padlet"),C.jsxs(C.Fragment,{children:[C.jsx(it,{children:C.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),C.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),C.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},sd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},CT=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,o=!1;for(const i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&G.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||sd(i.props.children[0])==="button")&&(o=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!G.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&sd(r)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},C.jsx("p",{className:"center",children:C.jsx(ut,{variant:"primary",size:"medium",...n,children:r})})):C.jsx("a",{...n,children:r})};const Mm=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:G.Fragment,forceBlock:!0,overrides:{a:CT,CollapsibleSection:qu,TextBox:nr,CaseStudy:ST,style:wT,details:OT,div:xT,iframe:AT}};return C.jsx("div",{className:se("markdown-text",e),children:C.jsx(Zo,{options:{...r,...t},children:n})})};const RT=({className:e="",children:t})=>C.jsx("span",{className:se("pill",e),children:t});const PT=({progress:e=0,text:t=!1,className:n=""})=>{const r=Ie(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return C.jsx("span",{className:se(`progress-bar section-${o}`,n),style:i,children:C.jsx(it,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Fm=G.memo(PT);const Ls="loadingBlock_",IT=({progress:e=0,steps:t=!1,className:n=""})=>{const r=Ie();t||(t={0:{text:r.formatMessage({id:`${Ls}loading`})},75:{text:r.formatMessage({id:`${Ls}almostDone`})},100:{text:r.formatMessage({id:`${Ls}complete`})}});let o=null;const i=Object.keys(t);for(let a=0;a<i.length&&!(e<parseInt(i[a]));a++)o=i[a];const s=o&&t[o].icon?{"--icon":`url(${$o}icons/${t[o].icon}.svg)`}:{};return C.jsxs(nr,{className:se("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:s,children:[o&&C.jsx("span",{className:"step",children:t[o].text}),C.jsx(Fm,{progress:e})]})},NT=G.memo(IT);const vr=({element:e="div",className:t="",...n})=>C.jsx(Eu,{element:e,className:se("loading-placeholder",t),...n});const yu={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},Um=(e,t)=>e in yu?C.jsx("div",{className:e,children:yu[e].map((n,r)=>Um(n,r))},t):C.jsx(vr,{className:e},t),Dm=({layout:e="overview-page"})=>C.jsx("div",{className:se("loading-state",e),children:yu[e].map((t,n)=>Um(t,n))}),$m=e=>{const t=e&&e.toUpperCase().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},To=["#5AB6A3","#A2D7AF","#806056","#3962B3"],LT=e=>{const t=Math.ceil(26/To.length),n=$m(e).toLowerCase();if(n==="")return To[0];const r=n.charCodeAt(0)-96;for(let o=0;o<To.length;o++)if(r<=t*(o+1))return To[o]};const ud=256,ea=({className:e="",src:t="",name:n,alt:r,width:o=ud,height:i=ud,...s})=>{const[a,l]=G.useState(!1),f=G.useRef(null);return G.useEffect(()=>{const u=f.current;if(!u)return;const h=u.getContext("2d");if(!h)return;const d=o,c=i;typeof window<"u"&&window.devicePixelRatio&&(u.width=d*window.devicePixelRatio,u.height=c*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=LT(n),h.fillRect(0,0,d,c),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText($m(n),d/2,c/1.6)},[n]),C.jsxs("figure",{className:se("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&C.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:o,height:i}),(t===""||a)&&C.jsx("canvas",{ref:f})]})},Vu=e=>e==="apolitical"?{image:`${$o}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${$o}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id||e.slug}`,image:e.image&&e.image.thumbnail},kT=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const o=e!=="",i=t!=="",s=n!=="";if(!o&&!i&&!s)return"";const a=`${e}${o&&i?` — ${t}`:t}`;let l=`${a}${(o||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=a),l.length>r&&(l=hm(l,r)),l};const zu=({member:e="community",additionalContent:t=!1,gtmContext:n="member",gtmType:r="member-click",className:o=""})=>{const i=Ie(),s=Vu(e);s.name||(s.name=i.formatMessage({id:`member_${typeof e=="string"?e:"community"}`}));const{name:a,url:l,image:f}=s,u=kT(s),h=t&&t.createdAt?Bb(t.createdAt):!1;return C.jsx("div",{className:se("member text-medium",o),children:C.jsxs(kp,{href:l,gtmType:r,gtmContext:n,children:[C.jsx(ea,{name:a,src:f}),C.jsxs("p",{className:"details",children:[C.jsx("strong",{children:a}),t&&C.jsxs("span",{className:"additional-content",children:[t.createdAt&&h&&C.jsx("span",{className:"date",title:Df(t&&t.createdAt),"aria-label":Df(t&&t.createdAt),children:i.formatMessage({id:`dates_${h.path}`},{number:h.number})}),t.didEdit&&C.jsx("em",{children:i.formatMessage({id:"discussion_edited"})})]}),u&&C.jsx("small",{children:u})]})]})})};const cd={small:24,medium:48},jm=({element:e="div",contributors:t=[],styling:{showText:n,size:r,showGap:o,showPlaceholders:i}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:a=""})=>{const l=Ie();return t.length===0?null:G.createElement(e,{className:se("contributors",a,r,{"has-gap":o}),children:C.jsxs(C.Fragment,{children:[C.jsx("ul",{children:t.map((f,u)=>{let h,d="";if(u<s){const{name:c="",image:p=""}=Vu(f);if(i)return C.jsx(vr,{element:"li",className:"contributor"},u);h=C.jsx(ea,{name:c,src:p,width:cd[r||"medium"],height:cd[r||"medium"]})}else u===s&&(h=C.jsxs("small",{children:["+",t.length-s]}),d="number-left");return h?C.jsx("li",{className:se("contributor",d),children:h},u):null})}),n&&C.jsx("span",{className:"label",children:typeof n=="string"?n:t.length===1?typeof t[0]=="string"?l.formatMessage({id:`member_${t[0]}`}):hm(t[0].name||"",20):null})]})})},BT=({children:e,locale:t,messages:n})=>{const r=t||"en",o={...Ub[r],...n||{}};return C.jsx(pS,{locale:r,messages:o,children:e})},Bn=G.createContext(null),MT=({children:e,user:t})=>C.jsx(Bn.Provider,{value:t,children:e});const Hm=({isMember:e=!1,functions:{join:t,leave:n}={join:()=>{},leave:()=>{}}})=>{const r=Ie(),o=G.useContext(Bn),i=o&&typeof o.id=="string",[s,a]=G.useState(e);return C.jsx(ut,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s?{icon:"tick",position:"left"}:!1,onClick:async()=>{s?typeof n=="function"&&await n():typeof t=="function"&&await t(),a(!s)},className:"join-community-button",disabled:!i,children:r.formatMessage({id:`joinCommunityButton${s?"_member":""}`})})};const FT=({className:e="",...t})=>{const n=Ie();return C.jsxs("div",{className:se("community-details",e),children:[C.jsx(Hm,{...t}),C.jsxs("div",{className:"additional-details",children:[C.jsx("hr",{}),C.jsx("h3",{children:n.formatMessage({id:"communityDetails_members"})}),C.jsx(jm,{contributors:[{},{},{},{},{}],styling:{size:"medium",showGap:!0,showPlaceholders:!0},cutoff:5})]})]})},UT={showThread:!1,showForm:!1},Yu=G.createContext(UT),DT=({children:e})=>{const[t,n]=G.useState({showThread:!1,showForm:!1});return C.jsx(Yu.Provider,{value:{...t,updateConversation:n},children:e})};function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vu.apply(this,arguments)}function $T(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var jT=G.useLayoutEffect,HT=function(t){var n=Oe.useRef(t);return jT(function(){n.current=t}),n},ld=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},qT=function(t,n){var r=G.useRef();return G.useCallback(function(o){t.current=o,r.current&&ld(r.current,null),r.current=n,n&&ld(n,o)},[n])},fd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},GT=function(t){Object.keys(fd).forEach(function(n){t.style.setProperty(n,fd[n],"important")})},dd=GT,rt=null,hd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function WT(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),rt||(rt=document.createElement("textarea"),rt.setAttribute("tabindex","-1"),rt.setAttribute("aria-hidden","true"),dd(rt)),rt.parentNode===null&&document.body.appendChild(rt);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var c=d;rt.style[c]=s[c]}),dd(rt),rt.value=t;var l=hd(rt,e);rt.value=t,l=hd(rt,e),rt.value="x";var f=rt.scrollHeight-o,u=f*n;a==="border-box"&&(u=u+o+i),l=Math.max(u,l);var h=f*r;return a==="border-box"&&(h=h+o+i),l=Math.min(h,l),[l,f]}var pd=function(){},VT=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},zT=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],YT=!!document.documentElement.currentStyle,KT=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=VT(zT,n),o=r.boxSizing;if(o==="")return null;YT&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},QT=KT;function qm(e,t,n){var r=HT(n);Oe.useLayoutEffect(function(){var o=function(s){return r.current(s)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var XT=function(t){qm(window,"resize",t)},JT=function(t){qm(document.fonts,"loadingdone",t)},ZT=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],eO=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?pd:s,l=t.onHeightChange,f=l===void 0?pd:l,u=$T(t,ZT),h=u.value!==void 0,d=Oe.useRef(null),c=qT(d,n),p=Oe.useRef(0),m=Oe.useRef(),_=function(){var b=d.current,A=r&&m.current?m.current:QT(b);if(A){m.current=A;var w=WT(A,b.value||b.placeholder||"x",i,o),N=w[0],F=w[1];p.current!==N&&(p.current=N,b.style.setProperty("height",N+"px","important"),f(N,{rowHeight:F}))}},T=function(b){h||_(),a(b)};return Oe.useLayoutEffect(_),XT(_),JT(_),Oe.createElement("textarea",vu({},u,{onChange:T,ref:c}))},tO=Oe.forwardRef(eO);let Oo=null;const pt="discussion_form_",Gm=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1},inputRef:n,maxLength:r=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:s={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var M,q;const l=Ie(),f=G.useContext(Bn),[u,h]=G.useState(t.isEditing&&t.isEditing.text||""),[d,c]=G.useState(i.error||!1),[p,m]=G.useState(!1),_=G.useRef(null);if(n||(n=_),t.isLoading)return C.jsx(vr,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const T=W=>{const V=W.target.value;h(V);let j;!f||!f.id?j=dr(l.formatMessage,`${pt}error_loggedOut`,e.type,"action"):V.length>=r&&(j=`${pt}error_tooLong`),j?c(j):d&&c(!1)};let E=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const W=e.type==="response"?((M=e.slugs)==null?void 0:M.question)||"":((q=e.slugs)==null?void 0:q.answer)||"";W&&(E=`${E}-${W.slice(-15)}`)}const b=async W=>{var j;if(W.preventDefault(),W.stopPropagation(),w)return;Oo&&clearTimeout(Oo),m("submitting");const V=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await s.create({content:u});break;case"question":Y=await s.create({title:u,authorId:f&&f.id,...(j=s.props)==null?void 0:j.create});break;case"response":Y=await s.create({question:e.slugs.question},{body:u,authorId:f&&f.id,contentPath:V});break;case"reply":Y=await s.create({question:e.slugs.question,answer:e.slugs.answer},{body:u,authorId:f&&f.id,contentPath:V});break;default:break}await Mb(1e3),s.callback&&await s.callback(Y),Oo=setTimeout(()=>{h(""),m("submitted"),A()},500)}catch(Y){const oe=Y;let K=`${pt}error`;oe.message.includes("entry already exists")&&(K=dr(l.formatMessage,`${pt}error_alreadyExists`,e.type,"action")),oe.message.includes("429")?K=dr(l.formatMessage,`${pt}error_tooMany`,e.type,"action"):oe.message.includes("400")&&(K=`${pt}error`),c(K),A()}},A=()=>{Oo=setTimeout(()=>{c(!1),m(!1)},5e3)},w=!u||!$b(u),N=p==="submitting",F=[];return(t.isEditing&&!N||i.cancel)&&F.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:s.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!f||!f.id||!u),children:l.formatMessage({id:`${pt}cancel`})}),F.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:W=>{if(t.isEditing){m("submitting"),s.handleSaveEdit&&s.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}b(W)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!f||!f.id||w||N||t.isEditing&&u===t.isEditing.text,children:l.formatMessage({id:`${pt}${N?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),C.jsxs("form",{id:E,className:se("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[!t.isEditing&&["question"].includes(e.type)&&C.jsx("h2",{children:dr(l.formatMessage,`${pt}title`,e.type,"action")}),C.jsx(zu,{member:f||"community",gtmContext:a,gtmType:"profile-click"}),C.jsx(it,{element:"label",showOnFocus:!1,htmlFor:`${E}-input`,children:dr(l.formatMessage,`${pt}label`,e.type,"action")}),C.jsx(tO,{ref:n,id:`${E}-input`,name:e.type,placeholder:dr(l.formatMessage,`${pt}placeholder`,e.type,"action"),onChange:T,value:u,maxLength:r,"aria-invalid":!!d,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),C.jsx("small",{children:dr(l.formatMessage,`${pt}explainer`,e.type,"action",{a:W=>C.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",children:W})})}),p==="submitted"&&C.jsx(hu,{className:"success","data-testid":"success",children:dr(l.formatMessage,`${pt}success`,e.type,"action")}),d&&C.jsx(hu,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof d=="string"?d.includes(" ")?d:l.formatMessage({id:d},{action:l.formatMessage({id:`discussion_action_${e.type}`}),maxLength:r}):d}),C.jsx(Xo,{buttons:F})]})},rO=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}});let $i=!1;const ks=()=>{$i!==!1&&(clearTimeout($i),$i=!1)},Wm=({element:e="p",likes:t=0,isShort:n=!0,userLiked:r=!1,content:o={type:"reply",slugs:{}},canLike:i=!0,createLike:s=()=>{},deleteLike:a=()=>{}})=>{const l=Ie();console.log({likes:t,userLiked:r}),G.useEffect(()=>{d(r)},[r]);const[f,u]=G.useState(t),[h,d]=G.useState(r),[c,p]=G.useState(!1),m=window.location.pathname,_=E=>{if(E.preventDefault(),E.stopPropagation(),$i)return ks(),!1;if(ks(),c||!i)return!1;$i=setTimeout(T,350)},T=async()=>{if(ks(),c||!i)return!1;let E=h?f-1:f+1;E<0&&(E=0),p(!0),u(E),d(!h);try{if(o&&o.slugs){const b=rO(o.slugs);h?await a(b):await s(b,{contentPath:m})}}catch{u(t),d(r)}finally{p(!1)}};return G.createElement(e,{className:se("likes-wrapper text-medium",{"show-spinner":c,"is-liked":h,disabled:!i}),onClick:_,children:C.jsxs(C.Fragment,{children:[C.jsx(ut,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:se({"do-animation":h&&!r}),screenreaderText:i?l.formatMessage({id:`discussion_${o.type}_likes_${h?"unlike":"like"}`}):!1,onClick:_,disabled:!i,"aria-hidden":!i,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),C.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:f})})]})})};var jo={exports:{}};jo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",c="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",T="[object Null]",E="[object Object]",b="[object Promise]",A="[object Proxy]",w="[object RegExp]",N="[object Set]",F="[object String]",M="[object Symbol]",q="[object Undefined]",W="[object WeakMap]",V="[object ArrayBuffer]",j="[object DataView]",Y="[object Float32Array]",oe="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",z="[object Int32Array]",J="[object Uint8Array]",de="[object Uint8ClampedArray]",X="[object Uint16Array]",ee="[object Uint32Array]",ue=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Q={};Q[Y]=Q[oe]=Q[K]=Q[k]=Q[z]=Q[J]=Q[de]=Q[X]=Q[ee]=!0,Q[a]=Q[l]=Q[V]=Q[u]=Q[j]=Q[h]=Q[d]=Q[c]=Q[m]=Q[_]=Q[E]=Q[w]=Q[N]=Q[F]=Q[W]=!1;var re=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Pe=typeof self=="object"&&self&&self.Object===Object&&self,xe=re||Pe||Function("return this")(),at=t&&!t.nodeType&&t,ct=at&&!0&&e&&!e.nodeType&&e,_t=ct&&ct.exports===at,te=_t&&re.process,ze=function(){try{return te&&te.binding&&te.binding("util")}catch{}}(),De=ze&&ze.isTypedArray;function bt(y,O){for(var R=-1,$=y==null?0:y.length,fe=0,ie=[];++R<$;){var pe=y[R];O(pe,R,y)&&(ie[fe++]=pe)}return ie}function Gt(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function Rt(y,O){for(var R=-1,$=y==null?0:y.length;++R<$;)if(O(y[R],R,y))return!0;return!1}function mt(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function br(y){return function(O){return y(O)}}function wt(y,O){return y.has(O)}function gt(y,O){return y==null?void 0:y[O]}function $e(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function St(y,O){return function(R){return y(O(R))}}function tt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var Ye=Array.prototype,wr=Function.prototype,S=Object.prototype,g=xe["__core-js_shared__"],v=wr.toString,x=S.hasOwnProperty,P=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),U=S.toString,H=RegExp("^"+v.call(x).replace(ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=_t?xe.Buffer:void 0,be=xe.Symbol,we=xe.Uint8Array,Se=S.propertyIsEnumerable,he=Ye.splice,lt=be?be.toStringTag:void 0,ir=Object.getOwnPropertySymbols,Sr=le?le.isBuffer:void 0,Wt=St(Object.keys,Object),Tr=Ot(xe,"DataView"),Vt=Ot(xe,"Map"),Or=Ot(xe,"Promise"),xr=Ot(xe,"Set"),Ar=Ot(xe,"WeakMap"),Pt=Ot(Object,"create"),nn=Ke(Tr),Tt=Ke(Vt),Fn=Ke(Or),Un=Ke(xr),Dn=Ke(Ar),on=be?be.prototype:void 0,Cr=on?on.valueOf:void 0;function Fe(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=Pt?Pt(null):{},this.size=0}function Pr(y){var O=this.has(y)&&delete this.__data__[y];return this.size-=O?1:0,O}function zt(y){var O=this.__data__;if(Pt){var R=O[y];return R===r?void 0:R}return x.call(O,y)?O[y]:void 0}function an(y){var O=this.__data__;return Pt?O[y]!==void 0:x.call(O,y)}function $n(y,O){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Pt&&O===void 0?r:O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__=[],this.size=0}function Hn(y){var O=this.__data__,R=sr(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():he.call(O,R,1),--this.size,!0}function qn(y){var O=this.__data__,R=sr(O,y);return R<0?void 0:O[R][1]}function Gn(y){return sr(this.__data__,y)>-1}function Ir(y,O){var R=this.__data__,$=sr(R,y);return $<0?(++this.size,R.push([y,O])):R[$][1]=O,this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Wn(){this.size=0,this.__data__={hash:new Fe,map:new(Vt||je),string:new Fe}}function Vn(y){var O=ft(this,y).delete(y);return this.size-=O?1:0,O}function zn(y){return ft(this,y).get(y)}function Yn(y){return ft(this,y).has(y)}function Kn(y,O){var R=ft(this,y),$=R.size;return R.set(y,O),this.size+=R.size==$?0:1,this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y){var O=-1,R=y==null?0:y.length;for(this.__data__=new Je;++O<R;)this.add(y[O])}function sn(y){return this.__data__.set(y,r),this}function ar(y){return this.__data__.has(y)}or.prototype.add=or.prototype.push=sn,or.prototype.has=ar;function st(y){var O=this.__data__=new je(y);this.size=O.size}function Nr(){this.__data__=new je,this.size=0}function Qn(y){var O=this.__data__,R=O.delete(y);return this.size=O.size,R}function Xn(y){return this.__data__.get(y)}function Jn(y){return this.__data__.has(y)}function Zn(y,O){var R=this.__data__;if(R instanceof je){var $=R.__data__;if(!Vt||$.length<n-1)return $.push([y,O]),this.size=++R.size,this;R=this.__data__=new Je($)}return R.set(y,O),this.size=R.size,this}st.prototype.clear=Nr,st.prototype.delete=Qn,st.prototype.get=Xn,st.prototype.has=Jn,st.prototype.set=Zn;function ei(y,O){var R=ur(y),$=!R&&hn(y),fe=!R&&!$&&lr(y),ie=!R&&!$&&!fe&&Fr(y),pe=R||$||fe||ie,me=pe?mt(y.length,String):[],ke=me.length;for(var _e in y)(O||x.call(y,_e))&&!(pe&&(_e=="length"||fe&&(_e=="offset"||_e=="parent")||ie&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||It(_e,ke)))&&me.push(_e);return me}function sr(y,O){for(var R=y.length;R--;)if(dn(y[R][0],O))return R;return-1}function Lr(y,O,R){var $=O(y);return ur(y)?$:Gt($,R(y))}function Yt(y){return y==null?y===void 0?q:T:lt&< in Object(y)?xt(y):fn(y)}function un(y){return yt(y)&&Yt(y)==a}function cn(y,O,R,$,fe){return y===O?!0:y==null||O==null||!yt(y)&&!yt(O)?y!==y&&O!==O:ln(y,O,R,$,cn,fe)}function ln(y,O,R,$,fe,ie){var pe=ur(y),me=ur(O),ke=pe?l:dt(y),_e=me?l:dt(O);ke=ke==a?E:ke,_e=_e==a?E:_e;var He=ke==E,Qe=_e==E,Me=ke==_e;if(Me&&lr(y)){if(!lr(O))return!1;pe=!0,He=!1}if(Me&&!He)return ie||(ie=new st),pe||Fr(y)?kr(y,O,R,$,fe,ie):ii(y,O,ke,R,$,fe,ie);if(!(R&o)){var qe=He&&x.call(y,"__wrapped__"),Ue=Qe&&x.call(O,"__wrapped__");if(qe||Ue){var Nt=qe?y.value():y,At=Ue?O.value():O;return ie||(ie=new st),fe(Nt,At,R,$,ie)}}return Me?(ie||(ie=new st),Br(y,O,R,$,fe,ie)):!1}function ti(y){if(!mn(y)||si(y))return!1;var O=pn(y)?H:ce;return O.test(Ke(y))}function ri(y){return yt(y)&&Mr(y.length)&&!!Q[Yt(y)]}function ni(y){if(!ui(y))return Wt(y);var O=[];for(var R in Object(y))x.call(y,R)&&R!="constructor"&&O.push(R);return O}function kr(y,O,R,$,fe,ie){var pe=R&o,me=y.length,ke=O.length;if(me!=ke&&!(pe&&ke>me))return!1;var _e=ie.get(y);if(_e&&ie.get(O))return _e==O;var He=-1,Qe=!0,Me=R&i?new or:void 0;for(ie.set(y,O),ie.set(O,y);++He<me;){var qe=y[He],Ue=O[He];if($)var Nt=pe?$(Ue,qe,He,O,y,ie):$(qe,Ue,He,y,O,ie);if(Nt!==void 0){if(Nt)continue;Qe=!1;break}if(Me){if(!Rt(O,function(At,Qt){if(!wt(Me,Qt)&&(qe===At||fe(qe,At,R,$,ie)))return Me.push(Qt)})){Qe=!1;break}}else if(!(qe===Ue||fe(qe,Ue,R,$,ie))){Qe=!1;break}}return ie.delete(y),ie.delete(O),Qe}function ii(y,O,R,$,fe,ie,pe){switch(R){case j:if(y.byteLength!=O.byteLength||y.byteOffset!=O.byteOffset)return!1;y=y.buffer,O=O.buffer;case V:return!(y.byteLength!=O.byteLength||!ie(new we(y),new we(O)));case u:case h:case _:return dn(+y,+O);case d:return y.name==O.name&&y.message==O.message;case w:case F:return y==O+"";case m:var me=$e;case N:var ke=$&o;if(me||(me=tt),y.size!=O.size&&!ke)return!1;var _e=pe.get(y);if(_e)return _e==O;$|=i,pe.set(y,O);var He=kr(me(y),me(O),$,fe,ie,pe);return pe.delete(y),He;case M:if(Cr)return Cr.call(y)==Cr.call(O)}return!1}function Br(y,O,R,$,fe,ie){var pe=R&o,me=Kt(y),ke=me.length,_e=Kt(O),He=_e.length;if(ke!=He&&!pe)return!1;for(var Qe=ke;Qe--;){var Me=me[Qe];if(!(pe?Me in O:x.call(O,Me)))return!1}var qe=ie.get(y);if(qe&&ie.get(O))return qe==O;var Ue=!0;ie.set(y,O),ie.set(O,y);for(var Nt=pe;++Qe<ke;){Me=me[Qe];var At=y[Me],Qt=O[Me];if($)var Ji=pe?$(Qt,At,Me,O,y,ie):$(At,Qt,Me,y,O,ie);if(!(Ji===void 0?At===Qt||fe(At,Qt,R,$,ie):Ji)){Ue=!1;break}Nt||(Nt=Me=="constructor")}if(Ue&&!Nt){var Lt=y.constructor,fr=O.constructor;Lt!=fr&&"constructor"in y&&"constructor"in O&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof fr=="function"&&fr instanceof fr)&&(Ue=!1)}return ie.delete(y),ie.delete(O),Ue}function Kt(y){return Lr(y,gn,oi)}function ft(y,O){var R=y.__data__;return ai(O)?R[typeof O=="string"?"string":"hash"]:R.map}function Ot(y,O){var R=gt(y,O);return ti(R)?R:void 0}function xt(y){var O=x.call(y,lt),R=y[lt];try{y[lt]=void 0;var $=!0}catch{}var fe=U.call(y);return $&&(O?y[lt]=R:delete y[lt]),fe}var oi=ir?function(y){return y==null?[]:(y=Object(y),bt(ir(y),function(O){return Se.call(y,O)}))}:yn,dt=Yt;(Tr&&dt(new Tr(new ArrayBuffer(1)))!=j||Vt&&dt(new Vt)!=m||Or&&dt(Or.resolve())!=b||xr&&dt(new xr)!=N||Ar&&dt(new Ar)!=W)&&(dt=function(y){var O=Yt(y),R=O==E?y.constructor:void 0,$=R?Ke(R):"";if($)switch($){case nn:return j;case Tt:return m;case Fn:return b;case Un:return N;case Dn:return W}return O});function It(y,O){return O=O??s,!!O&&(typeof y=="number"||Ve.test(y))&&y>-1&&y%1==0&&y<O}function ai(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function si(y){return!!P&&P in y}function ui(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||S;return y===R}function fn(y){return U.call(y)}function Ke(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y,O){return y===O||y!==y&&O!==O}var hn=un(function(){return arguments}())?un:function(y){return yt(y)&&x.call(y,"callee")&&!Se.call(y,"callee")},ur=Array.isArray;function cr(y){return y!=null&&Mr(y.length)&&!pn(y)}var lr=Sr||li;function ci(y,O){return cn(y,O)}function pn(y){if(!mn(y))return!1;var O=Yt(y);return O==c||O==p||O==f||O==A}function Mr(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function mn(y){var O=typeof y;return y!=null&&(O=="object"||O=="function")}function yt(y){return y!=null&&typeof y=="object"}var Fr=De?br(De):ri;function gn(y){return cr(y)?ei(y):ni(y)}function yn(){return[]}function li(){return!1}e.exports=ci})(jo,jo.exports);var nO=jo.exports;const iO=jt(nO),oO=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t},md="discussion_",aO=({content:e,isLoading:t=!1,originalAuthorId:n,functions:{content:{createContent:r,deleteContent:o,updateContent:i},likes:{createLike:s,deleteLike:a}},className:l,gtmContext:f="DiscussionAnswer",locale:u="en",children:h})=>{const d=Ie();G.useContext(Bn);const c=G.useContext(Yu);console.log("from post",{likes:e.likes,userLiked:e.userLiked});const[p,m]=G.useState({body:e&&e.body||"",isEditing:!1,didEdit:e&&e.isEdited||!1}),[_,T]=G.useState("");if(G.useEffect(()=>{m({...p,body:e&&e.body||"",didEdit:e&&e.isEdited||!1})},[e.isEdited]),t||!e||e.type==="answer"&&(!e.slugs||!e.slugs.question))return C.jsx(vr,{className:"discussion-card discussion-post"});const{author:E,createdAt:b,likes:A=0,userLiked:w}=e,N=!0,F=async q=>{q||(q=""),T("");try{iO(q,p.body)||await i(oO(e.slugs),{body:q}),m({body:q,isEditing:!1,didEdit:!0})}catch{T(`${md}form_error`)}},M=()=>{c&&c.updateConversation&&c.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const W=`reply-form-${(e.type==="answer"?e.slug:e.slugs.answer||"").toLowerCase().slice(-15)}`,V=document.getElementById(W),j=document.getElementById(`${W}-input`);j&&j.focus(),V&&V.scrollIntoView({behavior:"smooth"})},0)};return C.jsxs("div",{className:se("discussion-post",l),"data-testid":`discussion-${e.type}-thread`,children:[C.jsxs("div",{className:se("discussion-card",e.type,{editing:p.isEditing}),children:[!p.isEditing&&C.jsx(zu,{member:E,additionalContent:{createdAt:b,didEdit:p.didEdit},className:typeof E!="string"&&E.id===n?"highlighted":"",gtmContext:f,gtmType:"profile-click"}),p.isEditing?C.jsx(Gm,{content:{type:e.type,slugs:e.slugs},meta:{isLoading:t,isInWrapper:!0,isEditing:{text:p.body}},forceShow:{error:_!==""&&_!=="delete-error"?d.formatMessage({id:_},{action:d.formatMessage({id:`discussion_action_${e.type}`})}):!1},functions:{create:r,handleSaveEdit:F,handleCancel:()=>{T(""),m({...p,isEditing:!1})}},gtmContext:`${f}Form`}):C.jsx(Mm,{children:p.body}),!p.isEditing&&C.jsxs("ul",{className:se("actions",e.type),"data-testid":`${e.type}-actions`,children:[C.jsx(Wm,{element:"li",likes:A,isShort:!1,userLiked:w,content:{type:e.type,slugs:e.slugs},canLike:N,createLike:s,deleteLike:a,locale:u}),(e.type==="answer"||e.type==="reply")&&C.jsx("li",{children:C.jsx(ut,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:M,children:d.formatMessage({id:`${md}thread_reply_button`})})})]})]}),h]})};const xo="emailHelperTextBox_",sO=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const o=Ie(),[i,s]=G.useState({path:`${xo}default`,type:"default",link:{},mail:{},error:""}),[a,l]=G.useState(!1),f=G.useCallback(c=>{c.preventDefault(),c.stopPropagation();const p=m=>{s({path:`${xo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>f(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:m})};if(typeof r!="function"){p(o.formatMessage({id:`${xo}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{l(!1)})},[t,n,r]);G.useEffect(()=>{let c=xo,p="default",m={},_={};switch(e){case"gov":c+="autoApproved",p="success";break;case"nonGov":c+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":c+="pendingApproval",p="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":c+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>f(T),"data-testid":"send-verify-email-click"};break;case"exists":c+="emailAlreadyExists",p="error",m={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:c+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:c,type:p,link:m,mail:_})},[e]);const u={};return["link","mail"].forEach(c=>{u[c]=Object.keys(i[c]).length?p=>C.jsx("a",{...i[c],children:p}):p=>p}),C.jsx(Bm,{type:i.type,heading:a?!1:o.formatMessage({id:`${i.path}_title`}),children:a?C.jsxs(C.Fragment,{children:[C.jsx(vr,{element:"span"}),C.jsx(vr,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...u,strong:c=>C.jsx("strong",{children:c}),em:c=>C.jsx("em",{children:c}),br:C.jsxs(C.Fragment,{children:[C.jsx("br",{}),C.jsx("br",{})]}),error:i.error})})};const Ao="passwordRules_",Vm="isMoreThanEightCharacters",zm="includesNumberAndSymbol",Ym="includesLowerAndUppercase",uO={[Vm]:"8Characters",[zm]:"numberSymbol",[Ym]:"lowercaseUppercase"},cO=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=Ie();return C.jsxs("aside",{className:se("password-rules",t),children:[C.jsx("small",{children:n.formatMessage({id:`${Ao}intro`})}),C.jsx("ul",{children:[Vm,zm,Ym].map(r=>C.jsxs("li",{className:se({matches:e[r]}),children:[C.jsxs(it,{children:[n.formatMessage({id:`${Ao}rule_label`})," "]}),C.jsx("span",{children:n.formatMessage({id:`${Ao}rule_${uO[r]}`})}),!e[r]&&C.jsxs(it,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ao}notMet`})]})]},`rule-${r}`))})]})},lO=G.memo(cO);const fO=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:s=!1})=>{const a=Ie(),[l,f]=G.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const T=await n();f(E=>({...E,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(E=>({...E,setUp:!0,disabled:!0})),o(T)}};if(G.useEffect(()=>{s&&!l.setUp&&u()},[s]),!s)return C.jsx(vr,{className:"rating-placeholder"});const{id:h,rating:d,disabled:c}=l,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},_=async T=>{if(!(!h||c))try{f(E=>({...E,rating:T,disabled:!0})),await r({id:h,value:T})}catch(E){f(b=>({...b,rating:null})),o(E)}finally{f(E=>({...E,disabled:!1}))}};return C.jsxs("div",{className:se("rating",i),children:[C.jsx("span",{className:"label",children:m[d?"success":"text"]}),C.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const E=T+1;return C.jsx("li",{className:se({selected:d&&E<=d}),children:C.jsx(ut,{variant:"tertiary",size:"small",icon:{icon:`star${!d||E>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:E,total:t})}${E===1||E===t?` - ${m[E===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),_(E)},disabled:c})},`rating-${E}`)})})]})};const Km=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=n||{},l=Ie(),f=G.useRef(null);Io(()=>{!n||a||!s||f.current&&f.current.focus()},[s]);const u=h=>{if(h.preventDefault(),h.stopPropagation(),!(!f.current||!f.current.value||f.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(f.current.value)}`)};return C.jsx("form",{onSubmit:u,className:se("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:C.jsx("fieldset",{id:`${e}-form`,hidden:n?!s:!1,role:"search",children:C.jsxs("p",{children:[C.jsx(it,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),C.jsx("input",{ref:f,type:"search",id:e,name:e,defaultValue:r,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&u(h)}}),C.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),f.current&&f.current.value&&(f.current.value="")},children:C.jsx(it,{children:l.formatMessage({id:"search_clear"})})}),C.jsx("button",{className:"search",onClick:u,children:C.jsx(it,{children:l.formatMessage({id:"search_cta"})})})]})})})};const dO={"2-1":901},hO=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const o=Ki(!0);let i=r;return G.Children.count(r)===1&&(i=G.Children.toArray(r)[0],i.props&&(i=i.props.children)),C.jsx("section",{className:se("columns",`layout-${e}`,n),children:G.Children.map(i,(s,a)=>t!==!1&&a===t&&o&&o<dO[e]?null:s)})};const Bs="cookieBanner_",Ms=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Fs=new Date(Date.now()+12*30*24*60*60*1e3),Qm=()=>{const e=Ie(),[t,n,r]=Cd(Ms),[o,i]=G.useState(!t["apol-cookie-banner"]),s=()=>{Ms.forEach(u=>{n(u,!0,{path:"/",expires:Fs,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Fs}),Ms.forEach(u=>{if(u==="apol-cookie-banner"){n(u,!0,{path:"/",expires:Fs});return}r(u)}),i(!1)};if(!o)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:s,gtmType:"accepted-all"}],f=[];return l.forEach(u=>{f.push({variant:u.href?"tertiary":"primary",href:u.href,onClick:u.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${u.gtmType}-click`,children:e.formatMessage({id:`${Bs}buttons_${u.id}`})})}),C.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[C.jsx("h6",{children:e.formatMessage({id:`${Bs}title`})}),C.jsx("p",{children:e.formatMessage({id:`${Bs}text`})}),C.jsx(Xo,{buttons:f})]})};const pO=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:o=""})=>{const i=Ie(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[a,l]=G.useState(t?["all"]:[]),f=(u,h)=>{let d=[];a.includes(u)?d=a.filter(c=>c!==u):u==="all"?d=["all"]:n?d=[...a.filter(c=>c!=="all"),u]:d=[u],l(c=>(r&&typeof r=="function"&&r({current:d,previous:c}),d)),h&&typeof h=="function"&&h()};return C.jsx("ul",{className:se("filters",o),children:s.map(({id:u,text:h,disabled:d=!1,callback:c=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:h})}),C.jsx("li",{children:C.jsx("button",{className:se(u,{selected:a.includes(u)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(u,c)},...p,children:h})},u)})})};const Us=du({locale:"en",messages:Fu}),mO=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:o=!1,messages:i={button:Us.formatMessage({id:"loadMore_button"}),endOfFeed:Us.formatMessage({id:"loadMore_endOfFeed"}),error:Us.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[l,f]=G.useState(!1),[u,h]=G.useState(!1);if(t<=0||t<n*e)return null;const d=async c=>{try{await r(c)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return C.jsxs("footer",{className:se("load-more",s),children:[l&&C.jsx("p",{className:"error",children:i.error}),u?C.jsx("p",{children:i.endOfFeed}):C.jsx(ut,{variant:"secondary",icon:o,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};const Ku=({variant:e="default",version:t="default",className:n="",...r})=>C.jsx("p",{className:"logo-wrapper",children:C.jsx("a",{className:se("logo",e,t,n),href:"/home/",...r,children:C.jsx(it,{children:C.jsx(Yr,{id:"apolitical"})})})}),gd={default:"tags_",headerTopics:"header_topics_topics_"},Ds={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},gO={getTagDetails:e=>{if(e.includes("topic_")){if(e=Ds.topic[e.replace("topic_","")],e){const t=Gi.topics.topics[e].href;return t?{id:e,href:t,text:`${gd.headerTopics}${e}`}:null}return null}return Ds[e]?(e=Ds[e],{id:e,text:`${gd.default}${e}`}):null}};const yO=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:o="",gtmType:i="tag-click",gtmContext:s="tags"})=>{const a=Ie();if(!e||e.length<1)return null;const l=[];return e.forEach(f=>{if(!f)return;const u=gO.getTagDetails(f);u&&l.push(u)}),l.length<1?null:C.jsx("ul",{className:se("tags text-small",t,o,{"one-line":n}),children:l.map(f=>{const u=a.formatMessage({id:f.text});return C.jsx("li",{children:f.href&&r?C.jsx("a",{href:f.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":s,children:u}):u},f.id)})})},rr={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Sn="footer_",Ho="SiteFooter",yd=({group:e})=>{const t=rr[e].order||[];let n=!1;return"text"in rr[e]&&(n=rr[e].text),C.jsxs(G.Fragment,{children:[C.jsx("p",{className:"pre-title",children:C.jsx(Yr,{id:`${Sn}${e}`})}),Array.isArray(t)&&t.length>0&&C.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:o,gtmType:i}=rr[e][r],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),C.jsx("li",{children:C.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":i,...s,children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&C.jsx("dl",{className:"text-medium",children:n.order.map(r=>C.jsxs(G.Fragment,{children:[C.jsx("dt",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})}),C.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&C.jsx("address",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}_address`,values:{br:C.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&C.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Qu=()=>C.jsx("div",{id:"footer",children:C.jsxs("div",{className:"wrapper",children:[C.jsx(Eu,{element:"hr"}),C.jsx(Ku,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"logo-homepage-link"}),C.jsx("footer",{children:["platform","community","company","contact"].map(e=>C.jsxs("div",{className:"group",children:[C.jsx(yd,{group:e}),Object.keys(rr[e]).includes("child")&&C.jsx(yd,{group:rr[e].child})]},e))}),C.jsx("hr",{}),C.jsxs("div",{className:"sub-footer",children:[C.jsx("ul",{children:Array.isArray(rr.social.order)&&rr.social.order.map(e=>{const t=rr.social[e];return C.jsx("li",{className:e,children:C.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"social-click",children:C.jsx("span",{className:"hidden",children:C.jsx(Yr,{id:`${Sn}social_${e}`})})})},e)})}),C.jsx("small",{children:C.jsx(Yr,{id:`${Sn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});var vO="Expected a function",Xm="__lodash_hash_undefined__",Jm=1/0,EO="[object Function]",_O="[object GeneratorFunction]",bO="[object Symbol]",wO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SO=/^\w*$/,TO=/^\./,OO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xO=/[\\^$.*+?()[\]{}|]/g,AO=/\\(\\)?/g,CO=/^\[object .+?Constructor\]$/,RO=typeof ae=="object"&&ae&&ae.Object===Object&&ae,PO=typeof self=="object"&&self&&self.Object===Object&&self,Xu=RO||PO||Function("return this")();function IO(e,t){return e==null?void 0:e[t]}function NO(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var LO=Array.prototype,kO=Function.prototype,Zm=Object.prototype,$s=Xu["__core-js_shared__"],vd=function(){var e=/[^.]+$/.exec($s&&$s.keys&&$s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),eg=kO.toString,Ju=Zm.hasOwnProperty,tg=Zm.toString,BO=RegExp("^"+eg.call(Ju).replace(xO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ed=Xu.Symbol,MO=LO.splice,FO=rg(Xu,"Map"),qi=rg(Object,"create"),_d=Ed?Ed.prototype:void 0,bd=_d?_d.toString:void 0;function Zr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function UO(){this.__data__=qi?qi(null):{}}function DO(e){return this.has(e)&&delete this.__data__[e]}function $O(e){var t=this.__data__;if(qi){var n=t[e];return n===Xm?void 0:n}return Ju.call(t,e)?t[e]:void 0}function jO(e){var t=this.__data__;return qi?t[e]!==void 0:Ju.call(t,e)}function HO(e,t){var n=this.__data__;return n[e]=qi&&t===void 0?Xm:t,this}Zr.prototype.clear=UO;Zr.prototype.delete=DO;Zr.prototype.get=$O;Zr.prototype.has=jO;Zr.prototype.set=HO;function Mn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qO(){this.__data__=[]}function GO(e){var t=this.__data__,n=ta(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():MO.call(t,n,1),!0}function WO(e){var t=this.__data__,n=ta(t,e);return n<0?void 0:t[n][1]}function VO(e){return ta(this.__data__,e)>-1}function zO(e,t){var n=this.__data__,r=ta(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Mn.prototype.clear=qO;Mn.prototype.delete=GO;Mn.prototype.get=WO;Mn.prototype.has=VO;Mn.prototype.set=zO;function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function YO(){this.__data__={hash:new Zr,map:new(FO||Mn),string:new Zr}}function KO(e){return ra(this,e).delete(e)}function QO(e){return ra(this,e).get(e)}function XO(e){return ra(this,e).has(e)}function JO(e,t){return ra(this,e).set(e,t),this}rn.prototype.clear=YO;rn.prototype.delete=KO;rn.prototype.get=QO;rn.prototype.has=XO;rn.prototype.set=JO;function ta(e,t){for(var n=e.length;n--;)if(cx(e[n][0],t))return n;return-1}function ZO(e,t){t=nx(t,e)?[t]:rx(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[sx(t[n++])];return n&&n==r?e:void 0}function ex(e){if(!ig(e)||ox(e))return!1;var t=lx(e)||NO(e)?BO:CO;return t.test(ux(e))}function tx(e){if(typeof e=="string")return e;if(ec(e))return bd?bd.call(e):"";var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function rx(e){return ng(e)?e:ax(e)}function ra(e,t){var n=e.__data__;return ix(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rg(e,t){var n=IO(e,t);return ex(n)?n:void 0}function nx(e,t){if(ng(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ec(e)?!0:SO.test(e)||!wO.test(e)||t!=null&&e in Object(t)}function ix(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ox(e){return!!vd&&vd in e}var ax=Zu(function(e){e=dx(e);var t=[];return TO.test(e)&&t.push(""),e.replace(OO,function(n,r,o,i){t.push(o?i.replace(AO,"$1"):r||n)}),t});function sx(e){if(typeof e=="string"||ec(e))return e;var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function ux(e){if(e!=null){try{return eg.call(e)}catch{}try{return e+""}catch{}}return""}function Zu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(vO);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Zu.Cache||rn),n}Zu.Cache=rn;function cx(e,t){return e===t||e!==e&&t!==t}var ng=Array.isArray;function lx(e){var t=ig(e)?tg.call(e):"";return t==EO||t==_O}function ig(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function fx(e){return!!e&&typeof e=="object"}function ec(e){return typeof e=="symbol"||fx(e)&&tg.call(e)==bO}function dx(e){return e==null?"":tx(e)}function hx(e,t,n){var r=e==null?void 0:ZO(e,t);return r===void 0?n:r}var px=hx;const og=jt(px),Re={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=i=>{const s=`logged${e?"In":"Out"}`;return t>=n[i][s]};let o={};return["navigation","search"].forEach(i=>{o[i]=r(i)}),o},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(o=>o===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const o=Date.now();if(!t&&Re.handlerCalled[e]&&o-Re.handlerCalled[e]<500)return;Re.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(s=>{s===e||n[s]===!1||i.push({type:`menus.${s}`,value:!1})}),r(i)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const o=og(e[r],t);if(!(typeof o>"u")&&(!n||o[t]&&o[t].includes(n)||o.value&&o.value.includes(n)||o.toString().includes(n)))return e[r]}return e[0].children?Re.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:o})=>{if(!t.current||!t.current.children)return;const i=n?"desktop":"default";if(r[e][i]){r[e][i].focus();return}let s,a;switch(e){case"navigation":if(n){const l=Re.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Re.findFirstChild(l.children,"href")}else s=Re.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Re.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Re.findFirstChild(a.children,"href");break;default:return}s&&(o([{type:`focusElements.${e}.${i}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Re.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Re.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Re.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Re.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Gi={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},qo=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:o=()=>{},doTrack:i=null})=>{const s=Ie(),a=og(Gi,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,f=i===null?l?a.doTrack:!0:i,u=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let d=!1;if(a.href){let E=a.gtmType||`${e}-click`;if(E.includes(".")){const b=E.split("."),A=b[b.length-2];E=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}d={href:a.href,role:"menuitem"},f&&(d={...d,className:"gtm-trackable","data-gtm-event-type":E,"data-gtm-event-context":"HeaderButtons"}),u&&(d={...d,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const c=a.order&&a.order[0]&&a[a.order[0]],p=c&&a[a.order[0]].order,m=d&&typeof window<"u"&&window.location&&window.location.pathname===a.href;let _={},T={};if(c){const E=a.menuId||e,b={onClick:A=>Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]}),onFocus:()=>Re.events.onFocus({id:E}),onBlur:()=>Re.events.onBlur({id:E,callback:o}),onMouseLeave:()=>Re.events.onBlur({id:E,callback:o}),onMouseEnter:()=>Re.events.onMouseEnter({id:E,callback:o})};n&&(p&&(_={...b,onKeyPress:A=>{A.key==="Enter"&&Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[E],"aria-controls":E}),T={hidden:E in r?!r[E]:!0}),p||(T={...T,...b})}return C.jsxs("li",{className:se({[a.className]:a.className,"has-submenu":c,parent:p,active:m}),role:"none",..._,children:[d?G.createElement(u?ut:"a",d,s.formatMessage({id:h})):s.formatMessage({id:h}),a.order&&C.jsx("ul",{...T,children:a.order.map(E=>{if(!a[E])return null;const b={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:o,doTrack:l?f:null};return a[E].order?C.jsxs("li",{className:se({[a[E].className]:a[E].className}),children:[s.formatMessage({id:`${h}_${E}`}),C.jsx("ul",{children:a[E].order.map(A=>C.jsx(qo,{id:`${e}.${E}.${A}`,...b},A))})]},E):C.jsx(qo,{id:`${e}.${E}`,...b},E)})})]},e)};const mx={height:67,height_desktop:83},tc=()=>{const e=Ie(),t=G.useContext(Bn),n=Ki(!0,!0),r=t&&typeof t.id=="string",o=G.useMemo(()=>Re.getIsDesktopVersion(r,n),[r,n]),[i,s]=G.useReducer(kb,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:l,focusElements:f}=i;Sp({scrollPosition:mx[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!0,l,s)},scrollDown:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!1,l,s)}}});const u=(d,c)=>{Re.handleMenus({id:d,value:c,menus:l,dispatch:s})},h=G.useRef(null);return Io(()=>{l.navigation&&Re.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.navigation]),Io(()=>{l.account&&Re.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.account]),t&&t.isLoading?null:C.jsxs(C.Fragment,{children:[C.jsxs("nav",{id:"header",className:se({"logged-in":r,"logged-out":!r,visible:a}),children:[C.jsx(it,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),C.jsx(Ku,{}),!o.navigation&&C.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("navigation",!l.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":l.navigation,"aria-controls":"navigation",children:C.jsx(it,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),C.jsx("ul",{ref:h,id:"navigation",hidden:o.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!o.navigation&&l.account?"account":"default",children:Gi.order.map(d=>C.jsx(qo,{id:d,isLoggedIn:r,isDesktopVersion:o.navigation,menus:{navigation:l.navigation,account:l.account},callback:u},d))}),!o.search&&C.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:C.jsx(it,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),C.jsx(Km,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?C.jsxs("button",{className:"account-button",onClick:d=>Re.events.onClick(d,{id:"account",callback:u,isOpen:l.account}),onMouseEnter:()=>Re.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>Re.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[C.jsx(it,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),C.jsx(ea,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):C.jsx("ul",{className:"sign-in-buttons",children:Gi.buttons.order.map(d=>C.jsx(qo,{id:`buttons.${d}`},d))})]}),C.jsx("hr",{id:"content-of-page"}),C.jsx("div",{className:se("overlay",{open:l.navigation||l.account||!o.search&&l.search})})]})},gx=G.createContext(null),js={didCatch:!1,error:null};class yx extends G.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=js}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(js)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&vx(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(js)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(G.isValidElement(o))a=o;else if(typeof n=="function")a=n(l);else if(r)a=G.createElement(r,l);else throw s}return G.createElement(gx.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function vx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const Ex=()=>{const e=Ie();return C.jsxs(C.Fragment,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:C.jsx(Lm,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),C.jsx(Qu,{})]})},_x=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:o="",locale:i="en"})=>{const s=Db(e,{locale:i});return C.jsx(yx,{onError:t,fallback:C.jsx(Ex,{}),children:C.jsx(G.Suspense,{fallback:C.jsx(Dm,{layout:"overview-page"}),children:C.jsx("div",{id:"wrapper",className:se(o,{[r]:r!=="default"}),children:C.jsxs(Cg,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:s}),n&&C.jsx(Qu,{}),C.jsx(Qm,{})]})})})})};const bx=({children:e,className:t})=>C.jsx("section",{className:se("modal",t),children:typeof e=="string"?C.jsx("p",{children:e}):e});exports.ASSETS_BUCKET=$o;exports.Alert=hu;exports.BannerSection=zb;exports.Button=ut;exports.ButtonWrapper=Xo;exports.CollapsibleSection=qu;exports.Columns=hO;exports.CommunityDetails=FT;exports.Contributors=jm;exports.ConversationContext=Yu;exports.CookieBanner=Qm;exports.DiscussionConversation=DT;exports.DiscussionForm=Gm;exports.DiscussionLikes=Wm;exports.DiscussionPost=aO;exports.DownloadSection=qb;exports.EmailHelperTextBox=sO;exports.EmptyStateBox=Lm;exports.Filters=pO;exports.Footer=Qu;exports.FullWidthSection=Uu;exports.Header=tc;exports.HelperTextBox=Bm;exports.HiddenFromScreenReaders=Eu;exports.HideShowTextBox=bT;exports.HighlightedTextBox=nr;exports.IntlProvider=BT;exports.JoinButton=Hm;exports.Link=kp;exports.LoadMore=mO;exports.LoadingBlock=NT;exports.LoadingPlaceholder=vr;exports.LoadingState=Dm;exports.Logo=Ku;exports.LogoSection=Gb;exports.MarkdownText=Mm;exports.MarketingBox=Yb;exports.Member=zu;exports.Modal=bx;exports.NUMBER_OF_USERS=yS;exports.PageLayout=_x;exports.PasswordRules=lO;exports.Pill=RT;exports.ProfilePicture=ea;exports.ProgressBar=Fm;exports.Rating=fO;exports.ResponsiveImage=Bp;exports.SearchForm=Km;exports.Tags=yO;exports.UserContext=Bn;exports.UserProvider=MT;exports.VisuallyHidden=it;exports.getMember=Vu;exports.headerData=Gi;exports.useEffectAfterMount=Io;exports.useFeatureFlag=R_;exports.useScreenWidth=Ki;exports.useScrollListener=Sp;
|