@callimacus/thamyr-liquid 4.3.5 → 4.4.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/CHANGELOG.core.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.4.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.3.5...thamyr-core-v4.4.0) (2026-09-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **callimacus:** export additional action types from hooks for better type safety ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
12
+ * **ContentAPI:** implement getDocumentByGroupId method to retrieve documents based on language and group ID ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
13
+ * **hooks.ts:** enhance useProducts, useAnalytics, and useSitemap hooks with TypeScript interfaces and detailed documentation ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
14
+ * **react:** add eslint-config-xo-react for better React linting ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
15
+ * **react:** implement Callimacus store and hooks for state management ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
16
+ * **service.ts:** add polling transport option to socket connection for improved connectivity in restricted environments ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
17
+ * **service.ts:** add referrer to auth object for enhanced tracking and analytics ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
18
+ * **thamyr:** parity with the v2 wire, rounds without a message, acknowledged suggestions, receptors and block keys ([#784](https://github.com/callimacus/thamyr-sdk/issues/784)) ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * **AnalyticsAPI.ts, Thamyr.ts:** remove array type from content parameter in trackEvent method for consistency and simplification ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
24
+ * **core/package.json:** update @solomei-ai/intent to version 1.9.2 for latest features and fixes ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
25
+ * **package.json:** remove redundant comma in scripts section to ensure JSON validity ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
26
+ * **package.json:** update @types/react to version 19.2.10 for improved type definitions chore(package.json): bump react and react-dom to version 19.2.4 for latest features and fixes ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
27
+ * **react:** ensure consistent export style across components ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
28
+ * **react:** remove obsolete global type declarations ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
29
+ * remove legacy-peer-deps from .npmrc and update registry configuration for scoped package ([fe22166](https://github.com/callimacus/thamyr-sdk/commit/fe221665c994723d546f972c9379cdf4b4eecbc8))
30
+
6
31
  ## [4.3.5](https://github.com/callimacus/thamyr-sdk/compare/thamyr-core-v4.3.4...thamyr-core-v4.3.5) (2026-09-29)
7
32
 
8
33
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.4.0](https://github.com/callimacus/thamyr-sdk/compare/thamyr-liquid-v4.3.5...thamyr-liquid-v4.4.0) (2026-09-29)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **thamyr-liquid:** Synchronize thamyr versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @callimacus/thamyr-core bumped from ^4.3.5 to ^4.4.0
16
+
3
17
  ## [4.3.5](https://github.com/callimacus/thamyr-sdk/compare/thamyr-liquid-v4.3.4...thamyr-liquid-v4.3.5) (2026-09-29)
4
18
 
5
19
 
@@ -10,7 +10,7 @@
10
10
  * Socket.IO v4.8.4
11
11
  * (c) 2014-2026 Guillermo Rauch
12
12
  * Released under the MIT License.
13
- */const t=Object.create(null);t.open="0",t.close="1",t.ping="2",t.pong="3",t.message="4",t.upgrade="5",t.noop="6";const e=Object.create(null);Object.keys(t).forEach(s=>{e[t[s]]=s});const s={type:"error",data:"parser error"},i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,r=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:e,data:s},o,c)=>i&&s instanceof Blob?o?c(s):a(s,c):n&&(s instanceof ArrayBuffer||r(s))?o?c(s):a(new Blob([s]),c):c(t[e]+(s||"")),a=(t,e)=>{const s=new FileReader;return s.onload=function(){const t=s.result.split(",")[1];e("b"+(t||""))},s.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let h;const u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)u["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;const d="function"==typeof ArrayBuffer,l=(t,i)=>{if("string"!=typeof t)return{type:"message",data:f(t,i)};const n=t.charAt(0);return"b"===n?{type:"message",data:p(t.substring(1),i)}:e[n]?t.length>1?{type:e[n],data:t.substring(1)}:{type:e[n]}:s},p=(t,e)=>{if(d){const s=(t=>{let e,s,i,n,r,o=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);const h=new ArrayBuffer(o),d=new Uint8Array(h);for(e=0;e<a;e+=4)s=u[t.charCodeAt(e)],i=u[t.charCodeAt(e+1)],n=u[t.charCodeAt(e+2)],r=u[t.charCodeAt(e+3)],d[c++]=s<<2|i>>4,d[c++]=(15&i)<<4|n>>2,d[c++]=(3&n)<<6|63&r;return h})(t);return f(s,e)}return{base64:!0,data:t}},f=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,y=String.fromCharCode(30);function m(){return new TransformStream({transform(t,e){!function(t,e){i&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(e):n&&(t.data instanceof ArrayBuffer||r(t.data))?e(c(t.data)):o(t,!1,t=>{h||(h=new TextEncoder),e(h.encode(t))})}(t,s=>{const i=s.length;let n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,i)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(n[0]|=128),e.enqueue(n),e.enqueue(s)})}})}let g;function b(t){return t.reduce((t,e)=>t+e.length,0)}function v(t,e){if(t[0].length===e)return t.shift();const s=new Uint8Array(e);let i=0;for(let n=0;n<e;n++)s[n]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),s}function w(t){if(t)return function(t){for(var e in w.prototype)t[e]=w.prototype[e];return t}(t)}w.prototype.on=w.prototype.addEventListener=function(t,e){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(e),this},w.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},w.prototype.off=w.prototype.removeListener=w.prototype.removeAllListeners=w.prototype.removeEventListener=function(t,e){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var s,i=this.t["$"+t];if(!i)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var n=0;n<i.length;n++)if((s=i[n])===e||s.fn===e){i.splice(n,1);break}return 0===i.length&&delete this.t["$"+t],this},w.prototype.emit=function(t){this.t=this.t||{};for(var e=new Array(arguments.length-1),s=this.t["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(s){i=0;for(var n=(s=s.slice(0)).length;i<n;++i)s[i].apply(this,e)}return this},w.prototype.emitReserved=w.prototype.emit,w.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},w.prototype.hasListeners=function(t){return!!this.listeners(t).length};const k="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function E(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}const O=R.setTimeout,A=R.clearTimeout;function T(t,e){e.useNativeTimers?(t.setTimeoutFn=O.bind(R),t.clearTimeoutFn=A.bind(R)):(t.setTimeoutFn=R.setTimeout.bind(R),t.clearTimeoutFn=R.clearTimeout.bind(R))}function C(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class S extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class N extends w{constructor(t){super(),this.writable=!1,T(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,s){return super.emitReserved("error",new S(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=l(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this.i()+this.o()+this.opts.path+this.h(e)}i(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}h(t){const e=function(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}(t);return e.length?"?"+e:""}}class B extends N{constructor(){super(...arguments),this.u=!1}get name(){return"polling"}doOpen(){this.l()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}l(){this.u=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const s=t.split(y),i=[];for(let t=0;t<s.length;t++){const n=l(s[t],e);if(i.push(n),"error"===n.type)break}return i})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.u=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const s=t.length,i=new Array(s);let n=0;t.forEach((t,r)=>{o(t,!1,t=>{i[r]=t,++n===s&&e(i.join(y))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=C()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let x=!1;try{x="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const U=x;function I(){}class j extends B{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}let L=class t extends w{constructor(t,e,s){super(),this.createRequest=t,T(this,s),this.p=s,this.v=s.method||"GET",this.m=e,this.k=void 0!==s.data?s.data:null,this.A()}A(){var e;const s=E(this.p,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(e){}if("POST"===this.v)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{i.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.p.cookieJar)||void 0===e||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn(()=>{this.j("number"==typeof i.status?i.status:0)},0))},i.send(this.k)}catch(e){return void this.setTimeoutFn(()=>{this.j(e)},0)}"undefined"!=typeof document&&(this.B=t.requestsCount++,t.requests[this.B]=this)}j(t){this.emitReserved("error",t,this.O),this.C(!0)}C(e){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=I,e)try{this.O.abort()}catch(e){}"undefined"!=typeof document&&delete t.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.C())}abort(){this.C()}};function D(){for(let t in L.requests)L.requests.hasOwnProperty(t)&&L.requests[t].abort()}L.requestsCount=0,L.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",D):"function"==typeof addEventListener&&addEventListener("onpagehide"in R?"pagehide":"unload",D,!1));const _=function(){const t=q({xdomain:!1});return t&&null!==t.responseType}();function q(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||U))return new XMLHttpRequest}catch(t){}if(!e)try{return new(R[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const M="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class $ extends N{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,s=M?{}:E(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],i=e===t.length-1;o(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}i&&k(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=C()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const V=R.WebSocket||R.MozWebSocket;const P={websocket:class extends ${createSocket(t,e,s){return M?new V(t,e,s):e?new V(t,e):new V(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends N{get name(){return"webtransport"}doOpen(){try{this.N=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.N.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.N.ready.then(()=>{this.N.createBidirectionalStream().then(t=>{const e=function(t,e){g||(g=new TextDecoder);const i=[];let n=0,r=-1,o=!1;return new TransformStream({transform(a,c){for(i.push(a);;){if(0===n){if(b(i)<1)break;const t=v(i,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(b(i)<2)break;const t=v(i,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(b(i)<8)break;const t=v(i,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(s);break}r=o*Math.pow(2,32)+e.getUint32(4),n=3}else{if(b(i)<r)break;const t=v(i,r);c.enqueue(l(o?t:g.decode(t),e)),n=0}if(0===r||r>t){c.enqueue(s);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),n=m();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{i.read().then(({done:t,value:e})=>{t||(this.onPacket(e),r())}).catch(t=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.U.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],i=e===t.length-1;this.U.write(s).then(()=>{i&&k(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}},polling:class extends j{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=_&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new L(q,this.uri(),t)}}},F=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function K(t){if(t.length>8e3)throw"URI too long";const e=t,s=t.indexOf("["),i=t.indexOf("]");-1!=s&&-1!=i&&(t=t.substring(0,s)+t.substring(s,i).replace(/:/g,";")+t.substring(i,t.length));let n=F.exec(t||""),r={},o=14;for(;o--;)r[H[o]]=n[o]||"";return-1!=s&&-1!=i&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=function(t,e){const s=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||s.splice(0,1),"/"==e.slice(-1)&&s.splice(s.length-1,1),s}(0,r.path),r.queryKey=function(t,e){const s={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,i){e&&(s[e]=i)}),s}(0,r.query),r}const z="function"==typeof addEventListener&&"function"==typeof removeEventListener,W=[];z&&addEventListener("offline",()=>{W.forEach(t=>t())},!1);class Y extends w{constructor(t,e={}){var s,i;if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this.P=0,this.D=[],this.M=-1,this.S=-1,this.L=-1,this.R=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const s=K(t);e.hostname=s.host,e.secure="https"===s.protocol||"wss"===s.protocol,e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=K(e.host).host);if(T(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),e.transportImplementations&&e.transports)throw new Error("specifying both 'transportImplementations' and 'transports' options is not supported");e.transportImplementations||(null===(s=e.transports)||void 0===s?void 0:s.length)&&"function"==typeof e.transports[0]?(this.transports=[],this.I=Object.create(null),(null!==(i=e.transportImplementations)&&void 0!==i?i:e.transports).forEach(t=>{const e=t.prototype.name;this.transports.push(e),this.I[e]=t})):(this.transports=e.transports?[...e.transports]:["polling","websocket","webtransport"],this.I=P),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},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},s=t.split("&");for(let t=0,i=s.length;t<i;t++){let i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}(this.opts.query)),z&&(this.opts.closeOnBeforeunload&&(this.F=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.F,!1)),"localhost"!==this.hostname&&(this.$=()=>{this.V("transport close",{description:"network connection lost"})},W.push(this.$))),this.opts.withCredentials&&(this.W=void 0),this.q()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.I[t](s)}q(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.H.bind(this)).on("packet",this.X.bind(this)).on("error",this.j.bind(this)).on("close",t=>this.V("transport close",t))}J(t){let e=this.createTransport(t),s=!1;Y.priorWebsocketSuccess=!1;const i=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!s)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Y.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(h(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function n(){s||(s=!0,h(),e.close(),e=null)}const r=t=>{const s=new Error("probe error: "+t);s.transport=e.name,n(),this.emitReserved("upgradeError",s)};function o(){r("transport closed")}function a(){r("socket closed")}function c(t){e&&t.name!==e.name&&n()}const h=()=>{e.removeListener("open",i),e.removeListener("error",r),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",i),e.once("error",r),e.once("close",o),this.once("close",a),this.once("upgrading",c),-1!==this.D.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onOpen(){if(this.readyState="open",Y.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.D.length;t++)this.J(this.D[t])}X(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.G("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.K();break;case"error":const e=new Error("server error");e.code=t.data,this.j(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=this.Y(t.upgrades),this.M=t.pingInterval,this.S=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.K()}K(){this.clearTimeoutFn(this.Z);const t=this.M+this.S;this.R=Date.now()+t,this.Z=this.setTimeoutFn(()=>{this.V("ping timeout")},t),this.opts.autoUnref&&this.Z.unref()}H(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.tt();this.transport.send(t),this.P=t.length,this.emitReserved("flush")}}tt(){if(!(this.L&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+="string"==typeof(e=i)?function(t){let e=0,s=0;for(let i=0,n=t.length;i<n;i++)e=t.charCodeAt(i),e<128?s+=1:e<2048?s+=2:e<55296||e>=57344?s+=3:(i++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))),s>0&&t>this.L)return this.writeBuffer.slice(0,s);t+=2}var e;return this.writeBuffer}st(){if(!this.R)return!0;const t=Date.now()>this.R;return t&&(this.R=0,k(()=>{this.V("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this.G("message",t,e,s),this}send(t,e,s){return this.G("message",t,e,s),this}G(t,e,s,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof s&&(i=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:t,data:e,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.V("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.V("transport error",t)}V(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Z),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),z&&(this.F&&removeEventListener("beforeunload",this.F,!1),this.$)){const t=W.indexOf(this.$);-1!==t&&W.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.P=0}}Y(t){const e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}Y.protocol=4;const J="function"==typeof ArrayBuffer,X=Object.prototype.toString,G="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===X.call(Blob),Z="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===X.call(File);function Q(t){return J&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||G&&t instanceof Blob||Z&&t instanceof File}function tt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,s=t.length;e<s;e++)if(tt(t[e]))return!0;return!1}if(Q(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return tt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&tt(t[e]))return!0;return!1}function et(t){const e=[],s=t.data,i=t;return i.data=st(s,e),i.attachments=e.length,{packet:i,buffers:e}}function st(t,e,s){if(!t)return t;if(Q(t)){const s={_placeholder:!0,num:e.length};return e.push(t),s}if(Array.isArray(t)){const s=new Array(t.length);for(let i=0;i<t.length;i++)s[i]=st(t[i],e);return s}if("object"==typeof t&&!(t instanceof Date)){if(t.toJSON&&"function"==typeof t.toJSON&&!s)return st(t.toJSON(),e,!0);const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=st(t[s],e));return i}return t}function it(t,e){return t.data=nt(t.data,e),delete t.attachments,t}function nt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=nt(t[s],e);else if("object"==typeof t)for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=nt(t[s],e));return t}const rt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ot;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(ot||(ot={}));class at extends w{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const s=e.type===ot.BINARY_EVENT;s||e.type===ot.BINARY_ACK?(e.type=s?ot.EVENT:ot.ACK,this.reconstructor=new ct(e)):super.emitReserved("decoded",e)}else{if(!Q(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(void 0===ot[s.type])throw new Error("unknown packet type "+s.type);if(s.type===ot.BINARY_EVENT||s.type===ot.BINARY_ACK){const i=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const n=t.substring(i,e);if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const r=Number(n);if(!ht(r)||r<1)throw new Error("Illegal attachments");if(r>this.opts.maxAttachments)throw new Error("too many attachments");s.attachments=r}if("/"===t.charAt(e+1)){const i=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);s.nsp=t.substring(i,e)}else s.nsp="/";const i=t.charAt(e+1);if(""!==i&&Number(i)==i){const i=e+1;for(;++e;){const s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){const i=this.tryParse(t.substr(e));if(!at.isPayloadValid(s.type,i))throw new Error("invalid payload");s.data=i}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case ot.CONNECT:return ut(e);case ot.DISCONNECT:return void 0===e;case ot.CONNECT_ERROR:return"string"==typeof e||ut(e);case ot.EVENT:case ot.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===rt.indexOf(e[0]));case ot.ACK:case ot.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ct{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=it(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ht=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function ut(t){return"[object Object]"===Object.prototype.toString.call(t)}var dt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return ot},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==ot.EVENT&&t.type!==ot.ACK||!tt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===ot.EVENT?ot.BINARY_EVENT:ot.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==ot.BINARY_EVENT&&t.type!==ot.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=et(t),s=this.encodeAsString(e.packet),i=e.buffers;return i.unshift(s),i}},Decoder:at,isPacketValid:function(t){return"string"==typeof t.nsp&&(void 0===(e=t.id)||ht(e))&&function(t,e){switch(t){case ot.CONNECT:return void 0===e||ut(e);case ot.DISCONNECT:return void 0===e;case ot.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===rt.indexOf(e[0]));case ot.ACK:return Array.isArray(e);case ot.CONNECT_ERROR:return"string"==typeof e||ut(e);default:return!1}}(t.type,t.data);var e}});function lt(t,e,s){return t.on(e,s),function(){t.off(e,s)}}const pt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ft extends w{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this.p=Object.assign({},s),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[lt(t,"open",this.onopen.bind(this)),lt(t,"packet",this.onpacket.bind(this)),lt(t,"error",this.onerror.bind(this)),lt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),"open"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,i,n;if(pt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(e),this;const r={type:ot.EVENT,data:e,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,s=e.pop();this.ut(t,s),r.id=t}const o=null===(i=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===i?void 0:i.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.st());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,e){var s;const i=null!==(s=this.flags.timeout)&&void 0!==s?s:this.p.ackTimeout;if(void 0===i)return void(this.acks[t]=e);const n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},i),r=(...t)=>{this.io.clearTimeoutFn(n),e.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...e){return new Promise((s,i)=>{const n=(t,e)=>t?i(t):s(e);n.withError=!0,e.push(n),this.emit(t,...e)})}ct(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const s={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...i)=>(this.et[0],null!==t?s.tryCount>this.p.retries&&(this.et.shift(),e&&e(t)):(this.et.shift(),e&&e(null,...i)),s.pending=!1,this.ft())),this.et.push(s),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const e=this.et[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this.dt(t)}):this.dt(this.auth)}dt(t){this.packet({type:ot.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this.wt()}wt(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 ot.EVENT:case ot.BINARY_EVENT:this.onevent(t);break;case ot.ACK:case ot.BINARY_ACK:this.onack(t);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this.gt&&this.gt.length){const e=this.gt.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&"string"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const e=this;let s=!1;return function(...i){s||(s=!0,e.packet({type:ot.ACK,id:t,data:i}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this.yt===e,this.yt=e,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.gt=this.gt||[],this.gt.push(t),this}prependAny(t){return this.gt=this.gt||[],this.gt.unshift(t),this}offAny(t){if(!this.gt)return this;if(t){const e=this.gt;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this.gt=[];return this}listenersAny(){return this.gt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const e=this.kt;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const e=this.kt.slice();for(const s of e)s.apply(this,t.data)}}}function yt(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}yt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+s:t-s}return 0|Math.min(t,this.max)},yt.prototype.reset=function(){this.attempts=0},yt.prototype.setMin=function(t){this.ms=t},yt.prototype.setMax=function(t){this.max=t},yt.prototype.setJitter=function(t){this.jitter=t};class mt extends w{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,T(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new yt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.ht="closed",this.uri=t;const i=e.parser||dt;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this.rt=!1!==e.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var e;return void 0===t?this.Ot:(this.Ot=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._t:(this._t=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this.jt:(this.jt=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this.Bt=t,this):this.Bt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf("open"))return this;this.engine=new Y(this.uri,this.opts);const e=this.engine,s=this;this.ht="opening",this.skipReconnect=!1;const i=lt(e,"open",function(){s.onopen(),t&&t()}),n=e=>{this.cleanup(),this.ht="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},r=lt(e,"error",n);if(!1!==this.Bt){const t=this.Bt,s=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(i),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht="open",this.emitReserved("open");const t=this.engine;this.subs.push(lt(t,"ping",this.onping.bind(this)),lt(t,"data",this.ondata.bind(this)),lt(t,"error",this.onerror.bind(this)),lt(t,"close",this.onclose.bind(this)),lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){k(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this.rt&&!s.active&&s.connect():(s=new ft(this,t,e),this.nsps[t]=s),s}vt(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return;this.xt()}lt(t){const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}xt(){this.skipReconnect=!0,this.ot=!1,this.onclose("forced close")}disconnect(){return this.xt()}onclose(t,e){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this.ht="closed",this.emitReserved("close",t,e),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{const e=this.backoff.duration();this.ot=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t.ot=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const gt={};function bt(t,e){"object"==typeof t&&(e=t,t=void 0);const s=function(t,e="",s){let i=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==s?s.protocol+"//"+t:"https://"+t),i=K(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const n=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(s&&s.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),i=s.source,n=s.id,r=s.path,o=gt[n]&&r in gt[n].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||o?a=new mt(i,e):(gt[n]||(gt[n]=new mt(i,e)),a=gt[n]),s.query&&!e.query&&(e.query=s.queryKey),a.socket(s.path,e)}Object.assign(bt,{Manager:mt,Socket:ft,io:bt,connect:bt});
13
+ */const t=Object.create(null);t.open="0",t.close="1",t.ping="2",t.pong="3",t.message="4",t.upgrade="5",t.noop="6";const e=Object.create(null);Object.keys(t).forEach(s=>{e[t[s]]=s});const s={type:"error",data:"parser error"},i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,r=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:e,data:s},o,c)=>i&&s instanceof Blob?o?c(s):a(s,c):n&&(s instanceof ArrayBuffer||r(s))?o?c(s):a(new Blob([s]),c):c(t[e]+(s||"")),a=(t,e)=>{const s=new FileReader;return s.onload=function(){const t=s.result.split(",")[1];e("b"+(t||""))},s.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let h;const u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)u["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t)]=t;const d="function"==typeof ArrayBuffer,l=(t,i)=>{if("string"!=typeof t)return{type:"message",data:f(t,i)};const n=t.charAt(0);return"b"===n?{type:"message",data:p(t.substring(1),i)}:e[n]?t.length>1?{type:e[n],data:t.substring(1)}:{type:e[n]}:s},p=(t,e)=>{if(d){const s=(t=>{let e,s,i,n,r,o=.75*t.length,a=t.length,c=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);const h=new ArrayBuffer(o),d=new Uint8Array(h);for(e=0;e<a;e+=4)s=u[t.charCodeAt(e)],i=u[t.charCodeAt(e+1)],n=u[t.charCodeAt(e+2)],r=u[t.charCodeAt(e+3)],d[c++]=s<<2|i>>4,d[c++]=(15&i)<<4|n>>2,d[c++]=(3&n)<<6|63&r;return h})(t);return f(s,e)}return{base64:!0,data:t}},f=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,y=String.fromCharCode(30);function m(){return new TransformStream({transform(t,e){!function(t,e){i&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(e):n&&(t.data instanceof ArrayBuffer||r(t.data))?e(c(t.data)):o(t,!1,t=>{h||(h=new TextEncoder),e(h.encode(t))})}(t,s=>{const i=s.length;let n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,i)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(n[0]|=128),e.enqueue(n),e.enqueue(s)})}})}let g;function b(t){return t.reduce((t,e)=>t+e.length,0)}function v(t,e){if(t[0].length===e)return t.shift();const s=new Uint8Array(e);let i=0;for(let n=0;n<e;n++)s[n]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),s}function w(t){if(t)return function(t){for(var e in w.prototype)t[e]=w.prototype[e];return t}(t)}w.prototype.on=w.prototype.addEventListener=function(t,e){return this.t=this.t||{},(this.t["$"+t]=this.t["$"+t]||[]).push(e),this},w.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},w.prototype.off=w.prototype.removeListener=w.prototype.removeAllListeners=w.prototype.removeEventListener=function(t,e){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var s,i=this.t["$"+t];if(!i)return this;if(1==arguments.length)return delete this.t["$"+t],this;for(var n=0;n<i.length;n++)if((s=i[n])===e||s.fn===e){i.splice(n,1);break}return 0===i.length&&delete this.t["$"+t],this},w.prototype.emit=function(t){this.t=this.t||{};for(var e=new Array(arguments.length-1),s=this.t["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(s){i=0;for(var n=(s=s.slice(0)).length;i<n;++i)s[i].apply(this,e)}return this},w.prototype.emitReserved=w.prototype.emit,w.prototype.listeners=function(t){return this.t=this.t||{},this.t["$"+t]||[]},w.prototype.hasListeners=function(t){return!!this.listeners(t).length};const k="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function E(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}const O=R.setTimeout,A=R.clearTimeout;function T(t,e){e.useNativeTimers?(t.setTimeoutFn=O.bind(R),t.clearTimeoutFn=A.bind(R)):(t.setTimeoutFn=R.setTimeout.bind(R),t.clearTimeoutFn=R.clearTimeout.bind(R))}function C(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class S extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class N extends w{constructor(t){super(),this.writable=!1,T(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,s){return super.emitReserved("error",new S(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=l(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this.i()+this.o()+this.opts.path+this.h(e)}i(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}h(t){const e=function(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}(t);return e.length?"?"+e:""}}class B extends N{constructor(){super(...arguments),this.u=!1}get name(){return"polling"}doOpen(){this.l()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}l(){this.u=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const s=t.split(y),i=[];for(let t=0;t<s.length;t++){const n=l(s[t],e);if(i.push(n),"error"===n.type)break}return i})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this.u=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const s=t.length,i=new Array(s);let n=0;t.forEach((t,r)=>{o(t,!1,t=>{i[r]=t,++n===s&&e(i.join(y))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=C()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let x=!1;try{x="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const U=x;function I(){}class j extends B{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}let L=class t extends w{constructor(t,e,s){super(),this.createRequest=t,T(this,s),this.p=s,this.v=s.method||"GET",this.m=e,this.k=void 0!==s.data?s.data:null,this.A()}A(){var e;const s=E(this.p,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(e){}if("POST"===this.v)try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{i.setRequestHeader("Accept","*/*")}catch(e){}null===(e=this.p.cookieJar)||void 0===e||e.addCookies(i),"withCredentials"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader("set-cookie"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn(()=>{this.j("number"==typeof i.status?i.status:0)},0))},i.send(this.k)}catch(e){return void this.setTimeoutFn(()=>{this.j(e)},0)}"undefined"!=typeof document&&(this.B=t.requestsCount++,t.requests[this.B]=this)}j(t){this.emitReserved("error",t,this.O),this.C(!0)}C(e){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=I,e)try{this.O.abort()}catch(e){}"undefined"!=typeof document&&delete t.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.C())}abort(){this.C()}};function D(){for(let t in L.requests)L.requests.hasOwnProperty(t)&&L.requests[t].abort()}L.requestsCount=0,L.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",D):"function"==typeof addEventListener&&addEventListener("onpagehide"in R?"pagehide":"unload",D,!1));const q=function(){const t=_({xdomain:!1});return t&&null!==t.responseType}();function _(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||U))return new XMLHttpRequest}catch(t){}if(!e)try{return new(R[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const M="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class $ extends N{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,s=M?{}:E(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],i=e===t.length-1;o(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}i&&k(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=C()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const V=R.WebSocket||R.MozWebSocket;const P={websocket:class extends ${createSocket(t,e,s){return M?new V(t,e,s):e?new V(t,e):new V(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends N{get name(){return"webtransport"}doOpen(){try{this.N=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this.N.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.N.ready.then(()=>{this.N.createBidirectionalStream().then(t=>{const e=function(t,e){g||(g=new TextDecoder);const i=[];let n=0,r=-1,o=!1;return new TransformStream({transform(a,c){for(i.push(a);;){if(0===n){if(b(i)<1)break;const t=v(i,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(b(i)<2)break;const t=v(i,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(b(i)<8)break;const t=v(i,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(s);break}r=o*Math.pow(2,32)+e.getUint32(4),n=3}else{if(b(i)<r)break;const t=v(i,r);c.enqueue(l(o?t:g.decode(t),e)),n=0}if(0===r||r>t){c.enqueue(s);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),n=m();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{i.read().then(({done:t,value:e})=>{t||(this.onPacket(e),r())}).catch(t=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.U.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],i=e===t.length-1;this.U.write(s).then(()=>{i&&k(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}},polling:class extends j{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=q&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new L(_,this.uri(),t)}}},F=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,H=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function K(t){if(t.length>8e3)throw"URI too long";const e=t,s=t.indexOf("["),i=t.indexOf("]");-1!=s&&-1!=i&&(t=t.substring(0,s)+t.substring(s,i).replace(/:/g,";")+t.substring(i,t.length));let n=F.exec(t||""),r={},o=14;for(;o--;)r[H[o]]=n[o]||"";return-1!=s&&-1!=i&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=function(t,e){const s=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||s.splice(0,1),"/"==e.slice(-1)&&s.splice(s.length-1,1),s}(0,r.path),r.queryKey=function(t,e){const s={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,i){e&&(s[e]=i)}),s}(0,r.query),r}const z="function"==typeof addEventListener&&"function"==typeof removeEventListener,W=[];z&&addEventListener("offline",()=>{W.forEach(t=>t())},!1);class Y extends w{constructor(t,e={}){var s,i;if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this.P=0,this.D=[],this.M=-1,this.S=-1,this.L=-1,this.R=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const s=K(t);e.hostname=s.host,e.secure="https"===s.protocol||"wss"===s.protocol,e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=K(e.host).host);if(T(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),e.transportImplementations&&e.transports)throw new Error("specifying both 'transportImplementations' and 'transports' options is not supported");e.transportImplementations||(null===(s=e.transports)||void 0===s?void 0:s.length)&&"function"==typeof e.transports[0]?(this.transports=[],this.I=Object.create(null),(null!==(i=e.transportImplementations)&&void 0!==i?i:e.transports).forEach(t=>{const e=t.prototype.name;this.transports.push(e),this.I[e]=t})):(this.transports=e.transports?[...e.transports]:["polling","websocket","webtransport"],this.I=P),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},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},s=t.split("&");for(let t=0,i=s.length;t<i;t++){let i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}(this.opts.query)),z&&(this.opts.closeOnBeforeunload&&(this.F=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.F,!1)),"localhost"!==this.hostname&&(this.$=()=>{this.V("transport close",{description:"network connection lost"})},W.push(this.$))),this.opts.withCredentials&&(this.W=void 0),this.q()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.I[t](s)}q(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.H.bind(this)).on("packet",this.X.bind(this)).on("error",this.j.bind(this)).on("close",t=>this.V("transport close",t))}J(t){let e=this.createTransport(t),s=!1;Y.priorWebsocketSuccess=!1;const i=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!s)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Y.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(h(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function n(){s||(s=!0,h(),e.close(),e=null)}const r=t=>{const s=new Error("probe error: "+t);s.transport=e.name,n(),this.emitReserved("upgradeError",s)};function o(){r("transport closed")}function a(){r("socket closed")}function c(t){e&&t.name!==e.name&&n()}const h=()=>{e.removeListener("open",i),e.removeListener("error",r),e.removeListener("close",o),this.off("close",a),this.off("upgrading",c)};e.once("open",i),e.once("error",r),e.once("close",o),this.once("close",a),this.once("upgrading",c),-1!==this.D.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onOpen(){if(this.readyState="open",Y.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.D.length;t++)this.J(this.D[t])}X(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.G("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this.K();break;case"error":const e=new Error("server error");e.code=t.data,this.j(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=this.Y(t.upgrades),this.M=t.pingInterval,this.S=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.K()}K(){this.clearTimeoutFn(this.Z);const t=this.M+this.S;this.R=Date.now()+t,this.Z=this.setTimeoutFn(()=>{this.V("ping timeout")},t),this.opts.autoUnref&&this.Z.unref()}H(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.tt();this.transport.send(t),this.P=t.length,this.emitReserved("flush")}}tt(){if(!(this.L&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+="string"==typeof(e=i)?function(t){let e=0,s=0;for(let i=0,n=t.length;i<n;i++)e=t.charCodeAt(i),e<128?s+=1:e<2048?s+=2:e<55296||e>=57344?s+=3:(i++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))),s>0&&t>this.L)return this.writeBuffer.slice(0,s);t+=2}var e;return this.writeBuffer}st(){if(!this.R)return!0;const t=Date.now()>this.R;return t&&(this.R=0,k(()=>{this.V("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this.G("message",t,e,s),this}send(t,e,s){return this.G("message",t,e,s),this}G(t,e,s,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof s&&(i=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:t,data:e,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.V("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this.q();this.emitReserved("error",t),this.V("transport error",t)}V(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this.Z),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),z&&(this.F&&removeEventListener("beforeunload",this.F,!1),this.$)){const t=W.indexOf(this.$);-1!==t&&W.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.P=0}}Y(t){const e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}Y.protocol=4;const J="function"==typeof ArrayBuffer,G=Object.prototype.toString,X="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===G.call(Blob),Z="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===G.call(File);function Q(t){return J&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||X&&t instanceof Blob||Z&&t instanceof File}function tt(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,s=t.length;e<s;e++)if(tt(t[e]))return!0;return!1}if(Q(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return tt(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&tt(t[e]))return!0;return!1}function et(t){const e=[],s=t.data,i=t;return i.data=st(s,e),i.attachments=e.length,{packet:i,buffers:e}}function st(t,e,s){if(!t)return t;if(Q(t)){const s={_placeholder:!0,num:e.length};return e.push(t),s}if(Array.isArray(t)){const s=new Array(t.length);for(let i=0;i<t.length;i++)s[i]=st(t[i],e);return s}if("object"==typeof t&&!(t instanceof Date)){if(t.toJSON&&"function"==typeof t.toJSON&&!s)return st(t.toJSON(),e,!0);const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=st(t[s],e));return i}return t}function it(t,e){return t.data=nt(t.data,e),delete t.attachments,t}function nt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let s=0;s<t.length;s++)t[s]=nt(t[s],e);else if("object"==typeof t)for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(t[s]=nt(t[s],e));return t}const rt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ot;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(ot||(ot={}));class at extends w{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const s=e.type===ot.BINARY_EVENT;s||e.type===ot.BINARY_ACK?(e.type=s?ot.EVENT:ot.ACK,this.reconstructor=new ct(e)):super.emitReserved("decoded",e)}else{if(!Q(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(void 0===ot[s.type])throw new Error("unknown packet type "+s.type);if(s.type===ot.BINARY_EVENT||s.type===ot.BINARY_ACK){const i=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const n=t.substring(i,e);if(n!=Number(n)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const r=Number(n);if(!ht(r)||r<1)throw new Error("Illegal attachments");if(r>this.opts.maxAttachments)throw new Error("too many attachments");s.attachments=r}if("/"===t.charAt(e+1)){const i=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);s.nsp=t.substring(i,e)}else s.nsp="/";const i=t.charAt(e+1);if(""!==i&&Number(i)==i){const i=e+1;for(;++e;){const s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){const i=this.tryParse(t.substr(e));if(!at.isPayloadValid(s.type,i))throw new Error("invalid payload");s.data=i}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case ot.CONNECT:return ut(e);case ot.DISCONNECT:return void 0===e;case ot.CONNECT_ERROR:return"string"==typeof e||ut(e);case ot.EVENT:case ot.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===rt.indexOf(e[0]));case ot.ACK:case ot.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ct{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=it(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ht=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function ut(t){return"[object Object]"===Object.prototype.toString.call(t)}var dt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return ot},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==ot.EVENT&&t.type!==ot.ACK||!tt(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===ot.EVENT?ot.BINARY_EVENT:ot.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==ot.BINARY_EVENT&&t.type!==ot.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=et(t),s=this.encodeAsString(e.packet),i=e.buffers;return i.unshift(s),i}},Decoder:at,isPacketValid:function(t){return"string"==typeof t.nsp&&(void 0===(e=t.id)||ht(e))&&function(t,e){switch(t){case ot.CONNECT:return void 0===e||ut(e);case ot.DISCONNECT:return void 0===e;case ot.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===rt.indexOf(e[0]));case ot.ACK:return Array.isArray(e);case ot.CONNECT_ERROR:return"string"==typeof e||ut(e);default:return!1}}(t.type,t.data);var e}});function lt(t,e,s){return t.on(e,s),function(){t.off(e,s)}}const pt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ft extends w{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this.p=Object.assign({},s),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[lt(t,"open",this.onopen.bind(this)),lt(t,"packet",this.onpacket.bind(this)),lt(t,"error",this.onerror.bind(this)),lt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),"open"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,i,n;if(pt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(e),this;const r={type:ot.EVENT,data:e,options:{}};if(r.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++,s=e.pop();this.ut(t,s),r.id=t}const o=null===(i=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===i?void 0:i.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.st());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,e){var s;const i=null!==(s=this.flags.timeout)&&void 0!==s?s:this.p.ackTimeout;if(void 0===i)return void(this.acks[t]=e);const n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))},i),r=(...t)=>{this.io.clearTimeoutFn(n),e.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...e){return new Promise((s,i)=>{const n=(t,e)=>t?i(t):s(e);n.withError=!0,e.push(n),this.emit(t,...e)})}ct(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const s={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...i)=>(this.et[0],null!==t?s.tryCount>this.p.retries&&(this.et.shift(),e&&e(t)):(this.et.shift(),e&&e(null,...i)),s.pending=!1,this.ft())),this.et.push(s),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const e=this.et[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this.dt(t)}):this.dt(this.auth)}dt(t){this.packet({type:ot.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this.wt()}wt(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 ot.EVENT:case ot.BINARY_EVENT:this.onevent(t);break;case ot.ACK:case ot.BINARY_ACK:this.onack(t);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this.gt&&this.gt.length){const e=this.gt.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&"string"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const e=this;let s=!1;return function(...i){s||(s=!0,e.packet({type:ot.ACK,id:t,data:i}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this.yt===e,this.yt=e,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.gt=this.gt||[],this.gt.push(t),this}prependAny(t){return this.gt=this.gt||[],this.gt.unshift(t),this}offAny(t){if(!this.gt)return this;if(t){const e=this.gt;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this.gt=[];return this}listenersAny(){return this.gt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const e=this.kt;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const e=this.kt.slice();for(const s of e)s.apply(this,t.data)}}}function yt(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}yt.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+s:t-s}return 0|Math.min(t,this.max)},yt.prototype.reset=function(){this.attempts=0},yt.prototype.setMin=function(t){this.ms=t},yt.prototype.setMax=function(t){this.max=t},yt.prototype.setJitter=function(t){this.jitter=t};class mt extends w{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,T(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=e.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new yt({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.ht="closed",this.uri=t;const i=e.parser||dt;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this.rt=!1!==e.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var e;return void 0===t?this.Ot:(this.Ot=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._t:(this._t=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this.jt:(this.jt=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this.Bt=t,this):this.Bt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf("open"))return this;this.engine=new Y(this.uri,this.opts);const e=this.engine,s=this;this.ht="opening",this.skipReconnect=!1;const i=lt(e,"open",function(){s.onopen(),t&&t()}),n=e=>{this.cleanup(),this.ht="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},r=lt(e,"error",n);if(!1!==this.Bt){const t=this.Bt,s=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(i),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht="open",this.emitReserved("open");const t=this.engine;this.subs.push(lt(t,"ping",this.onping.bind(this)),lt(t,"data",this.ondata.bind(this)),lt(t,"error",this.onerror.bind(this)),lt(t,"close",this.onclose.bind(this)),lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){k(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this.rt&&!s.active&&s.connect():(s=new ft(this,t,e),this.nsps[t]=s),s}vt(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return;this.xt()}lt(t){const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}xt(){this.skipReconnect=!0,this.ot=!1,this.onclose("forced close")}disconnect(){return this.xt()}onclose(t,e){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this.ht="closed",this.emitReserved("close",t,e),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved("reconnect_failed"),this.ot=!1;else{const e=this.backoff.duration();this.ot=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t.ot=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const gt={};function bt(t,e){"object"==typeof t&&(e=t,t=void 0);const s=function(t,e="",s){let i=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==s?s.protocol+"//"+t:"https://"+t),i=K(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const n=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(s&&s.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),i=s.source,n=s.id,r=s.path,o=gt[n]&&r in gt[n].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||o?a=new mt(i,e):(gt[n]||(gt[n]=new mt(i,e)),a=gt[n]),s.query&&!e.query&&(e.query=s.queryKey),a.socket(s.path,e)}Object.assign(bt,{Manager:mt,Socket:ft,io:bt,connect:bt});
14
14
  /*!
15
15
  * Copyright © 2025–2026 Solomei AI SRL. All rights reserved.
16
16
  *
@@ -18,5 +18,5 @@
18
18
  * See LICENSE.md for the full terms.
19
19
  *
20
20
  */
21
- const vt="chapter-event",wt="error",kt="server-response",Rt="client-ready",Et="user-interaction",Ot=4,At={debug:0,info:1,warn:2,error:3,silent:4},Tt=new class{config={enabled:!1,level:"info",prefix:"[Thamyr]"};debug=(...t)=>{this.log("debug",...t)};info=(...t)=>{this.log("info",...t)};warn=(...t)=>{this.log("warn",...t)};error=(...t)=>{this.log("error",...t)};log(t,...e){if(!(this.config.enabled&&At[t]>=At[this.config.level]))return;const{prefix:s}=this.config,i=void 0===s||""===s?e:[s,...e];console[t](...i)}configure(t){this.config={...this.config,...t}}getConfig(){return{...this.config}}};function Ct(){const t="undefined"==typeof crypto?void 0:crypto;if("function"==typeof t?.randomUUID)return t.randomUUID();const e=new Uint8Array(16);if("function"==typeof t?.getRandomValues)t.getRandomValues(e);else for(let t=0;t<16;t++)e[t]=Math.floor(256*Math.random());e[6]=15&e[6]|64,e[8]=63&e[8]|128;const s=[...e].map(t=>t.toString(16).padStart(2,"0"));return[s.slice(0,4).join(""),s.slice(4,6).join(""),s.slice(6,8).join(""),s.slice(8,10).join(""),s.slice(10,16).join("")].join("-")}var St,Nt;!function(t){t.GET_STORY="get-story",t.CREATE_ROUND="create-round",t.RESET_STORY="reset-story",t.BACK_FROM_ROUND="back-from-round",t.SHARE_STORY="share-story",t.GET_SHARED_STORY="get-shared-story"}(St||(St={})),function(t){t.ROUND_CREATED="round-created",t.ROUND_EVENT="round-event",t.ROUND_COMPLETED="round-completed",t.ERROR="error"}(Nt||(Nt={}));const Bt={productSelector:"[data-product-id]",blockSelector:"[data-block-id]",maxTrackedElements:40,minVisibilityRatio:.5};class xt{elements=new Map;elementRefs=new Map;elementKeys=new WeakMap;blocks=new Map;blockRefs=new Map;blockKeys=new WeakMap;started=!1;config;constructor(t={}){const e=t.minVisibilityRatio??Bt.minVisibilityRatio;this.config={productSelector:t.productSelector??Bt.productSelector,blockSelector:t.blockSelector??Bt.blockSelector,maxTrackedElements:t.maxTrackedElements??Bt.maxTrackedElements,minVisibilityRatio:Math.min(1,Math.max(0,e))}}rescanUi(){if(!this.canUseDom())return;let t,e;try{t=document.querySelectorAll(this.config.productSelector),e=document.querySelectorAll(this.config.blockSelector)}catch(t){return void Tt.warn("UI Observer: invalid selector, skipping rescan:",t)}const s=Date.now();for(const e of t){const t=this.normalizeRect(e.getBoundingClientRect()),i=this.calculateVisibilityRatio(t);this.syncTrackedElement(e,{bounds:t,isVisible:i>=this.config.minVisibilityRatio,visibilityRatio:i,observedAt:s})}for(const t of e){const e=this.normalizeRect(t.getBoundingClientRect()),i=this.calculateVisibilityRatio(e);this.syncTrackedBlock(t,{bounds:e,isVisible:i>=this.config.minVisibilityRatio,visibilityRatio:i,observedAt:s})}this.pruneTrackedElements(),this.pruneTrackedBlocks()}pruneTrackedElements(){if(this.elements.size<=this.config.maxTrackedElements)return;const t=[...this.elements].sort(([,t],[,e])=>{const s=t.visibilityRatio-e.visibilityRatio;return 0===s||Number.isNaN(s)?t.observedAt-e.observedAt:s}).slice(0,this.elements.size-this.config.maxTrackedElements);for(const[e]of t)this.elements.delete(e),this.elementRefs.delete(e)}pruneTrackedBlocks(){if(this.blocks.size<=this.config.maxTrackedElements)return;const t=[...this.blocks].sort(([,t],[,e])=>{const s=t.visibilityRatio-e.visibilityRatio;return 0===s||Number.isNaN(s)?t.observedAt-e.observedAt:s}).slice(0,this.blocks.size-this.config.maxTrackedElements);for(const[e]of t)this.blocks.delete(e),this.blockRefs.delete(e)}syncTrackedElement(t,e){const s=this.resolveElementId(t),i=this.resolveBlockId(t),n=this.createTrackingKey(s,i),r=this.elementKeys.get(t);void 0!==r&&""!==r&&r!==n&&(this.elements.delete(r),this.elementRefs.delete(r)),this.elementKeys.set(t,n),this.elementRefs.set(n,t),this.elements.set(n,{id:s,blockId:i,trackingKey:n,...e})}syncTrackedBlock(t,e){const s=this.resolveTrackedBlockId(t),i=this.blockKeys.get(t),n=s;void 0!==i&&""!==i&&i!==n&&(this.blocks.delete(i),this.blockRefs.delete(i)),this.blockKeys.set(t,n),this.blockRefs.set(n,t),this.blocks.set(n,{id:s,...e})}resolveElementId(t){return[t.dataset.productId,t.dataset.productid,t.dataset.sku,t.id].find(t=>void 0!==t&&""!==t)??`${t.tagName}-${t.dataset.productId??this.elements.size}`}resolveBlockId(t){let e;try{e=t.closest(this.config.blockSelector)??void 0}catch{return}return e instanceof HTMLElement?this.resolveTrackedBlockId(e):void 0}resolveTrackedBlockId(t){return[t.dataset.blockId,t.dataset.blockid,t.id].find(t=>void 0!==t&&""!==t)??`${t.tagName}-${t.dataset.blockId??this.blocks.size}`}createTrackingKey(t,e){return void 0===e||""===e?t:`${t}::${e}`}normalizeRect(t){return{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,left:t.left,right:t.right,bottom:t.bottom}}calculateVisibilityRatio(t){const e=Math.max(0,Math.min(t.right,window.innerWidth)-Math.max(t.left,0))*Math.max(0,Math.min(t.bottom,window.innerHeight)-Math.max(t.top,0)),s=t.width*t.height;if(s<=0)return 0;const i=window.innerWidth*window.innerHeight,n=i>0?Math.min(s,i):s;return Math.min(1,Math.max(0,e/n))}canUseDom(){return void 0!==globalThis.window&&"undefined"!=typeof document}start(){!this.started&&this.canUseDom()&&(this.started=!0)}stop(){this.started&&(this.started=!1,this.elements.clear(),this.elementRefs.clear(),this.blocks.clear(),this.blockRefs.clear())}getSnapshot(){if(!this.canUseDom())return;this.rescanUi();const t=[],e=[],s=Date.now();for(const[e,s]of this.elements){const i=this.elementRefs.get(e);i?.isConnected?s.visibilityRatio<=0||t.push({blockId:s.blockId,element:{id:s.id,bounds:s.bounds,isVisible:s.visibilityRatio>=this.config.minVisibilityRatio,visibilityRatio:s.visibilityRatio}}):(this.elements.delete(e),this.elementRefs.delete(e))}for(const[t,s]of this.blocks){const i=this.blockRefs.get(t);i?.isConnected?s.visibilityRatio<this.config.minVisibilityRatio||e.push(s.id):(this.blocks.delete(t),this.blockRefs.delete(t))}const i=t.slice(0,this.config.maxTrackedElements);return{timestamp:s,viewport:{width:window.innerWidth,height:window.innerHeight},blockIds:[...new Set([...e,...i.flatMap(t=>t.blockId??[])])],elements:i.map(t=>t.element)}}}class Ut{socket;serverResponseListeners=new Set;connectionStatusListeners=new Set;errorListeners=new Set;uiObserver;uiObserverConfig=Bt;handshakeRetryAttempts=0;handshakeRetryTimer;setupEventListeners(){this.socket&&(this.socket.on("connect",()=>{Tt.debug("Connected to Callimacus"),this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.updateConnectionStatus(!0),this.socket?.emit(Rt)}),this.socket.on("disconnect",()=>{Tt.info("Disconnected from Callimacus"),this.updateConnectionStatus(!1)}),this.socket.on("connect_error",t=>{this.updateConnectionStatus(!1);const e=function(t,e){return e?void 0:function(t){const{data:e}=t;if("object"!=typeof e||null===e)return;const{code:s,reason:i}=e;return"number"==typeof s?{code:s,..."string"==typeof i&&{reason:i}}:void 0}(t)??{code:0}}(t,this.socket?.active??!0);e&&(Tt.error("Connection refused by Callimacus:",t.message,e.reason??""),this.notifyRejection(e,t.message),this.scheduleHandshakeRetry(e.code))}),this.socket.on(wt,t=>{Tt.error("Received error from Callimacus:",t),this.notifyErrorListeners(t)}),this.socket.io.on("reconnect",t=>{Tt.info(`Reconnected to Callimacus after ${t} attempts`)}),this.socket.io.on("reconnect_attempt",t=>{Tt.info(`Attempting to reconnect: attempt ${t}`)}),this.socket.io.on("reconnect_error",t=>{Tt.error("Reconnection error:",t)}),this.socket.io.on("reconnect_failed",()=>{Tt.error("Failed to reconnect to Callimacus service!"),this.updateConnectionStatus(!1)}),this.socket.on(kt,t=>{this.notifyServerResponseListeners(t)}))}notifyServerResponseListeners(t){this.serverResponseListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in server response listener:",t)}})}updateConnectionStatus(t){this.connectionStatusListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in connection status listener:",t)}})}notifyRejection(t,e){this.notifyErrorListeners({code:t.code,message:e,...void 0!==t.reason&&{reason:t.reason}})}scheduleHandshakeRetry(t){if(!this.socket)return;if(this.clearHandshakeRetry(),!function(t,e){return t>=500&&e<3}(t,this.handshakeRetryAttempts))return void(t>=500&&(Tt.error("Giving up on the Callimacus connection after 3 retries"),this.notifyRejection({code:t,reason:"retries_exhausted"},"Connection failed after 3 retries; call connect() to try again")));const e=2**(this.handshakeRetryAttempts+1);this.handshakeRetryAttempts+=1,Tt.info(`Retrying Callimacus connection in ${e}s (attempt ${this.handshakeRetryAttempts}/3)`),this.handshakeRetryTimer=setTimeout(()=>{this.socket?.connect()},1e3*e)}clearHandshakeRetry(){void 0!==this.handshakeRetryTimer&&(clearTimeout(this.handshakeRetryTimer),this.handshakeRetryTimer=void 0)}notifyErrorListeners(t){this.errorListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in error listener:",t)}})}async getLocation(){if("undefined"!=typeof navigator&&"function"==typeof navigator.geolocation?.getCurrentPosition)return new Promise(t=>{navigator.geolocation.getCurrentPosition(e=>{t(e)},()=>{t(void 0)})})}enrichPayloadWithUiContext(t){try{this.ensureUiObserver();const e=this.uiObserver?.getSnapshot();return e?{...t,context:{...t.context,uiSnapshot:e}}:t}catch(e){return Tt.error("Error enriching payload with UI context:",e),t}}ensureUiObserver(){"undefined"!=typeof window&&"undefined"!=typeof document&&this.uiObserverConfig.enabled&&(this.uiObserver??=new xt(this.uiObserverConfig),this.uiObserver.start())}socketEndpoint(t){const e=new URL(t),s=new URL("thamyr",e).pathname;return{origin:e.origin,path:s}}connect(t="wss://localhost:4000",e,s){this.socket&&(Tt.warn("Already connected to Thamyr. Disconnecting first...."),this.disconnect());const i=this.socketEndpoint(t);let n;"undefined"!=typeof window&&void 0!==globalThis.location&&(n=globalThis.location.href);const r={...void 0!==n&&""!==n&&{referrer:n},...s};Tt.info("Connecting to Thamyr at",i),this.socket=bt(i.origin,{path:i.path,transports:["websocket","polling"],tryAllTransports:!0,extraHeaders:e,auth:r}),this.setupEventListeners(),this.ensureUiObserver()}disconnect(){this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.socket&&(this.socket.disconnect(),this.socket=void 0,this.uiObserver?.stop(),this.uiObserver=void 0,this.updateConnectionStatus(!1),Tt.info("Disconnected from Callimacus"))}configureUiObserver(t){if(!t)return this.uiObserver?.stop(),this.uiObserver=void 0,void(this.uiObserverConfig={...Bt,enabled:!1});const e=t.enabled??(void 0!==t.productSelector||void 0!==t.blockSelector||void 0!==t.maxTrackedElements||void 0!==t.minVisibilityRatio||this.uiObserverConfig.enabled);if(this.uiObserverConfig={...this.uiObserverConfig,...t,enabled:e},"undefined"==typeof window||"undefined"==typeof document||!this.uiObserverConfig.enabled)return this.uiObserver?.stop(),void(this.uiObserver=void 0);this.uiObserver&&this.uiObserver.stop(),this.uiObserver=new xt(this.uiObserverConfig),this.uiObserver.start()}sendUserInteraction(t,e){if(!this.socket)return void Tt.error("Socket is not connected. Cannot send interaction.");if(t===St.BACK_FROM_ROUND&&void 0===e.chapterId)return void Tt.error("BACK_FROM_ROUND requires chapterId.");const s={type:t,payload:this.enrichPayloadWithUiContext(e)},i={id:Ct()};this.socket.emit(Et,{type:s.type,payload:s.payload},i.id)}async gatherClientInfo(){const t="undefined"==typeof navigator?void 0:navigator,e="undefined"==typeof window?void 0:window.screen;return{userAgent:t?.userAgent??"",language:t?.language??"",timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone,localTime:(new Date).toLocaleString(),screenResolution:void 0===e?"":`${e.width}x${e.height}`,location:await this.getLocation()}}onServerResponse(t){return this.serverResponseListeners.add(t),()=>{this.serverResponseListeners.delete(t)}}onConnectionStatus(t){return this.connectionStatusListeners.add(t),()=>{this.connectionStatusListeners.delete(t)}}onError(t){return this.errorListeners.add(t),()=>{this.errorListeners.delete(t)}}}const It="https://api.callimacus.ai",jt="/cart/add.js",Lt="[callimacus]";class Dt extends Error{code;constructor(t,e,s){super(e,s),this.name="CallimacusError",this.code=t}}function _t(t){if(void 0===t||""===t)return{};try{const e=JSON.parse(t);if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;console.warn(`${Lt} [data-callimacus-settings] must be a JSON object — using {}`)}catch(t){console.warn(`${Lt} [data-callimacus-settings] is not valid JSON — using {}`,t)}return{}}function qt(t,e){return void 0===t||""===t?e:t}function Mt(t){return`server_${t.code??"error"}`}function $t(t,e){t.dataset.callimacusState=e,t.setAttribute("aria-busy",String("loading"===e))}function Vt(t,e,s){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function Pt(t){const{data:e}=t;return"object"!=typeof e||null===e?[]:Object.values(e)}function Ft(t){let e=t.language;try{Intl.NumberFormat.supportedLocalesOf(e)}catch{console.warn(`${Lt} invalid data-language "${e}" — formatting with "en"`),e="en"}const s=new Map;return Object.freeze({locale:e,currency:t.currency,settings:t.settings,picks(t){for(const e of Pt(t)){if(!Array.isArray(e))continue;const t=e.filter(t=>Boolean(t?.fields?.["shopify-handle"]));if(t.length>0)return t}return[]},text(t){for(const e of Pt(t)){if("string"==typeof e&&""!==e.trim())return e.trim();const t=e?.text;if("string"==typeof t&&""!==t.trim())return t.trim()}},money(i){const n="number"==typeof i?i:i?.amount;if("number"!=typeof n)return"";const r="object"==typeof i?i?.currency:void 0,o=void 0===r||""===r?t.currency??"USD":r;return function(t){if(!s.has(t))try{s.set(t,new Intl.NumberFormat(e,{style:"currency",currency:t}))}catch{console.warn(`${Lt} invalid currency code "${t}" — showing bare amounts`),s.set(t,void 0)}return s.get(t)}(o)?.format(n)??n.toFixed(2)},productUrl(e){const s=e?.fields?.["shopify-handle"];if(void 0===s||""===s)return;return`${t.rootUrl.endsWith("/")?t.rootUrl.slice(0,-1):t.rootUrl}/products/${s}`},imageUrl(t,{width:e=800,index:s=0}={}){const i=t?.fields?.images?.[s]?.url;return void 0===i||""===i?void 0:`${i.split("?",1)[0]}?width=${e}`},variantId(t){const e=t?.fields?.variantTree?.variants??[],s=e.find(t=>t.orderable)??e[0];return void 0===s?.id?void 0:String(s.id).split("/").pop()},async addToCart(e,s=1){let i;try{i=await fetch(t.cartAddUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(e),quantity:s}]})})}catch(t){throw new Dt("cart_unreachable","Could not reach the cart",{cause:t})}const n=await i.json().catch(()=>(console.warn(`${Lt} cart response was not JSON (HTTP ${i.status})`),{}));if(!i.ok){const{description:t,message:e}=n??{};throw new Dt("cart_rejected",t??e??`Could not add to cart (HTTP ${i.status})`)}return document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:n})),n}})}function Ht(t){return function(){const t=globalThis;return t.callimacusRenderers??=[],t.callimacusRenderers}().find(e=>{const s=e;return s?.type===t&&"function"==typeof s.render})}function Kt(t,e={}){if(!Object.hasOwn(t.dataset,"callimacusReady")){t.dataset.callimacusReady="";try{!function(t,e){const{dataset:s}=t,i={clientId:s.clientId,endpoint:qt(s.endpoint,It),language:qt(s.language,"en"),currency:""===s.currency?void 0:s.currency,rootUrl:qt(s.rootUrl,"/"),cartAddUrl:qt(s.cartAddUrl,jt),settings:_t(t.querySelector("[data-callimacus-settings]")?.textContent??void 0)};if("true"===s.designMode)return void $t(t,"design-mode");if(void 0===i.clientId||""===i.clientId)return $t(t,"error"),void console.warn(`${Lt} no client id — leaving your markup in place`);t.querySelector("[data-callimacus-output]")||console.warn(`${Lt} no [data-callimacus-output] inside this mount — rendered blocks will replace the mount element's entire contents`);const{clientId:n}=i,r=e.roundTimeoutMs??45e3,o=Ft(i),a=new Set;let c,h,u=!1;function d(){return c||(c=e.transport??new Ut,c.onError(t=>{h=`${Mt(t)}: ${t.message??""}`,u||console.warn(`${Lt} transport error between rounds — ${h}`)}),c.connect(i.endpoint,{Authorization:`Bearer ${n}`},{token:n}),c)}async function l(t){const e=d();return new Promise((s,n)=>{function o(){clearTimeout(c),u(),d()}const c=setTimeout(()=>{o();n(new Dt("timeout",`Callimacus did not answer in time${void 0===h?"":` (last transport error: ${h})`}`))},r),u=e.onServerResponse(e=>{if(e.type!==vt)return;const i=e.chapter;if(i?.status!==Ot||a.has(i.id))return;const n=i.inputEvent?.data?.value;"string"==typeof n&&n!==t||(a.add(i.id),o(),s(i))}),d=e.onError(t=>{o(),n(new Dt(Mt(t),t.message??"Callimacus error",{cause:t}))});try{e.sendUserInteraction(St.CREATE_ROUND,{inputEvent:{type:"question",data:{value:t}},language:i.language})}catch(t){o(),n(new Dt("send_failed","Could not send the request",{cause:t}))}})}async function p(e){if(!u&&""!==e){u=!0,$t(t,"loading"),Vt(t,"callimacus:loading",{value:e});try{const s=await l(e),i=[...s.blocks??[]].sort((t,e)=>(t.priority??0)-(e.priority??0)),{fragment:n,rendered:r}=function(t,e){const s=document.createDocumentFragment();let i=0;for(const n of t){const t=Ht(n.type);if(t)try{const r=t.render(n,e);r instanceof Node?(s.append(r),i++):null!=r&&console.error(`${Lt} renderer for ${n.type} returned a non-Node value — skipped`)}catch(t){console.error(`${Lt} renderer for ${n.type} threw`,t)}else console.info(`${Lt} no renderer for ${n.type} — skipped`)}return{fragment:s,rendered:i}}(i,o);if(0===r)return $t(t,"empty"),void Vt(t,"callimacus:empty",{chapter:s});(t.querySelector("[data-callimacus-output]")??t).replaceChildren(n),$t(t,"ready"),Vt(t,"callimacus:ready",{chapter:s,blocks:i,rendered:r})}catch(e){$t(t,"error"),Vt(t,"callimacus:error",{error:e});const{code:s,message:i}=e instanceof Dt?e:{code:"error",message:String(e)};console.error(`${Lt} ${s}: ${i} — your markup is untouched`)}finally{u=!1}}}const f={ask:p,ctx:o,get state(){return t.dataset.callimacusState}};t.callimacus=f,Vt(t,"callimacus:mounted",f),void 0!==s.prompt&&""!==s.prompt&&p(s.prompt)}(t,e)}catch(e){$t(t,"error"),Vt(t,"callimacus:error",{error:e}),console.error(`${Lt} mount failed — your markup is untouched`,e)}}}function zt(t,e={}){for(const s of t.querySelectorAll("[data-callimacus]"))Kt(s,e)}function Wt(){document.addEventListener("shopify:section:load",t=>{t.target instanceof Element&&zt(t.target)}),zt(document)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Wt):Wt()}();
21
+ const vt="chapter-event",wt="error",kt="server-response",Rt="client-ready",Et="user-interaction",Ot=4,At={debug:0,info:1,warn:2,error:3,silent:4},Tt=new class{config={enabled:!1,level:"info",prefix:"[Thamyr]"};debug=(...t)=>{this.log("debug",...t)};info=(...t)=>{this.log("info",...t)};warn=(...t)=>{this.log("warn",...t)};error=(...t)=>{this.log("error",...t)};log(t,...e){if(!(this.config.enabled&&At[t]>=At[this.config.level]))return;const{prefix:s}=this.config,i=void 0===s||""===s?e:[s,...e];console[t](...i)}configure(t){this.config={...this.config,...t}}getConfig(){return{...this.config}}};function Ct(){const t="undefined"==typeof crypto?void 0:crypto;if("function"==typeof t?.randomUUID)return t.randomUUID();const e=new Uint8Array(16);if("function"==typeof t?.getRandomValues)t.getRandomValues(e);else for(let t=0;t<16;t++)e[t]=Math.floor(256*Math.random());e[6]=15&e[6]|64,e[8]=63&e[8]|128;const s=[...e].map(t=>t.toString(16).padStart(2,"0"));return[s.slice(0,4).join(""),s.slice(4,6).join(""),s.slice(6,8).join(""),s.slice(8,10).join(""),s.slice(10,16).join("")].join("-")}var St,Nt;!function(t){t.GET_STORY="get-story",t.CREATE_ROUND="create-round",t.RESET_STORY="reset-story",t.BACK_FROM_ROUND="back-from-round",t.SHARE_STORY="share-story",t.GET_SHARED_STORY="get-shared-story",t.SUGGEST="suggest"}(St||(St={})),function(t){t.ROUND_CREATED="round-created",t.ROUND_EVENT="round-event",t.ROUND_COMPLETED="round-completed",t.ERROR="error"}(Nt||(Nt={}));const Bt={productSelector:"[data-product-id]",blockSelector:"[data-block-id]",maxTrackedElements:40,minVisibilityRatio:.5};class xt{elements=new Map;elementRefs=new Map;elementKeys=new WeakMap;blocks=new Map;blockRefs=new Map;blockKeys=new WeakMap;started=!1;config;constructor(t={}){const e=t.minVisibilityRatio??Bt.minVisibilityRatio;this.config={productSelector:t.productSelector??Bt.productSelector,blockSelector:t.blockSelector??Bt.blockSelector,maxTrackedElements:t.maxTrackedElements??Bt.maxTrackedElements,minVisibilityRatio:Math.min(1,Math.max(0,e))}}rescanUi(){if(!this.canUseDom())return;let t,e;try{t=document.querySelectorAll(this.config.productSelector),e=document.querySelectorAll(this.config.blockSelector)}catch(t){return void Tt.warn("UI Observer: invalid selector, skipping rescan:",t)}const s=Date.now();for(const e of t){const t=this.normalizeRect(e.getBoundingClientRect()),i=this.calculateVisibilityRatio(t);this.syncTrackedElement(e,{bounds:t,isVisible:i>=this.config.minVisibilityRatio,visibilityRatio:i,observedAt:s})}for(const t of e){const e=this.normalizeRect(t.getBoundingClientRect()),i=this.calculateVisibilityRatio(e);this.syncTrackedBlock(t,{bounds:e,isVisible:i>=this.config.minVisibilityRatio,visibilityRatio:i,observedAt:s})}this.pruneTrackedElements(),this.pruneTrackedBlocks()}pruneTrackedElements(){if(this.elements.size<=this.config.maxTrackedElements)return;const t=[...this.elements].sort(([,t],[,e])=>{const s=t.visibilityRatio-e.visibilityRatio;return 0===s||Number.isNaN(s)?t.observedAt-e.observedAt:s}).slice(0,this.elements.size-this.config.maxTrackedElements);for(const[e]of t)this.elements.delete(e),this.elementRefs.delete(e)}pruneTrackedBlocks(){if(this.blocks.size<=this.config.maxTrackedElements)return;const t=[...this.blocks].sort(([,t],[,e])=>{const s=t.visibilityRatio-e.visibilityRatio;return 0===s||Number.isNaN(s)?t.observedAt-e.observedAt:s}).slice(0,this.blocks.size-this.config.maxTrackedElements);for(const[e]of t)this.blocks.delete(e),this.blockRefs.delete(e)}syncTrackedElement(t,e){const s=this.resolveElementId(t),i=this.resolveBlockId(t),n=this.createTrackingKey(s,i),r=this.elementKeys.get(t);void 0!==r&&""!==r&&r!==n&&(this.elements.delete(r),this.elementRefs.delete(r)),this.elementKeys.set(t,n),this.elementRefs.set(n,t),this.elements.set(n,{id:s,blockId:i,trackingKey:n,...e})}syncTrackedBlock(t,e){const s=this.resolveTrackedBlockId(t),i=this.blockKeys.get(t),n=s;void 0!==i&&""!==i&&i!==n&&(this.blocks.delete(i),this.blockRefs.delete(i)),this.blockKeys.set(t,n),this.blockRefs.set(n,t),this.blocks.set(n,{id:s,...e})}resolveElementId(t){return[t.dataset.productId,t.dataset.productid,t.dataset.sku,t.id].find(t=>void 0!==t&&""!==t)??`${t.tagName}-${t.dataset.productId??this.elements.size}`}resolveBlockId(t){let e;try{e=t.closest(this.config.blockSelector)??void 0}catch{return}return e instanceof HTMLElement?this.resolveTrackedBlockId(e):void 0}resolveTrackedBlockId(t){return[t.dataset.blockId,t.dataset.blockid,t.id].find(t=>void 0!==t&&""!==t)??`${t.tagName}-${t.dataset.blockId??this.blocks.size}`}createTrackingKey(t,e){return void 0===e||""===e?t:`${t}::${e}`}normalizeRect(t){return{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,left:t.left,right:t.right,bottom:t.bottom}}calculateVisibilityRatio(t){const e=Math.max(0,Math.min(t.right,window.innerWidth)-Math.max(t.left,0))*Math.max(0,Math.min(t.bottom,window.innerHeight)-Math.max(t.top,0)),s=t.width*t.height;if(s<=0)return 0;const i=window.innerWidth*window.innerHeight,n=i>0?Math.min(s,i):s;return Math.min(1,Math.max(0,e/n))}canUseDom(){return void 0!==globalThis.window&&"undefined"!=typeof document}start(){!this.started&&this.canUseDom()&&(this.started=!0)}stop(){this.started&&(this.started=!1,this.elements.clear(),this.elementRefs.clear(),this.blocks.clear(),this.blockRefs.clear())}getSnapshot(){if(!this.canUseDom())return;this.rescanUi();const t=[],e=[],s=Date.now();for(const[e,s]of this.elements){const i=this.elementRefs.get(e);i?.isConnected?s.visibilityRatio<=0||t.push({blockId:s.blockId,element:{id:s.id,bounds:s.bounds,isVisible:s.visibilityRatio>=this.config.minVisibilityRatio,visibilityRatio:s.visibilityRatio}}):(this.elements.delete(e),this.elementRefs.delete(e))}for(const[t,s]of this.blocks){const i=this.blockRefs.get(t);i?.isConnected?s.visibilityRatio<this.config.minVisibilityRatio||e.push(s.id):(this.blocks.delete(t),this.blockRefs.delete(t))}const i=t.slice(0,this.config.maxTrackedElements);return{timestamp:s,viewport:{width:window.innerWidth,height:window.innerHeight},blockIds:[...new Set([...e,...i.flatMap(t=>t.blockId??[])])],elements:i.map(t=>t.element)}}}class Ut{socket;serverResponseListeners=new Set;connectionStatusListeners=new Set;errorListeners=new Set;uiObserver;uiObserverConfig=Bt;handshakeRetryAttempts=0;handshakeRetryTimer;setupEventListeners(){this.socket&&(this.socket.on("connect",()=>{Tt.debug("Connected to Callimacus"),this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.updateConnectionStatus(!0),this.socket?.emit(Rt)}),this.socket.on("disconnect",()=>{Tt.info("Disconnected from Callimacus"),this.updateConnectionStatus(!1)}),this.socket.on("connect_error",t=>{this.updateConnectionStatus(!1);const e=function(t,e){return e?void 0:function(t){const{data:e}=t;if("object"!=typeof e||null===e)return;const{code:s,reason:i}=e;return"number"==typeof s?{code:s,..."string"==typeof i&&{reason:i}}:void 0}(t)??{code:0}}(t,this.socket?.active??!0);e&&(Tt.error("Connection refused by Callimacus:",t.message,e.reason??""),this.notifyRejection(e,t.message),this.scheduleHandshakeRetry(e.code))}),this.socket.on(wt,t=>{Tt.error("Received error from Callimacus:",t),this.notifyErrorListeners(t)}),this.socket.io.on("reconnect",t=>{Tt.info(`Reconnected to Callimacus after ${t} attempts`)}),this.socket.io.on("reconnect_attempt",t=>{Tt.info(`Attempting to reconnect: attempt ${t}`)}),this.socket.io.on("reconnect_error",t=>{Tt.error("Reconnection error:",t)}),this.socket.io.on("reconnect_failed",()=>{Tt.error("Failed to reconnect to Callimacus service!"),this.updateConnectionStatus(!1)}),this.socket.on(kt,t=>{this.notifyServerResponseListeners(t)}))}notifyServerResponseListeners(t){this.serverResponseListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in server response listener:",t)}})}updateConnectionStatus(t){this.connectionStatusListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in connection status listener:",t)}})}notifyRejection(t,e){this.notifyErrorListeners({code:t.code,message:e,...void 0!==t.reason&&{reason:t.reason}})}scheduleHandshakeRetry(t){if(!this.socket)return;if(this.clearHandshakeRetry(),!function(t,e){return t>=500&&e<3}(t,this.handshakeRetryAttempts))return void(t>=500&&(Tt.error("Giving up on the Callimacus connection after 3 retries"),this.notifyRejection({code:t,reason:"retries_exhausted"},"Connection failed after 3 retries; call connect() to try again")));const e=2**(this.handshakeRetryAttempts+1);this.handshakeRetryAttempts+=1,Tt.info(`Retrying Callimacus connection in ${e}s (attempt ${this.handshakeRetryAttempts}/3)`),this.handshakeRetryTimer=setTimeout(()=>{this.socket?.connect()},1e3*e)}clearHandshakeRetry(){void 0!==this.handshakeRetryTimer&&(clearTimeout(this.handshakeRetryTimer),this.handshakeRetryTimer=void 0)}notifyErrorListeners(t){this.errorListeners.forEach(e=>{try{e(t)}catch(t){Tt.error("Error in error listener:",t)}})}async getLocation(){if("undefined"!=typeof navigator&&"function"==typeof navigator.geolocation?.getCurrentPosition)return new Promise(t=>{navigator.geolocation.getCurrentPosition(e=>{t(e)},()=>{t(void 0)})})}enrichPayloadWithUiContext(t){try{this.ensureUiObserver();const e=this.uiObserver?.getSnapshot();return e?{...t,context:{...t.context,uiSnapshot:e}}:t}catch(e){return Tt.error("Error enriching payload with UI context:",e),t}}ensureUiObserver(){"undefined"!=typeof window&&"undefined"!=typeof document&&this.uiObserverConfig.enabled&&(this.uiObserver??=new xt(this.uiObserverConfig),this.uiObserver.start())}socketEndpoint(t){const e=new URL(t),s=new URL("thamyr",e).pathname;return{origin:e.origin,path:s}}connect(t="wss://localhost:4000",e,s){this.socket&&(Tt.warn("Already connected to Thamyr. Disconnecting first...."),this.disconnect());const i=this.socketEndpoint(t);let n;"undefined"!=typeof window&&void 0!==globalThis.location&&(n=globalThis.location.href);const r={...void 0!==n&&""!==n&&{referrer:n},...s};Tt.info("Connecting to Thamyr at",i),this.socket=bt(i.origin,{path:i.path,transports:["websocket","polling"],tryAllTransports:!0,extraHeaders:e,auth:r}),this.setupEventListeners(),this.ensureUiObserver()}disconnect(){this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.socket&&(this.socket.disconnect(),this.socket=void 0,this.uiObserver?.stop(),this.uiObserver=void 0,this.updateConnectionStatus(!1),Tt.info("Disconnected from Callimacus"))}configureUiObserver(t){if(!t)return this.uiObserver?.stop(),this.uiObserver=void 0,void(this.uiObserverConfig={...Bt,enabled:!1});const e=t.enabled??(void 0!==t.productSelector||void 0!==t.blockSelector||void 0!==t.maxTrackedElements||void 0!==t.minVisibilityRatio||this.uiObserverConfig.enabled);if(this.uiObserverConfig={...this.uiObserverConfig,...t,enabled:e},"undefined"==typeof window||"undefined"==typeof document||!this.uiObserverConfig.enabled)return this.uiObserver?.stop(),void(this.uiObserver=void 0);this.uiObserver&&this.uiObserver.stop(),this.uiObserver=new xt(this.uiObserverConfig),this.uiObserver.start()}sendUserInteraction(t,e){if(!this.socket)return void Tt.error("Socket is not connected. Cannot send interaction.");if(t===St.SUGGEST)return void Tt.error("SUGGEST is a request/response command. Use suggest() instead.");if(t===St.BACK_FROM_ROUND&&void 0===e.chapterId)return void Tt.error("BACK_FROM_ROUND requires chapterId.");const s={type:t,payload:this.enrichPayloadWithUiContext(e)},i={id:Ct()};this.socket.emit(Et,{type:s.type,payload:s.payload},i.id)}async suggest(t,e={}){if(!this.socket?.connected)return{suggestions:[]};try{return function(t){const e=t?.suggestions;return{suggestions:Array.isArray(e)?e.filter(t=>"string"==typeof t):[]}}(await this.socket.timeout(e.timeoutMs??4e3).emitWithAck(Et,{type:St.SUGGEST,payload:t}))}catch(t){return Tt.warn("Suggestions failed or timed out; serving none.",t),{suggestions:[]}}}async gatherClientInfo(){const t="undefined"==typeof navigator?void 0:navigator,e="undefined"==typeof window?void 0:window.screen;return{userAgent:t?.userAgent??"",language:t?.language??"",timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone,localTime:(new Date).toLocaleString(),screenResolution:void 0===e?"":`${e.width}x${e.height}`,location:await this.getLocation()}}onServerResponse(t){return this.serverResponseListeners.add(t),()=>{this.serverResponseListeners.delete(t)}}onConnectionStatus(t){return this.connectionStatusListeners.add(t),()=>{this.connectionStatusListeners.delete(t)}}onError(t){return this.errorListeners.add(t),()=>{this.errorListeners.delete(t)}}}const It="https://api.callimacus.ai",jt="/cart/add.js",Lt="[callimacus]";class Dt extends Error{code;constructor(t,e,s){super(e,s),this.name="CallimacusError",this.code=t}}function qt(t){if(void 0===t||""===t)return{};try{const e=JSON.parse(t);if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;console.warn(`${Lt} [data-callimacus-settings] must be a JSON object — using {}`)}catch(t){console.warn(`${Lt} [data-callimacus-settings] is not valid JSON — using {}`,t)}return{}}function _t(t,e){return void 0===t||""===t?e:t}function Mt(t){return`server_${t.code??"error"}`}function $t(t,e){t.dataset.callimacusState=e,t.setAttribute("aria-busy",String("loading"===e))}function Vt(t,e,s){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function Pt(t){const{data:e}=t;return"object"!=typeof e||null===e?[]:Object.values(e)}function Ft(t){let e=t.language;try{Intl.NumberFormat.supportedLocalesOf(e)}catch{console.warn(`${Lt} invalid data-language "${e}" — formatting with "en"`),e="en"}const s=new Map;return Object.freeze({locale:e,currency:t.currency,settings:t.settings,picks(t){for(const e of Pt(t)){if(!Array.isArray(e))continue;const t=e.filter(t=>Boolean(t?.fields?.["shopify-handle"]));if(t.length>0)return t}return[]},text(t){for(const e of Pt(t)){if("string"==typeof e&&""!==e.trim())return e.trim();const t=e?.text;if("string"==typeof t&&""!==t.trim())return t.trim()}},money(i){const n="number"==typeof i?i:i?.amount;if("number"!=typeof n)return"";const r="object"==typeof i?i?.currency:void 0,o=void 0===r||""===r?t.currency??"USD":r;return function(t){if(!s.has(t))try{s.set(t,new Intl.NumberFormat(e,{style:"currency",currency:t}))}catch{console.warn(`${Lt} invalid currency code "${t}" — showing bare amounts`),s.set(t,void 0)}return s.get(t)}(o)?.format(n)??n.toFixed(2)},productUrl(e){const s=e?.fields?.["shopify-handle"];if(void 0===s||""===s)return;return`${t.rootUrl.endsWith("/")?t.rootUrl.slice(0,-1):t.rootUrl}/products/${s}`},imageUrl(t,{width:e=800,index:s=0}={}){const i=t?.fields?.images?.[s]?.url;return void 0===i||""===i?void 0:`${i.split("?",1)[0]}?width=${e}`},variantId(t){const e=t?.fields?.variantTree?.variants??[],s=e.find(t=>t.orderable)??e[0];return void 0===s?.id?void 0:String(s.id).split("/").pop()},async addToCart(e,s=1){let i;try{i=await fetch(t.cartAddUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(e),quantity:s}]})})}catch(t){throw new Dt("cart_unreachable","Could not reach the cart",{cause:t})}const n=await i.json().catch(()=>(console.warn(`${Lt} cart response was not JSON (HTTP ${i.status})`),{}));if(!i.ok){const{description:t,message:e}=n??{};throw new Dt("cart_rejected",t??e??`Could not add to cart (HTTP ${i.status})`)}return document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:n})),n}})}function Ht(t){return function(){const t=globalThis;return t.callimacusRenderers??=[],t.callimacusRenderers}().find(e=>{const s=e;return s?.type===t&&"function"==typeof s.render})}function Kt(t,e={}){if(!Object.hasOwn(t.dataset,"callimacusReady")){t.dataset.callimacusReady="";try{!function(t,e){const{dataset:s}=t,i={clientId:s.clientId,endpoint:_t(s.endpoint,It),language:_t(s.language,"en"),currency:""===s.currency?void 0:s.currency,rootUrl:_t(s.rootUrl,"/"),cartAddUrl:_t(s.cartAddUrl,jt),settings:qt(t.querySelector("[data-callimacus-settings]")?.textContent??void 0)};if("true"===s.designMode)return void $t(t,"design-mode");if(void 0===i.clientId||""===i.clientId)return $t(t,"error"),void console.warn(`${Lt} no client id — leaving your markup in place`);t.querySelector("[data-callimacus-output]")||console.warn(`${Lt} no [data-callimacus-output] inside this mount — rendered blocks will replace the mount element's entire contents`);const{clientId:n}=i,r=e.roundTimeoutMs??45e3,o=Ft(i),a=new Set;let c,h,u=!1;function d(){return c||(c=e.transport??new Ut,c.onError(t=>{h=`${Mt(t)}: ${t.message??""}`,u||console.warn(`${Lt} transport error between rounds — ${h}`)}),c.connect(i.endpoint,{Authorization:`Bearer ${n}`},{token:n}),c)}async function l(t){const e=d();return new Promise((s,n)=>{function o(){clearTimeout(c),u(),d()}const c=setTimeout(()=>{o();n(new Dt("timeout",`Callimacus did not answer in time${void 0===h?"":` (last transport error: ${h})`}`))},r),u=e.onServerResponse(e=>{if(e.type!==vt)return;const i=e.chapter;if(i?.status!==Ot||a.has(i.id))return;const n=i.inputEvent?.data?.value;"string"==typeof n&&n!==t||(a.add(i.id),o(),s(i))}),d=e.onError(t=>{o(),n(new Dt(Mt(t),t.message??"Callimacus error",{cause:t}))});try{e.sendUserInteraction(St.CREATE_ROUND,{inputEvent:{type:"question",data:{value:t}},language:i.language})}catch(t){o(),n(new Dt("send_failed","Could not send the request",{cause:t}))}})}async function p(e){if(!u&&""!==e){u=!0,$t(t,"loading"),Vt(t,"callimacus:loading",{value:e});try{const s=await l(e),i=[...s.blocks??[]].sort((t,e)=>(t.priority??0)-(e.priority??0)),{fragment:n,rendered:r}=function(t,e){const s=document.createDocumentFragment();let i=0;for(const n of t){const t=Ht(n.type);if(t)try{const r=t.render(n,e);r instanceof Node?(s.append(r),i++):null!=r&&console.error(`${Lt} renderer for ${n.type} returned a non-Node value — skipped`)}catch(t){console.error(`${Lt} renderer for ${n.type} threw`,t)}else console.info(`${Lt} no renderer for ${n.type} — skipped`)}return{fragment:s,rendered:i}}(i,o);if(0===r)return $t(t,"empty"),void Vt(t,"callimacus:empty",{chapter:s});(t.querySelector("[data-callimacus-output]")??t).replaceChildren(n),$t(t,"ready"),Vt(t,"callimacus:ready",{chapter:s,blocks:i,rendered:r})}catch(e){$t(t,"error"),Vt(t,"callimacus:error",{error:e});const{code:s,message:i}=e instanceof Dt?e:{code:"error",message:String(e)};console.error(`${Lt} ${s}: ${i} — your markup is untouched`)}finally{u=!1}}}const f={ask:p,ctx:o,get state(){return t.dataset.callimacusState}};t.callimacus=f,Vt(t,"callimacus:mounted",f),void 0!==s.prompt&&""!==s.prompt&&p(s.prompt)}(t,e)}catch(e){$t(t,"error"),Vt(t,"callimacus:error",{error:e}),console.error(`${Lt} mount failed — your markup is untouched`,e)}}}function zt(t,e={}){for(const s of t.querySelectorAll("[data-callimacus]"))Kt(s,e)}function Wt(){document.addEventListener("shopify:section:load",t=>{t.target instanceof Element&&zt(t.target)}),zt(document)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Wt):Wt()}();
22
22
  //# sourceMappingURL=callimacus-runtime.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callimacus-runtime.min.js","sources":["../../../../node_modules/socket.io-client/dist/socket.io.esm.min.js","../../../core/dist/esm/index.js","../../../src/index.ts","../../../src/browser.ts"],"sourcesContent":["/*!\n * Socket.IO v4.8.4\n * (c) 2014-2026 Guillermo Rauch\n * Released under the MIT License.\n */\nconst t=Object.create(null);t.open=\"0\",t.close=\"1\",t.ping=\"2\",t.pong=\"3\",t.message=\"4\",t.upgrade=\"5\",t.noop=\"6\";const s=Object.create(null);Object.keys(t).forEach((i=>{s[t[i]]=i}));const i={type:\"error\",data:\"parser error\"},e=\"function\"==typeof Blob||\"undefined\"!=typeof Blob&&\"[object BlobConstructor]\"===Object.prototype.toString.call(Blob),n=\"function\"==typeof ArrayBuffer,r=t=>\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:s,data:i},o,c)=>e&&i instanceof Blob?o?c(i):h(i,c):n&&(i instanceof ArrayBuffer||r(i))?o?c(i):h(new Blob([i]),c):c(t[s]+(i||\"\")),h=(t,s)=>{const i=new FileReader;return i.onload=function(){const t=i.result.split(\",\")[1];s(\"b\"+(t||\"\"))},i.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let a;const u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",f=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)f[u.charCodeAt(t)]=t;const l=\"function\"==typeof ArrayBuffer,d=(t,e)=>{if(\"string\"!=typeof t)return{type:\"message\",data:y(t,e)};const n=t.charAt(0);if(\"b\"===n)return{type:\"message\",data:p(t.substring(1),e)};return s[n]?t.length>1?{type:s[n],data:t.substring(1)}:{type:s[n]}:i},p=(t,s)=>{if(l){const i=(t=>{let s,i,e,n,r,o=.75*t.length,h=t.length,c=0;\"=\"===t[t.length-1]&&(o--,\"=\"===t[t.length-2]&&o--);const a=new ArrayBuffer(o),u=new Uint8Array(a);for(s=0;s<h;s+=4)i=f[t.charCodeAt(s)],e=f[t.charCodeAt(s+1)],n=f[t.charCodeAt(s+2)],r=f[t.charCodeAt(s+3)],u[c++]=i<<2|e>>4,u[c++]=(15&e)<<4|n>>2,u[c++]=(3&n)<<6|63&r;return a})(t);return y(i,s)}return{base64:!0,data:t}},y=(t,s)=>\"blob\"===s?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,b=String.fromCharCode(30);function w(){return new TransformStream({transform(t,s){!function(t,s){e&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(s):n&&(t.data instanceof ArrayBuffer||r(t.data))?s(c(t.data)):o(t,!1,(t=>{a||(a=new TextEncoder),s(a.encode(t))}))}(t,(i=>{const e=i.length;let n;if(e<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,e);else if(e<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,e)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(e))}t.data&&\"string\"!=typeof t.data&&(n[0]|=128),s.enqueue(n),s.enqueue(i)}))}})}let g;function v(t){return t.reduce(((t,s)=>t+s.length),0)}function m(t,s){if(t[0].length===s)return t.shift();const i=new Uint8Array(s);let e=0;for(let n=0;n<s;n++)i[n]=t[0][e++],e===t[0].length&&(t.shift(),e=0);return t.length&&e<t[0].length&&(t[0]=t[0].slice(e)),i}function k(t){if(t)return function(t){for(var s in k.prototype)t[s]=k.prototype[s];return t}(t)}k.prototype.on=k.prototype.addEventListener=function(t,s){return this.t=this.t||{},(this.t[\"$\"+t]=this.t[\"$\"+t]||[]).push(s),this},k.prototype.once=function(t,s){function i(){this.off(t,i),s.apply(this,arguments)}return i.fn=s,this.on(t,i),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(t,s){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,e=this.t[\"$\"+t];if(!e)return this;if(1==arguments.length)return delete this.t[\"$\"+t],this;for(var n=0;n<e.length;n++)if((i=e[n])===s||i.fn===s){e.splice(n,1);break}return 0===e.length&&delete this.t[\"$\"+t],this},k.prototype.emit=function(t){this.t=this.t||{};for(var s=new Array(arguments.length-1),i=this.t[\"$\"+t],e=1;e<arguments.length;e++)s[e-1]=arguments[e];if(i){e=0;for(var n=(i=i.slice(0)).length;e<n;++e)i[e].apply(this,s)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(t){return this.t=this.t||{},this.t[\"$\"+t]||[]},k.prototype.hasListeners=function(t){return!!this.listeners(t).length};const A=\"function\"==typeof Promise&&\"function\"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,s)=>s(t,0),E=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:Function(\"return this\")();function O(t,...s){return s.reduce(((s,i)=>(t.hasOwnProperty(i)&&(s[i]=t[i]),s)),{})}const _=E.setTimeout,j=E.clearTimeout;function B(t,s){s.useNativeTimers?(t.setTimeoutFn=_.bind(E),t.clearTimeoutFn=j.bind(E)):(t.setTimeoutFn=E.setTimeout.bind(E),t.clearTimeoutFn=E.clearTimeout.bind(E))}function x(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class C extends Error{constructor(t,s,i){super(t),this.description=s,this.context=i,this.type=\"TransportError\"}}class T extends k{constructor(t){super(),this.writable=!1,B(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,i){return super.emitReserved(\"error\",new C(t,s,i)),this}open(){return this.readyState=\"opening\",this.doOpen(),this}close(){return\"opening\"!==this.readyState&&\"open\"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){\"open\"===this.readyState&&this.write(t)}onOpen(){this.readyState=\"open\",this.writable=!0,super.emitReserved(\"open\")}onData(t){const s=d(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved(\"packet\",t)}onClose(t){this.readyState=\"closed\",super.emitReserved(\"close\",t)}pause(t){}createUri(t,s={}){return t+\"://\"+this.i()+this.o()+this.opts.path+this.h(s)}i(){const t=this.opts.hostname;return-1===t.indexOf(\":\")?t:\"[\"+t+\"]\"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?\":\"+this.opts.port:\"\"}h(t){const s=function(t){let s=\"\";for(let i in t)t.hasOwnProperty(i)&&(s.length&&(s+=\"&\"),s+=encodeURIComponent(i)+\"=\"+encodeURIComponent(t[i]));return s}(t);return s.length?\"?\"+s:\"\"}}class N extends T{constructor(){super(...arguments),this.u=!1}get name(){return\"polling\"}doOpen(){this.l()}pause(t){this.readyState=\"pausing\";const s=()=>{this.readyState=\"paused\",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once(\"pollComplete\",(function(){--t||s()}))),this.writable||(t++,this.once(\"drain\",(function(){--t||s()})))}else s()}l(){this.u=!0,this.doPoll(),this.emitReserved(\"poll\")}onData(t){((t,s)=>{const i=t.split(b),e=[];for(let t=0;t<i.length;t++){const n=d(i[t],s);if(e.push(n),\"error\"===n.type)break}return e})(t,this.socket.binaryType).forEach((t=>{if(\"opening\"===this.readyState&&\"open\"===t.type&&this.onOpen(),\"close\"===t.type)return this.onClose({description:\"transport closed by the server\"}),!1;this.onPacket(t)})),\"closed\"!==this.readyState&&(this.u=!1,this.emitReserved(\"pollComplete\"),\"open\"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:\"close\"}])};\"open\"===this.readyState?t():this.once(\"open\",t)}write(t){this.writable=!1,((t,s)=>{const i=t.length,e=new Array(i);let n=0;t.forEach(((t,r)=>{o(t,!1,(t=>{e[r]=t,++n===i&&s(e.join(b))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved(\"drain\")}))}))}uri(){const t=this.opts.secure?\"https\":\"http\",s=this.query||{};return!1!==this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||s.sid||(s.b64=1),this.createUri(t,s)}}let U=!1;try{U=\"undefined\"!=typeof XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest}catch(t){}const P=U;function D(){}class M extends N{constructor(t){if(super(t),\"undefined\"!=typeof location){const s=\"https:\"===location.protocol;let i=location.port;i||(i=s?\"443\":\"80\"),this.xd=\"undefined\"!=typeof location&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:\"POST\",data:t});i.on(\"success\",s),i.on(\"error\",((t,s)=>{this.onError(\"xhr post error\",t,s)}))}doPoll(){const t=this.request();t.on(\"data\",this.onData.bind(this)),t.on(\"error\",((t,s)=>{this.onError(\"xhr poll error\",t,s)})),this.pollXhr=t}}class S extends k{constructor(t,s,i){super(),this.createRequest=t,B(this,i),this.p=i,this.v=i.method||\"GET\",this.m=s,this.k=void 0!==i.data?i.data:null,this.A()}A(){var t;const s=O(this.p,\"agent\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"autoUnref\");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(t){}if(\"POST\"===this.v)try{i.setRequestHeader(\"Content-type\",\"text/plain;charset=UTF-8\")}catch(t){}try{i.setRequestHeader(\"Accept\",\"*/*\")}catch(t){}null===(t=this.p.cookieJar)||void 0===t||t.addCookies(i),\"withCredentials\"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader(\"set-cookie\"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn((()=>{this.j(\"number\"==typeof i.status?i.status:0)}),0))},i.send(this.k)}catch(t){return void this.setTimeoutFn((()=>{this.j(t)}),0)}\"undefined\"!=typeof document&&(this.B=S.requestsCount++,S.requests[this.B]=this)}j(t){this.emitReserved(\"error\",t,this.O),this.C(!0)}C(t){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=D,t)try{this.O.abort()}catch(t){}\"undefined\"!=typeof document&&delete S.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved(\"data\",t),this.emitReserved(\"success\"),this.C())}abort(){this.C()}}if(S.requestsCount=0,S.requests={},\"undefined\"!=typeof document)if(\"function\"==typeof attachEvent)attachEvent(\"onunload\",L);else if(\"function\"==typeof addEventListener){addEventListener(\"onpagehide\"in E?\"pagehide\":\"unload\",L,!1)}function L(){for(let t in S.requests)S.requests.hasOwnProperty(t)&&S.requests[t].abort()}const R=function(){const t=F({xdomain:!1});return t&&null!==t.responseType}();class I extends M{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=R&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new S(F,this.uri(),t)}}function F(t){const s=t.xdomain;try{if(\"undefined\"!=typeof XMLHttpRequest&&(!s||P))return new XMLHttpRequest}catch(t){}if(!s)try{return new(E[[\"Active\"].concat(\"Object\").join(\"X\")])(\"Microsoft.XMLHTTP\")}catch(t){}}const $=\"undefined\"!=typeof navigator&&\"string\"==typeof navigator.product&&\"reactnative\"===navigator.product.toLowerCase();class V extends T{get name(){return\"websocket\"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=$?{}:O(this.opts,\"agent\",\"perMessageDeflate\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"localAddress\",\"protocolVersion\",\"origin\",\"maxPayload\",\"family\",\"checkServerIdentity\");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(t){return this.emitReserved(\"error\",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:\"websocket connection closed\",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError(\"websocket error\",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;o(i,this.supportsBinary,(t=>{try{this.doWrite(i,t)}catch(t){}e&&A((()=>{this.writable=!0,this.emitReserved(\"drain\")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?\"wss\":\"ws\",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const W=E.WebSocket||E.MozWebSocket;class q extends V{createSocket(t,s,i){return $?new W(t,s,i):s?new W(t,s):new W(t)}doWrite(t,s){this.ws.send(s)}}class H extends T{get name(){return\"webtransport\"}doOpen(){try{this.N=new WebTransport(this.createUri(\"https\"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved(\"error\",t)}this.N.closed.then((()=>{this.onClose()})).catch((t=>{this.onError(\"webtransport error\",t)})),this.N.ready.then((()=>{this.N.createBidirectionalStream().then((t=>{const s=function(t,s){g||(g=new TextDecoder);const e=[];let n=0,r=-1,o=!1;return new TransformStream({transform(h,c){for(e.push(h);;){if(0===n){if(v(e)<1)break;const t=m(e,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(v(e)<2)break;const t=m(e,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(v(e)<8)break;const t=m(e,8),s=new DataView(t.buffer,t.byteOffset,t.length),o=s.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(i);break}r=o*Math.pow(2,32)+s.getUint32(4),n=3}else{if(v(e)<r)break;const t=m(e,r);c.enqueue(d(o?t:g.decode(t),s)),n=0}if(0===r||r>t){c.enqueue(i);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(s).getReader(),n=w();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{e.read().then((({done:t,value:s})=>{t||(this.onPacket(s),r())})).catch((t=>{}))};r();const o={type:\"open\"};this.query.sid&&(o.data=`{\"sid\":\"${this.query.sid}\"}`),this.U.write(o).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;this.U.write(i).then((()=>{e&&A((()=>{this.writable=!0,this.emitReserved(\"drain\")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}}const X={websocket:q,webtransport:H,polling:I},z=/^(?:(?![^:@\\/?#]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@\\/?#]*)(?::([^:@\\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,J=[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"];function Q(t){if(t.length>8e3)throw\"URI too long\";const s=t,i=t.indexOf(\"[\"),e=t.indexOf(\"]\");-1!=i&&-1!=e&&(t=t.substring(0,i)+t.substring(i,e).replace(/:/g,\";\")+t.substring(e,t.length));let n=z.exec(t||\"\"),r={},o=14;for(;o--;)r[J[o]]=n[o]||\"\";return-1!=i&&-1!=e&&(r.source=s,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,\":\"),r.authority=r.authority.replace(\"[\",\"\").replace(\"]\",\"\").replace(/;/g,\":\"),r.ipv6uri=!0),r.pathNames=function(t,s){const i=/\\/{2,9}/g,e=s.replace(i,\"/\").split(\"/\");\"/\"!=s.slice(0,1)&&0!==s.length||e.splice(0,1);\"/\"==s.slice(-1)&&e.splice(e.length-1,1);return e}(0,r.path),r.queryKey=function(t,s){const i={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,s,e){s&&(i[s]=e)})),i}(0,r.query),r}const G=\"function\"==typeof addEventListener&&\"function\"==typeof removeEventListener,K=[];G&&addEventListener(\"offline\",(()=>{K.forEach((t=>t()))}),!1);class Y extends k{constructor(t,s={}){var i,e;if(super(),this.binaryType=\"arraybuffer\",this.writeBuffer=[],this.P=0,this.D=[],this.M=-1,this.S=-1,this.L=-1,this.R=1/0,t&&\"object\"==typeof t&&(s=t,t=null),t){const i=Q(t);s.hostname=i.host,s.secure=\"https\"===i.protocol||\"wss\"===i.protocol,s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Q(s.host).host);if(B(this,s),this.secure=null!=s.secure?s.secure:\"undefined\"!=typeof location&&\"https:\"===location.protocol,s.hostname&&!s.port&&(s.port=this.secure?\"443\":\"80\"),this.hostname=s.hostname||(\"undefined\"!=typeof location?location.hostname:\"localhost\"),this.port=s.port||(\"undefined\"!=typeof location&&location.port?location.port:this.secure?\"443\":\"80\"),s.transportImplementations&&s.transports)throw new Error(\"specifying both 'transportImplementations' and 'transports' options is not supported\");s.transportImplementations||(null===(i=s.transports)||void 0===i?void 0:i.length)&&\"function\"==typeof s.transports[0]?(this.transports=[],this.I=Object.create(null),(null!==(e=s.transportImplementations)&&void 0!==e?e:s.transports).forEach((t=>{const s=t.prototype.name;this.transports.push(s),this.I[s]=t}))):(this.transports=s.transports?[...s.transports]:[\"polling\",\"websocket\",\"webtransport\"],this.I=X),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},s),this.opts.path=this.opts.path.replace(/\\/$/,\"\")+(this.opts.addTrailingSlash?\"/\":\"\"),\"string\"==typeof this.opts.query&&(this.opts.query=function(t){let s={},i=t.split(\"&\");for(let t=0,e=i.length;t<e;t++){let e=i[t].split(\"=\");s[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return s}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this.F=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(\"beforeunload\",this.F,!1)),\"localhost\"!==this.hostname&&(this.$=()=>{this.V(\"transport close\",{description:\"network connection lost\"})},K.push(this.$))),this.opts.withCredentials&&(this.W=void 0),this.q()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=4,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.I[t](i)}q(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved(\"error\",\"No transports available\")}),0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf(\"websocket\")?\"websocket\":this.transports[0];this.readyState=\"opening\";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on(\"drain\",this.H.bind(this)).on(\"packet\",this.X.bind(this)).on(\"error\",this.j.bind(this)).on(\"close\",(t=>this.V(\"transport close\",t)))}J(t){let s=this.createTransport(t),i=!1;Y.priorWebsocketSuccess=!1;const e=()=>{i||(s.send([{type:\"ping\",data:\"probe\"}]),s.once(\"packet\",(t=>{if(!i)if(\"pong\"===t.type&&\"probe\"===t.data){if(this.upgrading=!0,this.emitReserved(\"upgrading\",s),!s)return;Y.priorWebsocketSuccess=\"websocket\"===s.name,this.transport.pause((()=>{i||\"closed\"!==this.readyState&&(a(),this.setTransport(s),s.send([{type:\"upgrade\"}]),this.emitReserved(\"upgrade\",s),s=null,this.upgrading=!1,this.flush())}))}else{const t=new Error(\"probe error\");t.transport=s.name,this.emitReserved(\"upgradeError\",t)}})))};function n(){i||(i=!0,a(),s.close(),s=null)}const r=t=>{const i=new Error(\"probe error: \"+t);i.transport=s.name,n(),this.emitReserved(\"upgradeError\",i)};function o(){r(\"transport closed\")}function h(){r(\"socket closed\")}function c(t){s&&t.name!==s.name&&n()}const a=()=>{s.removeListener(\"open\",e),s.removeListener(\"error\",r),s.removeListener(\"close\",o),this.off(\"close\",h),this.off(\"upgrading\",c)};s.once(\"open\",e),s.once(\"error\",r),s.once(\"close\",o),this.once(\"close\",h),this.once(\"upgrading\",c),-1!==this.D.indexOf(\"webtransport\")&&\"webtransport\"!==t?this.setTimeoutFn((()=>{i||s.open()}),200):s.open()}onOpen(){if(this.readyState=\"open\",Y.priorWebsocketSuccess=\"websocket\"===this.transport.name,this.emitReserved(\"open\"),this.flush(),\"open\"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.D.length;t++)this.J(this.D[t])}X(t){if(\"opening\"===this.readyState||\"open\"===this.readyState||\"closing\"===this.readyState)switch(this.emitReserved(\"packet\",t),this.emitReserved(\"heartbeat\"),t.type){case\"open\":this.onHandshake(JSON.parse(t.data));break;case\"ping\":this.G(\"pong\"),this.emitReserved(\"ping\"),this.emitReserved(\"pong\"),this.K();break;case\"error\":const s=new Error(\"server error\");s.code=t.data,this.j(s);break;case\"message\":this.emitReserved(\"data\",t.data),this.emitReserved(\"message\",t.data)}}onHandshake(t){this.emitReserved(\"handshake\",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=this.Y(t.upgrades),this.M=t.pingInterval,this.S=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),\"closed\"!==this.readyState&&this.K()}K(){this.clearTimeoutFn(this.Z);const t=this.M+this.S;this.R=Date.now()+t,this.Z=this.setTimeoutFn((()=>{this.V(\"ping timeout\")}),t),this.opts.autoUnref&&this.Z.unref()}H(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved(\"drain\"):this.flush()}flush(){if(\"closed\"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.tt();this.transport.send(t),this.P=t.length,this.emitReserved(\"flush\")}}tt(){if(!(this.L&&\"polling\"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let i=0;i<this.writeBuffer.length;i++){const e=this.writeBuffer[i].data;if(e&&(t+=\"string\"==typeof(s=e)?function(t){let s=0,i=0;for(let e=0,n=t.length;e<n;e++)s=t.charCodeAt(e),s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(e++,i+=4);return i}(s):Math.ceil(1.33*(s.byteLength||s.size))),i>0&&t>this.L)return this.writeBuffer.slice(0,i);t+=2}var s;return this.writeBuffer}st(){if(!this.R)return!0;const t=Date.now()>this.R;return t&&(this.R=0,A((()=>{this.V(\"ping timeout\")}),this.setTimeoutFn)),t}write(t,s,i){return this.G(\"message\",t,s,i),this}send(t,s,i){return this.G(\"message\",t,s,i),this}G(t,s,i,e){if(\"function\"==typeof s&&(e=s,s=void 0),\"function\"==typeof i&&(e=i,i=null),\"closing\"===this.readyState||\"closed\"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;const n={type:t,data:s,options:i};this.emitReserved(\"packetCreate\",n),this.writeBuffer.push(n),e&&this.once(\"flush\",e),this.flush()}close(){const t=()=>{this.V(\"forced close\"),this.transport.close()},s=()=>{this.off(\"upgrade\",s),this.off(\"upgradeError\",s),t()},i=()=>{this.once(\"upgrade\",s),this.once(\"upgradeError\",s)};return\"opening\"!==this.readyState&&\"open\"!==this.readyState||(this.readyState=\"closing\",this.writeBuffer.length?this.once(\"drain\",(()=>{this.upgrading?i():t()})):this.upgrading?i():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&\"opening\"===this.readyState)return this.transports.shift(),this.q();this.emitReserved(\"error\",t),this.V(\"transport error\",t)}V(t,s){if(\"opening\"===this.readyState||\"open\"===this.readyState||\"closing\"===this.readyState){if(this.clearTimeoutFn(this.Z),this.transport.removeAllListeners(\"close\"),this.transport.close(),this.transport.removeAllListeners(),G&&(this.F&&removeEventListener(\"beforeunload\",this.F,!1),this.$)){const t=K.indexOf(this.$);-1!==t&&K.splice(t,1)}this.readyState=\"closed\",this.id=null,this.emitReserved(\"close\",t,s),this.writeBuffer=[],this.P=0}}Y(t){const s=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&s.push(t[i]);return s}}Y.protocol=4;class Z extends N{doPoll(){this.it().then((t=>{if(!t.ok)return this.onError(\"fetch read error\",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError(\"fetch read error\",t)}))}doWrite(t,s){this.it(t).then((t=>{if(!t.ok)return this.onError(\"fetch write error\",t.status,t);s()})).catch((t=>{this.onError(\"fetch write error\",t)}))}it(t){var s;const i=void 0!==t,e=new Headers(this.opts.extraHeaders);return i&&e.set(\"content-type\",\"text/plain;charset=UTF-8\"),null===(s=this.socket.W)||void 0===s||s.appendCookies(e),fetch(this.uri(),{method:i?\"POST\":\"GET\",body:i?t:null,headers:e,credentials:this.opts.withCredentials?\"include\":\"omit\"}).then((t=>{var s;return null===(s=this.socket.W)||void 0===s||s.parseCookies(t.headers.getSetCookie()),t}))}}const tt=\"function\"==typeof ArrayBuffer,st=t=>\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,it=Object.prototype.toString,et=\"function\"==typeof Blob||\"undefined\"!=typeof Blob&&\"[object BlobConstructor]\"===it.call(Blob),nt=\"function\"==typeof File||\"undefined\"!=typeof File&&\"[object FileConstructor]\"===it.call(File);function rt(t){return tt&&(t instanceof ArrayBuffer||st(t))||et&&t instanceof Blob||nt&&t instanceof File}function ot(t,s){if(!t||\"object\"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,i=t.length;s<i;s++)if(ot(t[s]))return!0;return!1}if(rt(t))return!0;if(t.toJSON&&\"function\"==typeof t.toJSON&&1===arguments.length)return ot(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&ot(t[s]))return!0;return!1}function ht(t){const s=[],i=t.data,e=t;return e.data=ct(i,s),e.attachments=s.length,{packet:e,buffers:s}}function ct(t,s,i){if(!t)return t;if(rt(t)){const i={_placeholder:!0,num:s.length};return s.push(t),i}if(Array.isArray(t)){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=ct(t[e],s);return i}if(\"object\"==typeof t&&!(t instanceof Date)){if(t.toJSON&&\"function\"==typeof t.toJSON&&!i)return ct(t.toJSON(),s,!0);const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=ct(t[i],s));return e}return t}function at(t,s){return t.data=ut(t.data,s),delete t.attachments,t}function ut(t,s){if(!t)return t;if(t&&!0===t._placeholder){if(\"number\"==typeof t.num&&t.num>=0&&t.num<s.length)return s[t.num];throw new Error(\"illegal attachments\")}if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ut(t[i],s);else if(\"object\"==typeof t)for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ut(t[i],s));return t}const ft=[\"connect\",\"connect_error\",\"disconnect\",\"disconnecting\",\"newListener\",\"removeListener\"],lt=5;var dt;!function(t){t[t.CONNECT=0]=\"CONNECT\",t[t.DISCONNECT=1]=\"DISCONNECT\",t[t.EVENT=2]=\"EVENT\",t[t.ACK=3]=\"ACK\",t[t.CONNECT_ERROR=4]=\"CONNECT_ERROR\",t[t.BINARY_EVENT=5]=\"BINARY_EVENT\",t[t.BINARY_ACK=6]=\"BINARY_ACK\"}(dt||(dt={}));class pt extends k{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},\"function\"==typeof t?{reviver:t}:t)}add(t){let s;if(\"string\"==typeof t){if(this.reconstructor)throw new Error(\"got plaintext data when reconstructing a packet\");s=this.decodeString(t);const i=s.type===dt.BINARY_EVENT;i||s.type===dt.BINARY_ACK?(s.type=i?dt.EVENT:dt.ACK,this.reconstructor=new yt(s)):super.emitReserved(\"decoded\",s)}else{if(!rt(t)&&!t.base64)throw new Error(\"Unknown type: \"+t);if(!this.reconstructor)throw new Error(\"got binary data when not reconstructing a packet\");s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved(\"decoded\",s))}}decodeString(t){let s=0;const i={type:Number(t.charAt(0))};if(void 0===dt[i.type])throw new Error(\"unknown packet type \"+i.type);if(i.type===dt.BINARY_EVENT||i.type===dt.BINARY_ACK){const e=s+1;for(;\"-\"!==t.charAt(++s)&&s!=t.length;);const n=t.substring(e,s);if(n!=Number(n)||\"-\"!==t.charAt(s))throw new Error(\"Illegal attachments\");const r=Number(n);if(!bt(r)||r<1)throw new Error(\"Illegal attachments\");if(r>this.opts.maxAttachments)throw new Error(\"too many attachments\");i.attachments=r}if(\"/\"===t.charAt(s+1)){const e=s+1;for(;++s;){if(\",\"===t.charAt(s))break;if(s===t.length)break}i.nsp=t.substring(e,s)}else i.nsp=\"/\";const e=t.charAt(s+1);if(\"\"!==e&&Number(e)==e){const e=s+1;for(;++s;){const i=t.charAt(s);if(null==i||Number(i)!=i){--s;break}if(s===t.length)break}i.id=Number(t.substring(e,s+1))}if(t.charAt(++s)){const e=this.tryParse(t.substr(s));if(!pt.isPayloadValid(i.type,e))throw new Error(\"invalid payload\");i.data=e}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,s){switch(t){case dt.CONNECT:return wt(s);case dt.DISCONNECT:return void 0===s;case dt.CONNECT_ERROR:return\"string\"==typeof s||wt(s);case dt.EVENT:case dt.BINARY_EVENT:return Array.isArray(s)&&(\"number\"==typeof s[0]||\"string\"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:case dt.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=at(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const bt=Number.isInteger||function(t){return\"number\"==typeof t&&isFinite(t)&&Math.floor(t)===t};function wt(t){return\"[object Object]\"===Object.prototype.toString.call(t)}var gt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return dt},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==dt.EVENT&&t.type!==dt.ACK||!ot(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===dt.EVENT?dt.BINARY_EVENT:dt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let s=\"\"+t.type;return t.type!==dt.BINARY_EVENT&&t.type!==dt.BINARY_ACK||(s+=t.attachments+\"-\"),t.nsp&&\"/\"!==t.nsp&&(s+=t.nsp+\",\"),null!=t.id&&(s+=t.id),null!=t.data&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=ht(t),i=this.encodeAsString(s.packet),e=s.buffers;return e.unshift(i),e}},Decoder:pt,isPacketValid:function(t){return\"string\"==typeof t.nsp&&(void 0===(s=t.id)||bt(s))&&function(t,s){switch(t){case dt.CONNECT:return void 0===s||wt(s);case dt.DISCONNECT:return void 0===s;case dt.EVENT:return Array.isArray(s)&&(\"number\"==typeof s[0]||\"string\"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:return Array.isArray(s);case dt.CONNECT_ERROR:return\"string\"==typeof s||wt(s);default:return!1}}(t.type,t.data);var s}});function vt(t,s,i){return t.on(s,i),function(){t.off(s,i)}}const mt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kt extends k{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this.p=Object.assign({},i),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vt(t,\"open\",this.onopen.bind(this)),vt(t,\"packet\",this.onpacket.bind(this)),vt(t,\"error\",this.onerror.bind(this)),vt(t,\"close\",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),\"open\"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift(\"message\"),this.emit.apply(this,t),this}emit(t,...s){var i,e,n;if(mt.hasOwnProperty(t))throw new Error('\"'+t.toString()+'\" is a reserved event name');if(s.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(s),this;const r={type:dt.EVENT,data:s,options:{}};if(r.options.compress=!1!==this.flags.compress,\"function\"==typeof s[s.length-1]){const t=this.ids++,i=s.pop();this.ut(t,i),r.id=t}const o=null===(e=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===e?void 0:e.writable,h=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.st());return this.flags.volatile&&!o||(h?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,s){var i;const e=null!==(i=this.flags.timeout)&&void 0!==i?i:this.p.ackTimeout;if(void 0===e)return void(this.acks[t]=s);const n=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);s.call(this,new Error(\"operation has timed out\"))}),e),r=(...t)=>{this.io.clearTimeoutFn(n),s.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...s){return new Promise(((i,e)=>{const n=(t,s)=>t?e(t):i(s);n.withError=!0,s.push(n),this.emit(t,...s)}))}ct(t){let s;\"function\"==typeof t[t.length-1]&&(s=t.pop());const i={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...e)=>{this.et[0];return null!==t?i.tryCount>this.p.retries&&(this.et.shift(),s&&s(t)):(this.et.shift(),s&&s(null,...e)),i.pending=!1,this.ft()})),this.et.push(i),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const s=this.et[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){\"function\"==typeof this.auth?this.auth((t=>{this.dt(t)})):this.dt(this.auth)}dt(t){this.packet({type:dt.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved(\"connect_error\",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved(\"disconnect\",t,s),this.wt()}wt(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((s=>String(s.id)===t))){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error(\"socket has been disconnected\"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case dt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 dt.EVENT:case dt.BINARY_EVENT:this.onevent(t);break;case dt.ACK:case dt.BINARY_ACK:this.onack(t);break;case dt.DISCONNECT:this.ondisconnect();break;case dt.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved(\"connect_error\",s)}}onevent(t){const s=t.data||[];null!=t.id&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this.gt&&this.gt.length){const s=this.gt.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&\"string\"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...e){i||(i=!0,s.packet({type:dt.ACK,id:t,data:e}))}}onack(t){const s=this.acks[t.id];\"function\"==typeof s&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this.yt===s,this.yt=s,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved(\"connect\")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(\"io server disconnect\")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:dt.DISCONNECT}),this.destroy(),this.connected&&this.onclose(\"io client disconnect\"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.gt=this.gt||[],this.gt.push(t),this}prependAny(t){return this.gt=this.gt||[],this.gt.unshift(t),this}offAny(t){if(!this.gt)return this;if(t){const s=this.gt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.gt=[];return this}listenersAny(){return this.gt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const s=this.kt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const s=this.kt.slice();for(const i of s)i.apply(this,t.data)}}}function At(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}At.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),i=Math.floor(s*this.jitter*t);t=1&Math.floor(10*s)?t+i:t-i}return 0|Math.min(t,this.max)},At.prototype.reset=function(){this.attempts=0},At.prototype.setMin=function(t){this.ms=t},At.prototype.setMax=function(t){this.max=t},At.prototype.setJitter=function(t){this.jitter=t};class Et extends k{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&\"object\"==typeof t&&(s=t,t=void 0),(s=s||{}).path=s.path||\"/socket.io\",this.opts=s,B(this,s),this.reconnection(!1!==s.reconnection),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=s.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new At({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==s.timeout?2e4:s.timeout),this.ht=\"closed\",this.uri=t;const e=s.parser||gt;this.encoder=new e.Encoder,this.decoder=new e.Decoder,this.rt=!1!==s.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var s;return void 0===t?this.Ot:(this.Ot=t,null===(s=this.backoff)||void 0===s||s.setMin(t),this)}randomizationFactor(t){var s;return void 0===t?this._t:(this._t=t,null===(s=this.backoff)||void 0===s||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return void 0===t?this.jt:(this.jt=t,null===(s=this.backoff)||void 0===s||s.setMax(t),this)}timeout(t){return arguments.length?(this.Bt=t,this):this.Bt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf(\"open\"))return this;this.engine=new Y(this.uri,this.opts);const s=this.engine,i=this;this.ht=\"opening\",this.skipReconnect=!1;const e=vt(s,\"open\",(function(){i.onopen(),t&&t()})),n=s=>{this.cleanup(),this.ht=\"closed\",this.emitReserved(\"error\",s),t?t(s):this.maybeReconnectOnOpen()},r=vt(s,\"error\",n);if(!1!==this.Bt){const t=this.Bt,i=this.setTimeoutFn((()=>{e(),n(new Error(\"timeout\")),s.close()}),t);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}return this.subs.push(e),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht=\"open\",this.emitReserved(\"open\");const t=this.engine;this.subs.push(vt(t,\"ping\",this.onping.bind(this)),vt(t,\"data\",this.ondata.bind(this)),vt(t,\"error\",this.onerror.bind(this)),vt(t,\"close\",this.onclose.bind(this)),vt(this.decoder,\"decoded\",this.ondecoded.bind(this)))}onping(){this.emitReserved(\"ping\")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose(\"parse error\",t)}}ondecoded(t){A((()=>{this.emitReserved(\"packet\",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved(\"error\",t)}socket(t,s){let i=this.nsps[t];return i?this.rt&&!i.active&&i.connect():(i=new kt(this,t,s),this.nsps[t]=i),i}vt(t){const s=Object.keys(this.nsps);for(const t of s){if(this.nsps[t].active)return}this.xt()}lt(t){const s=this.encoder.encode(t);for(let i=0;i<s.length;i++)this.engine.write(s[i],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}xt(){this.skipReconnect=!0,this.ot=!1,this.onclose(\"forced close\")}disconnect(){return this.xt()}onclose(t,s){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this.ht=\"closed\",this.emitReserved(\"close\",t,s),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved(\"reconnect_failed\"),this.ot=!1;else{const s=this.backoff.duration();this.ot=!0;const i=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved(\"reconnect_attempt\",t.backoff.attempts),t.skipReconnect||t.open((s=>{s?(t.ot=!1,t.reconnect(),this.emitReserved(\"reconnect_error\",s)):t.onreconnect()})))}),s);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved(\"reconnect\",t)}}const Ot={};function _t(t,s){\"object\"==typeof t&&(s=t,t=void 0);const i=function(t,s=\"\",i){let e=t;i=i||\"undefined\"!=typeof location&&location,null==t&&(t=i.protocol+\"//\"+i.host),\"string\"==typeof t&&(\"/\"===t.charAt(0)&&(t=\"/\"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\\/\\//.test(t)||(t=void 0!==i?i.protocol+\"//\"+t:\"https://\"+t),e=Q(t)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port=\"80\":/^(http|ws)s$/.test(e.protocol)&&(e.port=\"443\")),e.path=e.path||\"/\";const n=-1!==e.host.indexOf(\":\")?\"[\"+e.host+\"]\":e.host;return e.id=e.protocol+\"://\"+n+\":\"+e.port+s,e.href=e.protocol+\"://\"+n+(i&&i.port===e.port?\"\":\":\"+e.port),e}(t,(s=s||{}).path||\"/socket.io\"),e=i.source,n=i.id,r=i.path,o=Ot[n]&&r in Ot[n].nsps;let h;return s.forceNew||s[\"force new connection\"]||!1===s.multiplex||o?h=new Et(e,s):(Ot[n]||(Ot[n]=new Et(e,s)),h=Ot[n]),i.query&&!s.query&&(s.query=i.queryKey),h.socket(i.path,s)}Object.assign(_t,{Manager:Et,Socket:kt,io:_t,connect:_t});export{Z as Fetch,Et as Manager,q as NodeWebSocket,I as NodeXHR,kt as Socket,q as WebSocket,H as WebTransport,I as XHR,_t as connect,_t as default,_t as io,lt as protocol};\n//# sourceMappingURL=socket.io.esm.min.js.map\n","/*!\n * Copyright © 2025–2026 Solomei AI SRL. All rights reserved.\n *\n * Proprietary software, licensed for use by Callimacus customers only.\n * See LICENSE.md for the full terms.\n *\n */\nexport*from\"@callimacus/intent\";import{io as e}from\"socket.io-client\";const t={ERROR:\"error\",CHAPTER_EVENT:\"chapter-event\",CHAPTER_DELETED:\"chapter-deleted\",STORY_RESET:\"story-reset\",STORY_CREATED:\"story-created\",STORY_SHARED:\"story-shared\"},s={ERROR:\"error\",SYSTEM_MESSAGE:\"system-message\",SERVER_STATUS:\"server-status\",SERVER_RESPONSE:\"server-response\"},n={CLIENT_READY:\"client-ready\",USER_INTERACTION:\"user-interaction\"},r={question:\"question\",content:\"content\",topic:\"topic\",tag:\"tag\",image:\"image\",video:\"video\",gallery:\"gallery\",relatedQuestion:\"relatedQuestion\",page:\"page\",customInteraction:\"customInteraction\",customPage:\"customPage\"},i={masonry:\"masonry\",carousel:\"carousel\"},o={understandingQuery:1,craftingAnswer:2,curatingContent:3,done:4};function a(e){return e.type.startsWith(\"custom:\")}function c(e){return\"set\"in e.type&&e.type.set}function l(e){return\"master\"in e.type&&e.type.master}const d={debug:0,info:1,warn:2,error:3,silent:4};const u=new class{config={enabled:!1,level:\"info\",prefix:\"[Thamyr]\"};debug=(...e)=>{this.log(\"debug\",...e)};info=(...e)=>{this.log(\"info\",...e)};warn=(...e)=>{this.log(\"warn\",...e)};error=(...e)=>{this.log(\"error\",...e)};log(e,...t){if(!(this.config.enabled&&d[e]>=d[this.config.level]))return;const{prefix:s}=this.config,n=void 0===s||\"\"===s?t:[s,...t];console[e](...n)}configure(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};function h(e,t){const s=new URL(e),n=decodeURIComponent(s.pathname.slice(1)),r=(new TextEncoder).encode(JSON.stringify({bucket:\"storage.callimacus.ai\",key:n,edits:t})).toBase64();return`${s.origin}/${encodeURIComponent(r)}`}function y(){const e=\"undefined\"==typeof crypto?void 0:crypto;if(\"function\"==typeof e?.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(\"function\"==typeof e?.getRandomValues)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(256*Math.random());t[6]=15&t[6]|64,t[8]=63&t[8]|128;const s=[...t].map(e=>e.toString(16).padStart(2,\"0\"));return[s.slice(0,4).join(\"\"),s.slice(4,6).join(\"\"),s.slice(6,8).join(\"\"),s.slice(8,10).join(\"\"),s.slice(10,16).join(\"\")].join(\"-\")}var p,f;function m(e){if(\"object\"!=typeof e||null===e)return!1;const t=e;return\"string\"==typeof t.audioUrl&&\"string\"==typeof t.mimeType}function g(e){if(\"object\"==typeof e&&null!==e)for(const t of Object.values(e))if(m(t))return t}!function(e){e.GET_STORY=\"get-story\",e.CREATE_ROUND=\"create-round\",e.RESET_STORY=\"reset-story\",e.BACK_FROM_ROUND=\"back-from-round\",e.SHARE_STORY=\"share-story\",e.GET_SHARED_STORY=\"get-shared-story\"}(p||(p={})),function(e){e.ROUND_CREATED=\"round-created\",e.ROUND_EVENT=\"round-event\",e.ROUND_COMPLETED=\"round-completed\",e.ERROR=\"error\"}(f||(f={}));const b={productSelector:\"[data-product-id]\",blockSelector:\"[data-block-id]\",maxTrackedElements:40,minVisibilityRatio:.5};class k{elements=new Map;elementRefs=new Map;elementKeys=new WeakMap;blocks=new Map;blockRefs=new Map;blockKeys=new WeakMap;started=!1;config;constructor(e={}){const t=e.minVisibilityRatio??b.minVisibilityRatio;this.config={productSelector:e.productSelector??b.productSelector,blockSelector:e.blockSelector??b.blockSelector,maxTrackedElements:e.maxTrackedElements??b.maxTrackedElements,minVisibilityRatio:Math.min(1,Math.max(0,t))}}rescanUi(){if(!this.canUseDom())return;let e,t;try{e=document.querySelectorAll(this.config.productSelector),t=document.querySelectorAll(this.config.blockSelector)}catch(e){return void u.warn(\"UI Observer: invalid selector, skipping rescan:\",e)}const s=Date.now();for(const t of e){const e=this.normalizeRect(t.getBoundingClientRect()),n=this.calculateVisibilityRatio(e);this.syncTrackedElement(t,{bounds:e,isVisible:n>=this.config.minVisibilityRatio,visibilityRatio:n,observedAt:s})}for(const e of t){const t=this.normalizeRect(e.getBoundingClientRect()),n=this.calculateVisibilityRatio(t);this.syncTrackedBlock(e,{bounds:t,isVisible:n>=this.config.minVisibilityRatio,visibilityRatio:n,observedAt:s})}this.pruneTrackedElements(),this.pruneTrackedBlocks()}pruneTrackedElements(){if(this.elements.size<=this.config.maxTrackedElements)return;const e=[...this.elements].sort(([,e],[,t])=>{const s=e.visibilityRatio-t.visibilityRatio;return 0===s||Number.isNaN(s)?e.observedAt-t.observedAt:s}).slice(0,this.elements.size-this.config.maxTrackedElements);for(const[t]of e)this.elements.delete(t),this.elementRefs.delete(t)}pruneTrackedBlocks(){if(this.blocks.size<=this.config.maxTrackedElements)return;const e=[...this.blocks].sort(([,e],[,t])=>{const s=e.visibilityRatio-t.visibilityRatio;return 0===s||Number.isNaN(s)?e.observedAt-t.observedAt:s}).slice(0,this.blocks.size-this.config.maxTrackedElements);for(const[t]of e)this.blocks.delete(t),this.blockRefs.delete(t)}syncTrackedElement(e,t){const s=this.resolveElementId(e),n=this.resolveBlockId(e),r=this.createTrackingKey(s,n),i=this.elementKeys.get(e);void 0!==i&&\"\"!==i&&i!==r&&(this.elements.delete(i),this.elementRefs.delete(i)),this.elementKeys.set(e,r),this.elementRefs.set(r,e),this.elements.set(r,{id:s,blockId:n,trackingKey:r,...t})}syncTrackedBlock(e,t){const s=this.resolveTrackedBlockId(e),n=this.blockKeys.get(e),r=s;void 0!==n&&\"\"!==n&&n!==r&&(this.blocks.delete(n),this.blockRefs.delete(n)),this.blockKeys.set(e,r),this.blockRefs.set(r,e),this.blocks.set(r,{id:s,...t})}resolveElementId(e){return[e.dataset.productId,e.dataset.productid,e.dataset.sku,e.id].find(e=>void 0!==e&&\"\"!==e)??`${e.tagName}-${e.dataset.productId??this.elements.size}`}resolveBlockId(e){let t;try{t=e.closest(this.config.blockSelector)??void 0}catch{return}return t instanceof HTMLElement?this.resolveTrackedBlockId(t):void 0}resolveTrackedBlockId(e){return[e.dataset.blockId,e.dataset.blockid,e.id].find(e=>void 0!==e&&\"\"!==e)??`${e.tagName}-${e.dataset.blockId??this.blocks.size}`}createTrackingKey(e,t){return void 0===t||\"\"===t?e:`${e}::${t}`}normalizeRect(e){return{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom}}calculateVisibilityRatio(e){const t=Math.max(0,Math.min(e.right,window.innerWidth)-Math.max(e.left,0))*Math.max(0,Math.min(e.bottom,window.innerHeight)-Math.max(e.top,0)),s=e.width*e.height;if(s<=0)return 0;const n=window.innerWidth*window.innerHeight,r=n>0?Math.min(s,n):s;return Math.min(1,Math.max(0,t/r))}canUseDom(){return void 0!==globalThis.window&&\"undefined\"!=typeof document}start(){!this.started&&this.canUseDom()&&(this.started=!0)}stop(){this.started&&(this.started=!1,this.elements.clear(),this.elementRefs.clear(),this.blocks.clear(),this.blockRefs.clear())}getSnapshot(){if(!this.canUseDom())return;this.rescanUi();const e=[],t=[],s=Date.now();for(const[t,s]of this.elements){const n=this.elementRefs.get(t);n?.isConnected?s.visibilityRatio<=0||e.push({blockId:s.blockId,element:{id:s.id,bounds:s.bounds,isVisible:s.visibilityRatio>=this.config.minVisibilityRatio,visibilityRatio:s.visibilityRatio}}):(this.elements.delete(t),this.elementRefs.delete(t))}for(const[e,s]of this.blocks){const n=this.blockRefs.get(e);n?.isConnected?s.visibilityRatio<this.config.minVisibilityRatio||t.push(s.id):(this.blocks.delete(e),this.blockRefs.delete(e))}const n=e.slice(0,this.config.maxTrackedElements);return{timestamp:s,viewport:{width:window.innerWidth,height:window.innerHeight},blockIds:[...new Set([...t,...n.flatMap(e=>e.blockId??[])])],elements:n.map(e=>e.element)}}}function v(e){const{data:t}=e;if(\"object\"!=typeof t||null===t)return;const{code:s,reason:n}=t;return\"number\"==typeof s?{code:s,...\"string\"==typeof n&&{reason:n}}:void 0}const R=3;function w(e,t){return e>=500&&t<3}function E(e,t){return t?void 0:v(e)??{code:0}}class S{socket;serverResponseListeners=new Set;connectionStatusListeners=new Set;errorListeners=new Set;uiObserver;uiObserverConfig=b;handshakeRetryAttempts=0;handshakeRetryTimer;setupEventListeners(){this.socket&&(this.socket.on(\"connect\",()=>{u.debug(\"Connected to Callimacus\"),this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.updateConnectionStatus(!0),this.socket?.emit(n.CLIENT_READY)}),this.socket.on(\"disconnect\",()=>{u.info(\"Disconnected from Callimacus\"),this.updateConnectionStatus(!1)}),this.socket.on(\"connect_error\",e=>{this.updateConnectionStatus(!1);const t=E(e,this.socket?.active??!0);t&&(u.error(\"Connection refused by Callimacus:\",e.message,t.reason??\"\"),this.notifyRejection(t,e.message),this.scheduleHandshakeRetry(t.code))}),this.socket.on(s.ERROR,e=>{u.error(\"Received error from Callimacus:\",e),this.notifyErrorListeners(e)}),this.socket.io.on(\"reconnect\",e=>{u.info(`Reconnected to Callimacus after ${e} attempts`)}),this.socket.io.on(\"reconnect_attempt\",e=>{u.info(`Attempting to reconnect: attempt ${e}`)}),this.socket.io.on(\"reconnect_error\",e=>{u.error(\"Reconnection error:\",e)}),this.socket.io.on(\"reconnect_failed\",()=>{u.error(\"Failed to reconnect to Callimacus service!\"),this.updateConnectionStatus(!1)}),this.socket.on(s.SERVER_RESPONSE,e=>{this.notifyServerResponseListeners(e)}))}notifyServerResponseListeners(e){this.serverResponseListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in server response listener:\",e)}})}updateConnectionStatus(e){this.connectionStatusListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in connection status listener:\",e)}})}notifyRejection(e,t){this.notifyErrorListeners({code:e.code,message:t,...void 0!==e.reason&&{reason:e.reason}})}scheduleHandshakeRetry(e){if(!this.socket)return;if(this.clearHandshakeRetry(),!w(e,this.handshakeRetryAttempts))return void(e>=500&&(u.error(\"Giving up on the Callimacus connection after 3 retries\"),this.notifyRejection({code:e,reason:\"retries_exhausted\"},\"Connection failed after 3 retries; call connect() to try again\")));const t=2**(this.handshakeRetryAttempts+1);this.handshakeRetryAttempts+=1,u.info(`Retrying Callimacus connection in ${t}s (attempt ${this.handshakeRetryAttempts}/3)`),this.handshakeRetryTimer=setTimeout(()=>{this.socket?.connect()},1e3*t)}clearHandshakeRetry(){void 0!==this.handshakeRetryTimer&&(clearTimeout(this.handshakeRetryTimer),this.handshakeRetryTimer=void 0)}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in error listener:\",e)}})}async getLocation(){if(\"undefined\"!=typeof navigator&&\"function\"==typeof navigator.geolocation?.getCurrentPosition)return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e(t)},()=>{e(void 0)})})}enrichPayloadWithUiContext(e){try{this.ensureUiObserver();const t=this.uiObserver?.getSnapshot();return t?{...e,context:{...e.context,uiSnapshot:t}}:e}catch(t){return u.error(\"Error enriching payload with UI context:\",t),e}}ensureUiObserver(){\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&this.uiObserverConfig.enabled&&(this.uiObserver??=new k(this.uiObserverConfig),this.uiObserver.start())}socketEndpoint(e){const t=new URL(e),s=new URL(\"thamyr\",t).pathname;return{origin:t.origin,path:s}}connect(t=\"wss://localhost:4000\",s,n){this.socket&&(u.warn(\"Already connected to Thamyr. Disconnecting first....\"),this.disconnect());const r=this.socketEndpoint(t);let i;\"undefined\"!=typeof window&&void 0!==globalThis.location&&(i=globalThis.location.href);const o={...void 0!==i&&\"\"!==i&&{referrer:i},...n};u.info(\"Connecting to Thamyr at\",r),this.socket=e(r.origin,{path:r.path,transports:[\"websocket\",\"polling\"],tryAllTransports:!0,extraHeaders:s,auth:o}),this.setupEventListeners(),this.ensureUiObserver()}disconnect(){this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.socket&&(this.socket.disconnect(),this.socket=void 0,this.uiObserver?.stop(),this.uiObserver=void 0,this.updateConnectionStatus(!1),u.info(\"Disconnected from Callimacus\"))}configureUiObserver(e){if(!e)return this.uiObserver?.stop(),this.uiObserver=void 0,void(this.uiObserverConfig={...b,enabled:!1});const t=e.enabled??(void 0!==e.productSelector||void 0!==e.blockSelector||void 0!==e.maxTrackedElements||void 0!==e.minVisibilityRatio||this.uiObserverConfig.enabled);if(this.uiObserverConfig={...this.uiObserverConfig,...e,enabled:t},\"undefined\"==typeof window||\"undefined\"==typeof document||!this.uiObserverConfig.enabled)return this.uiObserver?.stop(),void(this.uiObserver=void 0);this.uiObserver&&this.uiObserver.stop(),this.uiObserver=new k(this.uiObserverConfig),this.uiObserver.start()}sendUserInteraction(e,t){if(!this.socket)return void u.error(\"Socket is not connected. Cannot send interaction.\");if(e===p.BACK_FROM_ROUND){if(void 0===t.chapterId)return void u.error(\"BACK_FROM_ROUND requires chapterId.\")}const s={type:e,payload:this.enrichPayloadWithUiContext(t)},r={id:y()};this.socket.emit(n.USER_INTERACTION,{type:s.type,payload:s.payload},r.id)}async gatherClientInfo(){const e=\"undefined\"==typeof navigator?void 0:navigator,t=\"undefined\"==typeof window?void 0:window.screen;return{userAgent:e?.userAgent??\"\",language:e?.language??\"\",timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone,localTime:(new Date).toLocaleString(),screenResolution:void 0===t?\"\":`${t.width}x${t.height}`,location:await this.getLocation()}}onServerResponse(e){return this.serverResponseListeners.add(e),()=>{this.serverResponseListeners.delete(e)}}onConnectionStatus(e){return this.connectionStatusListeners.add(e),()=>{this.connectionStatusListeners.delete(e)}}onError(e){return this.errorListeners.add(e),()=>{this.errorListeners.delete(e)}}}const T=new S,O={bodySerializer:e=>JSON.stringify(e,(e,t)=>\"bigint\"==typeof t?t.toString():t)},x=Object.entries({$body_:\"body\",$headers_:\"headers\",$path_:\"path\",$query_:\"query\"});function C(e,t){t||(t=new Map);for(const s of e)\"in\"in s?s.key&&t.set(s.key,{in:s.in,map:s.map}):\"key\"in s?t.set(s.key,{map:s.map}):s.args&&C(s.args,t);return t}function I(e,t){const s={headers:Object.create(null),path:Object.create(null),query:Object.create(null)},n=C(t);function r(e,t,n){let r=s[e];void 0===r&&(r=Object.create(null),s[e]=r),r[t]=n}let i;for(const[o,a]of e.entries())if(t[o]&&(i=t[o]),i)if(\"in\"in i)if(i.key){const e=n.get(i.key),t=e.map||i.key;e.in&&r(e.in,t,a)}else s.body=a;else for(const[e,t]of Object.entries(a??{})){const o=n.get(e);if(o)if(o.in){const s=o.map||e;r(o.in,s,t)}else s[o.map]=t;else{const s=x.find(([t])=>e.startsWith(t));if(s){const[n,i]=s;r(i,e.slice(n.length),t)}else if(\"allowExtra\"in i&&i.allowExtra)for(const[s,n]of Object.entries(i.allowExtra))if(n){r(s,e,t);break}}}return function(e){for(const[t,s]of Object.entries(e))\"body\"!==t&&(!s||\"object\"!=typeof s||Array.isArray(s)||Object.keys(s).length||delete e[t])}(s),s}const A=({allowReserved:e,explode:t,name:s,style:n,value:r})=>{if(!t){const t=(e?r:r.map(e=>encodeURIComponent(e))).join((e=>{switch(e){case\"form\":default:return\",\";case\"pipeDelimited\":return\"|\";case\"spaceDelimited\":return\"%20\"}})(n));switch(n){case\"label\":return`.${t}`;case\"matrix\":return`;${s}=${t}`;case\"simple\":return t;default:return`${s}=${t}`}}const i=(e=>{switch(e){case\"label\":return\".\";case\"matrix\":return\";\";case\"simple\":return\",\";default:return\"&\"}})(n),o=r.map(t=>\"label\"===n||\"simple\"===n?e?t:encodeURIComponent(t):j({allowReserved:e,name:s,value:t})).join(i);return\"label\"===n||\"matrix\"===n?i+o:o},j=({allowReserved:e,name:t,value:s})=>{if(null==s)return\"\";if(\"object\"==typeof s)throw new Error(\"Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.\");return`${t}=${e?s:encodeURIComponent(s)}`},_=({allowReserved:e,explode:t,name:s,style:n,value:r,valueOnly:i})=>{if(r instanceof Date)return i?r.toISOString():`${s}=${r.toISOString()}`;if(\"deepObject\"!==n&&!t){let t=[];Object.entries(r).forEach(([s,n])=>{t=[...t,s,e?n:encodeURIComponent(n)]});const i=t.join(\",\");switch(n){case\"form\":return`${s}=${i}`;case\"label\":return`.${i}`;case\"matrix\":return`;${s}=${i}`;default:return i}}const o=(e=>{switch(e){case\"label\":return\".\";case\"matrix\":return\";\";case\"simple\":return\",\";default:return\"&\"}})(n),a=Object.entries(r).map(([t,r])=>j({allowReserved:e,name:\"deepObject\"===n?`${s}[${t}]`:t,value:r})).join(o);return\"label\"===n||\"matrix\"===n?o+a:a},U=/\\{[^{}]+\\}/g,$=({baseUrl:e,path:t,query:s,querySerializer:n,url:r})=>{let i=(e??\"\")+(r.startsWith(\"/\")?r:`/${r}`);t&&(i=(({path:e,url:t})=>{let s=t;const n=t.match(U);if(n)for(const t of n){let n=!1,r=t.substring(1,t.length-1),i=\"simple\";r.endsWith(\"*\")&&(n=!0,r=r.substring(0,r.length-1)),r.startsWith(\".\")?(r=r.substring(1),i=\"label\"):r.startsWith(\";\")&&(r=r.substring(1),i=\"matrix\");const o=e[r];if(null==o)continue;if(Array.isArray(o)){s=s.replace(t,A({explode:n,name:r,style:i,value:o}));continue}if(\"object\"==typeof o){s=s.replace(t,_({explode:n,name:r,style:i,value:o,valueOnly:!0}));continue}if(\"matrix\"===i){s=s.replace(t,`;${j({name:r,value:o})}`);continue}const a=encodeURIComponent(\"label\"===i?`.${o}`:o);s=s.replace(t,a)}return s})({path:t,url:i}));let o=s?n(s):\"\";return o.startsWith(\"?\")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function D(e){const t=void 0!==e.body;if(t&&e.bodySerializer){if(\"serializedBody\"in e){return void 0!==e.serializedBody&&\"\"!==e.serializedBody?e.serializedBody:null}return\"\"!==e.body?e.body:null}if(t)return e.body}const q=async(e,t)=>{const s=\"function\"==typeof t?await t(e):t;if(s)return\"bearer\"===e.scheme?`Bearer ${s}`:\"basic\"===e.scheme?`Basic ${btoa(s)}`:s},N=({parameters:e={},...t}={})=>s=>{const n=[];if(s&&\"object\"==typeof s)for(const r in s){const i=s[r];if(null==i)continue;const o=e[r]||t;if(Array.isArray(i)){const e=A({allowReserved:o.allowReserved,explode:!0,name:r,style:\"form\",value:i,...o.array});e&&n.push(e)}else if(\"object\"==typeof i){const e=_({allowReserved:o.allowReserved,explode:!0,name:r,style:\"deepObject\",value:i,...o.object});e&&n.push(e)}else{const e=j({allowReserved:o.allowReserved,name:r,value:i});e&&n.push(e)}}return n.join(\"&\")},L=(e,t)=>!!t&&!!(e.headers.has(t)||e.query?.[t]||e.headers.get(\"Cookie\")?.includes(`${t}=`));const K=e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:\"function\"==typeof e.querySerializer?e.querySerializer:N(e.querySerializer),url:e.url}),B=(e,t)=>{const s={...e,...t};return s.baseUrl?.endsWith(\"/\")&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=M(e.headers,t.headers),s},z=e=>{const t=[];return e.forEach((e,s)=>{t.push([s,e])}),t},M=(...e)=>{const t=new Headers;for(const s of e){if(!s)continue;const e=s instanceof Headers?z(s):Object.entries(s);for(const[s,n]of e)if(null===n)t.delete(s);else if(Array.isArray(n))for(const e of n)t.append(s,e);else void 0!==n&&t.set(s,\"object\"==typeof n?JSON.stringify(n):n)}return t};class V{fns=[];clear(){this.fns=[]}eject(e){const t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){const t=this.getInterceptorIndex(e);return Boolean(this.fns[t])}getInterceptorIndex(e){return\"number\"==typeof e?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){const s=this.getInterceptorIndex(e);return!!this.fns[s]&&(this.fns[s]=t,e)}use(e){return this.fns.push(e),this.fns.length-1}}const H=N({allowReserved:!1,array:{explode:!0,style:\"form\"},object:{explode:!0,style:\"deepObject\"}}),P={\"Content-Type\":\"application/json\"},W=(e={})=>({...O,headers:P,parseAs:\"auto\",querySerializer:H,...e}),Y=(e={})=>{let t=B(W(),e);const s=()=>({...t}),n={error:new V,request:new V,response:new V},r=async e=>{const s={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:M(t.headers,e.headers),serializedBody:void 0};s.security&&await async function(e){for(const t of e.security??[]){if(L(e,t.name))continue;const s=await q(t,e.auth);if(!s)continue;const n=t.name??\"Authorization\";switch(t.in){case\"query\":e.query||(e.query={}),e.query[n]=s;break;case\"cookie\":e.headers.append(\"Cookie\",`${n}=${s}`);break;default:e.headers.set(n,s)}}}(s),s.requestValidator&&await s.requestValidator(s),void 0!==s.body&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),void 0!==s.body&&\"\"!==s.serializedBody||s.headers.delete(\"Content-Type\");return{opts:s,url:K(s)}},i=async e=>{const s=e.throwOnError??t.throwOnError,i=e.responseStyle??t.responseStyle;let o,a;try{const{opts:t,url:s}=await r(e),i={redirect:\"follow\",...t,body:D(t)};o=new Request(s,i);for(const e of n.request.fns)e&&(o=await e(o,t));const c=t.fetch;a=await c(o);for(const e of n.response.fns)e&&(a=await e(a,o,t));const l={request:o,response:a};if(a.ok){const e=(\"auto\"===t.parseAs?(e=>{if(!e)return\"stream\";const t=e.split(\";\")[0]?.trim();return t?t.startsWith(\"application/json\")||t.endsWith(\"+json\")?\"json\":\"multipart/form-data\"===t?\"formData\":[\"application/\",\"audio/\",\"image/\",\"video/\"].some(e=>t.startsWith(e))?\"blob\":t.startsWith(\"text/\")?\"text\":void 0:void 0})(a.headers.get(\"Content-Type\")):t.parseAs)??\"json\";if(204===a.status||\"0\"===a.headers.get(\"Content-Length\")){let s;switch(e){case\"arrayBuffer\":case\"blob\":case\"text\":s=await a[e]();break;case\"formData\":s=new FormData;break;case\"stream\":s=a.body;break;default:s={}}return\"data\"===t.responseStyle?s:{data:s,...l}}let s;switch(e){case\"arrayBuffer\":case\"blob\":case\"formData\":case\"text\":s=await a[e]();break;case\"json\":{const e=await a.text();s=e?JSON.parse(e):{};break}case\"stream\":return\"data\"===t.responseStyle?a.body:{data:a.body,...l}}return\"json\"===e&&(t.responseValidator&&await t.responseValidator(s),t.responseTransformer&&(s=await t.responseTransformer(s))),\"data\"===t.responseStyle?s:{data:s,...l}}const d=await a.text();let u;try{u=JSON.parse(d)}catch{}throw u??d}catch(t){let r=t;for(const t of n.error.fns)t&&(r=await t(r,a,o,e));if(r=r||{},s)throw r;return\"data\"===i?void 0:{error:r,request:o,response:a}}},o=e=>t=>i({...t,method:e}),a=e=>async t=>{const{opts:s,url:i}=await r(t);return function({onRequest:e,onSseError:t,onSseEvent:s,responseTransformer:n,responseValidator:r,sseDefaultRetryDelay:i,sseMaxRetryAttempts:o,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...d}){let u;const h=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=i??3e3,y=0;const p=d.signal??(new AbortController).signal;for(;!p.aborted;){y++;const i=d.headers instanceof Headers?d.headers:new Headers(d.headers);void 0!==u&&i.set(\"Last-Event-ID\",u);try{const t={redirect:\"follow\",...d,body:d.serializedBody,headers:i,signal:p};let o=new Request(l,t);e&&(o=await e(l,t));const a=d.fetch??globalThis.fetch,h=await a(o);if(!h.ok)throw new Error(`SSE failed: ${h.status} ${h.statusText}`);if(!h.body)throw new Error(\"No body in SSE response\");const y=h.body.pipeThrough(new TextDecoderStream).getReader();let f=\"\";const m=()=>{try{y.cancel()}catch{}};p.addEventListener(\"abort\",m);try{for(;;){const{done:e,value:t}=await y.read();if(e)break;f+=t,f=f.replace(/\\r\\n?/g,\"\\n\");const i=f.split(\"\\n\\n\");f=i.pop()??\"\";for(const e of i){const t=e.split(\"\\n\"),i=[];let o,a;for(const e of t)if(e.startsWith(\"data:\"))i.push(e.replace(/^data:\\s*/,\"\"));else if(e.startsWith(\"event:\"))o=e.replace(/^event:\\s*/,\"\");else if(e.startsWith(\"id:\"))u=e.replace(/^id:\\s*/,\"\");else if(e.startsWith(\"retry:\")){const t=Number.parseInt(e.replace(/^retry:\\s*/,\"\"),10);Number.isNaN(t)||(c=t)}let l=!1;if(i.length){const e=i.join(\"\\n\");try{a=JSON.parse(e),l=!0}catch{a=e}}l&&(r&&await r(a),n&&(a=await n(a))),s?.({data:a,event:o,id:u,retry:c}),i.length&&(yield a)}}}finally{p.removeEventListener(\"abort\",m),y.releaseLock()}break}catch(e){if(t?.(e),void 0!==o&&y>=o)break;const s=Math.min(c*2**(y-1),a??3e4);await h(s)}}}()}}({...s,body:s.body,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(const e of n.request.fns)e&&(r=await e(r,s));return r},serializedBody:D(s),url:i})};return{buildUrl:e=>K({...t,...e}),connect:o(\"CONNECT\"),delete:o(\"DELETE\"),get:o(\"GET\"),getConfig:s,head:o(\"HEAD\"),interceptors:n,options:o(\"OPTIONS\"),patch:o(\"PATCH\"),post:o(\"POST\"),put:o(\"PUT\"),request:i,setConfig:e=>(t=B(t,e),s()),sse:{connect:a(\"CONNECT\"),delete:a(\"DELETE\"),get:a(\"GET\"),head:a(\"HEAD\"),options:a(\"OPTIONS\"),patch:a(\"PATCH\"),post:a(\"POST\"),put:a(\"PUT\"),trace:a(\"TRACE\")},trace:o(\"TRACE\")}};class F{client;constructor(e){this.client=e.client}}class G{defaultKey=\"default\";instances=new Map;get(e){const t=this.instances.get(e??this.defaultKey);if(!t)throw new Error('No SDK client found. Create one with \"new CallimacusApi()\" to fix this error.');return t}set(e,t){this.instances.set(t??this.defaultKey,e)}}class J extends F{getPage(e,t){const s=I([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/page/{language}/{id}\",...t,...s})}listTopics(e,t){const s=I([e],[{args:[{in:\"path\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/topic/{language}\",...t,...s})}getTopicContents(e,t){const s=I([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"idOrSlug\"},{in:\"query\",key:\"offset\"},{in:\"query\",key:\"limit\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/topic/{language}/{idOrSlug}\",...t,...s})}getDocumentBySlug(e,t){const s=I([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"slug\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/{language}/{slug}\",...t,...s})}getDocumentByGroup(e,t){const s=I([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"groupId\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/by-group/{language}/{groupId}\",...t,...s})}getDocumentByPath(e,t){const s=I([e],[{args:[{in:\"query\",key:\"path\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/by-path\",...t,...s})}}class Q extends F{getShared(e,t){const s=I([e],[{args:[{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/share/{id}\",...t,...s})}share(e,t){const s=I([e],[{args:[{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/share/{id}\",...t,...s})}}class Z extends F{getSimilar(e,t){const s=I([e],[{args:[{in:\"path\",key:\"productId\"},{in:\"query\",key:\"topK\"},{in:\"query\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/product/{productId}/similar\",...t,...s})}getRecommendations(e,t){const s=I([e],[{args:[{in:\"path\",key:\"productId\"},{in:\"query\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/product/{productId}/recommendations\",...t,...s})}}class X extends F{getLast(e,t){const s=I([e],[{args:[{in:\"query\",key:\"storyId\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/whisper\",...t,...s})}}class ee extends F{trackEvent(e,t){const s=I([e],[{args:[{in:\"body\",key:\"storyId\"},{in:\"body\",key:\"eventName\"},{in:\"body\",key:\"content\"},{in:\"body\",key:\"payload\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/track-event\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class te extends F{getCart(e){return(e?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart\",...e})}addItemToCart(e,t){const s=I([e],[{args:[{in:\"body\",key:\"productId\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/add\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}removeItemFromCart(e,t){const s=I([e],[{args:[{in:\"body\",key:\"productId\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/remove\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}updateProductQuantity(e,t){const s=I([e],[{args:[{in:\"body\",key:\"productId\"},{in:\"body\",key:\"quantity\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/update\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class se extends F{similar(e,t){const s=I([e],[{args:[{in:\"body\",key:\"anchorId\"},{in:\"body\",key:\"topK\"},{in:\"body\",key:\"locale\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/skesis/query/similar\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}related(e,t){const s=I([e],[{args:[{in:\"body\",key:\"anchorId\"},{in:\"body\",key:\"locale\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/skesis/query/related\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class ne extends F{static __registry=new G;constructor(e){super(e),ne.__registry.set(this,e.key)}_content;get content(){return this._content??=new J({client:this.client})}_stories;get stories(){return this._stories??=new Q({client:this.client})}_products;get products(){return this._products??=new Z({client:this.client})}_whisper;get whisper(){return this._whisper??=new X({client:this.client})}_analytics;get analytics(){return this._analytics??=new ee({client:this.client})}_cart;get cart(){return this._cart??=new te({client:this.client})}_skesis;get skesis(){return this._skesis??=new se({client:this.client})}}class re extends Error{status;body;response;request;constructor(e,t,s){const n=t?.status,r=s?`${s.method} ${s.url}`:\"request\";let i=`[thamyr] ${r} failed before a response arrived`;t&&(i=t.ok?`[thamyr] ${r} → ${t.status}, but the response could not be processed`:`[thamyr] ${r} → ${t.status}`),super(i,e instanceof Error?{cause:e}:void 0),this.name=\"ThamyrHttpError\",this.status=n,this.body=e,this.response=t,this.request=s}}function ie(e){const t=Y(W({baseUrl:new URL(\"api/v3\",e.endpoint).href,headers:{Authorization:`Bearer ${e.accessToken}`,\"x-sl-access-token\":e.accessToken},credentials:e.withCredentials?\"include\":\"same-origin\"}));return t.interceptors.error.use((e,s,n,r)=>{if(!(r.throwOnError??t.getConfig().throwOnError??!1)||!0===r.signal?.aborted)return e;return new re(\"\"===e?{}:e??{},s,n)}),t}export{ne as CallimacusApi,f as CallimacusEvent,S as CallimacusService,o as ChapterStatus,n as ClientEvents,i as GalleryMode,R as MAX_HANDSHAKE_RETRIES,r as SLInputEventType,s as ServerEvents,re as ThamyrHttpError,t as ThamyrResponseType,p as UserInteractionType,T as callimacusService,E as classifyConnectError,ie as createContractClient,g as extractTtsAudio,a as isCustomBlock,l as isMasterProduct,c as isSetProduct,u as logger,v as parseConnectRejection,y as randomUuid,w as shouldRetryHandshake,h as transformImageUrl};\n//# sourceMappingURL=index.js.map\n",null,null],"names":["t","Object","create","open","close","ping","pong","message","upgrade","noop","s","keys","forEach","i","type","data","e","Blob","prototype","toString","call","n","ArrayBuffer","r","isView","buffer","o","c","h","FileReader","onload","result","split","readAsDataURL","Uint8Array","byteOffset","byteLength","a","f","charCodeAt","l","d","y","charAt","p","substring","length","u","base64","b","String","fromCharCode","w","TransformStream","transform","arrayBuffer","then","TextEncoder","encode","DataView","setUint8","setUint16","setBigUint64","BigInt","enqueue","g","v","reduce","m","shift","slice","k","on","addEventListener","this","push","once","off","apply","arguments","fn","removeListener","removeAllListeners","removeEventListener","splice","emit","Array","emitReserved","listeners","hasListeners","A","Promise","resolve","E","self","window","Function","O","hasOwnProperty","_","setTimeout","j","clearTimeout","B","useNativeTimers","setTimeoutFn","bind","clearTimeoutFn","x","Date","now","Math","random","C","Error","constructor","super","description","context","T","writable","opts","query","socket","supportsBinary","forceBase64","onError","readyState","doOpen","doClose","onClose","send","write","onOpen","onData","binaryType","onPacket","pause","createUri","path","hostname","indexOf","port","secure","Number","encodeURIComponent","N","name","doPoll","join","doWrite","uri","timestampRequests","timestampParam","sid","b64","U","XMLHttpRequest","P","D","M","location","protocol","xd","request","method","pollXhr","S$1","S","createRequest","xdomain","extraHeaders","setDisableHeaderCheck","setRequestHeader","cookieJar","addCookies","withCredentials","requestTimeout","timeout","onreadystatechange","parseCookies","getResponseHeader","status","document","requestsCount","requests","abort","responseText","L","attachEvent","R","F","responseType","concat","$","navigator","product","toLowerCase","V","protocols","headers","ws","createSocket","addEventListeners","onopen","autoUnref","unref","onclose","onmessage","onerror","W","WebSocket","MozWebSocket","X","websocket","webtransport","WebTransport","transportOptions","closed","catch","ready","createBidirectionalStream","TextDecoder","getUint16","getUint32","pow","decode","MAX_SAFE_INTEGER","readable","pipeThrough","getReader","pipeTo","getWriter","read","done","value","polling","assign","z","J","Q","replace","exec","source","host","authority","ipv6uri","pathNames","queryKey","G","K","Y","writeBuffer","transportImplementations","transports","I","agent","rememberUpgrade","addTrailingSlash","rejectUnauthorized","perMessageDeflate","threshold","closeOnBeforeunload","decodeURIComponent","transport","q","createTransport","EIO","id","priorWebsocketSuccess","setTransport","H","upgrading","flush","onHandshake","JSON","parse","code","upgrades","pingInterval","pingTimeout","maxPayload","Z","tt","ceil","size","st","compress","options","tryAllTransports","it","et","nt","File","rt","ot","isArray","toJSON","ht","ct","attachments","packet","buffers","_placeholder","num","at","ut","ft","dt","CONNECT","DISCONNECT","EVENT","ACK","CONNECT_ERROR","BINARY_EVENT","BINARY_ACK","pt","reviver","maxAttachments","add","reconstructor","decodeString","yt","takeBinaryData","bt","nsp","tryParse","substr","isPayloadValid","wt","destroy","finishedReconstruction","reconPack","isInteger","isFinite","floor","gt","freeze","__proto__","PacketType","Encoder","replacer","encodeAsString","encodeAsBinary","stringify","unshift","Decoder","isPacketValid","vt","mt","connect","connect_error","disconnect","disconnecting","newListener","kt","connected","recovered","receiveBuffer","sendBuffer","ids","acks","flags","io","auth","disconnected","subEvents","subs","onpacket","active","retries","fromQueue","volatile","pop","engine","notifyOutgoingListeners","ackTimeout","withError","emitWithAck","tryCount","pending","args","lt","pid","offset","some","onconnect","onevent","onack","ondisconnect","ack","emitEvent","emitBuffered","onAny","prependAny","offAny","listenersAny","onAnyOutgoing","prependAnyOutgoing","offAnyOutgoing","listenersAnyOutgoing","At","ms","min","max","factor","jitter","attempts","duration","reset","setMin","setMax","setJitter","Et","nsps","reconnection","reconnectionAttempts","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","parser","encoder","decoder","autoConnect","skipReconnect","Ot","_t","jt","Bt","maybeReconnectOnOpen","reconnect","cleanup","onping","ondata","ondecoded","xt","onreconnect","test","href","forceNew","multiplex","Manager","Socket","debug","info","warn","error","silent","config","enabled","level","prefix","log","console","configure","getConfig","crypto","randomUUID","getRandomValues","map","padStart","GET_STORY","CREATE_ROUND","RESET_STORY","BACK_FROM_ROUND","SHARE_STORY","GET_SHARED_STORY","ROUND_CREATED","ROUND_EVENT","ROUND_COMPLETED","ERROR","productSelector","blockSelector","maxTrackedElements","minVisibilityRatio","elements","Map","elementRefs","elementKeys","WeakMap","blocks","blockRefs","blockKeys","started","rescanUi","canUseDom","querySelectorAll","normalizeRect","getBoundingClientRect","calculateVisibilityRatio","syncTrackedElement","bounds","isVisible","visibilityRatio","observedAt","syncTrackedBlock","pruneTrackedElements","pruneTrackedBlocks","sort","isNaN","delete","resolveElementId","resolveBlockId","createTrackingKey","get","set","blockId","trackingKey","resolveTrackedBlockId","dataset","productId","productid","sku","find","tagName","closest","HTMLElement","blockid","width","height","top","left","right","bottom","innerWidth","innerHeight","globalThis","start","stop","clear","getSnapshot","isConnected","element","timestamp","viewport","blockIds","Set","flatMap","serverResponseListeners","connectionStatusListeners","errorListeners","uiObserver","uiObserverConfig","handshakeRetryAttempts","handshakeRetryTimer","setupEventListeners","clearHandshakeRetry","updateConnectionStatus","reason","notifyRejection","scheduleHandshakeRetry","notifyErrorListeners","notifyServerResponseListeners","getLocation","geolocation","getCurrentPosition","enrichPayloadWithUiContext","ensureUiObserver","uiSnapshot","socketEndpoint","URL","pathname","origin","referrer","configureUiObserver","sendUserInteraction","chapterId","payload","gatherClientInfo","screen","userAgent","language","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","localTime","toLocaleString","screenResolution","onServerResponse","onConnectionStatus","DEFAULT_ENDPOINT","DEFAULT_CART_ADD_URL","LOG","CallimacusError","parseSettings","text","undefined","parsed","attr","fallback","serverCode","setState","root","state","callimacusState","setAttribute","detail","dispatchEvent","CustomEvent","bubbles","dataValues","block","values","makeCtx","locale","NumberFormat","supportedLocalesOf","formatters","currency","settings","picks","items","filter","item","Boolean","fields","trim","nested","money","price","amount","own","has","style","formatterFor","format","toFixed","productUrl","handle","rootUrl","endsWith","imageUrl","index","url","images","variantId","variants","variantTree","variant","candidate","orderable","addToCart","quantity","response","fetch","cartAddUrl","Accept","body","cause","json","ok","rendererFor","callimacusRenderers","registry","entry","render","mount","hasOwn","callimacusReady","clientId","endpoint","querySelector","textContent","designMode","roundTimeoutMs","ctx","consumedChapters","lastTransportError","isInFlight","ensureTransport","CallimacusService","Authorization","token","async","requestRound","activeTransport","reject","timer","offResponse","offError","ThamyrResponseType","chapter","ChapterStatus","echoed","inputEvent","UserInteractionType","ask","priority","fragment","rendered","createDocumentFragment","renderer","node","Node","append","renderBlocks","replaceChildren","callimacus","prompt","mountRoot","mountAll","scope","event","target","Element"],"mappings":";;;;;;;;;;;;OAKA,MAAMA,EAAEC,OAAOC,OAAO,MAAMF,EAAEG,KAAK,IAAIH,EAAEI,MAAM,IAAIJ,EAAEK,KAAK,IAAIL,EAAEM,KAAK,IAAIN,EAAEO,QAAQ,IAAIP,EAAEQ,QAAQ,IAAIR,EAAES,KAAK,IAAI,MAAMC,EAAET,OAAOC,OAAO,MAAMD,OAAOU,KAAKX,GAAGY,QAASC,IAAIH,EAAEV,EAAEa,IAAIA,CAAE,GAAG,MAAMA,EAAE,CAACC,KAAK,QAAQC,KAAK,gBAAgBC,EAAE,mBAAmBC,MAAM,oB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AM1K,KAACA,EAAI9Q,QAAEA,GAAWwb,aAAiB2I,GAAkB3I,EAAQ,CAAC1K,KAAM,QAAS9Q,QAAS2C,OAAO6Y,IACnGO,QAAQP,MAAM,GAAG0I,MAAOpT,MAAS9Q,+BAClC,SACCwpB,GAAa,CACd,CA5BA,CA6BD,CAEA,MAAMxC,EAA2B,CAChC0D,MACArB,MACA,SAAIxE,GACH,OAAOD,EAAKrF,QAAQuF,eACrB,GAEDF,EAAKyG,WAAarE,EAClBliB,GAAK8f,EAAM,qBAAsBoC,QAEV1C,IAAnB/E,EAAQ+L,QAA2C,KAAnB/L,EAAQ+L,QACtCZ,EAAInL,EAAQ+L,OAEnB,CAnLEC,CAAU3G,EAAMnT,EACjB,CAAE,MAAO+J,GACRmJ,GAASC,EAAM,SACf9f,GAAK8f,EAAM,mBAAoB,CAACpJ,UAChCO,QAAQP,MAAM,GAAG0I,6CAA+C1I,EACjE,CAVA,CAWD,UAkLgBgQ,GAASC,EAAmBha,EAAwB,IACnE,IAAK,MAAMmT,KAAQ6G,EAAMzN,iBAAwC,qBAChE4K,GAAMhE,EAAMnT,EAEd,CCnoBA,SAASgP,KAGRzV,SAAS9G,iBAAiB,uBAAwBwnB,IAC7CA,EAAMC,kBAAkBC,SAC3BJ,GAASE,EAAMC,UAGjBH,GAASxgB,SACV,CAG4B,YAAxBA,SAASxD,WACZwD,SAAS9G,iBAAiB,mBAAoBuc,IAE9CA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"callimacus-runtime.min.js","sources":["../../../../node_modules/socket.io-client/dist/socket.io.esm.min.js","../../../core/dist/esm/index.js","../../../src/index.ts","../../../src/browser.ts"],"sourcesContent":["/*!\n * Socket.IO v4.8.4\n * (c) 2014-2026 Guillermo Rauch\n * Released under the MIT License.\n */\nconst t=Object.create(null);t.open=\"0\",t.close=\"1\",t.ping=\"2\",t.pong=\"3\",t.message=\"4\",t.upgrade=\"5\",t.noop=\"6\";const s=Object.create(null);Object.keys(t).forEach((i=>{s[t[i]]=i}));const i={type:\"error\",data:\"parser error\"},e=\"function\"==typeof Blob||\"undefined\"!=typeof Blob&&\"[object BlobConstructor]\"===Object.prototype.toString.call(Blob),n=\"function\"==typeof ArrayBuffer,r=t=>\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,o=({type:s,data:i},o,c)=>e&&i instanceof Blob?o?c(i):h(i,c):n&&(i instanceof ArrayBuffer||r(i))?o?c(i):h(new Blob([i]),c):c(t[s]+(i||\"\")),h=(t,s)=>{const i=new FileReader;return i.onload=function(){const t=i.result.split(\",\")[1];s(\"b\"+(t||\"\"))},i.readAsDataURL(t)};function c(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let a;const u=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",f=\"undefined\"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)f[u.charCodeAt(t)]=t;const l=\"function\"==typeof ArrayBuffer,d=(t,e)=>{if(\"string\"!=typeof t)return{type:\"message\",data:y(t,e)};const n=t.charAt(0);if(\"b\"===n)return{type:\"message\",data:p(t.substring(1),e)};return s[n]?t.length>1?{type:s[n],data:t.substring(1)}:{type:s[n]}:i},p=(t,s)=>{if(l){const i=(t=>{let s,i,e,n,r,o=.75*t.length,h=t.length,c=0;\"=\"===t[t.length-1]&&(o--,\"=\"===t[t.length-2]&&o--);const a=new ArrayBuffer(o),u=new Uint8Array(a);for(s=0;s<h;s+=4)i=f[t.charCodeAt(s)],e=f[t.charCodeAt(s+1)],n=f[t.charCodeAt(s+2)],r=f[t.charCodeAt(s+3)],u[c++]=i<<2|e>>4,u[c++]=(15&e)<<4|n>>2,u[c++]=(3&n)<<6|63&r;return a})(t);return y(i,s)}return{base64:!0,data:t}},y=(t,s)=>\"blob\"===s?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,b=String.fromCharCode(30);function w(){return new TransformStream({transform(t,s){!function(t,s){e&&t.data instanceof Blob?t.data.arrayBuffer().then(c).then(s):n&&(t.data instanceof ArrayBuffer||r(t.data))?s(c(t.data)):o(t,!1,(t=>{a||(a=new TextEncoder),s(a.encode(t))}))}(t,(i=>{const e=i.length;let n;if(e<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,e);else if(e<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,e)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(e))}t.data&&\"string\"!=typeof t.data&&(n[0]|=128),s.enqueue(n),s.enqueue(i)}))}})}let g;function v(t){return t.reduce(((t,s)=>t+s.length),0)}function m(t,s){if(t[0].length===s)return t.shift();const i=new Uint8Array(s);let e=0;for(let n=0;n<s;n++)i[n]=t[0][e++],e===t[0].length&&(t.shift(),e=0);return t.length&&e<t[0].length&&(t[0]=t[0].slice(e)),i}function k(t){if(t)return function(t){for(var s in k.prototype)t[s]=k.prototype[s];return t}(t)}k.prototype.on=k.prototype.addEventListener=function(t,s){return this.t=this.t||{},(this.t[\"$\"+t]=this.t[\"$\"+t]||[]).push(s),this},k.prototype.once=function(t,s){function i(){this.off(t,i),s.apply(this,arguments)}return i.fn=s,this.on(t,i),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(t,s){if(this.t=this.t||{},0==arguments.length)return this.t={},this;var i,e=this.t[\"$\"+t];if(!e)return this;if(1==arguments.length)return delete this.t[\"$\"+t],this;for(var n=0;n<e.length;n++)if((i=e[n])===s||i.fn===s){e.splice(n,1);break}return 0===e.length&&delete this.t[\"$\"+t],this},k.prototype.emit=function(t){this.t=this.t||{};for(var s=new Array(arguments.length-1),i=this.t[\"$\"+t],e=1;e<arguments.length;e++)s[e-1]=arguments[e];if(i){e=0;for(var n=(i=i.slice(0)).length;e<n;++e)i[e].apply(this,s)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(t){return this.t=this.t||{},this.t[\"$\"+t]||[]},k.prototype.hasListeners=function(t){return!!this.listeners(t).length};const A=\"function\"==typeof Promise&&\"function\"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,s)=>s(t,0),E=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:Function(\"return this\")();function O(t,...s){return s.reduce(((s,i)=>(t.hasOwnProperty(i)&&(s[i]=t[i]),s)),{})}const _=E.setTimeout,j=E.clearTimeout;function B(t,s){s.useNativeTimers?(t.setTimeoutFn=_.bind(E),t.clearTimeoutFn=j.bind(E)):(t.setTimeoutFn=E.setTimeout.bind(E),t.clearTimeoutFn=E.clearTimeout.bind(E))}function x(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class C extends Error{constructor(t,s,i){super(t),this.description=s,this.context=i,this.type=\"TransportError\"}}class T extends k{constructor(t){super(),this.writable=!1,B(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,s,i){return super.emitReserved(\"error\",new C(t,s,i)),this}open(){return this.readyState=\"opening\",this.doOpen(),this}close(){return\"opening\"!==this.readyState&&\"open\"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){\"open\"===this.readyState&&this.write(t)}onOpen(){this.readyState=\"open\",this.writable=!0,super.emitReserved(\"open\")}onData(t){const s=d(t,this.socket.binaryType);this.onPacket(s)}onPacket(t){super.emitReserved(\"packet\",t)}onClose(t){this.readyState=\"closed\",super.emitReserved(\"close\",t)}pause(t){}createUri(t,s={}){return t+\"://\"+this.i()+this.o()+this.opts.path+this.h(s)}i(){const t=this.opts.hostname;return-1===t.indexOf(\":\")?t:\"[\"+t+\"]\"}o(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?\":\"+this.opts.port:\"\"}h(t){const s=function(t){let s=\"\";for(let i in t)t.hasOwnProperty(i)&&(s.length&&(s+=\"&\"),s+=encodeURIComponent(i)+\"=\"+encodeURIComponent(t[i]));return s}(t);return s.length?\"?\"+s:\"\"}}class N extends T{constructor(){super(...arguments),this.u=!1}get name(){return\"polling\"}doOpen(){this.l()}pause(t){this.readyState=\"pausing\";const s=()=>{this.readyState=\"paused\",t()};if(this.u||!this.writable){let t=0;this.u&&(t++,this.once(\"pollComplete\",(function(){--t||s()}))),this.writable||(t++,this.once(\"drain\",(function(){--t||s()})))}else s()}l(){this.u=!0,this.doPoll(),this.emitReserved(\"poll\")}onData(t){((t,s)=>{const i=t.split(b),e=[];for(let t=0;t<i.length;t++){const n=d(i[t],s);if(e.push(n),\"error\"===n.type)break}return e})(t,this.socket.binaryType).forEach((t=>{if(\"opening\"===this.readyState&&\"open\"===t.type&&this.onOpen(),\"close\"===t.type)return this.onClose({description:\"transport closed by the server\"}),!1;this.onPacket(t)})),\"closed\"!==this.readyState&&(this.u=!1,this.emitReserved(\"pollComplete\"),\"open\"===this.readyState&&this.l())}doClose(){const t=()=>{this.write([{type:\"close\"}])};\"open\"===this.readyState?t():this.once(\"open\",t)}write(t){this.writable=!1,((t,s)=>{const i=t.length,e=new Array(i);let n=0;t.forEach(((t,r)=>{o(t,!1,(t=>{e[r]=t,++n===i&&s(e.join(b))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved(\"drain\")}))}))}uri(){const t=this.opts.secure?\"https\":\"http\",s=this.query||{};return!1!==this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||s.sid||(s.b64=1),this.createUri(t,s)}}let U=!1;try{U=\"undefined\"!=typeof XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest}catch(t){}const P=U;function D(){}class M extends N{constructor(t){if(super(t),\"undefined\"!=typeof location){const s=\"https:\"===location.protocol;let i=location.port;i||(i=s?\"443\":\"80\"),this.xd=\"undefined\"!=typeof location&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:\"POST\",data:t});i.on(\"success\",s),i.on(\"error\",((t,s)=>{this.onError(\"xhr post error\",t,s)}))}doPoll(){const t=this.request();t.on(\"data\",this.onData.bind(this)),t.on(\"error\",((t,s)=>{this.onError(\"xhr poll error\",t,s)})),this.pollXhr=t}}class S extends k{constructor(t,s,i){super(),this.createRequest=t,B(this,i),this.p=i,this.v=i.method||\"GET\",this.m=s,this.k=void 0!==i.data?i.data:null,this.A()}A(){var t;const s=O(this.p,\"agent\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"autoUnref\");s.xdomain=!!this.p.xd;const i=this.O=this.createRequest(s);try{i.open(this.v,this.m,!0);try{if(this.p.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let t in this.p.extraHeaders)this.p.extraHeaders.hasOwnProperty(t)&&i.setRequestHeader(t,this.p.extraHeaders[t])}}catch(t){}if(\"POST\"===this.v)try{i.setRequestHeader(\"Content-type\",\"text/plain;charset=UTF-8\")}catch(t){}try{i.setRequestHeader(\"Accept\",\"*/*\")}catch(t){}null===(t=this.p.cookieJar)||void 0===t||t.addCookies(i),\"withCredentials\"in i&&(i.withCredentials=this.p.withCredentials),this.p.requestTimeout&&(i.timeout=this.p.requestTimeout),i.onreadystatechange=()=>{var t;3===i.readyState&&(null===(t=this.p.cookieJar)||void 0===t||t.parseCookies(i.getResponseHeader(\"set-cookie\"))),4===i.readyState&&(200===i.status||1223===i.status?this._():this.setTimeoutFn((()=>{this.j(\"number\"==typeof i.status?i.status:0)}),0))},i.send(this.k)}catch(t){return void this.setTimeoutFn((()=>{this.j(t)}),0)}\"undefined\"!=typeof document&&(this.B=S.requestsCount++,S.requests[this.B]=this)}j(t){this.emitReserved(\"error\",t,this.O),this.C(!0)}C(t){if(void 0!==this.O&&null!==this.O){if(this.O.onreadystatechange=D,t)try{this.O.abort()}catch(t){}\"undefined\"!=typeof document&&delete S.requests[this.B],this.O=null}}_(){const t=this.O.responseText;null!==t&&(this.emitReserved(\"data\",t),this.emitReserved(\"success\"),this.C())}abort(){this.C()}}if(S.requestsCount=0,S.requests={},\"undefined\"!=typeof document)if(\"function\"==typeof attachEvent)attachEvent(\"onunload\",L);else if(\"function\"==typeof addEventListener){addEventListener(\"onpagehide\"in E?\"pagehide\":\"unload\",L,!1)}function L(){for(let t in S.requests)S.requests.hasOwnProperty(t)&&S.requests[t].abort()}const R=function(){const t=F({xdomain:!1});return t&&null!==t.responseType}();class I extends M{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=R&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new S(F,this.uri(),t)}}function F(t){const s=t.xdomain;try{if(\"undefined\"!=typeof XMLHttpRequest&&(!s||P))return new XMLHttpRequest}catch(t){}if(!s)try{return new(E[[\"Active\"].concat(\"Object\").join(\"X\")])(\"Microsoft.XMLHTTP\")}catch(t){}}const $=\"undefined\"!=typeof navigator&&\"string\"==typeof navigator.product&&\"reactnative\"===navigator.product.toLowerCase();class V extends T{get name(){return\"websocket\"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=$?{}:O(this.opts,\"agent\",\"perMessageDeflate\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"localAddress\",\"protocolVersion\",\"origin\",\"maxPayload\",\"family\",\"checkServerIdentity\");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(t){return this.emitReserved(\"error\",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws.T.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:\"websocket connection closed\",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError(\"websocket error\",t)}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;o(i,this.supportsBinary,(t=>{try{this.doWrite(i,t)}catch(t){}e&&A((()=>{this.writable=!0,this.emitReserved(\"drain\")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?\"wss\":\"ws\",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=x()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const W=E.WebSocket||E.MozWebSocket;class q extends V{createSocket(t,s,i){return $?new W(t,s,i):s?new W(t,s):new W(t)}doWrite(t,s){this.ws.send(s)}}class H extends T{get name(){return\"webtransport\"}doOpen(){try{this.N=new WebTransport(this.createUri(\"https\"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved(\"error\",t)}this.N.closed.then((()=>{this.onClose()})).catch((t=>{this.onError(\"webtransport error\",t)})),this.N.ready.then((()=>{this.N.createBidirectionalStream().then((t=>{const s=function(t,s){g||(g=new TextDecoder);const e=[];let n=0,r=-1,o=!1;return new TransformStream({transform(h,c){for(e.push(h);;){if(0===n){if(v(e)<1)break;const t=m(e,1);o=!(128&~t[0]),r=127&t[0],n=r<126?3:126===r?1:2}else if(1===n){if(v(e)<2)break;const t=m(e,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(v(e)<8)break;const t=m(e,8),s=new DataView(t.buffer,t.byteOffset,t.length),o=s.getUint32(0);if(o>Math.pow(2,21)-1){c.enqueue(i);break}r=o*Math.pow(2,32)+s.getUint32(4),n=3}else{if(v(e)<r)break;const t=m(e,r);c.enqueue(d(o?t:g.decode(t),s)),n=0}if(0===r||r>t){c.enqueue(i);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(s).getReader(),n=w();n.readable.pipeTo(t.writable),this.U=n.writable.getWriter();const r=()=>{e.read().then((({done:t,value:s})=>{t||(this.onPacket(s),r())})).catch((t=>{}))};r();const o={type:\"open\"};this.query.sid&&(o.data=`{\"sid\":\"${this.query.sid}\"}`),this.U.write(o).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let s=0;s<t.length;s++){const i=t[s],e=s===t.length-1;this.U.write(i).then((()=>{e&&A((()=>{this.writable=!0,this.emitReserved(\"drain\")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.N)||void 0===t||t.close()}}const X={websocket:q,webtransport:H,polling:I},z=/^(?:(?![^:@\\/?#]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@\\/?#]*)(?::([^:@\\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,J=[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"];function Q(t){if(t.length>8e3)throw\"URI too long\";const s=t,i=t.indexOf(\"[\"),e=t.indexOf(\"]\");-1!=i&&-1!=e&&(t=t.substring(0,i)+t.substring(i,e).replace(/:/g,\";\")+t.substring(e,t.length));let n=z.exec(t||\"\"),r={},o=14;for(;o--;)r[J[o]]=n[o]||\"\";return-1!=i&&-1!=e&&(r.source=s,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,\":\"),r.authority=r.authority.replace(\"[\",\"\").replace(\"]\",\"\").replace(/;/g,\":\"),r.ipv6uri=!0),r.pathNames=function(t,s){const i=/\\/{2,9}/g,e=s.replace(i,\"/\").split(\"/\");\"/\"!=s.slice(0,1)&&0!==s.length||e.splice(0,1);\"/\"==s.slice(-1)&&e.splice(e.length-1,1);return e}(0,r.path),r.queryKey=function(t,s){const i={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,s,e){s&&(i[s]=e)})),i}(0,r.query),r}const G=\"function\"==typeof addEventListener&&\"function\"==typeof removeEventListener,K=[];G&&addEventListener(\"offline\",(()=>{K.forEach((t=>t()))}),!1);class Y extends k{constructor(t,s={}){var i,e;if(super(),this.binaryType=\"arraybuffer\",this.writeBuffer=[],this.P=0,this.D=[],this.M=-1,this.S=-1,this.L=-1,this.R=1/0,t&&\"object\"==typeof t&&(s=t,t=null),t){const i=Q(t);s.hostname=i.host,s.secure=\"https\"===i.protocol||\"wss\"===i.protocol,s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=Q(s.host).host);if(B(this,s),this.secure=null!=s.secure?s.secure:\"undefined\"!=typeof location&&\"https:\"===location.protocol,s.hostname&&!s.port&&(s.port=this.secure?\"443\":\"80\"),this.hostname=s.hostname||(\"undefined\"!=typeof location?location.hostname:\"localhost\"),this.port=s.port||(\"undefined\"!=typeof location&&location.port?location.port:this.secure?\"443\":\"80\"),s.transportImplementations&&s.transports)throw new Error(\"specifying both 'transportImplementations' and 'transports' options is not supported\");s.transportImplementations||(null===(i=s.transports)||void 0===i?void 0:i.length)&&\"function\"==typeof s.transports[0]?(this.transports=[],this.I=Object.create(null),(null!==(e=s.transportImplementations)&&void 0!==e?e:s.transports).forEach((t=>{const s=t.prototype.name;this.transports.push(s),this.I[s]=t}))):(this.transports=s.transports?[...s.transports]:[\"polling\",\"websocket\",\"webtransport\"],this.I=X),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},s),this.opts.path=this.opts.path.replace(/\\/$/,\"\")+(this.opts.addTrailingSlash?\"/\":\"\"),\"string\"==typeof this.opts.query&&(this.opts.query=function(t){let s={},i=t.split(\"&\");for(let t=0,e=i.length;t<e;t++){let e=i[t].split(\"=\");s[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return s}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this.F=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(\"beforeunload\",this.F,!1)),\"localhost\"!==this.hostname&&(this.$=()=>{this.V(\"transport close\",{description:\"network connection lost\"})},K.push(this.$))),this.opts.withCredentials&&(this.W=void 0),this.q()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=4,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this.I[t](i)}q(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved(\"error\",\"No transports available\")}),0);const t=this.opts.rememberUpgrade&&Y.priorWebsocketSuccess&&-1!==this.transports.indexOf(\"websocket\")?\"websocket\":this.transports[0];this.readyState=\"opening\";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on(\"drain\",this.H.bind(this)).on(\"packet\",this.X.bind(this)).on(\"error\",this.j.bind(this)).on(\"close\",(t=>this.V(\"transport close\",t)))}J(t){let s=this.createTransport(t),i=!1;Y.priorWebsocketSuccess=!1;const e=()=>{i||(s.send([{type:\"ping\",data:\"probe\"}]),s.once(\"packet\",(t=>{if(!i)if(\"pong\"===t.type&&\"probe\"===t.data){if(this.upgrading=!0,this.emitReserved(\"upgrading\",s),!s)return;Y.priorWebsocketSuccess=\"websocket\"===s.name,this.transport.pause((()=>{i||\"closed\"!==this.readyState&&(a(),this.setTransport(s),s.send([{type:\"upgrade\"}]),this.emitReserved(\"upgrade\",s),s=null,this.upgrading=!1,this.flush())}))}else{const t=new Error(\"probe error\");t.transport=s.name,this.emitReserved(\"upgradeError\",t)}})))};function n(){i||(i=!0,a(),s.close(),s=null)}const r=t=>{const i=new Error(\"probe error: \"+t);i.transport=s.name,n(),this.emitReserved(\"upgradeError\",i)};function o(){r(\"transport closed\")}function h(){r(\"socket closed\")}function c(t){s&&t.name!==s.name&&n()}const a=()=>{s.removeListener(\"open\",e),s.removeListener(\"error\",r),s.removeListener(\"close\",o),this.off(\"close\",h),this.off(\"upgrading\",c)};s.once(\"open\",e),s.once(\"error\",r),s.once(\"close\",o),this.once(\"close\",h),this.once(\"upgrading\",c),-1!==this.D.indexOf(\"webtransport\")&&\"webtransport\"!==t?this.setTimeoutFn((()=>{i||s.open()}),200):s.open()}onOpen(){if(this.readyState=\"open\",Y.priorWebsocketSuccess=\"websocket\"===this.transport.name,this.emitReserved(\"open\"),this.flush(),\"open\"===this.readyState&&this.opts.upgrade)for(let t=0;t<this.D.length;t++)this.J(this.D[t])}X(t){if(\"opening\"===this.readyState||\"open\"===this.readyState||\"closing\"===this.readyState)switch(this.emitReserved(\"packet\",t),this.emitReserved(\"heartbeat\"),t.type){case\"open\":this.onHandshake(JSON.parse(t.data));break;case\"ping\":this.G(\"pong\"),this.emitReserved(\"ping\"),this.emitReserved(\"pong\"),this.K();break;case\"error\":const s=new Error(\"server error\");s.code=t.data,this.j(s);break;case\"message\":this.emitReserved(\"data\",t.data),this.emitReserved(\"message\",t.data)}}onHandshake(t){this.emitReserved(\"handshake\",t),this.id=t.sid,this.transport.query.sid=t.sid,this.D=this.Y(t.upgrades),this.M=t.pingInterval,this.S=t.pingTimeout,this.L=t.maxPayload,this.onOpen(),\"closed\"!==this.readyState&&this.K()}K(){this.clearTimeoutFn(this.Z);const t=this.M+this.S;this.R=Date.now()+t,this.Z=this.setTimeoutFn((()=>{this.V(\"ping timeout\")}),t),this.opts.autoUnref&&this.Z.unref()}H(){this.writeBuffer.splice(0,this.P),this.P=0,0===this.writeBuffer.length?this.emitReserved(\"drain\"):this.flush()}flush(){if(\"closed\"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.tt();this.transport.send(t),this.P=t.length,this.emitReserved(\"flush\")}}tt(){if(!(this.L&&\"polling\"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let i=0;i<this.writeBuffer.length;i++){const e=this.writeBuffer[i].data;if(e&&(t+=\"string\"==typeof(s=e)?function(t){let s=0,i=0;for(let e=0,n=t.length;e<n;e++)s=t.charCodeAt(e),s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(e++,i+=4);return i}(s):Math.ceil(1.33*(s.byteLength||s.size))),i>0&&t>this.L)return this.writeBuffer.slice(0,i);t+=2}var s;return this.writeBuffer}st(){if(!this.R)return!0;const t=Date.now()>this.R;return t&&(this.R=0,A((()=>{this.V(\"ping timeout\")}),this.setTimeoutFn)),t}write(t,s,i){return this.G(\"message\",t,s,i),this}send(t,s,i){return this.G(\"message\",t,s,i),this}G(t,s,i,e){if(\"function\"==typeof s&&(e=s,s=void 0),\"function\"==typeof i&&(e=i,i=null),\"closing\"===this.readyState||\"closed\"===this.readyState)return;(i=i||{}).compress=!1!==i.compress;const n={type:t,data:s,options:i};this.emitReserved(\"packetCreate\",n),this.writeBuffer.push(n),e&&this.once(\"flush\",e),this.flush()}close(){const t=()=>{this.V(\"forced close\"),this.transport.close()},s=()=>{this.off(\"upgrade\",s),this.off(\"upgradeError\",s),t()},i=()=>{this.once(\"upgrade\",s),this.once(\"upgradeError\",s)};return\"opening\"!==this.readyState&&\"open\"!==this.readyState||(this.readyState=\"closing\",this.writeBuffer.length?this.once(\"drain\",(()=>{this.upgrading?i():t()})):this.upgrading?i():t()),this}j(t){if(Y.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&\"opening\"===this.readyState)return this.transports.shift(),this.q();this.emitReserved(\"error\",t),this.V(\"transport error\",t)}V(t,s){if(\"opening\"===this.readyState||\"open\"===this.readyState||\"closing\"===this.readyState){if(this.clearTimeoutFn(this.Z),this.transport.removeAllListeners(\"close\"),this.transport.close(),this.transport.removeAllListeners(),G&&(this.F&&removeEventListener(\"beforeunload\",this.F,!1),this.$)){const t=K.indexOf(this.$);-1!==t&&K.splice(t,1)}this.readyState=\"closed\",this.id=null,this.emitReserved(\"close\",t,s),this.writeBuffer=[],this.P=0}}Y(t){const s=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&s.push(t[i]);return s}}Y.protocol=4;class Z extends N{doPoll(){this.it().then((t=>{if(!t.ok)return this.onError(\"fetch read error\",t.status,t);t.text().then((t=>this.onData(t)))})).catch((t=>{this.onError(\"fetch read error\",t)}))}doWrite(t,s){this.it(t).then((t=>{if(!t.ok)return this.onError(\"fetch write error\",t.status,t);s()})).catch((t=>{this.onError(\"fetch write error\",t)}))}it(t){var s;const i=void 0!==t,e=new Headers(this.opts.extraHeaders);return i&&e.set(\"content-type\",\"text/plain;charset=UTF-8\"),null===(s=this.socket.W)||void 0===s||s.appendCookies(e),fetch(this.uri(),{method:i?\"POST\":\"GET\",body:i?t:null,headers:e,credentials:this.opts.withCredentials?\"include\":\"omit\"}).then((t=>{var s;return null===(s=this.socket.W)||void 0===s||s.parseCookies(t.headers.getSetCookie()),t}))}}const tt=\"function\"==typeof ArrayBuffer,st=t=>\"function\"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,it=Object.prototype.toString,et=\"function\"==typeof Blob||\"undefined\"!=typeof Blob&&\"[object BlobConstructor]\"===it.call(Blob),nt=\"function\"==typeof File||\"undefined\"!=typeof File&&\"[object FileConstructor]\"===it.call(File);function rt(t){return tt&&(t instanceof ArrayBuffer||st(t))||et&&t instanceof Blob||nt&&t instanceof File}function ot(t,s){if(!t||\"object\"!=typeof t)return!1;if(Array.isArray(t)){for(let s=0,i=t.length;s<i;s++)if(ot(t[s]))return!0;return!1}if(rt(t))return!0;if(t.toJSON&&\"function\"==typeof t.toJSON&&1===arguments.length)return ot(t.toJSON(),!0);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&ot(t[s]))return!0;return!1}function ht(t){const s=[],i=t.data,e=t;return e.data=ct(i,s),e.attachments=s.length,{packet:e,buffers:s}}function ct(t,s,i){if(!t)return t;if(rt(t)){const i={_placeholder:!0,num:s.length};return s.push(t),i}if(Array.isArray(t)){const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=ct(t[e],s);return i}if(\"object\"==typeof t&&!(t instanceof Date)){if(t.toJSON&&\"function\"==typeof t.toJSON&&!i)return ct(t.toJSON(),s,!0);const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=ct(t[i],s));return e}return t}function at(t,s){return t.data=ut(t.data,s),delete t.attachments,t}function ut(t,s){if(!t)return t;if(t&&!0===t._placeholder){if(\"number\"==typeof t.num&&t.num>=0&&t.num<s.length)return s[t.num];throw new Error(\"illegal attachments\")}if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ut(t[i],s);else if(\"object\"==typeof t)for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ut(t[i],s));return t}const ft=[\"connect\",\"connect_error\",\"disconnect\",\"disconnecting\",\"newListener\",\"removeListener\"],lt=5;var dt;!function(t){t[t.CONNECT=0]=\"CONNECT\",t[t.DISCONNECT=1]=\"DISCONNECT\",t[t.EVENT=2]=\"EVENT\",t[t.ACK=3]=\"ACK\",t[t.CONNECT_ERROR=4]=\"CONNECT_ERROR\",t[t.BINARY_EVENT=5]=\"BINARY_EVENT\",t[t.BINARY_ACK=6]=\"BINARY_ACK\"}(dt||(dt={}));class pt extends k{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},\"function\"==typeof t?{reviver:t}:t)}add(t){let s;if(\"string\"==typeof t){if(this.reconstructor)throw new Error(\"got plaintext data when reconstructing a packet\");s=this.decodeString(t);const i=s.type===dt.BINARY_EVENT;i||s.type===dt.BINARY_ACK?(s.type=i?dt.EVENT:dt.ACK,this.reconstructor=new yt(s)):super.emitReserved(\"decoded\",s)}else{if(!rt(t)&&!t.base64)throw new Error(\"Unknown type: \"+t);if(!this.reconstructor)throw new Error(\"got binary data when not reconstructing a packet\");s=this.reconstructor.takeBinaryData(t),s&&(this.reconstructor=null,super.emitReserved(\"decoded\",s))}}decodeString(t){let s=0;const i={type:Number(t.charAt(0))};if(void 0===dt[i.type])throw new Error(\"unknown packet type \"+i.type);if(i.type===dt.BINARY_EVENT||i.type===dt.BINARY_ACK){const e=s+1;for(;\"-\"!==t.charAt(++s)&&s!=t.length;);const n=t.substring(e,s);if(n!=Number(n)||\"-\"!==t.charAt(s))throw new Error(\"Illegal attachments\");const r=Number(n);if(!bt(r)||r<1)throw new Error(\"Illegal attachments\");if(r>this.opts.maxAttachments)throw new Error(\"too many attachments\");i.attachments=r}if(\"/\"===t.charAt(s+1)){const e=s+1;for(;++s;){if(\",\"===t.charAt(s))break;if(s===t.length)break}i.nsp=t.substring(e,s)}else i.nsp=\"/\";const e=t.charAt(s+1);if(\"\"!==e&&Number(e)==e){const e=s+1;for(;++s;){const i=t.charAt(s);if(null==i||Number(i)!=i){--s;break}if(s===t.length)break}i.id=Number(t.substring(e,s+1))}if(t.charAt(++s)){const e=this.tryParse(t.substr(s));if(!pt.isPayloadValid(i.type,e))throw new Error(\"invalid payload\");i.data=e}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,s){switch(t){case dt.CONNECT:return wt(s);case dt.DISCONNECT:return void 0===s;case dt.CONNECT_ERROR:return\"string\"==typeof s||wt(s);case dt.EVENT:case dt.BINARY_EVENT:return Array.isArray(s)&&(\"number\"==typeof s[0]||\"string\"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:case dt.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yt{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=at(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const bt=Number.isInteger||function(t){return\"number\"==typeof t&&isFinite(t)&&Math.floor(t)===t};function wt(t){return\"[object Object]\"===Object.prototype.toString.call(t)}var gt=Object.freeze({__proto__:null,protocol:5,get PacketType(){return dt},Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==dt.EVENT&&t.type!==dt.ACK||!ot(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===dt.EVENT?dt.BINARY_EVENT:dt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let s=\"\"+t.type;return t.type!==dt.BINARY_EVENT&&t.type!==dt.BINARY_ACK||(s+=t.attachments+\"-\"),t.nsp&&\"/\"!==t.nsp&&(s+=t.nsp+\",\"),null!=t.id&&(s+=t.id),null!=t.data&&(s+=JSON.stringify(t.data,this.replacer)),s}encodeAsBinary(t){const s=ht(t),i=this.encodeAsString(s.packet),e=s.buffers;return e.unshift(i),e}},Decoder:pt,isPacketValid:function(t){return\"string\"==typeof t.nsp&&(void 0===(s=t.id)||bt(s))&&function(t,s){switch(t){case dt.CONNECT:return void 0===s||wt(s);case dt.DISCONNECT:return void 0===s;case dt.EVENT:return Array.isArray(s)&&(\"number\"==typeof s[0]||\"string\"==typeof s[0]&&-1===ft.indexOf(s[0]));case dt.ACK:return Array.isArray(s);case dt.CONNECT_ERROR:return\"string\"==typeof s||wt(s);default:return!1}}(t.type,t.data);var s}});function vt(t,s,i){return t.on(s,i),function(){t.off(s,i)}}const mt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kt extends k{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this.et=[],this.nt=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this.p=Object.assign({},i),this.io.rt&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vt(t,\"open\",this.onopen.bind(this)),vt(t,\"packet\",this.onpacket.bind(this)),vt(t,\"error\",this.onerror.bind(this)),vt(t,\"close\",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io.ot||this.io.open(),\"open\"===this.io.ht&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift(\"message\"),this.emit.apply(this,t),this}emit(t,...s){var i,e,n;if(mt.hasOwnProperty(t))throw new Error('\"'+t.toString()+'\" is a reserved event name');if(s.unshift(t),this.p.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this.ct(s),this;const r={type:dt.EVENT,data:s,options:{}};if(r.options.compress=!1!==this.flags.compress,\"function\"==typeof s[s.length-1]){const t=this.ids++,i=s.pop();this.ut(t,i),r.id=t}const o=null===(e=null===(i=this.io.engine)||void 0===i?void 0:i.transport)||void 0===e?void 0:e.writable,h=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n.st());return this.flags.volatile&&!o||(h?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}ut(t,s){var i;const e=null!==(i=this.flags.timeout)&&void 0!==i?i:this.p.ackTimeout;if(void 0===e)return void(this.acks[t]=s);const n=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);s.call(this,new Error(\"operation has timed out\"))}),e),r=(...t)=>{this.io.clearTimeoutFn(n),s.apply(this,t)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...s){return new Promise(((i,e)=>{const n=(t,s)=>t?e(t):i(s);n.withError=!0,s.push(n),this.emit(t,...s)}))}ct(t){let s;\"function\"==typeof t[t.length-1]&&(s=t.pop());const i={id:this.nt++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...e)=>{this.et[0];return null!==t?i.tryCount>this.p.retries&&(this.et.shift(),s&&s(t)):(this.et.shift(),s&&s(null,...e)),i.pending=!1,this.ft()})),this.et.push(i),this.ft()}ft(t=!1){if(!this.connected||0===this.et.length)return;const s=this.et[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io.lt(t)}onopen(){\"function\"==typeof this.auth?this.auth((t=>{this.dt(t)})):this.dt(this.auth)}dt(t){this.packet({type:dt.CONNECT,data:this.yt?Object.assign({pid:this.yt,offset:this.bt},t):t})}onerror(t){this.connected||this.emitReserved(\"connect_error\",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved(\"disconnect\",t,s),this.wt()}wt(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((s=>String(s.id)===t))){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error(\"socket has been disconnected\"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case dt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 dt.EVENT:case dt.BINARY_EVENT:this.onevent(t);break;case dt.ACK:case dt.BINARY_ACK:this.onack(t);break;case dt.DISCONNECT:this.ondisconnect();break;case dt.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved(\"connect_error\",s)}}onevent(t){const s=t.data||[];null!=t.id&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this.gt&&this.gt.length){const s=this.gt.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this.yt&&t.length&&\"string\"==typeof t[t.length-1]&&(this.bt=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...e){i||(i=!0,s.packet({type:dt.ACK,id:t,data:e}))}}onack(t){const s=this.acks[t.id];\"function\"==typeof s&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this.yt===s,this.yt=s,this.connected=!0,this.emitBuffered(),this.ft(!0),this.emitReserved(\"connect\")}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(\"io server disconnect\")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io.vt(this)}disconnect(){return this.connected&&this.packet({type:dt.DISCONNECT}),this.destroy(),this.connected&&this.onclose(\"io client disconnect\"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this.gt=this.gt||[],this.gt.push(t),this}prependAny(t){return this.gt=this.gt||[],this.gt.unshift(t),this}offAny(t){if(!this.gt)return this;if(t){const s=this.gt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.gt=[];return this}listenersAny(){return this.gt||[]}onAnyOutgoing(t){return this.kt=this.kt||[],this.kt.push(t),this}prependAnyOutgoing(t){return this.kt=this.kt||[],this.kt.unshift(t),this}offAnyOutgoing(t){if(!this.kt)return this;if(t){const s=this.kt;for(let i=0;i<s.length;i++)if(t===s[i])return s.splice(i,1),this}else this.kt=[];return this}listenersAnyOutgoing(){return this.kt||[]}notifyOutgoingListeners(t){if(this.kt&&this.kt.length){const s=this.kt.slice();for(const i of s)i.apply(this,t.data)}}}function At(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}At.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),i=Math.floor(s*this.jitter*t);t=1&Math.floor(10*s)?t+i:t-i}return 0|Math.min(t,this.max)},At.prototype.reset=function(){this.attempts=0},At.prototype.setMin=function(t){this.ms=t},At.prototype.setMax=function(t){this.max=t},At.prototype.setJitter=function(t){this.jitter=t};class Et extends k{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&\"object\"==typeof t&&(s=t,t=void 0),(s=s||{}).path=s.path||\"/socket.io\",this.opts=s,B(this,s),this.reconnection(!1!==s.reconnection),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(i=s.randomizationFactor)&&void 0!==i?i:.5),this.backoff=new At({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==s.timeout?2e4:s.timeout),this.ht=\"closed\",this.uri=t;const e=s.parser||gt;this.encoder=new e.Encoder,this.decoder=new e.Decoder,this.rt=!1!==s.autoConnect,this.rt&&this.open()}reconnection(t){return arguments.length?(this.At=!!t,t||(this.skipReconnect=!0),this):this.At}reconnectionAttempts(t){return void 0===t?this.Et:(this.Et=t,this)}reconnectionDelay(t){var s;return void 0===t?this.Ot:(this.Ot=t,null===(s=this.backoff)||void 0===s||s.setMin(t),this)}randomizationFactor(t){var s;return void 0===t?this._t:(this._t=t,null===(s=this.backoff)||void 0===s||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return void 0===t?this.jt:(this.jt=t,null===(s=this.backoff)||void 0===s||s.setMax(t),this)}timeout(t){return arguments.length?(this.Bt=t,this):this.Bt}maybeReconnectOnOpen(){!this.ot&&this.At&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this.ht.indexOf(\"open\"))return this;this.engine=new Y(this.uri,this.opts);const s=this.engine,i=this;this.ht=\"opening\",this.skipReconnect=!1;const e=vt(s,\"open\",(function(){i.onopen(),t&&t()})),n=s=>{this.cleanup(),this.ht=\"closed\",this.emitReserved(\"error\",s),t?t(s):this.maybeReconnectOnOpen()},r=vt(s,\"error\",n);if(!1!==this.Bt){const t=this.Bt,i=this.setTimeoutFn((()=>{e(),n(new Error(\"timeout\")),s.close()}),t);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}return this.subs.push(e),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this.ht=\"open\",this.emitReserved(\"open\");const t=this.engine;this.subs.push(vt(t,\"ping\",this.onping.bind(this)),vt(t,\"data\",this.ondata.bind(this)),vt(t,\"error\",this.onerror.bind(this)),vt(t,\"close\",this.onclose.bind(this)),vt(this.decoder,\"decoded\",this.ondecoded.bind(this)))}onping(){this.emitReserved(\"ping\")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose(\"parse error\",t)}}ondecoded(t){A((()=>{this.emitReserved(\"packet\",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved(\"error\",t)}socket(t,s){let i=this.nsps[t];return i?this.rt&&!i.active&&i.connect():(i=new kt(this,t,s),this.nsps[t]=i),i}vt(t){const s=Object.keys(this.nsps);for(const t of s){if(this.nsps[t].active)return}this.xt()}lt(t){const s=this.encoder.encode(t);for(let i=0;i<s.length;i++)this.engine.write(s[i],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}xt(){this.skipReconnect=!0,this.ot=!1,this.onclose(\"forced close\")}disconnect(){return this.xt()}onclose(t,s){var i;this.cleanup(),null===(i=this.engine)||void 0===i||i.close(),this.backoff.reset(),this.ht=\"closed\",this.emitReserved(\"close\",t,s),this.At&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this.ot||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this.Et)this.backoff.reset(),this.emitReserved(\"reconnect_failed\"),this.ot=!1;else{const s=this.backoff.duration();this.ot=!0;const i=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved(\"reconnect_attempt\",t.backoff.attempts),t.skipReconnect||t.open((s=>{s?(t.ot=!1,t.reconnect(),this.emitReserved(\"reconnect_error\",s)):t.onreconnect()})))}),s);this.opts.autoUnref&&i.unref(),this.subs.push((()=>{this.clearTimeoutFn(i)}))}}onreconnect(){const t=this.backoff.attempts;this.ot=!1,this.backoff.reset(),this.emitReserved(\"reconnect\",t)}}const Ot={};function _t(t,s){\"object\"==typeof t&&(s=t,t=void 0);const i=function(t,s=\"\",i){let e=t;i=i||\"undefined\"!=typeof location&&location,null==t&&(t=i.protocol+\"//\"+i.host),\"string\"==typeof t&&(\"/\"===t.charAt(0)&&(t=\"/\"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\\/\\//.test(t)||(t=void 0!==i?i.protocol+\"//\"+t:\"https://\"+t),e=Q(t)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port=\"80\":/^(http|ws)s$/.test(e.protocol)&&(e.port=\"443\")),e.path=e.path||\"/\";const n=-1!==e.host.indexOf(\":\")?\"[\"+e.host+\"]\":e.host;return e.id=e.protocol+\"://\"+n+\":\"+e.port+s,e.href=e.protocol+\"://\"+n+(i&&i.port===e.port?\"\":\":\"+e.port),e}(t,(s=s||{}).path||\"/socket.io\"),e=i.source,n=i.id,r=i.path,o=Ot[n]&&r in Ot[n].nsps;let h;return s.forceNew||s[\"force new connection\"]||!1===s.multiplex||o?h=new Et(e,s):(Ot[n]||(Ot[n]=new Et(e,s)),h=Ot[n]),i.query&&!s.query&&(s.query=i.queryKey),h.socket(i.path,s)}Object.assign(_t,{Manager:Et,Socket:kt,io:_t,connect:_t});export{Z as Fetch,Et as Manager,q as NodeWebSocket,I as NodeXHR,kt as Socket,q as WebSocket,H as WebTransport,I as XHR,_t as connect,_t as default,_t as io,lt as protocol};\n//# sourceMappingURL=socket.io.esm.min.js.map\n","/*!\n * Copyright © 2025–2026 Solomei AI SRL. All rights reserved.\n *\n * Proprietary software, licensed for use by Callimacus customers only.\n * See LICENSE.md for the full terms.\n *\n */\nexport*from\"@callimacus/intent\";import{io as e}from\"socket.io-client\";const t={ERROR:\"error\",CHAPTER_EVENT:\"chapter-event\",CHAPTER_DELETED:\"chapter-deleted\",STORY_RESET:\"story-reset\",STORY_CREATED:\"story-created\",STORY_SHARED:\"story-shared\",BLOCK_PATCH:\"block-patch\"},s={ERROR:\"error\",SYSTEM_MESSAGE:\"system-message\",SERVER_STATUS:\"server-status\",SERVER_RESPONSE:\"server-response\"},n={CLIENT_READY:\"client-ready\",USER_INTERACTION:\"user-interaction\"},r={question:\"question\",content:\"content\",topic:\"topic\",tag:\"tag\",image:\"image\",video:\"video\",gallery:\"gallery\",relatedQuestion:\"relatedQuestion\",page:\"page\",customInteraction:\"customInteraction\",customPage:\"customPage\"},i={masonry:\"masonry\",carousel:\"carousel\"},o={understandingQuery:1,craftingAnswer:2,curatingContent:3,done:4};function a(e){return e.type.startsWith(\"custom:\")}function c(e){return\"set\"in e.type&&e.type.set}function l(e){return\"master\"in e.type&&e.type.master}const d={debug:0,info:1,warn:2,error:3,silent:4};const u=new class{config={enabled:!1,level:\"info\",prefix:\"[Thamyr]\"};debug=(...e)=>{this.log(\"debug\",...e)};info=(...e)=>{this.log(\"info\",...e)};warn=(...e)=>{this.log(\"warn\",...e)};error=(...e)=>{this.log(\"error\",...e)};log(e,...t){if(!(this.config.enabled&&d[e]>=d[this.config.level]))return;const{prefix:s}=this.config,n=void 0===s||\"\"===s?t:[s,...t];console[e](...n)}configure(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};function h(e,t){const s=new URL(e),n=decodeURIComponent(s.pathname.slice(1)),r=(new TextEncoder).encode(JSON.stringify({bucket:\"storage.callimacus.ai\",key:n,edits:t})).toBase64();return`${s.origin}/${encodeURIComponent(r)}`}function y(){const e=\"undefined\"==typeof crypto?void 0:crypto;if(\"function\"==typeof e?.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(\"function\"==typeof e?.getRandomValues)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(256*Math.random());t[6]=15&t[6]|64,t[8]=63&t[8]|128;const s=[...t].map(e=>e.toString(16).padStart(2,\"0\"));return[s.slice(0,4).join(\"\"),s.slice(4,6).join(\"\"),s.slice(6,8).join(\"\"),s.slice(8,10).join(\"\"),s.slice(10,16).join(\"\")].join(\"-\")}var p,f;function m(e){if(\"object\"!=typeof e||null===e)return!1;const t=e;return\"string\"==typeof t.audioUrl&&\"string\"==typeof t.mimeType}function g(e){if(\"object\"==typeof e&&null!==e)for(const t of Object.values(e))if(m(t))return t}!function(e){e.GET_STORY=\"get-story\",e.CREATE_ROUND=\"create-round\",e.RESET_STORY=\"reset-story\",e.BACK_FROM_ROUND=\"back-from-round\",e.SHARE_STORY=\"share-story\",e.GET_SHARED_STORY=\"get-shared-story\",e.SUGGEST=\"suggest\"}(p||(p={})),function(e){e.ROUND_CREATED=\"round-created\",e.ROUND_EVENT=\"round-event\",e.ROUND_COMPLETED=\"round-completed\",e.ERROR=\"error\"}(f||(f={}));const b={productSelector:\"[data-product-id]\",blockSelector:\"[data-block-id]\",maxTrackedElements:40,minVisibilityRatio:.5};class k{elements=new Map;elementRefs=new Map;elementKeys=new WeakMap;blocks=new Map;blockRefs=new Map;blockKeys=new WeakMap;started=!1;config;constructor(e={}){const t=e.minVisibilityRatio??b.minVisibilityRatio;this.config={productSelector:e.productSelector??b.productSelector,blockSelector:e.blockSelector??b.blockSelector,maxTrackedElements:e.maxTrackedElements??b.maxTrackedElements,minVisibilityRatio:Math.min(1,Math.max(0,t))}}rescanUi(){if(!this.canUseDom())return;let e,t;try{e=document.querySelectorAll(this.config.productSelector),t=document.querySelectorAll(this.config.blockSelector)}catch(e){return void u.warn(\"UI Observer: invalid selector, skipping rescan:\",e)}const s=Date.now();for(const t of e){const e=this.normalizeRect(t.getBoundingClientRect()),n=this.calculateVisibilityRatio(e);this.syncTrackedElement(t,{bounds:e,isVisible:n>=this.config.minVisibilityRatio,visibilityRatio:n,observedAt:s})}for(const e of t){const t=this.normalizeRect(e.getBoundingClientRect()),n=this.calculateVisibilityRatio(t);this.syncTrackedBlock(e,{bounds:t,isVisible:n>=this.config.minVisibilityRatio,visibilityRatio:n,observedAt:s})}this.pruneTrackedElements(),this.pruneTrackedBlocks()}pruneTrackedElements(){if(this.elements.size<=this.config.maxTrackedElements)return;const e=[...this.elements].sort(([,e],[,t])=>{const s=e.visibilityRatio-t.visibilityRatio;return 0===s||Number.isNaN(s)?e.observedAt-t.observedAt:s}).slice(0,this.elements.size-this.config.maxTrackedElements);for(const[t]of e)this.elements.delete(t),this.elementRefs.delete(t)}pruneTrackedBlocks(){if(this.blocks.size<=this.config.maxTrackedElements)return;const e=[...this.blocks].sort(([,e],[,t])=>{const s=e.visibilityRatio-t.visibilityRatio;return 0===s||Number.isNaN(s)?e.observedAt-t.observedAt:s}).slice(0,this.blocks.size-this.config.maxTrackedElements);for(const[t]of e)this.blocks.delete(t),this.blockRefs.delete(t)}syncTrackedElement(e,t){const s=this.resolveElementId(e),n=this.resolveBlockId(e),r=this.createTrackingKey(s,n),i=this.elementKeys.get(e);void 0!==i&&\"\"!==i&&i!==r&&(this.elements.delete(i),this.elementRefs.delete(i)),this.elementKeys.set(e,r),this.elementRefs.set(r,e),this.elements.set(r,{id:s,blockId:n,trackingKey:r,...t})}syncTrackedBlock(e,t){const s=this.resolveTrackedBlockId(e),n=this.blockKeys.get(e),r=s;void 0!==n&&\"\"!==n&&n!==r&&(this.blocks.delete(n),this.blockRefs.delete(n)),this.blockKeys.set(e,r),this.blockRefs.set(r,e),this.blocks.set(r,{id:s,...t})}resolveElementId(e){return[e.dataset.productId,e.dataset.productid,e.dataset.sku,e.id].find(e=>void 0!==e&&\"\"!==e)??`${e.tagName}-${e.dataset.productId??this.elements.size}`}resolveBlockId(e){let t;try{t=e.closest(this.config.blockSelector)??void 0}catch{return}return t instanceof HTMLElement?this.resolveTrackedBlockId(t):void 0}resolveTrackedBlockId(e){return[e.dataset.blockId,e.dataset.blockid,e.id].find(e=>void 0!==e&&\"\"!==e)??`${e.tagName}-${e.dataset.blockId??this.blocks.size}`}createTrackingKey(e,t){return void 0===t||\"\"===t?e:`${e}::${t}`}normalizeRect(e){return{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,left:e.left,right:e.right,bottom:e.bottom}}calculateVisibilityRatio(e){const t=Math.max(0,Math.min(e.right,window.innerWidth)-Math.max(e.left,0))*Math.max(0,Math.min(e.bottom,window.innerHeight)-Math.max(e.top,0)),s=e.width*e.height;if(s<=0)return 0;const n=window.innerWidth*window.innerHeight,r=n>0?Math.min(s,n):s;return Math.min(1,Math.max(0,t/r))}canUseDom(){return void 0!==globalThis.window&&\"undefined\"!=typeof document}start(){!this.started&&this.canUseDom()&&(this.started=!0)}stop(){this.started&&(this.started=!1,this.elements.clear(),this.elementRefs.clear(),this.blocks.clear(),this.blockRefs.clear())}getSnapshot(){if(!this.canUseDom())return;this.rescanUi();const e=[],t=[],s=Date.now();for(const[t,s]of this.elements){const n=this.elementRefs.get(t);n?.isConnected?s.visibilityRatio<=0||e.push({blockId:s.blockId,element:{id:s.id,bounds:s.bounds,isVisible:s.visibilityRatio>=this.config.minVisibilityRatio,visibilityRatio:s.visibilityRatio}}):(this.elements.delete(t),this.elementRefs.delete(t))}for(const[e,s]of this.blocks){const n=this.blockRefs.get(e);n?.isConnected?s.visibilityRatio<this.config.minVisibilityRatio||t.push(s.id):(this.blocks.delete(e),this.blockRefs.delete(e))}const n=e.slice(0,this.config.maxTrackedElements);return{timestamp:s,viewport:{width:window.innerWidth,height:window.innerHeight},blockIds:[...new Set([...t,...n.flatMap(e=>e.blockId??[])])],elements:n.map(e=>e.element)}}}function v(e){const{data:t}=e;if(\"object\"!=typeof t||null===t)return;const{code:s,reason:n}=t;return\"number\"==typeof s?{code:s,...\"string\"==typeof n&&{reason:n}}:void 0}const R=3;function w(e,t){return e>=500&&t<3}function E(e,t){return t?void 0:v(e)??{code:0}}class S{socket;serverResponseListeners=new Set;connectionStatusListeners=new Set;errorListeners=new Set;uiObserver;uiObserverConfig=b;handshakeRetryAttempts=0;handshakeRetryTimer;setupEventListeners(){this.socket&&(this.socket.on(\"connect\",()=>{u.debug(\"Connected to Callimacus\"),this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.updateConnectionStatus(!0),this.socket?.emit(n.CLIENT_READY)}),this.socket.on(\"disconnect\",()=>{u.info(\"Disconnected from Callimacus\"),this.updateConnectionStatus(!1)}),this.socket.on(\"connect_error\",e=>{this.updateConnectionStatus(!1);const t=E(e,this.socket?.active??!0);t&&(u.error(\"Connection refused by Callimacus:\",e.message,t.reason??\"\"),this.notifyRejection(t,e.message),this.scheduleHandshakeRetry(t.code))}),this.socket.on(s.ERROR,e=>{u.error(\"Received error from Callimacus:\",e),this.notifyErrorListeners(e)}),this.socket.io.on(\"reconnect\",e=>{u.info(`Reconnected to Callimacus after ${e} attempts`)}),this.socket.io.on(\"reconnect_attempt\",e=>{u.info(`Attempting to reconnect: attempt ${e}`)}),this.socket.io.on(\"reconnect_error\",e=>{u.error(\"Reconnection error:\",e)}),this.socket.io.on(\"reconnect_failed\",()=>{u.error(\"Failed to reconnect to Callimacus service!\"),this.updateConnectionStatus(!1)}),this.socket.on(s.SERVER_RESPONSE,e=>{this.notifyServerResponseListeners(e)}))}notifyServerResponseListeners(e){this.serverResponseListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in server response listener:\",e)}})}updateConnectionStatus(e){this.connectionStatusListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in connection status listener:\",e)}})}notifyRejection(e,t){this.notifyErrorListeners({code:e.code,message:t,...void 0!==e.reason&&{reason:e.reason}})}scheduleHandshakeRetry(e){if(!this.socket)return;if(this.clearHandshakeRetry(),!w(e,this.handshakeRetryAttempts))return void(e>=500&&(u.error(\"Giving up on the Callimacus connection after 3 retries\"),this.notifyRejection({code:e,reason:\"retries_exhausted\"},\"Connection failed after 3 retries; call connect() to try again\")));const t=2**(this.handshakeRetryAttempts+1);this.handshakeRetryAttempts+=1,u.info(`Retrying Callimacus connection in ${t}s (attempt ${this.handshakeRetryAttempts}/3)`),this.handshakeRetryTimer=setTimeout(()=>{this.socket?.connect()},1e3*t)}clearHandshakeRetry(){void 0!==this.handshakeRetryTimer&&(clearTimeout(this.handshakeRetryTimer),this.handshakeRetryTimer=void 0)}notifyErrorListeners(e){this.errorListeners.forEach(t=>{try{t(e)}catch(e){u.error(\"Error in error listener:\",e)}})}async getLocation(){if(\"undefined\"!=typeof navigator&&\"function\"==typeof navigator.geolocation?.getCurrentPosition)return new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{e(t)},()=>{e(void 0)})})}enrichPayloadWithUiContext(e){try{this.ensureUiObserver();const t=this.uiObserver?.getSnapshot();return t?{...e,context:{...e.context,uiSnapshot:t}}:e}catch(t){return u.error(\"Error enriching payload with UI context:\",t),e}}ensureUiObserver(){\"undefined\"!=typeof window&&\"undefined\"!=typeof document&&this.uiObserverConfig.enabled&&(this.uiObserver??=new k(this.uiObserverConfig),this.uiObserver.start())}socketEndpoint(e){const t=new URL(e),s=new URL(\"thamyr\",t).pathname;return{origin:t.origin,path:s}}connect(t=\"wss://localhost:4000\",s,n){this.socket&&(u.warn(\"Already connected to Thamyr. Disconnecting first....\"),this.disconnect());const r=this.socketEndpoint(t);let i;\"undefined\"!=typeof window&&void 0!==globalThis.location&&(i=globalThis.location.href);const o={...void 0!==i&&\"\"!==i&&{referrer:i},...n};u.info(\"Connecting to Thamyr at\",r),this.socket=e(r.origin,{path:r.path,transports:[\"websocket\",\"polling\"],tryAllTransports:!0,extraHeaders:s,auth:o}),this.setupEventListeners(),this.ensureUiObserver()}disconnect(){this.clearHandshakeRetry(),this.handshakeRetryAttempts=0,this.socket&&(this.socket.disconnect(),this.socket=void 0,this.uiObserver?.stop(),this.uiObserver=void 0,this.updateConnectionStatus(!1),u.info(\"Disconnected from Callimacus\"))}configureUiObserver(e){if(!e)return this.uiObserver?.stop(),this.uiObserver=void 0,void(this.uiObserverConfig={...b,enabled:!1});const t=e.enabled??(void 0!==e.productSelector||void 0!==e.blockSelector||void 0!==e.maxTrackedElements||void 0!==e.minVisibilityRatio||this.uiObserverConfig.enabled);if(this.uiObserverConfig={...this.uiObserverConfig,...e,enabled:t},\"undefined\"==typeof window||\"undefined\"==typeof document||!this.uiObserverConfig.enabled)return this.uiObserver?.stop(),void(this.uiObserver=void 0);this.uiObserver&&this.uiObserver.stop(),this.uiObserver=new k(this.uiObserverConfig),this.uiObserver.start()}sendUserInteraction(e,t){if(!this.socket)return void u.error(\"Socket is not connected. Cannot send interaction.\");if(e===p.SUGGEST)return void u.error(\"SUGGEST is a request/response command. Use suggest() instead.\");if(e===p.BACK_FROM_ROUND){if(void 0===t.chapterId)return void u.error(\"BACK_FROM_ROUND requires chapterId.\")}const s={type:e,payload:this.enrichPayloadWithUiContext(t)},r={id:y()};this.socket.emit(n.USER_INTERACTION,{type:s.type,payload:s.payload},r.id)}async suggest(e,t={}){if(!this.socket?.connected)return{suggestions:[]};try{return function(e){const t=e?.suggestions;return{suggestions:Array.isArray(t)?t.filter(e=>\"string\"==typeof e):[]}}(await this.socket.timeout(t.timeoutMs??4e3).emitWithAck(n.USER_INTERACTION,{type:p.SUGGEST,payload:e}))}catch(e){return u.warn(\"Suggestions failed or timed out; serving none.\",e),{suggestions:[]}}}async gatherClientInfo(){const e=\"undefined\"==typeof navigator?void 0:navigator,t=\"undefined\"==typeof window?void 0:window.screen;return{userAgent:e?.userAgent??\"\",language:e?.language??\"\",timezone:(new Intl.DateTimeFormat).resolvedOptions().timeZone,localTime:(new Date).toLocaleString(),screenResolution:void 0===t?\"\":`${t.width}x${t.height}`,location:await this.getLocation()}}onServerResponse(e){return this.serverResponseListeners.add(e),()=>{this.serverResponseListeners.delete(e)}}onConnectionStatus(e){return this.connectionStatusListeners.add(e),()=>{this.connectionStatusListeners.delete(e)}}onError(e){return this.errorListeners.add(e),()=>{this.errorListeners.delete(e)}}}const T=new S,O=200;function x(e,t={}){if(void 0!==e&&e.length>200)throw new RangeError(\"[thamyr] landing value exceeds 200 characters\");return{inputEvent:{type:\"customPage\",data:void 0===e?{}:{value:e}},...t}}function C(e,t={}){const{block:s,payload:n,value:r,...i}=t;return{inputEvent:{type:\"customInteraction\",data:{interactionId:e,...void 0!==s&&{nodeKey:s},...void 0!==n&&{payload:n},...void 0!==r&&{value:r}}},...i}}function I(e){return e.receptors??e.intent??[]}function A(e){return\"key\"in e?e.key:void 0}const _=\"custom:addToCartResult\";function j(e){return\"object\"==typeof e&&null!==e&&!Array.isArray(e)}const U=e=>\"string\"==typeof e&&e.length>0,$=e=>j(e)&&U(e.size)&&U(e.variantId)&&\"boolean\"==typeof e.orderable;function N(e){if(!j(e.data)||!j(e.data.addToCart))return;const t=e.data.addToCart;return\"error\"===t.status?{status:\"error\"}:\"resolved\"===t.status&&U(t.variantId)&&U(t.productName)&&U(t.size)?{status:\"resolved\",variantId:t.variantId,productName:t.productName,size:t.size}:\"size_selection_needed\"===t.status&&U(t.productSku)&&U(t.productName)&&Array.isArray(t.availableSizes)&&t.availableSizes.every($)?{status:\"size_selection_needed\",productSku:t.productSku,productName:t.productName,availableSizes:t.availableSizes}:void 0}const q=e=>j(e)?e:{};function D(e,t,s){const[n,...r]=t;if(!j(e)||!Object.hasOwn(e,n))return;const i=0===r.length?function(e,t){if(j(e)&&\"string\"==typeof e.docId)return{...e,values:{...q(e.values),...t.values},inputs:{...q(e.inputs),...t.inputs},textRuns:{...q(e.textRuns),...t.textRuns}}}(e[n],s):D(e[n],r,s);return i&&{...e,[n]:i}}function z(e,t){const s=e.blocks??[],n=e.id===t.chapterId?s.findIndex(e=>e.id===t.blockId):-1;if(-1===n)return e;const r=s[n],i=D(r.data,t.contentId.split(\".\"),t);return i?{...e,blocks:s.with(n,{...r,data:i})}:e}const L={bodySerializer:e=>JSON.stringify(e,(e,t)=>\"bigint\"==typeof t?t.toString():t)},K=Object.entries({$body_:\"body\",$headers_:\"headers\",$path_:\"path\",$query_:\"query\"});function B(e,t){t||(t=new Map);for(const s of e)\"in\"in s?s.key&&t.set(s.key,{in:s.in,map:s.map}):\"key\"in s?t.set(s.key,{map:s.map}):s.args&&B(s.args,t);return t}function M(e,t){const s={headers:Object.create(null),path:Object.create(null),query:Object.create(null)},n=B(t);function r(e,t,n){let r=s[e];void 0===r&&(r=Object.create(null),s[e]=r),r[t]=n}let i;for(const[o,a]of e.entries())if(t[o]&&(i=t[o]),i)if(\"in\"in i)if(i.key){const e=n.get(i.key),t=e.map||i.key;e.in&&r(e.in,t,a)}else s.body=a;else for(const[e,t]of Object.entries(a??{})){const o=n.get(e);if(o)if(o.in){const s=o.map||e;r(o.in,s,t)}else s[o.map]=t;else{const s=K.find(([t])=>e.startsWith(t));if(s){const[n,i]=s;r(i,e.slice(n.length),t)}else if(\"allowExtra\"in i&&i.allowExtra)for(const[s,n]of Object.entries(i.allowExtra))if(n){r(s,e,t);break}}}return function(e){for(const[t,s]of Object.entries(e))\"body\"!==t&&(!s||\"object\"!=typeof s||Array.isArray(s)||Object.keys(s).length||delete e[t])}(s),s}const P=({allowReserved:e,explode:t,name:s,style:n,value:r})=>{if(!t){const t=(e?r:r.map(e=>encodeURIComponent(e))).join((e=>{switch(e){case\"form\":default:return\",\";case\"pipeDelimited\":return\"|\";case\"spaceDelimited\":return\"%20\"}})(n));switch(n){case\"label\":return`.${t}`;case\"matrix\":return`;${s}=${t}`;case\"simple\":return t;default:return`${s}=${t}`}}const i=(e=>{switch(e){case\"label\":return\".\";case\"matrix\":return\";\";case\"simple\":return\",\";default:return\"&\"}})(n),o=r.map(t=>\"label\"===n||\"simple\"===n?e?t:encodeURIComponent(t):V({allowReserved:e,name:s,value:t})).join(i);return\"label\"===n||\"matrix\"===n?i+o:o},V=({allowReserved:e,name:t,value:s})=>{if(null==s)return\"\";if(\"object\"==typeof s)throw new Error(\"Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.\");return`${t}=${e?s:encodeURIComponent(s)}`},H=({allowReserved:e,explode:t,name:s,style:n,value:r,valueOnly:i})=>{if(r instanceof Date)return i?r.toISOString():`${s}=${r.toISOString()}`;if(\"deepObject\"!==n&&!t){let t=[];Object.entries(r).forEach(([s,n])=>{t=[...t,s,e?n:encodeURIComponent(n)]});const i=t.join(\",\");switch(n){case\"form\":return`${s}=${i}`;case\"label\":return`.${i}`;case\"matrix\":return`;${s}=${i}`;default:return i}}const o=(e=>{switch(e){case\"label\":return\".\";case\"matrix\":return\";\";case\"simple\":return\",\";default:return\"&\"}})(n),a=Object.entries(r).map(([t,r])=>V({allowReserved:e,name:\"deepObject\"===n?`${s}[${t}]`:t,value:r})).join(o);return\"label\"===n||\"matrix\"===n?o+a:a},W=/\\{[^{}]+\\}/g,G=({baseUrl:e,path:t,query:s,querySerializer:n,url:r})=>{let i=(e??\"\")+(r.startsWith(\"/\")?r:`/${r}`);t&&(i=(({path:e,url:t})=>{let s=t;const n=t.match(W);if(n)for(const t of n){let n=!1,r=t.substring(1,t.length-1),i=\"simple\";r.endsWith(\"*\")&&(n=!0,r=r.substring(0,r.length-1)),r.startsWith(\".\")?(r=r.substring(1),i=\"label\"):r.startsWith(\";\")&&(r=r.substring(1),i=\"matrix\");const o=e[r];if(null==o)continue;if(Array.isArray(o)){s=s.replace(t,P({explode:n,name:r,style:i,value:o}));continue}if(\"object\"==typeof o){s=s.replace(t,H({explode:n,name:r,style:i,value:o,valueOnly:!0}));continue}if(\"matrix\"===i){s=s.replace(t,`;${V({name:r,value:o})}`);continue}const a=encodeURIComponent(\"label\"===i?`.${o}`:o);s=s.replace(t,a)}return s})({path:t,url:i}));let o=s?n(s):\"\";return o.startsWith(\"?\")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function Y(e){const t=void 0!==e.body;if(t&&e.bodySerializer){if(\"serializedBody\"in e){return void 0!==e.serializedBody&&\"\"!==e.serializedBody?e.serializedBody:null}return\"\"!==e.body?e.body:null}if(t)return e.body}const F=async(e,t)=>{const s=\"function\"==typeof t?await t(e):t;if(s)return\"bearer\"===e.scheme?`Bearer ${s}`:\"basic\"===e.scheme?`Basic ${btoa(s)}`:s},J=({parameters:e={},...t}={})=>s=>{const n=[];if(s&&\"object\"==typeof s)for(const r in s){const i=s[r];if(null==i)continue;const o=e[r]||t;if(Array.isArray(i)){const e=P({allowReserved:o.allowReserved,explode:!0,name:r,style:\"form\",value:i,...o.array});e&&n.push(e)}else if(\"object\"==typeof i){const e=H({allowReserved:o.allowReserved,explode:!0,name:r,style:\"deepObject\",value:i,...o.object});e&&n.push(e)}else{const e=V({allowReserved:o.allowReserved,name:r,value:i});e&&n.push(e)}}return n.join(\"&\")},Q=(e,t)=>!!t&&!!(e.headers.has(t)||e.query?.[t]||e.headers.get(\"Cookie\")?.includes(`${t}=`));const Z=e=>G({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:\"function\"==typeof e.querySerializer?e.querySerializer:J(e.querySerializer),url:e.url}),X=(e,t)=>{const s={...e,...t};return s.baseUrl?.endsWith(\"/\")&&(s.baseUrl=s.baseUrl.substring(0,s.baseUrl.length-1)),s.headers=te(e.headers,t.headers),s},ee=e=>{const t=[];return e.forEach((e,s)=>{t.push([s,e])}),t},te=(...e)=>{const t=new Headers;for(const s of e){if(!s)continue;const e=s instanceof Headers?ee(s):Object.entries(s);for(const[s,n]of e)if(null===n)t.delete(s);else if(Array.isArray(n))for(const e of n)t.append(s,e);else void 0!==n&&t.set(s,\"object\"==typeof n?JSON.stringify(n):n)}return t};class se{fns=[];clear(){this.fns=[]}eject(e){const t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){const t=this.getInterceptorIndex(e);return Boolean(this.fns[t])}getInterceptorIndex(e){return\"number\"==typeof e?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){const s=this.getInterceptorIndex(e);return!!this.fns[s]&&(this.fns[s]=t,e)}use(e){return this.fns.push(e),this.fns.length-1}}const ne=J({allowReserved:!1,array:{explode:!0,style:\"form\"},object:{explode:!0,style:\"deepObject\"}}),re={\"Content-Type\":\"application/json\"},ie=(e={})=>({...L,headers:re,parseAs:\"auto\",querySerializer:ne,...e}),oe=(e={})=>{let t=X(ie(),e);const s=()=>({...t}),n={error:new se,request:new se,response:new se},r=async e=>{const s={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:te(t.headers,e.headers),serializedBody:void 0};s.security&&await async function(e){for(const t of e.security??[]){if(Q(e,t.name))continue;const s=await F(t,e.auth);if(!s)continue;const n=t.name??\"Authorization\";switch(t.in){case\"query\":e.query||(e.query={}),e.query[n]=s;break;case\"cookie\":e.headers.append(\"Cookie\",`${n}=${s}`);break;default:e.headers.set(n,s)}}}(s),s.requestValidator&&await s.requestValidator(s),void 0!==s.body&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),void 0!==s.body&&\"\"!==s.serializedBody||s.headers.delete(\"Content-Type\");return{opts:s,url:Z(s)}},i=async e=>{const s=e.throwOnError??t.throwOnError,i=e.responseStyle??t.responseStyle;let o,a;try{const{opts:t,url:s}=await r(e),i={redirect:\"follow\",...t,body:Y(t)};o=new Request(s,i);for(const e of n.request.fns)e&&(o=await e(o,t));const c=t.fetch;a=await c(o);for(const e of n.response.fns)e&&(a=await e(a,o,t));const l={request:o,response:a};if(a.ok){const e=(\"auto\"===t.parseAs?(e=>{if(!e)return\"stream\";const t=e.split(\";\")[0]?.trim();return t?t.startsWith(\"application/json\")||t.endsWith(\"+json\")?\"json\":\"multipart/form-data\"===t?\"formData\":[\"application/\",\"audio/\",\"image/\",\"video/\"].some(e=>t.startsWith(e))?\"blob\":t.startsWith(\"text/\")?\"text\":void 0:void 0})(a.headers.get(\"Content-Type\")):t.parseAs)??\"json\";if(204===a.status||\"0\"===a.headers.get(\"Content-Length\")){let s;switch(e){case\"arrayBuffer\":case\"blob\":case\"text\":s=await a[e]();break;case\"formData\":s=new FormData;break;case\"stream\":s=a.body;break;default:s={}}return\"data\"===t.responseStyle?s:{data:s,...l}}let s;switch(e){case\"arrayBuffer\":case\"blob\":case\"formData\":case\"text\":s=await a[e]();break;case\"json\":{const e=await a.text();s=e?JSON.parse(e):{};break}case\"stream\":return\"data\"===t.responseStyle?a.body:{data:a.body,...l}}return\"json\"===e&&(t.responseValidator&&await t.responseValidator(s),t.responseTransformer&&(s=await t.responseTransformer(s))),\"data\"===t.responseStyle?s:{data:s,...l}}const d=await a.text();let u;try{u=JSON.parse(d)}catch{}throw u??d}catch(t){let r=t;for(const t of n.error.fns)t&&(r=await t(r,a,o,e));if(r=r||{},s)throw r;return\"data\"===i?void 0:{error:r,request:o,response:a}}},o=e=>t=>i({...t,method:e}),a=e=>async t=>{const{opts:s,url:i}=await r(t);return function({onRequest:e,onSseError:t,onSseEvent:s,responseTransformer:n,responseValidator:r,sseDefaultRetryDelay:i,sseMaxRetryAttempts:o,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...d}){let u;const h=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=i??3e3,y=0;const p=d.signal??(new AbortController).signal;for(;!p.aborted;){y++;const i=d.headers instanceof Headers?d.headers:new Headers(d.headers);void 0!==u&&i.set(\"Last-Event-ID\",u);try{const t={redirect:\"follow\",...d,body:d.serializedBody,headers:i,signal:p};let o=new Request(l,t);e&&(o=await e(l,t));const a=d.fetch??globalThis.fetch,h=await a(o);if(!h.ok)throw new Error(`SSE failed: ${h.status} ${h.statusText}`);if(!h.body)throw new Error(\"No body in SSE response\");const y=h.body.pipeThrough(new TextDecoderStream).getReader();let f=\"\";const m=()=>{try{y.cancel()}catch{}};p.addEventListener(\"abort\",m);try{for(;;){const{done:e,value:t}=await y.read();if(e)break;f+=t,f=f.replace(/\\r\\n?/g,\"\\n\");const i=f.split(\"\\n\\n\");f=i.pop()??\"\";for(const e of i){const t=e.split(\"\\n\"),i=[];let o,a;for(const e of t)if(e.startsWith(\"data:\"))i.push(e.replace(/^data:\\s*/,\"\"));else if(e.startsWith(\"event:\"))o=e.replace(/^event:\\s*/,\"\");else if(e.startsWith(\"id:\"))u=e.replace(/^id:\\s*/,\"\");else if(e.startsWith(\"retry:\")){const t=Number.parseInt(e.replace(/^retry:\\s*/,\"\"),10);Number.isNaN(t)||(c=t)}let l=!1;if(i.length){const e=i.join(\"\\n\");try{a=JSON.parse(e),l=!0}catch{a=e}}l&&(r&&await r(a),n&&(a=await n(a))),s?.({data:a,event:o,id:u,retry:c}),i.length&&(yield a)}}}finally{p.removeEventListener(\"abort\",m),y.releaseLock()}break}catch(e){if(t?.(e),void 0!==o&&y>=o)break;const s=Math.min(c*2**(y-1),a??3e4);await h(s)}}}()}}({...s,body:s.body,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(const e of n.request.fns)e&&(r=await e(r,s));return r},serializedBody:Y(s),url:i})};return{buildUrl:e=>Z({...t,...e}),connect:o(\"CONNECT\"),delete:o(\"DELETE\"),get:o(\"GET\"),getConfig:s,head:o(\"HEAD\"),interceptors:n,options:o(\"OPTIONS\"),patch:o(\"PATCH\"),post:o(\"POST\"),put:o(\"PUT\"),request:i,setConfig:e=>(t=X(t,e),s()),sse:{connect:a(\"CONNECT\"),delete:a(\"DELETE\"),get:a(\"GET\"),head:a(\"HEAD\"),options:a(\"OPTIONS\"),patch:a(\"PATCH\"),post:a(\"POST\"),put:a(\"PUT\"),trace:a(\"TRACE\")},trace:o(\"TRACE\")}};class ae{client;constructor(e){this.client=e.client}}class ce{defaultKey=\"default\";instances=new Map;get(e){const t=this.instances.get(e??this.defaultKey);if(!t)throw new Error('No SDK client found. Create one with \"new CallimacusApi()\" to fix this error.');return t}set(e,t){this.instances.set(t??this.defaultKey,e)}}class le extends ae{getPage(e,t){const s=M([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/page/{language}/{id}\",...t,...s})}listTopics(e,t){const s=M([e],[{args:[{in:\"path\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/topic/{language}\",...t,...s})}getTopicContents(e,t){const s=M([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"idOrSlug\"},{in:\"query\",key:\"offset\"},{in:\"query\",key:\"limit\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/topic/{language}/{idOrSlug}\",...t,...s})}getDocumentBySlug(e,t){const s=M([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"slug\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/{language}/{slug}\",...t,...s})}getDocumentByGroup(e,t){const s=M([e],[{args:[{in:\"path\",key:\"language\"},{in:\"path\",key:\"groupId\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/by-group/{language}/{groupId}\",...t,...s})}getDocumentByPath(e,t){const s=M([e],[{args:[{in:\"query\",key:\"path\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/document/by-path\",...t,...s})}}class de extends ae{getShared(e,t){const s=M([e],[{args:[{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/share/{id}\",...t,...s})}share(e,t){const s=M([e],[{args:[{in:\"path\",key:\"id\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/share/{id}\",...t,...s})}}class ue extends ae{getSimilar(e,t){const s=M([e],[{args:[{in:\"path\",key:\"productId\"},{in:\"query\",key:\"topK\"},{in:\"query\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/product/{productId}/similar\",...t,...s})}getRecommendations(e,t){const s=M([e],[{args:[{in:\"path\",key:\"productId\"},{in:\"query\",key:\"language\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/product/{productId}/recommendations\",...t,...s})}}class he extends ae{getLast(e,t){const s=M([e],[{args:[{in:\"query\",key:\"storyId\"}]}]);return(t?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/whisper\",...t,...s})}}class ye extends ae{trackEvent(e,t){const s=M([e],[{args:[{in:\"body\",key:\"storyId\"},{in:\"body\",key:\"eventName\"},{in:\"body\",key:\"content\"},{in:\"body\",key:\"payload\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/track-event\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class pe extends ae{getCart(e){return(e?.client??this.client).get({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart\",...e})}addItemToCart(e,t){const s=M([e],[{args:[{in:\"body\",key:\"productId\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/add\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}removeItemFromCart(e,t){const s=M([e],[{args:[{in:\"body\",key:\"productId\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/remove\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}updateProductQuantity(e,t){const s=M([e],[{args:[{in:\"body\",key:\"productId\"},{in:\"body\",key:\"quantity\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/cart/update\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class fe extends ae{similar(e,t){const s=M([e],[{args:[{in:\"body\",key:\"anchorId\"},{in:\"body\",key:\"topK\"},{in:\"body\",key:\"locale\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/skesis/query/similar\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}related(e,t){const s=M([e],[{args:[{in:\"body\",key:\"anchorId\"},{in:\"body\",key:\"locale\"}]}]);return(t?.client??this.client).post({security:[{name:\"x-sl-access-token\",type:\"apiKey\"}],url:\"/skesis/query/related\",...t,...s,headers:{\"Content-Type\":\"application/json\",...t?.headers,...s.headers}})}}class me extends ae{static __registry=new ce;constructor(e){super(e),me.__registry.set(this,e.key)}_content;get content(){return this._content??=new le({client:this.client})}_stories;get stories(){return this._stories??=new de({client:this.client})}_products;get products(){return this._products??=new ue({client:this.client})}_whisper;get whisper(){return this._whisper??=new he({client:this.client})}_analytics;get analytics(){return this._analytics??=new ye({client:this.client})}_cart;get cart(){return this._cart??=new pe({client:this.client})}_skesis;get skesis(){return this._skesis??=new fe({client:this.client})}}class ge extends Error{status;body;response;request;constructor(e,t,s){const n=t?.status,r=s?`${s.method} ${s.url}`:\"request\";let i=`[thamyr] ${r} failed before a response arrived`;t&&(i=t.ok?`[thamyr] ${r} → ${t.status}, but the response could not be processed`:`[thamyr] ${r} → ${t.status}`),super(i,e instanceof Error?{cause:e}:void 0),this.name=\"ThamyrHttpError\",this.status=n,this.body=e,this.response=t,this.request=s}}function be(e){const t=oe(ie({baseUrl:new URL(\"api/v3\",e.endpoint).href,headers:{Authorization:`Bearer ${e.accessToken}`,\"x-sl-access-token\":e.accessToken},credentials:e.withCredentials?\"include\":\"same-origin\"}));return t.interceptors.error.use((e,s,n,r)=>{if(!(r.throwOnError??t.getConfig().throwOnError??!1)||!0===r.signal?.aborted)return e;return new ge(\"\"===e?{}:e??{},s,n)}),t}export{_ as ADD_TO_CART_RESULT_BLOCK,me as CallimacusApi,f as CallimacusEvent,S as CallimacusService,o as ChapterStatus,n as ClientEvents,i as GalleryMode,O as LANDING_VALUE_MAX_LENGTH,R as MAX_HANDSHAKE_RETRIES,r as SLInputEventType,s as ServerEvents,ge as ThamyrHttpError,t as ThamyrResponseType,p as UserInteractionType,N as addToCartResultOf,z as applyBlockPatch,A as blockKeyOf,T as callimacusService,E as classifyConnectError,be as createContractClient,g as extractTtsAudio,C as interactionRound,a as isCustomBlock,l as isMasterProduct,c as isSetProduct,x as landingRound,u as logger,v as parseConnectRejection,y as randomUuid,I as receptorsOf,w as shouldRetryHandshake,h as transformImageUrl};\n//# sourceMappingURL=index.js.map\n",null,null],"names":["t","Object","create","open","close","ping","pong","message","upgrade","noop","s","keys","forEach","i","type","data","e","Blob","prototype","toString","call","n","ArrayBuffer","r","isView","buffer","o","c","h","FileReader","onload","result","split","readAsDataURL","Uint8Array","byteOffset","byteLength","a","f","charCodeAt","l","d","y","charAt","p","substring","length","u","base64","b","String","fromCharCode","w","TransformStream","transform","arrayBuffer","then","TextEncoder","encode","DataView","setUint8","setUint16","setBigUint64","BigInt","enqueue","g","v","reduce","m","shift","slice","k","on","addEventListener","this","push","once","off","apply","arguments","fn","removeListener","removeAllListeners","removeEventListener","splice","emit","Array","emitReserved","listeners","hasListeners","A","Promise","resolve","E","self","window","Function","O","hasOwnProperty","_","setTimeout","j","clearTimeout","B","useNativeTimers","setTimeoutFn","bind","clearTimeoutFn","x","Date","now","Math","random","C","Error","constructor","super","description","context","T","writable","opts","query","socket","supportsBinary","forceBase64","onError","readyState","doOpen","doClose","onClose","send","write","onOpen","onData","binaryType","onPacket","pause","createUri","path","hostname","indexOf","port","secure","Number","encodeURIComponent","N","name","doPoll","join","doWrite","uri","timestampRequests","timestampParam","sid","b64","U","XMLHttpRequest","P","D","M","location","protocol","xd","request","method","pollXhr","S$1","S","createRequest","xdomain","extraHeaders","setDisableHeaderCheck","setRequestHeader","cookieJar","addCookies","withCredentials","requestTimeout","timeout","onreadystatechange","parseCookies","getResponseHeader","status","document","requestsCount","requests","abort","responseText","L","attachEvent","R","F","responseType","concat","$","navigator","product","toLowerCase","V","protocols","headers","ws","createSocket","addEventListeners","onopen","autoUnref","unref","onclose","onmessage","onerror","W","WebSocket","MozWebSocket","X","websocket","webtransport","WebTransport","transportOptions","closed","catch","ready","createBidirectionalStream","TextDecoder","getUint16","getUint32","pow","decode","MAX_SAFE_INTEGER","readable","pipeThrough","getReader","pipeTo","getWriter","read","done","value","polling","assign","z","J","Q","replace","exec","source","host","authority","ipv6uri","pathNames","queryKey","G","K","Y","writeBuffer","transportImplementations","transports","I","agent","rememberUpgrade","addTrailingSlash","rejectUnauthorized","perMessageDeflate","threshold","closeOnBeforeunload","decodeURIComponent","transport","q","createTransport","EIO","id","priorWebsocketSuccess","setTransport","H","upgrading","flush","onHandshake","JSON","parse","code","upgrades","pingInterval","pingTimeout","maxPayload","Z","tt","ceil","size","st","compress","options","tryAllTransports","it","et","nt","File","rt","ot","isArray","toJSON","ht","ct","attachments","packet","buffers","_placeholder","num","at","ut","ft","dt","CONNECT","DISCONNECT","EVENT","ACK","CONNECT_ERROR","BINARY_EVENT","BINARY_ACK","pt","reviver","maxAttachments","add","reconstructor","decodeString","yt","takeBinaryData","bt","nsp","tryParse","substr","isPayloadValid","wt","destroy","finishedReconstruction","reconPack","isInteger","isFinite","floor","gt","freeze","__proto__","PacketType","Encoder","replacer","encodeAsString","encodeAsBinary","stringify","unshift","Decoder","isPacketValid","vt","mt","connect","connect_error","disconnect","disconnecting","newListener","kt","connected","recovered","receiveBuffer","sendBuffer","ids","acks","flags","io","auth","disconnected","subEvents","subs","onpacket","active","retries","fromQueue","volatile","pop","engine","notifyOutgoingListeners","ackTimeout","withError","emitWithAck","tryCount","pending","args","lt","pid","offset","some","onconnect","onevent","onack","ondisconnect","ack","emitEvent","emitBuffered","onAny","prependAny","offAny","listenersAny","onAnyOutgoing","prependAnyOutgoing","offAnyOutgoing","listenersAnyOutgoing","At","ms","min","max","factor","jitter","attempts","duration","reset","setMin","setMax","setJitter","Et","nsps","reconnection","reconnectionAttempts","reconnectionDelay","reconnectionDelayMax","randomizationFactor","backoff","parser","encoder","decoder","autoConnect","skipReconnect","Ot","_t","jt","Bt","maybeReconnectOnOpen","reconnect","cleanup","onping","ondata","ondecoded","xt","onreconnect","test","href","forceNew","multiplex","Manager","Socket","debug","info","warn","error","silent","config","enabled","level","prefix","log","console","configure","getConfig","crypto","randomUUID","getRandomValues","map","padStart","GET_STORY","CREATE_ROUND","RESET_STORY","BACK_FROM_ROUND","SHARE_STORY","GET_SHARED_STORY","SUGGEST","ROUND_CREATED","ROUND_EVENT","ROUND_COMPLETED","ERROR","productSelector","blockSelector","maxTrackedElements","minVisibilityRatio","elements","Map","elementRefs","elementKeys","WeakMap","blocks","blockRefs","blockKeys","started","rescanUi","canUseDom","querySelectorAll","normalizeRect","getBoundingClientRect","calculateVisibilityRatio","syncTrackedElement","bounds","isVisible","visibilityRatio","observedAt","syncTrackedBlock","pruneTrackedElements","pruneTrackedBlocks","sort","isNaN","delete","resolveElementId","resolveBlockId","createTrackingKey","get","set","blockId","trackingKey","resolveTrackedBlockId","dataset","productId","productid","sku","find","tagName","closest","HTMLElement","blockid","width","height","top","left","right","bottom","innerWidth","innerHeight","globalThis","start","stop","clear","getSnapshot","isConnected","element","timestamp","viewport","blockIds","Set","flatMap","serverResponseListeners","connectionStatusListeners","errorListeners","uiObserver","uiObserverConfig","handshakeRetryAttempts","handshakeRetryTimer","setupEventListeners","clearHandshakeRetry","updateConnectionStatus","reason","notifyRejection","scheduleHandshakeRetry","notifyErrorListeners","notifyServerResponseListeners","getLocation","geolocation","getCurrentPosition","enrichPayloadWithUiContext","ensureUiObserver","uiSnapshot","socketEndpoint","URL","pathname","origin","referrer","configureUiObserver","sendUserInteraction","chapterId","payload","suggest","suggestions","filter","timeoutMs","gatherClientInfo","screen","userAgent","language","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","localTime","toLocaleString","screenResolution","onServerResponse","onConnectionStatus","DEFAULT_ENDPOINT","DEFAULT_CART_ADD_URL","LOG","CallimacusError","parseSettings","text","undefined","parsed","attr","fallback","serverCode","setState","root","state","callimacusState","setAttribute","detail","dispatchEvent","CustomEvent","bubbles","dataValues","block","values","makeCtx","locale","NumberFormat","supportedLocalesOf","formatters","currency","settings","picks","items","item","Boolean","fields","trim","nested","money","price","amount","own","has","style","formatterFor","format","toFixed","productUrl","handle","rootUrl","endsWith","imageUrl","index","url","images","variantId","variants","variantTree","variant","candidate","orderable","addToCart","quantity","response","fetch","cartAddUrl","Accept","body","cause","json","ok","rendererFor","callimacusRenderers","registry","entry","render","mount","hasOwn","callimacusReady","clientId","endpoint","querySelector","textContent","designMode","roundTimeoutMs","ctx","consumedChapters","lastTransportError","isInFlight","ensureTransport","CallimacusService","Authorization","token","async","requestRound","activeTransport","reject","timer","offResponse","offError","ThamyrResponseType","chapter","ChapterStatus","echoed","inputEvent","UserInteractionType","ask","priority","fragment","rendered","createDocumentFragment","renderer","node","Node","append","renderBlocks","replaceChildren","callimacus","prompt","mountRoot","mountAll","scope","event","target","Element"],"mappings":";;;;;;;;;;;;OAKA,MAAMA,EAAEC,OAAOC,OAAO,MAAMF,EAAEG,KAAK,IAAIH,EAAEI,MAAM,IAAIJ,EAAEK,KAAK,IAAIL,EAAEM,KAAK,IAAIN,EAAEO,QAAQ,IAAIP,EAAEQ,QAAQ,IAAIR,EAAES,KAAK,IAAI,MAAMC,EAAET,OAAOC,OAAO,MAAMD,OAAOU,KAAKX,GAAGY,QAASC,IAAIH,EAAEV,EAAEa,IAAIA,CAAE,GAAG,MAAMA,EAAE,CAACC,KAAK,QAAQC,KAAK,gBAAgBC,EAAE,mBAAmBC,MAAM,oBAAoBA,MAAM,6BAA6BhB,OAAOiB,UAAUC,SAASC,KAAKH,MAAMI,EAAE,mBAAmBC,YAAYC,EAAEvB,GAAG,mBAAmBsB,YAAYE,OAAOF,YAAYE,OAAOxB,GAAGA,GAAGA,EAAEyB,kBAAkBH,YAAYI,EAAE,EAAEZ,KAAKJ,EAAEK,KAAKF,GAAGa,EAAEC,IAAIX,GAAGH,aAAaI,KAAKS,EAAEC,EAAEd,GAAGe,EAAEf,EAAEc,GAAGN,IAAIR,aAAaS,aAAaC,EAAEV,IAAIa,EAAEC,EAAEd,GAAGe,EAAE,IAAIX,KAAK,CAACJ,IAAIc,GAAGA,EAAE3B,EAAEU,IAAIG,GAAG,KAAKe,EAAE,CAAC5B,EAAEU,KAAK,MAAMG,EAAE,IAAIgB,WAAW,OAAOhB,EAAEiB,OAAO,WAAW,MAAM9B,EAAEa,EAAEkB,OAAOC,MAAM,KAAK,GAAGtB,EAAE,KAAKV,GAAG,IAAI,EAAEa,EAAEoB,cAAcjC,IAAI,SAAS2B,EAAE3B,GAAG,OAAOA,aAAakC,W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,QAAS9Q,QAAS2C,OAAO6Y,IACnGO,QAAQP,MAAM,GAAG+I,MAAOzT,MAAS9Q,+BAClC,SACC4pB,GAAa,CACd,CA5BA,CA6BD,CAEA,MAAMxC,EAA2B,CAChC0D,MACArB,MACA,SAAIvE,GACH,OAAOD,EAAKzF,QAAQ2F,eACrB,GAEDF,EAAKwG,WAAarE,EAClBtiB,GAAKmgB,EAAM,qBAAsBmC,QAEVzC,IAAnBnF,EAAQkM,QAA2C,KAAnBlM,EAAQkM,QACtCZ,EAAItL,EAAQkM,OAEnB,CAnLEC,CAAU1G,EAAMxT,EACjB,CAAE,MAAO+J,GACRwJ,GAASC,EAAM,SACfngB,GAAKmgB,EAAM,mBAAoB,CAACzJ,UAChCO,QAAQP,MAAM,GAAG+I,6CAA+C/I,EACjE,CAVA,CAWD,UAkLgBoQ,GAASC,EAAmBpa,EAAwB,IACnE,IAAK,MAAMwT,KAAQ4G,EAAM5N,iBAAwC,qBAChE+K,GAAM/D,EAAMxT,EAEd,CCnoBA,SAASiP,KAGR1V,SAAS9G,iBAAiB,uBAAwB4nB,IAC7CA,EAAMC,kBAAkBC,SAC3BJ,GAASE,EAAMC,UAGjBH,GAAS5gB,SACV,CAG4B,YAAxBA,SAASxD,WACZwD,SAAS9G,iBAAiB,mBAAoBwc,IAE9CA","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@callimacus/thamyr-liquid",
3
- "version": "4.3.5",
3
+ "version": "4.4.0",
4
4
  "private": false,
5
5
  "description": "Headless Callimacus runtime for Shopify Liquid themes",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -38,7 +38,7 @@
38
38
  "lint": "eslint src"
39
39
  },
40
40
  "dependencies": {
41
- "@callimacus/thamyr-core": "^4.3.5"
41
+ "@callimacus/thamyr-core": "^4.4.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "eslint-config-xo": "^4.0.1",