From 3ccb5bb087f25e87e669535f4c0b35ee5e85c7b2 Mon Sep 17 00:00:00 2001 From: Rizky Date: Wed, 24 Jul 2024 19:47:19 +0700 Subject: [PATCH] fix live reload --- app/srv/core/chunk-5TBO732O.js | 1 - app/srv/core/chunk-ACJPWHEH.js | 6 + app/srv/core/font-PYFUZD3A.js | 1 + app/srv/core/font-ULAYMU2A.js | 1 - app/srv/core/main.js | 97 ++++++----- app/srv/ws/sync/actions/page_load.ts | 53 ++++-- app/srv/ws/sync/code/parts/init/frontend.ts | 57 ++++-- app/srv/ws/sync/editor/load-component.ts | 9 +- app/srv/ws/sync/entity/user.ts | 108 ++++++++---- app/srv/ws/sync/preview/live-reload.ts | 27 +++ app/srv/ws/sync/sync-handler.ts | 4 + app/web/src/nova/ed/logic/code-loader.ts | 6 +- app/web/src/nova/ed/logic/ed-sync.tsx | 20 ++- .../prod/base/live-reload/dev-live-reload.ts | 164 ++++++++++++++++++ app/web/src/nova/prod/base/page.tsx | 1 + app/web/src/nova/prod/main.tsx | 3 +- app/web/src/nova/prod/root.tsx | 3 + app/web/src/utils/sync/idx-map.ts | 70 -------- app/web/src/utils/sync/ws-client.ts | 8 +- bun.lockb | Bin 280160 -> 281336 bytes pkgs/core/build-core.ts | 58 ++++++- pkgs/core/package.json | 1 + pkgs/core/utils/global.ts | 1 + 23 files changed, 500 insertions(+), 199 deletions(-) delete mode 100644 app/srv/core/chunk-5TBO732O.js create mode 100644 app/srv/core/chunk-ACJPWHEH.js create mode 100644 app/srv/core/font-PYFUZD3A.js delete mode 100644 app/srv/core/font-ULAYMU2A.js create mode 100644 app/srv/ws/sync/preview/live-reload.ts create mode 100644 app/web/src/nova/prod/base/live-reload/dev-live-reload.ts delete mode 100644 app/web/src/utils/sync/idx-map.ts diff --git a/app/srv/core/chunk-5TBO732O.js b/app/srv/core/chunk-5TBO732O.js deleted file mode 100644 index 4d94598c..00000000 --- a/app/srv/core/chunk-5TBO732O.js +++ /dev/null @@ -1 +0,0 @@ -var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c}; diff --git a/app/srv/core/chunk-ACJPWHEH.js b/app/srv/core/chunk-ACJPWHEH.js new file mode 100644 index 00000000..3bb99a1f --- /dev/null +++ b/app/srv/core/chunk-ACJPWHEH.js @@ -0,0 +1,6 @@ +var Jr=Object.create;var hr=Object.defineProperty;var Qr=Object.getOwnPropertyDescriptor;var Kr=Object.getOwnPropertyNames;var Zr=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty;var tr=(p,c)=>()=>(p&&(c=p(p=0)),c);var rt=(p,c)=>()=>(c||p((c={exports:{}}).exports,c),c.exports),st=(p,c)=>{for(var f in c)hr(p,f,{get:c[f],enumerable:!0})},tt=(p,c,f,T)=>{if(c&&typeof c=="object"||typeof c=="function")for(let w of Kr(c))!vr.call(p,w)&&w!==f&&hr(p,w,{get:()=>c[w],enumerable:!(T=Qr(c,w))||T.enumerable});return p};var et=(p,c,f)=>(f=p!=null?Jr(Zr(p)):{},tt(c||!p||!p.__esModule?hr(f,"default",{value:p,enumerable:!0}):f,p));var Q=tr(()=>{});function ot(){if(Ir)return K;Ir=!0,K.byteLength=S,K.toByteArray=P,K.fromByteArray=k;for(var p=[],c=[],f=typeof Uint8Array<"u"?Uint8Array:Array,T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0,B=T.length;w0)throw new Error("Invalid string. Length must be a multiple of 4");var d=s.indexOf("=");d===-1&&(d=a);var x=d===a?0:4-d%4;return[d,x]}function S(s){var a=o(s),d=a[0],x=a[1];return(d+x)*3/4-x}function L(s,a,d){return(a+d)*3/4-d}function P(s){var a,d=o(s),x=d[0],M=d[1],U=new f(L(s,x,M)),N=0,b=M>0?x-4:x,C;for(C=0;C>16&255,U[N++]=a>>8&255,U[N++]=a&255;return M===2&&(a=c[s.charCodeAt(C)]<<2|c[s.charCodeAt(C+1)]>>4,U[N++]=a&255),M===1&&(a=c[s.charCodeAt(C)]<<10|c[s.charCodeAt(C+1)]<<4|c[s.charCodeAt(C+2)]>>2,U[N++]=a>>8&255,U[N++]=a&255),U}function I(s){return p[s>>18&63]+p[s>>12&63]+p[s>>6&63]+p[s&63]}function _(s,a,d){for(var x,M=[],U=a;Ub?b:N+U));return x===1?(a=s[d-1],M.push(p[a>>2]+p[a<<4&63]+"==")):x===2&&(a=(s[d-2]<<8)+s[d-1],M.push(p[a>>10]+p[a>>4&63]+p[a<<2&63]+"=")),M.join("")}return K}function ut(){if(Ar)return er;Ar=!0;return er.read=function(p,c,f,T,w){var B,o,S=w*8-T-1,L=(1<>1,I=-7,_=f?w-1:0,k=f?-1:1,s=p[c+_];for(_+=k,B=s&(1<<-I)-1,s>>=-I,I+=S;I>0;B=B*256+p[c+_],_+=k,I-=8);for(o=B&(1<<-I)-1,B>>=-I,I+=T;I>0;o=o*256+p[c+_],_+=k,I-=8);if(B===0)B=1-P;else{if(B===L)return o?NaN:(s?-1:1)*(1/0);o=o+Math.pow(2,T),B=B-P}return(s?-1:1)*o*Math.pow(2,B-T)},er.write=function(p,c,f,T,w,B){var o,S,L,P=B*8-w-1,I=(1<>1,k=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,s=T?0:B-1,a=T?1:-1,d=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(S=isNaN(c)?1:0,o=I):(o=Math.floor(Math.log(c)/Math.LN2),c*(L=Math.pow(2,-o))<1&&(o--,L*=2),o+_>=1?c+=k/L:c+=k*Math.pow(2,1-_),c*L>=2&&(o++,L/=2),o+_>=I?(S=0,o=I):o+_>=1?(S=(c*L-1)*Math.pow(2,w),o=o+_):(S=c*Math.pow(2,_-1)*Math.pow(2,w),o=0));w>=8;p[f+s]=S&255,s+=a,S/=256,w-=8);for(o=o<0;p[f+s]=o&255,s+=a,o/=256,P-=8);p[f+s-a]|=d*128},er}function ht(){if(Ur)return W;Ur=!0;let p=ot(),c=ut(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;W.Buffer=o,W.SlowBuffer=M,W.INSPECT_MAX_BYTES=50;let T=2147483647;W.kMaxLength=T,o.TYPED_ARRAY_SUPPORT=w(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function w(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function B(e){if(e>T)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,o.prototype),r}function o(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(e)}return S(e,r,t)}o.poolSize=8192;function S(e,r,t){if(typeof e=="string")return _(e,r);if(ArrayBuffer.isView(e))return s(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return a(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return o.from(n,r,t);let i=d(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return o.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}o.from=function(e,r,t){return S(e,r,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function L(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function P(e,r,t){return L(e),e<=0?B(e):r!==void 0?typeof t=="string"?B(e).fill(r,t):B(e).fill(r):B(e)}o.alloc=function(e,r,t){return P(e,r,t)};function I(e){return L(e),B(e<0?0:x(e)|0)}o.allocUnsafe=function(e){return I(e)},o.allocUnsafeSlow=function(e){return I(e)};function _(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=U(e,r)|0,n=B(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function k(e){let r=e.length<0?0:x(e.length)|0,t=B(r);for(let n=0;n=T)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T.toString(16)+" bytes");return e|0}function M(e){return+e!=e&&(e=0),o.alloc(+e)}o.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==o.prototype},o.compare=function(r,t){if(F(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(r)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let n=r.length,i=t.length;for(let u=0,h=Math.min(n,i);ui.length?(o.isBuffer(h)||(h=o.from(h)),h.copy(i,u)):Uint8Array.prototype.set.call(i,h,u);else if(o.isBuffer(h))h.copy(i,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=h.length}return i};function U(e,r){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return or(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return gr(e).length;default:if(i)return n?-1:or(e).length;r=(""+r).toLowerCase(),i=!0}}o.byteLength=U;function N(e,r,t){let n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Yr(this,r,t);case"utf8":case"utf-8":return lr(this,r,t);case"ascii":return Or(this,r,t);case"latin1":case"binary":return Dr(this,r,t);case"base64":return Pr(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Gr(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}o.prototype._isBuffer=!0;function b(e,r,t){let n=e[r];e[r]=e[t],e[t]=n}o.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(r+=" ... "),""},f&&(o.prototype[f]=o.prototype.inspect),o.prototype.compare=function(r,t,n,i,u){if(F(r,Uint8Array)&&(r=o.from(r,r.offset,r.byteLength)),!o.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),u===void 0&&(u=this.length),t<0||n>r.length||i<0||u>this.length)throw new RangeError("out of range index");if(i>=u&&t>=n)return 0;if(i>=u)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,u>>>=0,this===r)return 0;let h=u-i,l=n-t,m=Math.min(h,l),E=this.slice(i,u),g=r.slice(t,n);for(let y=0;y2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ur(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=o.from(r,n)),o.isBuffer(r))return r.length===0?-1:sr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):sr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function sr(e,r,t,n,i){let u=1,h=e.length,l=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;u=2,h/=2,l/=2,t/=2}function m(g,y){return u===1?g[y]:g.readUInt16BE(y*u)}let E;if(i){let g=-1;for(E=t;Eh&&(t=h-l),E=t;E>=0;E--){let g=!0;for(let y=0;yi&&(n=i)):n=i;let u=r.length;n>u/2&&(n=u/2);let h;for(h=0;h>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let u=this.length-t;if((n===void 0||n>u)&&(n=u),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let h=!1;for(;;)switch(i){case"hex":return Mr(this,r,t,n);case"utf8":case"utf-8":return Nr(this,r,t,n);case"ascii":case"latin1":case"binary":return $r(this,r,t,n);case"base64":return br(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kr(this,r,t,n);default:if(h)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),h=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pr(e,r,t){return r===0&&t===e.length?p.fromByteArray(e):p.fromByteArray(e.slice(r,t))}function lr(e,r,t){t=Math.min(e.length,t);let n=[],i=r;for(;i239?4:u>223?3:u>191?2:1;if(i+l<=t){let m,E,g,y;switch(l){case 1:u<128&&(h=u);break;case 2:m=e[i+1],(m&192)===128&&(y=(u&31)<<6|m&63,y>127&&(h=y));break;case 3:m=e[i+1],E=e[i+2],(m&192)===128&&(E&192)===128&&(y=(u&15)<<12|(m&63)<<6|E&63,y>2047&&(y<55296||y>57343)&&(h=y));break;case 4:m=e[i+1],E=e[i+2],g=e[i+3],(m&192)===128&&(E&192)===128&&(g&192)===128&&(y=(u&15)<<18|(m&63)<<12|(E&63)<<6|g&63,y>65535&&y<1114112&&(h=y))}}h===null?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|h&1023),n.push(h),i+=l}return Fr(n)}let ar=4096;function Fr(e){let r=e.length;if(r<=ar)return String.fromCharCode.apply(String,e);let t="",n=0;for(;nn)&&(t=n);let i="";for(let u=r;un&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tt)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||R(r,t,this.length);let i=this[r],u=1,h=0;for(;++h>>0,t=t>>>0,n||R(r,t,this.length);let i=this[r+--t],u=1;for(;t>0&&(u*=256);)i+=this[r+--t]*u;return i},o.prototype.readUint8=o.prototype.readUInt8=function(r,t){return r=r>>>0,t||R(r,1,this.length),this[r]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||R(r,2,this.length),this[r]|this[r+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||R(r,2,this.length),this[r]<<8|this[r+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||R(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||R(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])},o.prototype.readBigUInt64LE=q(function(r){r=r>>>0,V(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&J(r,this.length-8);let i=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,u=this[++r]+this[++r]*2**8+this[++r]*2**16+n*2**24;return BigInt(i)+(BigInt(u)<>>0,V(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&J(r,this.length-8);let i=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],u=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+n;return(BigInt(i)<>>0,t=t>>>0,n||R(r,t,this.length);let i=this[r],u=1,h=0;for(;++h=u&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||R(r,t,this.length);let i=t,u=1,h=this[r+--i];for(;i>0&&(u*=256);)h+=this[r+--i]*u;return u*=128,h>=u&&(h-=Math.pow(2,8*t)),h},o.prototype.readInt8=function(r,t){return r=r>>>0,t||R(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]},o.prototype.readInt16LE=function(r,t){r=r>>>0,t||R(r,2,this.length);let n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n},o.prototype.readInt16BE=function(r,t){r=r>>>0,t||R(r,2,this.length);let n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n},o.prototype.readInt32LE=function(r,t){return r=r>>>0,t||R(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},o.prototype.readInt32BE=function(r,t){return r=r>>>0,t||R(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},o.prototype.readBigInt64LE=q(function(r){r=r>>>0,V(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&J(r,this.length-8);let i=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(n<<24);return(BigInt(i)<>>0,V(r,"offset");let t=this[r],n=this[r+7];(t===void 0||n===void 0)&&J(r,this.length-8);let i=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(i)<>>0,t||R(r,4,this.length),c.read(this,r,!0,23,4)},o.prototype.readFloatBE=function(r,t){return r=r>>>0,t||R(r,4,this.length),c.read(this,r,!1,23,4)},o.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||R(r,8,this.length),c.read(this,r,!0,52,8)},o.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||R(r,8,this.length),c.read(this,r,!1,52,8)};function $(e,r,t,n,i,u){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||re.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){let l=Math.pow(2,8*n)-1;$(this,r,t,n,l,0)}let u=1,h=0;for(this[t]=r&255;++h>>0,n=n>>>0,!i){let l=Math.pow(2,8*n)-1;$(this,r,t,n,l,0)}let u=n-1,h=1;for(this[t+u]=r&255;--u>=0&&(h*=256);)this[t+u]=r/h&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,255,0),this[t]=r&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function fr(e,r,t,n,i){mr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u;let h=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=h,h=h>>8,e[t++]=h,h=h>>8,e[t++]=h,h=h>>8,e[t++]=h,t}function yr(e,r,t,n,i){mr(r,n,i,e,t,7);let u=Number(r&BigInt(4294967295));e[t+7]=u,u=u>>8,e[t+6]=u,u=u>>8,e[t+5]=u,u=u>>8,e[t+4]=u;let h=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=h,h=h>>8,e[t+2]=h,h=h>>8,e[t+1]=h,h=h>>8,e[t]=h,t+8}o.prototype.writeBigUInt64LE=q(function(r,t=0){return fr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=q(function(r,t=0){return yr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let m=Math.pow(2,8*n-1);$(this,r,t,n,m-1,-m)}let u=0,h=1,l=0;for(this[t]=r&255;++u>0)-l&255;return t+n},o.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){let m=Math.pow(2,8*n-1);$(this,r,t,n,m-1,-m)}let u=n-1,h=1,l=0;for(this[t+u]=r&255;--u>=0&&(h*=256);)r<0&&l===0&&this[t+u+1]!==0&&(l=1),this[t+u]=(r/h>>0)-l&255;return t+n},o.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1},o.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2},o.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2},o.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4},o.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||$(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4},o.prototype.writeBigInt64LE=q(function(r,t=0){return fr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=q(function(r,t=0){return yr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wr(e,r,t,n,i,u){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Br(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,4),c.write(e,r,t,n,23,4),t+4}o.prototype.writeFloatLE=function(r,t,n){return Br(this,r,t,!0,n)},o.prototype.writeFloatBE=function(r,t,n){return Br(this,r,t,!1,n)};function dr(e,r,t,n,i){return r=+r,t=t>>>0,i||wr(e,r,t,8),c.write(e,r,t,n,52,8),t+8}o.prototype.writeDoubleLE=function(r,t,n){return dr(this,r,t,!0,n)},o.prototype.writeDoubleBE=function(r,t,n){return dr(this,r,t,!1,n)},o.prototype.copy=function(r,t,n,i){if(!o.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t>>0,n=n===void 0?this.length:n>>>0,r||(r=0);let u;if(typeof r=="number")for(u=t;u2**32?i=Er(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=Er(i)),i+="n"),n+=` It must be ${r}. Received ${i}`,n},RangeError);function Er(e){let r="",t=e.length,n=e[0]==="-"?1:0;for(;t>=n+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function qr(e,r,t){V(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&J(r,e.length-(t+1))}function mr(e,r,t,n,i,u){if(e>t||e3?r===0||r===BigInt(0)?l=`>= 0${h} and < 2${h} ** ${(u+1)*8}${h}`:l=`>= -(2${h} ** ${(u+1)*8-1}${h}) and < 2 ** ${(u+1)*8-1}${h}`:l=`>= ${r}${h} and <= ${t}${h}`,new H.ERR_OUT_OF_RANGE("value",l,e)}qr(n,i,u)}function V(e,r){if(typeof e!="number")throw new H.ERR_INVALID_ARG_TYPE(r,"number",e)}function J(e,r,t){throw Math.floor(e)!==e?(V(e,t),new H.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new H.ERR_BUFFER_OUT_OF_BOUNDS:new H.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}let Wr=/[^+/0-9A-Za-z-_]/g;function Xr(e){if(e=e.split("=")[0],e=e.trim().replace(Wr,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function or(e,r){r=r||1/0;let t,n=e.length,i=null,u=[];for(let h=0;h55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&u.push(239,191,189);continue}else if(h+1===n){(r-=3)>-1&&u.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&u.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&u.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;u.push(t)}else if(t<2048){if((r-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function jr(e){let r=[];for(let t=0;t>8,i=t%256,u.push(i),u.push(n);return u}function gr(e){return p.toByteArray(Xr(e))}function rr(e,r,t,n){let i;for(i=0;i=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function F(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ur(e){return e!==e}let Vr=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)r[n+i]=e[t]+e[i]}return r}();function q(e){return typeof BigInt>"u"?zr:e}function zr(){throw new Error("BigInt not supported")}return W}var K,Ir,er,Ar,W,Ur,X,Tr,yt,wt,xr=tr(()=>{Q();v();Z();K={},Ir=!1;er={},Ar=!1;W={},Ur=!1;X=ht();X.Buffer;X.SlowBuffer;X.INSPECT_MAX_BYTES;X.kMaxLength;Tr=X.Buffer,yt=X.INSPECT_MAX_BYTES,wt=X.kMaxLength});var v=tr(()=>{xr()});var Lr=rt((At,Cr)=>{Q();v();Z();var A=Cr.exports={},O,D;function cr(){throw new Error("setTimeout has not been defined")}function pr(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?O=setTimeout:O=cr}catch{O=cr}try{typeof clearTimeout=="function"?D=clearTimeout:D=pr}catch{D=pr}})();function Rr(p){if(O===setTimeout)return setTimeout(p,0);if((O===cr||!O)&&setTimeout)return O=setTimeout,setTimeout(p,0);try{return O(p,0)}catch{try{return O.call(null,p,0)}catch{return O.call(this,p,0)}}}function ct(p){if(D===clearTimeout)return clearTimeout(p);if((D===pr||!D)&&clearTimeout)return D=clearTimeout,clearTimeout(p);try{return D(p)}catch{try{return D.call(null,p)}catch{return D.call(this,p)}}}var Y=[],z=!1,j,nr=-1;function pt(){!z||!j||(z=!1,j.length?Y=j.concat(Y):nr=-1,Y.length&&_r())}function _r(){if(!z){var p=Rr(pt);z=!0;for(var c=Y.length;c;){for(j=Y,Y=[];++nr1)for(var f=1;f{it=et(Lr(),1)});export{rt as a,st as b,et as c,Q as d,Z as e,Tr as f,v as g}; +/*! Bundled license information: + +@jspm/core/nodelibs/browser/buffer.js: + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) +*/ diff --git a/app/srv/core/font-PYFUZD3A.js b/app/srv/core/font-PYFUZD3A.js new file mode 100644 index 00000000..359d722a --- /dev/null +++ b/app/srv/core/font-PYFUZD3A.js @@ -0,0 +1 @@ +import{d as o,e as f,g as s}from"./chunk-ACJPWHEH.js";o();s();f(); diff --git a/app/srv/core/font-ULAYMU2A.js b/app/srv/core/font-ULAYMU2A.js deleted file mode 100644 index 1ae6eb2f..00000000 --- a/app/srv/core/font-ULAYMU2A.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-5TBO732O.js"; diff --git a/app/srv/core/main.js b/app/srv/core/main.js index 8cd8a98f..abf62887 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -1,23 +1,34 @@ -import{a as ie,b as $1,c as P}from"./chunk-5TBO732O.js";var gp=ie(j=>{"use strict";var Ti=Symbol.for("react.element"),H1=Symbol.for("react.portal"),V1=Symbol.for("react.fragment"),W1=Symbol.for("react.strict_mode"),G1=Symbol.for("react.profiler"),Z1=Symbol.for("react.provider"),K1=Symbol.for("react.context"),Q1=Symbol.for("react.forward_ref"),q1=Symbol.for("react.suspense"),X1=Symbol.for("react.memo"),J1=Symbol.for("react.lazy"),sp=Symbol.iterator;function Y1(e){return e===null||typeof e!="object"?null:(e=sp&&e[sp]||e["@@iterator"],typeof e=="function"?e:null)}var up={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cp=Object.assign,fp={};function xr(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}xr.prototype.isReactComponent={};xr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dp(){}dp.prototype=xr.prototype;function $a(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}var Ha=$a.prototype=new dp;Ha.constructor=$a;cp(Ha,xr.prototype);Ha.isPureReactComponent=!0;var lp=Array.isArray,pp=Object.prototype.hasOwnProperty,Va={current:null},mp={key:!0,ref:!0,__self:!0,__source:!0};function hp(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)pp.call(t,r)&&!mp.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{"use strict";yp.exports=gp()});var Cp=ie(K=>{"use strict";function Qa(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rgs(l,n))cgs(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else if(cgs(u,n))e[r]=u,e[c]=n,r=c;else break e}}return t}function gs(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(_p=performance,K.unstable_now=function(){return _p.now()}):(Ga=Date,vp=Ga.now(),K.unstable_now=function(){return Ga.now()-vp});var _p,Ga,vp,bt=[],cn=[],iw=1,tt=null,be=3,vs=!1,Vn=!1,Ni=!1,kp=typeof setTimeout=="function"?setTimeout:null,Sp=typeof clearTimeout=="function"?clearTimeout:null,wp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function qa(e){for(var t=pt(cn);t!==null;){if(t.callback===null)_s(cn);else if(t.startTime<=e)_s(cn),t.sortIndex=t.expirationTime,Qa(bt,t);else break;t=pt(cn)}}function Xa(e){if(Ni=!1,qa(e),!Vn)if(pt(bt)!==null)Vn=!0,Ya(Ja);else{var t=pt(cn);t!==null&&eu(Xa,t.startTime-e)}}function Ja(e,t){Vn=!1,Ni&&(Ni=!1,Sp(Pi),Pi=-1),vs=!0;var n=be;try{for(qa(t),tt=pt(bt);tt!==null&&(!(tt.expirationTime>t)||e&&!Rp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,be=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===pt(bt)&&_s(bt),qa(t)}else _s(bt);tt=pt(bt)}if(tt!==null)var o=!0;else{var s=pt(cn);s!==null&&eu(Xa,s.startTime-t),o=!1}return o}finally{tt=null,be=n,vs=!1}}var ws=!1,ys=null,Pi=-1,Ep=5,bp=-1;function Rp(){return!(K.unstable_now()-bpe||125r?(e.sortIndex=n,Qa(cn,e),pt(bt)===null&&e===pt(cn)&&(Ni?(Sp(Pi),Pi=-1):Ni=!0,eu(Xa,n-r))):(e.sortIndex=i,Qa(bt,e),Vn||vs||(Vn=!0,Ya(Ja))),e};K.unstable_shouldYield=Rp;K.unstable_wrapCallback=function(e){var t=be;return function(){var n=be;be=t;try{return e.apply(this,arguments)}finally{be=n}}}});var Tp=ie((o3,Ip)=>{"use strict";Ip.exports=Cp()});var D0=ie(Xe=>{"use strict";var Mm=_e(),Qe=Tp();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Su=Object.prototype.hasOwnProperty,ow=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Op={},Np={};function sw(e){return Su.call(Np,e)?!0:Su.call(Op,e)?!1:ow.test(e)?Np[e]=!0:(Op[e]=!0,!1)}function lw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aw(e,t,n,r){if(t===null||typeof t>"u"||lw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var hc=/[\-:]([a-z])/g;function gc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hc,gc);xe[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hc,gc);xe[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hc,gc);xe[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function yc(e,t,n,r){var i=xe.hasOwnProperty(t)?xe[t]:null;(i!==null?i.type!==0:r||!(2{"use strict";m();g();h();var No=Symbol.for("react.element"),uS=Symbol.for("react.portal"),fS=Symbol.for("react.fragment"),cS=Symbol.for("react.strict_mode"),dS=Symbol.for("react.profiler"),pS=Symbol.for("react.provider"),mS=Symbol.for("react.context"),hS=Symbol.for("react.forward_ref"),gS=Symbol.for("react.suspense"),yS=Symbol.for("react.memo"),vS=Symbol.for("react.lazy"),Am=Symbol.iterator;function wS(e){return e===null||typeof e!="object"?null:(e=Am&&e[Am]||e["@@iterator"],typeof e=="function"?e:null)}var Lm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Um=Object.assign,Fm={};function xi(e,t,n){this.props=e,this.context=t,this.refs=Fm,this.updater=n||Lm}xi.prototype.isReactComponent={};xi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jm(){}jm.prototype=xi.prototype;function Ku(e,t,n){this.props=e,this.context=t,this.refs=Fm,this.updater=n||Lm}var Xu=Ku.prototype=new jm;Xu.constructor=Ku;Um(Xu,xi.prototype);Xu.isPureReactComponent=!0;var Dm=Array.isArray,zm=Object.prototype.hasOwnProperty,Ju={current:null},Bm={key:!0,ref:!0,__self:!0,__source:!0};function $m(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)zm.call(t,r)&&!Bm.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";m();g();h();Wm.exports=Hm()});var eh=Pe(we=>{"use strict";m();g();h();function of(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rSs(s,n))uSs(f,s)?(e[r]=f,e[u]=n,r=u):(e[r]=s,e[a]=n,r=a);else if(uSs(f,n))e[r]=f,e[u]=n,r=u;else break e}}return t}function Ss(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Vm=performance,we.unstable_now=function(){return Vm.now()}):(tf=Date,Ym=tf.now(),we.unstable_now=function(){return tf.now()-Ym});var Vm,tf,Ym,cn=[],Xn=[],bS=1,Ft=null,rt=3,Es=!1,Fr=!1,Do=!1,qm=typeof setTimeout=="function"?setTimeout:null,Qm=typeof clearTimeout=="function"?clearTimeout:null,Gm=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function af(e){for(var t=Xt(Xn);t!==null;){if(t.callback===null)bs(Xn);else if(t.startTime<=e)bs(Xn),t.sortIndex=t.expirationTime,of(cn,t);else break;t=Xt(Xn)}}function sf(e){if(Do=!1,af(e),!Fr)if(Xt(cn)!==null)Fr=!0,uf(lf);else{var t=Xt(Xn);t!==null&&ff(sf,t.startTime-e)}}function lf(e,t){Fr=!1,Do&&(Do=!1,Qm(Mo),Mo=-1),Es=!0;var n=rt;try{for(af(t),Ft=Xt(cn);Ft!==null&&(!(Ft.expirationTime>t)||e&&!Jm());){var r=Ft.callback;if(typeof r=="function"){Ft.callback=null,rt=Ft.priorityLevel;var i=r(Ft.expirationTime<=t);t=we.unstable_now(),typeof i=="function"?Ft.callback=i:Ft===Xt(cn)&&bs(cn),af(t)}else bs(cn);Ft=Xt(cn)}if(Ft!==null)var o=!0;else{var a=Xt(Xn);a!==null&&ff(sf,a.startTime-t),o=!1}return o}finally{Ft=null,rt=n,Es=!1}}var Os=!1,ks=null,Mo=-1,Km=5,Xm=-1;function Jm(){return!(we.unstable_now()-Xme||125r?(e.sortIndex=n,of(Xn,e),Xt(cn)===null&&e===Xt(Xn)&&(Do?(Qm(Mo),Mo=-1):Do=!0,ff(sf,n-r))):(e.sortIndex=i,of(cn,e),Fr||Es||(Fr=!0,uf(lf))),e};we.unstable_shouldYield=Jm;we.unstable_wrapCallback=function(e){var t=rt;return function(){var n=rt;rt=t;try{return e.apply(this,arguments)}finally{rt=n}}}});var nh=Pe((X3,th)=>{"use strict";m();g();h();th.exports=eh()});var ly=Pe(Nt=>{"use strict";m();g();h();var u0=Qe(),It=nh();function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Af=Object.prototype.hasOwnProperty,ES=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rh={},ih={};function OS(e){return Af.call(ih,e)?!0:Af.call(rh,e)?!1:ES.test(e)?ih[e]=!0:(rh[e]=!0,!1)}function CS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TS(e,t,n,r){if(t===null||typeof t>"u"||CS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function pt(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new pt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Je[e]=new pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ec=/[\-:]([a-z])/g;function Oc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ec,Oc);Je[t]=new pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ec,Oc);Je[t]=new pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ec,Oc);Je[t]=new pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new pt(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cc(e,t,n,r){var i=Je.hasOwnProperty(t)?Je[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` -`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{nu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bi(e):""}function uw(e){switch(e.tag){case 5:return Bi(e.type);case 16:return Bi("Lazy");case 13:return Bi("Suspense");case 19:return Bi("SuspenseList");case 0:case 2:case 15:return e=ru(e.type,!1),e;case 11:return e=ru(e.type.render,!1),e;case 1:return e=ru(e.type,!0),e;default:return""}}function Cu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case Er:return"Portal";case Eu:return"Profiler";case _c:return"StrictMode";case bu:return"Suspense";case Ru:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fm:return(e.displayName||"Context")+".Consumer";case jm:return(e._context.displayName||"Context")+".Provider";case vc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wc:return t=e.displayName||null,t!==null?t:Cu(e.type)||"Memo";case dn:t=e._payload,e=e._init;try{return Cu(e(t))}catch{}}return null}function cw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Cu(t);case 8:return t===_c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fw(e){var t=Bm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ks(e){e._valueTracker||(e._valueTracker=fw(e))}function $m(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function qs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Iu(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ap(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hm(e,t){t=t.checked,t!=null&&yc(e,"checked",t,!1)}function Tu(e,t){Hm(e,t);var n=Rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ou(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ou(e,t.type,Rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ou(e,t,n){(t!=="number"||qs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $i=Array.isArray;function Mr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ss.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function to(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dw=["Webkit","ms","Moz","O"];Object.keys(Wi).forEach(function(e){dw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wi[t]=Wi[e]})});function Zm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wi.hasOwnProperty(e)&&Wi[e]?(""+t).trim():t+"px"}function Km(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Zm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var pw=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Au(e,t){if(t){if(pw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Lu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Du=null;function xc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mu=null,zr=null,jr=null;function zp(e){if(e=wo(e)){if(typeof Mu!="function")throw Error(R(280));var t=e.stateNode;t&&(t=El(t),Mu(e.stateNode,e.type,t))}}function Qm(e){zr?jr?jr.push(e):jr=[e]:zr=e}function qm(){if(zr){var e=zr,t=jr;if(jr=zr=null,zp(e),t)for(e=0;e>>=0,e===0?32:31-(Ew(e)/bw|0)|0}var Es=64,bs=4194304;function Hi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function el(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Hi(l):(o&=s,o!==0&&(r=Hi(o)))}else s=n&~i,s!==0?r=Hi(s):o!==0&&(r=Hi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _o(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function Tw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zi),Gp=" ",Zp=!1;function gh(e,t){switch(e){case"keyup":return rx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function ox(e,t){switch(e){case"compositionend":return yh(t);case"keypress":return t.which!==32?null:(Zp=!0,Gp);case"textInput":return e=t.data,e===Gp&&Zp?null:e;default:return null}}function sx(e,t){if(Rr)return e==="compositionend"||!Tc&&gh(e,t)?(e=mh(),Bs=Rc=gn=null,Rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qp(n)}}function xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kh(){for(var e=window,t=qs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qs(e.document)}return t}function Oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gx(e){var t=kh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xh(n.ownerDocument.documentElement,n)){if(r!==null&&Oc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Xp(n,o);var s=Xp(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cr=null,$u=null,Qi=null,Hu=!1;function Jp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hu||Cr==null||Cr!==qs(r)||(r=Cr,"selectionStart"in r&&Oc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qi&&lo(Qi,r)||(Qi=r,r=rl($u,"onSelect"),0Or||(e.current=Qu[Or],Qu[Or]=null,Or--)}function Q(e,t){Or++,Qu[Or]=e.current,e.current=t}var Cn={},Te=Tn(Cn),Ue=Tn(!1),Jn=Cn;function Hr(e,t){var n=e.type.contextTypes;if(!n)return Cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Be(e){return e=e.childContextTypes,e!=null}function ol(){J(Ue),J(Te)}function lm(e,t,n){if(Te.current!==Cn)throw Error(R(168));Q(Te,t),Q(Ue,n)}function Nh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(R(108,cw(e)||"Unknown",i));return re({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,Jn=Te.current,Q(Te,e),Q(Ue,Ue.current),!0}function am(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Nh(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,J(Ue),J(Te),Q(Te,e)):J(Ue),Q(Ue,n)}var Ht=null,bl=!1,mu=!1;function Ph(e){Ht===null?Ht=[e]:Ht.push(e)}function Rx(e){bl=!0,Ph(e)}function On(){if(!mu&&Ht!==null){mu=!0;var e=0,t=W;try{var n=Ht;for(W=1;e>=s,i-=s,Vt=1<<32-_t(t)+i|n<b?(O=k,k=null):O=k.sibling;var I=f(m,k,y[b],_);if(I===null){k===null&&(k=O);break}e&&k&&I.alternate===null&&t(m,k),g=o(I,g,b),E===null?S=I:E.sibling=I,E=I,k=O}if(b===y.length)return n(m,k),Y&&Wn(m,b),S;if(k===null){for(;bb?(O=k,k=null):O=k.sibling;var N=f(m,k,I.value,_);if(N===null){k===null&&(k=O);break}e&&k&&N.alternate===null&&t(m,k),g=o(N,g,b),E===null?S=N:E.sibling=N,E=N,k=O}if(I.done)return n(m,k),Y&&Wn(m,b),S;if(k===null){for(;!I.done;b++,I=y.next())I=p(m,I.value,_),I!==null&&(g=o(I,g,b),E===null?S=I:E.sibling=I,E=I);return Y&&Wn(m,b),S}for(k=r(m,k);!I.done;b++,I=y.next())I=d(k,m,b,I.value,_),I!==null&&(e&&I.alternate!==null&&k.delete(I.key===null?b:I.key),g=o(I,g,b),E===null?S=I:E.sibling=I,E=I);return e&&k.forEach(function(ze){return t(m,ze)}),Y&&Wn(m,b),S}function w(m,g,y,_){if(typeof y=="object"&&y!==null&&y.type===br&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case xs:e:{for(var S=y.key,E=g;E!==null;){if(E.key===S){if(S=y.type,S===br){if(E.tag===7){n(m,E.sibling),g=i(E,y.props.children),g.return=m,m=g;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===dn&&hm(S)===E.type){n(m,E.sibling),g=i(E,y.props),g.ref=zi(m,E,y),g.return=m,m=g;break e}n(m,E);break}else t(m,E);E=E.sibling}y.type===br?(g=Xn(y.props.children,m.mode,_,y.key),g.return=m,m=g):(_=Qs(y.type,y.key,y.props,null,m.mode,_),_.ref=zi(m,g,y),_.return=m,m=_)}return s(m);case Er:e:{for(E=y.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(m,g.sibling),g=i(g,y.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=ku(y,m.mode,_),g.return=m,m=g}return s(m);case dn:return E=y._init,w(m,g,E(y._payload),_)}if($i(y))return h(m,g,y,_);if(Ai(y))return v(m,g,y,_);Ms(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,y),g.return=m,m=g):(n(m,g),g=xu(y,m.mode,_),g.return=m,m=g),s(m)):n(m,g)}return w}var Wr=Uh(!0),Bh=Uh(!1),xo={},Ot=Tn(xo),fo=Tn(xo),po=Tn(xo);function Qn(e){if(e===xo)throw Error(R(174));return e}function Fc(e,t){switch(Q(po,t),Q(fo,e),Q(Ot,xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pu(t,e)}J(Ot),Q(Ot,t)}function Gr(){J(Ot),J(fo),J(po)}function $h(e){Qn(po.current);var t=Qn(Ot.current),n=Pu(t,e.type);t!==n&&(Q(fo,e),Q(Ot,n))}function Uc(e){fo.current===e&&(J(Ot),J(fo))}var te=Tn(0);function dl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hu=[];function Bc(){for(var e=0;en?n:4,e(!0);var r=gu.transition;gu.transition={};try{e(!1),t()}finally{W=n,gu.transition=r}}function i0(){return lt().memoizedState}function Ox(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},o0(e))s0(t,n);else if(n=Mh(e,t,n,r),n!==null){var i=Le();vt(n,e,r,i),l0(n,t,r)}}function Nx(e,t,n){var r=En(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(o0(e))s0(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,wt(l,s)){var c=t.interleaved;c===null?(i.next=i,zc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Mh(e,t,i,r),n!==null&&(i=Le(),vt(n,e,r,i),l0(n,t,r))}}function o0(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function s0(e,t){qi=pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function l0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Sc(e,n)}}var ml={readContext:st,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},Px={readContext:st,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:ym,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ws(4194308,4,Yh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ws(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ct();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ox.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:gm,useDebugValue:Gc,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=gm(!1),t=e[0];return e=Tx.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=Ct();if(Y){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),he===null)throw Error(R(349));er&30||Wh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ym(Zh.bind(null,r,o,e),[e]),r.flags|=2048,go(9,Gh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ct(),t=he.identifierPrefix;if(Y){var n=Wt,r=Vt;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mo++,0s||i[a]!==o[s]){var u=` +`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{df=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wo(e):""}function RS(e){switch(e.tag){case 5:return Wo(e.type);case 16:return Wo("Lazy");case 13:return Wo("Suspense");case 19:return Wo("SuspenseList");case 0:case 2:case 15:return e=pf(e.type,!1),e;case 11:return e=pf(e.type.render,!1),e;case 1:return e=pf(e.type,!0),e;default:return""}}function Uf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ei:return"Fragment";case bi:return"Portal";case Df:return"Profiler";case Tc:return"StrictMode";case Mf:return"Suspense";case Lf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d0:return(e.displayName||"Context")+".Consumer";case c0:return(e._context.displayName||"Context")+".Provider";case Rc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ic:return t=e.displayName||null,t!==null?t:Uf(e.type)||"Memo";case er:t=e._payload,e=e._init;try{return Uf(e(t))}catch{}}return null}function IS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uf(t);case 8:return t===Tc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function m0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PS(e){var t=m0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=PS(e))}function h0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=m0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ff(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ah(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=mr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function g0(e,t){t=t.checked,t!=null&&Cc(e,"checked",t,!1)}function jf(e,t){g0(e,t);var n=mr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zf(e,t.type,n):t.hasOwnProperty("defaultValue")&&zf(e,t.type,mr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zf(e,t,n){(t!=="number"||nl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vo=Array.isArray;function Li(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Rs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ia(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NS=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){NS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});function _0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zo.hasOwnProperty(e)&&Zo[e]?(""+t).trim():t+"px"}function x0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=_0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var AS=Re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hf(e,t){if(t){if(AS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Wf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vf=null;function Pc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yf=null,Ui=null,Fi=null;function fh(e){if(e=Sa(e)){if(typeof Yf!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Il(t),Yf(e.stateNode,e.type,t))}}function S0(e){Ui?Fi?Fi.push(e):Fi=[e]:Ui=e}function k0(){if(Ui){var e=Ui,t=Fi;if(Fi=Ui=null,fh(e),t)for(e=0;e>>=0,e===0?32:31-(WS(e)/VS|0)|0}var Is=64,Ps=4194304;function Yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Yo(s):(o&=a,o!==0&&(r=Yo(o)))}else a=n&~i,a!==0?r=Yo(a):o!==0&&(r=Yo(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _a(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rn(t),e[t]=n}function qS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Qo),wh=" ",_h=!1;function H0(e,t){switch(e){case"keyup":return kk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oi=!1;function Ek(e,t){switch(e){case"compositionend":return W0(t);case"keypress":return t.which!==32?null:(_h=!0,wh);case"textInput":return e=t.data,e===wh&&_h?null:e;default:return null}}function Ok(e,t){if(Oi)return e==="compositionend"||!jc&&H0(e,t)?(e=B0(),Gs=Lc=ir=null,Oi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kh(n)}}function Z0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Z0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function q0(){for(var e=window,t=nl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nl(e.document)}return t}function zc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Mk(e){var t=q0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Z0(n.ownerDocument.documentElement,n)){if(r!==null&&zc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=bh(n,o);var a=bh(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ci=null,Xf=null,Xo=null,Jf=!1;function Eh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jf||Ci==null||Ci!==nl(r)||(r=Ci,"selectionStart"in r&&zc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xo&&fa(Xo,r)||(Xo=r,r=ul(Xf,"onSelect"),0Ii||(e.current=oc[Ii],oc[Ii]=null,Ii--)}function _e(e,t){Ii++,oc[Ii]=e.current,e.current=t}var hr={},st=yr(hr),wt=yr(!1),Yr=hr;function Hi(e,t){var n=e.type.contextTypes;if(!n)return hr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function _t(e){return e=e.childContextTypes,e!=null}function cl(){be(wt),be(st)}function Dh(e,t,n){if(st.current!==hr)throw Error(F(168));_e(st,t),_e(wt,n)}function ig(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(F(108,IS(e)||"Unknown",i));return Re({},n,r)}function dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hr,Yr=st.current,_e(st,e),_e(wt,wt.current),!0}function Mh(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=ig(e,t,Yr),r.__reactInternalMemoizedMergedChildContext=e,be(wt),be(st),_e(st,e)):be(wt),_e(wt,n)}var Tn=null,Pl=!1,bf=!1;function og(e){Tn===null?Tn=[e]:Tn.push(e)}function Vk(e){Pl=!0,og(e)}function vr(){if(!bf&&Tn!==null){bf=!0;var e=0,t=he;try{var n=Tn;for(he=1;e>=a,i-=a,Rn=1<<32-rn(t)+i|n<M?(W=A,A=null):W=A.sibling;var U=c(y,A,_[M],x);if(U===null){A===null&&(A=W);break}e&&A&&U.alternate===null&&t(y,A),w=o(U,w,M),D===null?N=U:D.sibling=U,D=U,A=W}if(M===_.length)return n(y,A),Ee&&jr(y,M),N;if(A===null){for(;M<_.length;M++)A=d(y,_[M],x),A!==null&&(w=o(A,w,M),D===null?N=A:D.sibling=A,D=A);return Ee&&jr(y,M),N}for(A=r(y,A);M<_.length;M++)W=p(A,y,M,_[M],x),W!==null&&(e&&W.alternate!==null&&A.delete(W.key===null?M:W.key),w=o(W,w,M),D===null?N=W:D.sibling=W,D=W);return e&&A.forEach(function(Y){return t(y,Y)}),Ee&&jr(y,M),N}function S(y,w,_,x){var N=Lo(_);if(typeof N!="function")throw Error(F(150));if(_=N.call(_),_==null)throw Error(F(151));for(var D=N=null,A=w,M=w=0,W=null,U=_.next();A!==null&&!U.done;M++,U=_.next()){A.index>M?(W=A,A=null):W=A.sibling;var Y=c(y,A,U.value,x);if(Y===null){A===null&&(A=W);break}e&&A&&Y.alternate===null&&t(y,A),w=o(Y,w,M),D===null?N=Y:D.sibling=Y,D=Y,A=W}if(U.done)return n(y,A),Ee&&jr(y,M),N;if(A===null){for(;!U.done;M++,U=_.next())U=d(y,U.value,x),U!==null&&(w=o(U,w,M),D===null?N=U:D.sibling=U,D=U);return Ee&&jr(y,M),N}for(A=r(y,A);!U.done;M++,U=_.next())U=p(A,y,M,U.value,x),U!==null&&(e&&U.alternate!==null&&A.delete(U.key===null?M:U.key),w=o(U,w,M),D===null?N=U:D.sibling=U,D=U);return e&&A.forEach(function(je){return t(y,je)}),Ee&&jr(y,M),N}function b(y,w,_,x){if(typeof _=="object"&&_!==null&&_.type===Ei&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Cs:e:{for(var N=_.key,D=w;D!==null;){if(D.key===N){if(N=_.type,N===Ei){if(D.tag===7){n(y,D.sibling),w=i(D,_.props.children),w.return=y,y=w;break e}}else if(D.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===er&&$h(N)===D.type){n(y,D.sibling),w=i(D,_.props),w.ref=zo(y,D,_),w.return=y,y=w;break e}n(y,D);break}else t(y,D);D=D.sibling}_.type===Ei?(w=Vr(_.props.children,y.mode,x,_.key),w.return=y,y=w):(x=tl(_.type,_.key,_.props,null,y.mode,x),x.ref=zo(y,w,_),x.return=y,y=x)}return a(y);case bi:e:{for(D=_.key;w!==null;){if(w.key===D)if(w.tag===4&&w.stateNode.containerInfo===_.containerInfo&&w.stateNode.implementation===_.implementation){n(y,w.sibling),w=i(w,_.children||[]),w.return=y,y=w;break e}else{n(y,w);break}else t(y,w);w=w.sibling}w=Nf(_,y.mode,x),w.return=y,y=w}return a(y);case er:return D=_._init,b(y,w,D(_._payload),x)}if(Vo(_))return v(y,w,_,x);if(Lo(_))return S(y,w,_,x);$s(y,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,w!==null&&w.tag===6?(n(y,w.sibling),w=i(w,_),w.return=y,y=w):(n(y,w),w=Pf(_,y.mode,x),w.return=y,y=w),a(y)):n(y,w)}return b}var Vi=pg(!0),mg=pg(!1),ka={},gn=yr(ka),ma=yr(ka),ha=yr(ka);function Hr(e){if(e===ka)throw Error(F(174));return e}function qc(e,t){switch(_e(ha,t),_e(ma,e),_e(gn,ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$f(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$f(t,e)}be(gn),_e(gn,t)}function Yi(){be(gn),be(ma),be(ha)}function hg(e){Hr(ha.current);var t=Hr(gn.current),n=$f(t,e.type);t!==n&&(_e(ma,e),_e(gn,n))}function Qc(e){ma.current===e&&(be(gn),be(ma))}var Ce=yr(0);function vl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ef=[];function Kc(){for(var e=0;en?n:4,e(!0);var r=Of.transition;Of.transition={};try{e(!1),t()}finally{he=n,Of.transition=r}}function Pg(){return Wt().memoizedState}function qk(e,t,n){var r=dr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ng(e))Ag(t,n);else if(n=ug(e,t,n,r),n!==null){var i=dt();on(n,e,r,i),Dg(n,t,r)}}function Qk(e,t,n){var r=dr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ng(e))Ag(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,an(s,a)){var u=t.interleaved;u===null?(i.next=i,Gc(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=ug(e,t,i,r),n!==null&&(i=dt(),on(n,e,r,i),Dg(n,t,r))}}function Ng(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Ag(e,t){Jo=wl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ac(e,n)}}var _l={readContext:Ht,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},Kk={readContext:Ht,useCallback:function(e,t){return pn().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Wh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ks(4194308,4,Og.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ks(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ks(4,2,e,t)},useMemo:function(e,t){var n=pn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qk.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=pn();return e={current:e},t.memoizedState=e},useState:Hh,useDebugValue:nd,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=Hh(!1),t=e[0];return e=Zk.bind(null,e[1]),pn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,i=pn();if(Ee){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Ve===null)throw Error(F(349));Zr&30||vg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wh(_g.bind(null,r,o,e),[e]),r.flags|=2048,va(9,wg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=pn(),t=Ve.identifierPrefix;if(Ee){var n=In,r=Rn;n=(r&~(1<<32-rn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ga++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[It]=t,e[co]=r,g0(e,t,!1,!1),t.stateNode=e;e:{switch(s=Lu(n,r),n){case"dialog":X("cancel",e),X("close",e),i=r;break;case"iframe":case"object":case"embed":X("load",e),i=r;break;case"video":case"audio":for(i=0;iKr&&(t.flags|=128,r=!0,ji(o,!1),t.lanes=4194304)}else{if(!r)if(e=dl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ji(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Y)return Ce(t),null}else 2*se()-o.renderingStartTime>Kr&&n!==1073741824&&(t.flags|=128,r=!0,ji(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=te.current,Q(te,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return Jc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Ux(e,t){switch(Pc(t),t.tag){case 1:return Be(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gr(),J(Ue),J(Te),Bc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Uc(t),null;case 13:if(J(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));Vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(te),null;case 4:return Gr(),null;case 10:return Mc(t.type._context),null;case 22:case 23:return Jc(),null;case 24:return null;default:return null}}var js=!1,Ie=!1,Bx=typeof WeakSet=="function"?WeakSet:Set,T=null;function Lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function lc(e,t,n){try{n()}catch(r){oe(e,t,r)}}var Rm=!1;function $x(e,t){if(Vu=tl,e=kh(),Oc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,u=0,a=0,p=e,f=null;t:for(;;){for(var d;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++a===r&&(c=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wu={focusedElem:e,selectionRange:n},tl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,w=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:ht(t.type,v),w);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(_){oe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return h=Rm,Rm=!1,h}function Xi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&lc(t,n,o)}i=i.next}while(i!==r)}}function Il(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ac(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function v0(e){var t=e.alternate;t!==null&&(e.alternate=null,v0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[co],delete t[Ku],delete t[Ex],delete t[bx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function w0(e){return e.tag===5||e.tag===3||e.tag===4}function Cm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(uc(e,t,n),e=e.sibling;e!==null;)uc(e,t,n),e=e.sibling}function cc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}var ve=null,gt=!1;function fn(e,t,n){for(n=n.child;n!==null;)x0(e,t,n),n=n.sibling}function x0(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(wl,n)}catch{}switch(n.tag){case 5:Ie||Lr(n,t);case 6:var r=ve,i=gt;ve=null,fn(e,t,n),ve=r,gt=i,ve!==null&&(gt?(e=ve,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(gt?(e=ve,n=n.stateNode,e.nodeType===8?pu(e.parentNode,n):e.nodeType===1&&pu(e,n),oo(e)):pu(ve,n.stateNode));break;case 4:r=ve,i=gt,ve=n.stateNode.containerInfo,gt=!0,fn(e,t,n),ve=r,gt=i;break;case 0:case 11:case 14:case 15:if(!Ie&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&lc(n,t,s),i=i.next}while(i!==r)}fn(e,t,n);break;case 1:if(!Ie&&(Lr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){oe(n,t,l)}fn(e,t,n);break;case 21:fn(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,fn(e,t,n),Ie=r):fn(e,t,n);break;default:fn(e,t,n)}}function Im(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bx),t.forEach(function(r){var i=Xx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vx(r/1960))-r,10e?16:e,yn===null)var r=!1;else{if(e=yn,yn=null,yl=0,B&6)throw Error(R(331));var i=B;for(B|=4,T=e.current;T!==null;){var o=T,s=o.child;if(T.flags&16){var l=o.deletions;if(l!==null){for(var c=0;cse()-qc?qn(e,0):Qc|=n),$e(e,t)}function T0(e,t){t===0&&(e.mode&1?(t=bs,bs<<=1,!(bs&130023424)&&(bs=4194304)):t=1);var n=Le();e=Qt(e,t),e!==null&&(_o(e,t,n),$e(e,n))}function qx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),T0(e,n)}function Xx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),T0(e,n)}var O0;O0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,jx(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,Y&&t.flags&1048576&&Ah(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Gs(e,t),e=t.pendingProps;var i=Hr(t,Te.current);Ur(t,n),i=Hc(null,t,r,e,i,n);var o=Vc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,sl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jc(t),i.updater=Rl,t.stateNode=i,i._reactInternals=t,ec(t,r,e,n),t=rc(null,t,r,!0,o,n)):(t.tag=0,Y&&o&&Nc(t),Ae(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Gs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Yx(r),e=ht(r,e),i){case 0:t=nc(null,t,r,e,n);break e;case 1:t=Sm(null,t,r,e,n);break e;case 11:t=xm(null,t,r,e,n);break e;case 14:t=km(null,t,r,ht(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),nc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Sm(e,t,r,i,n);case 3:e:{if(p0(t),e===null)throw Error(R(387));r=t.pendingProps,o=t.memoizedState,i=o.element,zh(e,t),fl(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Zr(Error(R(423)),t),t=Em(e,t,r,n,i);break e}else if(r!==i){i=Zr(Error(R(424)),t),t=Em(e,t,r,n,i);break e}else for(Ze=xn(t.stateNode.containerInfo.firstChild),Ke=t,Y=!0,yt=null,n=Bh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===i){t=qt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return $h(t),e===null&&Xu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Gu(r,i)?s=null:o!==null&&Gu(r,o)&&(t.flags|=32),d0(e,t),Ae(e,t,s,n),t.child;case 6:return e===null&&Xu(t),null;case 13:return m0(e,t,n);case 4:return Fc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),xm(e,t,r,i,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Q(ul,r._currentValue),r._currentValue=s,o!==null)if(wt(o.value,s)){if(o.children===i.children&&!Ue.current){t=qt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Gt(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var a=u.pending;a===null?c.next=c:(c.next=a.next,a.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ju(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(R(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ju(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ae(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ur(t,n),i=st(i),r=r(i),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,i=ht(r,t.pendingProps),i=ht(r.type,i),km(e,t,r,i,n);case 15:return c0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Gs(e,t),t.tag=1,Be(r)?(e=!0,sl(t)):e=!1,Ur(t,n),Fh(t,r,i),ec(t,r,i,n),rc(null,t,r,!0,e,n);case 19:return h0(e,t,n);case 22:return f0(e,t,n)}throw Error(R(156,t.tag))};function N0(e,t){return rh(e,t)}function Jx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new Jx(e,t,n,r)}function ef(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yx(e){if(typeof e=="function")return ef(e)?1:0;if(e!=null){if(e=e.$$typeof,e===vc)return 11;if(e===wc)return 14}return 2}function bn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")ef(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case br:return Xn(n.children,i,o,t);case _c:s=8,i|=8;break;case Eu:return e=it(12,n,t,i|2),e.elementType=Eu,e.lanes=o,e;case bu:return e=it(13,n,t,i),e.elementType=bu,e.lanes=o,e;case Ru:return e=it(19,n,t,i),e.elementType=Ru,e.lanes=o,e;case Um:return Ol(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jm:s=10;break e;case Fm:s=9;break e;case vc:s=11;break e;case wc:s=14;break e;case dn:s=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=it(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Xn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Ol(e,t,n,r){return e=it(22,e,r,t),e.elementType=Um,e.lanes=n,e.stateNode={isHidden:!1},e}function xu(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function ku(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ek(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ou(0),this.expirationTimes=ou(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tf(e,t,n,r,i,o,s,l,c){return e=new ek(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jc(o),e}function tk(e,t,n){var r=3{"use strict";function M0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M0)}catch(e){console.error(e)}}M0(),z0.exports=D0()});var F0=ie(lf=>{"use strict";var j0=sf();lf.createRoot=j0.createRoot,lf.hydrateRoot=j0.hydrateRoot;var a3});var B0=ie(cf=>{"use strict";var lk=Symbol.for("react.fragment");cf.Fragment=lk;cf.jsxDEV=void 0});var H0=ie((v3,$0)=>{"use strict";$0.exports=B0()});var W0=ie(Dl=>{"use strict";var ak=_e(),uk=Symbol.for("react.element"),ck=Symbol.for("react.fragment"),fk=Object.prototype.hasOwnProperty,dk=ak.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pk={key:!0,ref:!0,__self:!0,__source:!0};function V0(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)fk.call(t,r)&&!pk.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:uk,type:e,key:o,ref:s,props:i,_owner:dk.current}}Dl.Fragment=ck;Dl.jsx=V0;Dl.jsxs=V0});var G=ie((x3,G0)=>{"use strict";G0.exports=W0()});var bf=ie((uI,Rg)=>{var xk="Expected a function",_g="__lodash_hash_undefined__",vg=1/0,kk="[object Function]",Sk="[object GeneratorFunction]",Ek="[object Symbol]",bk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rk=/^\w*$/,Ck=/^\./,Ik=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tk=/[\\^$.*+?()[\]{}|]/g,Ok=/\\(\\)?/g,Nk=/^\[object .+?Constructor\]$/,Pk=typeof global=="object"&&global&&global.Object===Object&&global,Ak=typeof self=="object"&&self&&self.Object===Object&&self,xf=Pk||Ak||Function("return this")();function Lk(e,t){return e?.[t]}function Dk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Mk=Array.prototype,zk=Function.prototype,wg=Object.prototype,wf=xf["__core-js_shared__"],mg=function(){var e=/[^.]+$/.exec(wf&&wf.keys&&wf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xg=zk.toString,kf=wg.hasOwnProperty,kg=wg.toString,jk=RegExp("^"+xg.call(kf).replace(Tk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hg=xf.Symbol,Fk=Mk.splice,Uk=Sg(xf,"Map"),Eo=Sg(Object,"create"),gg=hg?hg.prototype:void 0,yg=gg?gg.toString:void 0;function sr(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function qk(e,t){var n=this.__data__,r=jl(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Yr.prototype.clear=Gk;Yr.prototype.delete=Zk;Yr.prototype.get=Kk;Yr.prototype.has=Qk;Yr.prototype.set=qk;function lr(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.output=ke.exists=ke.hash=ke.bytes=ke.bool=ke.number=ke.isBytes=void 0;function Ul(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}ke.number=Ul;function Dg(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}ke.bool=Dg;function Mg(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}ke.isBytes=Mg;function Cf(e,...t){if(!Mg(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}ke.bytes=Cf;function zg(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ul(e.outputLen),Ul(e.blockLen)}ke.hash=zg;function jg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ke.exists=jg;function Fg(e,t){Cf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.add5L=L.add5H=L.add4H=L.add4L=L.add3H=L.add3L=L.add=L.rotlBL=L.rotlBH=L.rotlSL=L.rotlSH=L.rotr32L=L.rotr32H=L.rotrBL=L.rotrBH=L.rotrSL=L.rotrSH=L.shrSL=L.shrSH=L.toBig=L.split=L.fromBig=void 0;var Bl=BigInt(2**32-1),Tf=BigInt(32);function Of(e,t=!1){return t?{h:Number(e&Bl),l:Number(e>>Tf&Bl)}:{h:Number(e>>Tf&Bl)|0,l:Number(e&Bl)|0}}L.fromBig=Of;function Ug(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);L.toBig=Bg;var $g=(e,t,n)=>e>>>n;L.shrSH=$g;var Hg=(e,t,n)=>e<<32-n|t>>>n;L.shrSL=Hg;var Vg=(e,t,n)=>e>>>n|t<<32-n;L.rotrSH=Vg;var Wg=(e,t,n)=>e<<32-n|t>>>n;L.rotrSL=Wg;var Gg=(e,t,n)=>e<<64-n|t>>>n-32;L.rotrBH=Gg;var Zg=(e,t,n)=>e>>>n-32|t<<64-n;L.rotrBL=Zg;var Kg=(e,t)=>t;L.rotr32H=Kg;var Qg=(e,t)=>e;L.rotr32L=Qg;var qg=(e,t,n)=>e<>>32-n;L.rotlSH=qg;var Xg=(e,t,n)=>t<>>32-n;L.rotlSL=Xg;var Jg=(e,t,n)=>t<>>64-n;L.rotlBH=Jg;var Yg=(e,t,n)=>e<>>64-n;L.rotlBL=Yg;function ey(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}L.add=ey;var ty=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);L.add3L=ty;var ny=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;L.add3H=ny;var ry=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);L.add4L=ry;var iy=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;L.add4H=iy;var oy=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);L.add5L=oy;var sy=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;L.add5H=sy;var _S={fromBig:Of,split:Ug,toBig:Bg,shrSH:$g,shrSL:Hg,rotrSH:Vg,rotrSL:Wg,rotrBH:Gg,rotrBL:Zg,rotr32H:Kg,rotr32L:Qg,rotlSH:qg,rotlSL:Xg,rotlBH:Jg,rotlBL:Yg,add:ey,add3L:ty,add3H:ny,add4L:ry,add4H:iy,add5H:sy,add5L:oy};L.default=_S});var ay=ie($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.crypto=void 0;$l.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var fy=ie(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.randomBytes=A.wrapXOFConstructorWithOpts=A.wrapConstructorWithOpts=A.wrapConstructor=A.checkOpts=A.Hash=A.concatBytes=A.toBytes=A.utf8ToBytes=A.asyncLoop=A.nextTick=A.hexToBytes=A.bytesToHex=A.byteSwap32=A.byteSwapIfBE=A.byteSwap=A.isLE=A.rotl=A.rotr=A.createView=A.u32=A.u8=A.isBytes=void 0;var Nf=ay(),Af=If();function vS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}A.isBytes=vS;var wS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);A.u8=wS;var xS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));A.u32=xS;var kS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);A.createView=kS;var SS=(e,t)=>e<<32-t|e>>>t;A.rotr=SS;var ES=(e,t)=>e<>>32-t>>>0;A.rotl=ES;A.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;var bS=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;A.byteSwap=bS;A.byteSwapIfBE=A.isLE?e=>e:e=>(0,A.byteSwap)(e);function RS(e){for(let t=0;tt.toString(16).padStart(2,"0"));function IS(e){(0,Af.bytes)(e);let t="";for(let n=0;n=tn._0&&e<=tn._9)return e-tn._0;if(e>=tn._A&&e<=tn._F)return e-(tn._A-10);if(e>=tn._a&&e<=tn._f)return e-(tn._a-10)}function TS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};A.nextTick=OS;async function NS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Hl(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}A.wrapConstructor=DS;function MS(e){let t=(r,i)=>e(i).update(Hl(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}A.wrapConstructorWithOpts=MS;function zS(e){let t=(r,i)=>e(i).update(Hl(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}A.wrapXOFConstructorWithOpts=zS;function jS(e=32){if(Nf.crypto&&typeof Nf.crypto.getRandomValues=="function")return Nf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}A.randomBytes=jS});var vy=ie(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.shake256=q.shake128=q.keccak_512=q.keccak_384=q.keccak_256=q.keccak_224=q.sha3_512=q.sha3_384=q.sha3_256=q.sha3_224=q.Keccak=q.keccakP=void 0;var ti=If(),Co=ly(),nn=fy(),my=[],hy=[],gy=[],FS=BigInt(0),Ro=BigInt(1),US=BigInt(2),BS=BigInt(7),$S=BigInt(256),HS=BigInt(113);for(let e=0,t=Ro,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],my.push(2*(5*r+n)),hy.push((e+1)*(e+2)/2%64);let i=FS;for(let o=0;o<7;o++)t=(t<>BS)*HS)%$S,t&US&&(i^=Ro<<(Ro<n>32?(0,Co.rotlBH)(e,t,n):(0,Co.rotlSH)(e,t,n),py=(e,t,n)=>n>32?(0,Co.rotlBL)(e,t,n):(0,Co.rotlSL)(e,t,n);function yy(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let l=(s+8)%10,c=(s+2)%10,u=n[c],a=n[c+1],p=dy(u,a,1)^n[l],f=py(u,a,1)^n[l+1];for(let d=0;d<50;d+=10)e[s+d]^=p,e[s+d+1]^=f}let i=e[2],o=e[3];for(let s=0;s<24;s++){let l=hy[s],c=dy(i,o,l),u=py(i,o,l),a=my[s];i=e[a],o=e[a+1],e[a]=c,e[a+1]=u}for(let s=0;s<50;s+=10){for(let l=0;l<10;l++)n[l]=e[s+l];for(let l=0;l<10;l++)e[s+l]^=~n[(l+2)%10]&n[(l+4)%10]}e[0]^=VS[r],e[1]^=WS[r]}n.fill(0)}q.keccakP=yy;var Io=class e extends nn.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,ti.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,nn.u32)(this.state)}keccak(){nn.isLE||(0,nn.byteSwap32)(this.state32),yy(this.state32,this.rounds),nn.isLE||(0,nn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,ti.exists)(this);let{blockLen:n,state:r}=this;t=(0,nn.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let s=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,ti.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,ti.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(n,r,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};q.Keccak=Io;var Ln=(e,t,n)=>(0,nn.wrapConstructor)(()=>new Io(t,e,n));q.sha3_224=Ln(6,144,224/8);q.sha3_256=Ln(6,136,256/8);q.sha3_384=Ln(6,104,384/8);q.sha3_512=Ln(6,72,512/8);q.keccak_224=Ln(1,144,224/8);q.keccak_256=Ln(1,136,256/8);q.keccak_384=Ln(1,104,384/8);q.keccak_512=Ln(1,72,512/8);var _y=(e,t,n)=>(0,nn.wrapXOFConstructorWithOpts)((r={})=>new Io(t,e,r.dkLen===void 0?n:r.dkLen,!0));q.shake128=_y(31,168,128/8);q.shake256=_y(31,136,256/8)});var Cy=ie((jI,Dn)=>{var{sha3_512:GS}=vy(),xy=24,To=32,Lf=(e=4,t=Math.random)=>{let n="";for(;n.lengthky(GS(e)).toString(36).slice(1),wy=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),ZS=e=>wy[Math.floor(e()*wy.length)],Ey=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+Lf(To,t):Lf(To,t);return Sy(r).substring(0,To)},by=e=>()=>e++,KS=476782367,Ry=({random:e=Math.random,counter:t=by(Math.floor(e()*KS)),length:n=xy,fingerprint:r=Ey({random:e})}={})=>function(){let o=ZS(e),s=Date.now().toString(36),l=t().toString(36),c=Lf(n,e),u=`${s+c+l+r}`;return`${o+Sy(u).substring(1,n)}`},QS=Ry(),qS=(e,{minLength:t=2,maxLength:n=To}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};Dn.exports.getConstants=()=>({defaultLength:xy,bigLength:To});Dn.exports.init=Ry;Dn.exports.createId=QS;Dn.exports.bufToBigInt=ky;Dn.exports.createCounter=by;Dn.exports.createFingerprint=Ey;Dn.exports.isCuid=qS});var Vl=ie((FI,Oo)=>{var{createId:XS,init:JS,getConstants:YS,isCuid:eE}=Cy();Oo.exports.createId=XS;Oo.exports.init=JS;Oo.exports.getConstants=YS;Oo.exports.isCuid=eE});var Zy=ie((Po,ta)=>{(function(e,t){"use strict";var n="1.0.38",r="",i="?",o="function",s="undefined",l="object",c="string",u="major",a="model",p="name",f="type",d="vendor",h="version",v="architecture",w="console",m="mobile",g="tablet",y="smarttv",_="wearable",S="embedded",E=500,k="Amazon",b="Apple",O="ASUS",I="BlackBerry",N="Browser",ze="Chrome",as="Edge",Ft="Firefox",Ut="Google",qd="Huawei",La="LG",Da="Microsoft",Xd="Motorola",Ri="Opera",us="Samsung",Jd="Sharp",cs="Sony",Ma="Xiaomi",za="Zebra",Yd="Facebook",ep="Chromium OS",tp="Mac OS",F1=function(F,V){var z={};for(var Z in F)V[Z]&&V[Z].length%2===0?z[Z]=V[Z].concat(F[Z]):z[Z]=F[Z];return z},fs=function(F){for(var V={},z=0;z0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,Et):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=Et?H[1].call(this,Et,H[2]):t:this[H[0]]=Et?Et.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=Et?H[3].call(this,Et.replace(H[1],H[2])):t):this[H]=Et||t;z+=2}},Fa=function(F,V){for(var z in V)if(typeof V[z]===l&&V[z].length>0){for(var Z=0;Z2&&(M[a]="iPad",M[f]=g),M},this.getEngine=function(){var M={};return M[p]=t,M[h]=t,Ii.call(M,Z,St.engine),M},this.getOS=function(){var M={};return M[p]=t,M[h]=t,Ii.call(M,Z,St.os),H&&!M[p]&&Bt&&Bt.platform&&Bt.platform!="Unknown"&&(M[p]=Bt.platform.replace(/chrome os/i,ep).replace(/macos/i,tp)),M},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Z},this.setUA=function(M){return Z=typeof M===c&&M.length>E?ja(M,E):M,this},this.setUA(Z),this};We.VERSION=n,We.BROWSER=fs([p,h,u]),We.CPU=fs([v]),We.DEVICE=fs([a,d,f,w,m,y,g,_,S]),We.ENGINE=We.OS=fs([p,h]),typeof Po!==s?(typeof ta!==s&&ta.exports&&(Po=ta.exports=We),Po.UAParser=We):typeof define===o&&define.amd?define(function(){return We}):typeof e!==s&&(e.UAParser=We);var wr=typeof e!==s&&(e.jQuery||e.Zepto);if(wr&&!wr.ua){var ds=new We;wr.ua=ds.getResult(),wr.ua.get=function(){return ds.getUA()},wr.ua.set=function(F){ds.setUA(F);var V=ds.getResult();for(var z in V)wr.ua[z]=V[z]}}})(typeof window=="object"?window:Po)});var Y_=ie((zA,J_)=>{var b2=1/0,R2="[object Symbol]",C2=/^\s+|\s+$/g,yd="\\ud800-\\udfff",B_="\\u0300-\\u036f\\ufe20-\\ufe23",$_="\\u20d0-\\u20f0",H_="\\ufe0e\\ufe0f",I2="["+yd+"]",hd="["+B_+$_+"]",gd="\\ud83c[\\udffb-\\udfff]",T2="(?:"+hd+"|"+gd+")",V_="[^"+yd+"]",W_="(?:\\ud83c[\\udde6-\\uddff]){2}",G_="[\\ud800-\\udbff][\\udc00-\\udfff]",Z_="\\u200d",K_=T2+"?",Q_="["+H_+"]?",O2="(?:"+Z_+"(?:"+[V_,W_,G_].join("|")+")"+Q_+K_+")*",N2=Q_+K_+O2,P2="(?:"+[V_+hd+"?",hd,W_,G_,I2].join("|")+")",A2=RegExp(gd+"(?="+gd+")|"+P2+N2,"g"),L2=RegExp("["+Z_+yd+B_+$_+H_+"]"),D2=typeof global=="object"&&global&&global.Object===Object&&global,M2=typeof self=="object"&&self&&self.Object===Object&&self,z2=D2||M2||Function("return this")();function j2(e){return e.split("")}function F2(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function $2(e,t){for(var n=e.length;n--&&q_(t,e[n],0)>-1;);return n}function H2(e){return L2.test(e)}function z_(e){return H2(e)?V2(e):j2(e)}function V2(e){return e.match(A2)||[]}var W2=Object.prototype,G2=W2.toString,j_=z2.Symbol,F_=j_?j_.prototype:void 0,U_=F_?F_.toString:void 0;function Z2(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Z2(e,t,n)}function Q2(e){return!!e&&typeof e=="object"}function q2(e){return typeof e=="symbol"||Q2(e)&&G2.call(e)==R2}function X2(e){return e==null?"":X_(e)}function J2(e,t,n){if(e=X2(e),e&&(n||t===void 0))return e.replace(C2,"");if(!e||!(t=X_(t)))return e;var r=z_(e),i=z_(t),o=B2(r,i),s=$2(r,i)+1;return K2(r,o,s).join("")}J_.exports=J2});var sv=ie((HA,ov)=>{"use strict";function eb(e,t){for(;e.length{let[,r]=(0,Xr.useState)({}),o=(0,Xr.useRef)({data:e,deps:n||[],ready:!1,_loading:{},lastRender:0,lastRenderCount:0}).current;if((0,Xr.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{if(o.ready){if(Date.now()-o.lastRender<300?o.lastRenderCount++:o.lastRenderCount=0,o.lastRenderCount>300)throw new Error("local.render more than 300 times in less than 300ms");o.lastRender=Date.now(),r({})}};else if(o.deps.length>0&&n){for(let[s,l]of Object.entries(n))if(o.deps[s]!==l){o.deps[s]=l,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};var U0=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});var sk=P(_e());var Jt=P(_e());function af(e){let t=new WeakMap;function n(r,i=[]){if(!(r!==null&&typeof r=="object"))return r;let o=t.get(r);if(o)return`[Circular *${o.join(".")}]`;t.set(r,i);let s=Array.isArray(r)?[]:{};for(let[l,c]of Object.entries(r))s[l]=n(c,[...i,l]);return t.delete(r),s}return n(e)}var uf=(0,Jt.createContext)({global:{},render:()=>{}});var Pn=(e,t)=>{let n=(0,Jt.useContext)(uf),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Jt.useEffect)(()=>{let s=null;return()=>{typeof s=="function"?s():s instanceof Promise&&s.then(l=>{typeof l=="function"&&l()})}},[]);let o=r[t];return o&&(o.render=s=>{s&&(r[t]=void 0),(0,Jt.startTransition)(i)}),o},Jr=af;var T3=P(_e());var ff=P(_e()),Z0=P(sf()),K0=P(H0()),Q0=P(G()),q0=()=>{let e=typeof window=="object"?window:globalThis;e.React=ff.default,e.ReactDOM=Z0.default,e.JSXRuntime=Q0.default,e.JSXDevRuntime=K0.default,e.Fragment=ff.default.Fragment};var mk={data:""},J0=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||mk,Y0=e=>{let t=J0(e),n=t.data;return t.data="",n},hk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,gk=/\/\*[^]*?\*\/| +/g,X0=/\n+/g,or=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?or(s,o):o+"{"+or(s,o[1]=="k"?"":t)+"}":typeof s=="object"?r+=or(s,t?t.replace(/([^,])+/g,l=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=or.p?or.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Yt={},eg=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+eg(e[n]);return t}return e},yk=(e,t,n,r,i)=>{let o=eg(e),s=Yt[o]||(Yt[o]=(c=>{let u=0,a=11;for(;u>>0;return"go"+a})(o));if(!Yt[s]){let c=o!==e?e:(u=>{let a,p,f=[{}];for(;a=hk.exec(u.replace(gk,""));)a[4]?f.shift():a[3]?(p=a[3].replace(X0," ").trim(),f.unshift(f[0][p]=f[0][p]||{})):f[0][a[1]]=a[2].replace(X0," ").trim();return f[0]})(e);Yt[s]=or(i?{["@keyframes "+s]:c}:c,n?"":"."+s)}let l=n&&Yt.g?Yt.g:null;return n&&(Yt.g=Yt[s]),((c,u,a,p)=>{p?u.data=u.data.replace(p,c):u.data.indexOf(c)===-1&&(u.data=a?c+u.data:u.data+c)})(Yt[s],t,r,l),s},_k=(e,t,n)=>e.reduce((r,i,o)=>{let s=t[o];if(s&&s.call){let l=s(n),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;s=c?"."+c:l&&typeof l=="object"?l.props?"":or(l,""):l===!1?"":l}return r+i+(s??"")},"");function Ml(e){let t=this||{},n=e.call?e(t.p):e;return yk(n.unshift?n.raw?_k(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,J0(t.target),t.g,t.o,t.k)}var S3=Ml.bind({g:1}),E3=Ml.bind({k:1});var tg=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await U0(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let s=new URL(t.serverurl);(s.hostname==="localhost"||s.hostname==="127.0.0.1")&&(s.hostname=n.hostname,s.pathname=s.pathname==="/"?"":s.pathname,t.serverurl=s.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=Ml,t.extractCss=Y0,t.pathname=n.pathname,t.cx=(...s)=>{let l=[];return s.filter(c=>c?(typeof c=="string"&&c.trim(),!0):!1).forEach(c=>{if(Array.isArray(c))for(let u of c)typeof u=="string"&&u.trim()&&l.push(u.trim());else l.push(c.trim())}),l.join(" ")},t.navigate=s=>{let l=s;if(typeof t.navigateOverride=="function"&&(l=t.navigateOverride(s),!l))return null;history.pushState({prevUrl:window.location.href},"",l),t.pathname=s,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let s=navigator.serviceWorker.controller;if(s&&s.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};var df=window,C={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(C.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:df._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},ng=()=>{if(!C.root){let e=new URL(location.href);df._prasi.basepath&&(e.pathname=df._prasi.basepath),C.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),C.root.pathname.endsWith("/")&&(C.root.pathname=C.root.pathname.substring(0,C.root.length-1))}};function mf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function hf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=mf(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}var pf;function rg(){return pf||(pf=hf("keyval-store","keyval")),pf}function gf(e,t=rg()){return t("readonly",n=>mf(n.get(e)))}function zl(e,t,n=rg()){return n("readwrite",r=>(r.put(t,e),mf(r.transaction)))}var D1=P(_e());var ig=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function vk(e){return typeof e=="string"&&ig.test(e)}var yf=vk;var ko=P(G()),_f=({children:e,back:t})=>(0,ko.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,ko.jsx)("div",{children:e}),(0,ko.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var sg=P(_e());var Oe=P(G()),og=window,So=({children:e,className:t,show:n,backdrop:r,note:i,alt:o,pointer:s})=>{let l=Nn({icon:(0,Oe.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,sg.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),og.loadingIcon&&(l.icon=(0,Oe.jsx)("img",{alt:"loading",src:og.loadingIcon,className:css` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Rf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function cc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var eb=typeof WeakMap=="function"?WeakMap:Map;function Mg(e,t,n){n=Pn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Sl||(Sl=!0,xc=r),cc(e,t)},n}function Lg(e,t,n){n=Pn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){cc(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){cc(e,t),typeof r!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Vh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new eb;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=mb.bind(null,e,t,n),t.then(e,e))}function Yh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Gh(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pn(-1,1),t.tag=2,fr(n,t,1))),n.lanes|=1),e)}var tb=Ln.ReactCurrentOwner,vt=!1;function ct(e,t,n,r){t.child=e===null?mg(t,null,n,r):Vi(t,e.child,n,r)}function Zh(e,t,n,r,i){n=n.render;var o=t.ref;return zi(t,i),r=Jc(e,t,n,r,o,i),n=ed(),e!==null&&!vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mn(e,t,i)):(Ee&&n&&Bc(t),t.flags|=1,ct(e,t,r,i),t.child)}function qh(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ug(e,t,o,r,i)):(e=tl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:fa,n(a,r)&&e.ref===t.ref)return Mn(e,t,i)}return t.flags|=1,e=pr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ug(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(fa(o,r)&&e.ref===t.ref)if(vt=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(vt=!0);else return t.lanes=e.lanes,Mn(e,t,i)}return dc(e,t,n,r,i)}function Fg(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(Mi,Ct),Ct|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_e(Mi,Ct),Ct|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,_e(Mi,Ct),Ct|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,_e(Mi,Ct),Ct|=r;return ct(e,t,i,n),t.child}function jg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dc(e,t,n,r,i){var o=_t(n)?Yr:st.current;return o=Hi(t,o),zi(t,i),n=Jc(e,t,n,r,o,i),r=ed(),e!==null&&!vt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mn(e,t,i)):(Ee&&r&&Bc(t),t.flags|=1,ct(e,t,n,i),t.child)}function Qh(e,t,n,r,i){if(_t(n)){var o=!0;dl(t)}else o=!1;if(zi(t,i),t.stateNode===null)Xs(e,t),dg(t,n,r),fc(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,f=n.contextType;typeof f=="object"&&f!==null?f=Ht(f):(f=_t(n)?Yr:st.current,f=Hi(t,f));var l=n.getDerivedStateFromProps,d=typeof l=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==f)&&Bh(t,a,r,f),tr=!1;var c=t.memoizedState;a.state=c,yl(t,r,a,i),u=t.memoizedState,s!==r||c!==u||wt.current||tr?(typeof l=="function"&&(uc(t,n,l,r),u=t.memoizedState),(s=tr||zh(t,n,s,r,c,u,f))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=f,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,fg(e,t),s=t.memoizedProps,f=t.type===t.elementType?s:en(t.type,s),a.props=f,d=t.pendingProps,c=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ht(u):(u=_t(n)?Yr:st.current,u=Hi(t,u));var p=n.getDerivedStateFromProps;(l=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||c!==u)&&Bh(t,a,r,u),tr=!1,c=t.memoizedState,a.state=c,yl(t,r,a,i);var v=t.memoizedState;s!==d||c!==v||wt.current||tr?(typeof p=="function"&&(uc(t,n,p,r),v=t.memoizedState),(f=tr||zh(t,n,f,r,c,v,u)||!1)?(l||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=u,r=f):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),r=!1)}return pc(e,t,n,r,o,i)}function pc(e,t,n,r,i,o){jg(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Mh(t,n,!1),Mn(e,t,o);r=t.stateNode,tb.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Vi(t,e.child,null,o),t.child=Vi(t,null,s,o)):ct(e,t,s,o),t.memoizedState=r.state,i&&Mh(t,n,!0),t.child}function zg(e){var t=e.stateNode;t.pendingContext?Dh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Dh(e,t.context,!1),qc(e,t.containerInfo)}function Kh(e,t,n,r,i){return Wi(),Hc(i),t.flags|=256,ct(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0};function hc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bg(e,t,n){var r=t.pendingProps,i=Ce.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),_e(Ce,i&1),e===null)return sc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Ll(a,r,0,null),e=Vr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=hc(n),t.memoizedState=mc,e):rd(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return nb(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=pr(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=pr(s,o):(o=Vr(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?hc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=mc,r}return o=e.child,e=o.sibling,r=pr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rd(e,t){return t=Ll({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,n,r){return r!==null&&Hc(r),Vi(t,e.child,null,n),e=rd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nb(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Rf(Error(F(422))),Hs(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ll({mode:"visible",children:r.children},i,0,null),o=Vr(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Vi(t,e.child,null,a),t.child.memoizedState=hc(a),t.memoizedState=mc,o);if(!(t.mode&1))return Hs(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(F(419)),r=Rf(o,r,void 0),Hs(e,t,a,r)}if(s=(a&e.childLanes)!==0,vt||s){if(r=Ve,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Dn(e,i),on(r,e,i,-1))}return ud(),r=Rf(Error(F(421))),Hs(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=hb.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Tt=ur(i.nextSibling),Rt=t,Ee=!0,nn=null,e!==null&&(jt[zt++]=Rn,jt[zt++]=In,jt[zt++]=Gr,Rn=e.id,In=e.overflow,Gr=t),t=rd(t,r.children),t.flags|=4096,t)}function Xh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lc(e.return,t,n)}function If(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function $g(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ct(e,t,r.children,n),r=Ce.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xh(e,n,t);else if(e.tag===19)Xh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_e(Ce,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&vl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),If(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&vl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}If(t,!0,n,null,o);break;case"together":If(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=pr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rb(e,t,n){switch(t.tag){case 3:zg(t),Wi();break;case 5:hg(t);break;case 1:_t(t.type)&&dl(t);break;case 4:qc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;_e(hl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(_e(Ce,Ce.current&1),t.flags|=128,null):n&t.child.childLanes?Bg(e,t,n):(_e(Ce,Ce.current&1),e=Mn(e,t,n),e!==null?e.sibling:null);_e(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $g(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,Fg(e,t,n)}return Mn(e,t,n)}var Hg,gc,Wg,Vg;Hg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};gc=function(){};Wg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Hr(gn.current);var o=null;switch(n){case"input":i=Ff(e,i),r=Ff(e,r),o=[];break;case"select":i=Re({},i,{value:void 0}),r=Re({},r,{value:void 0}),o=[];break;case"textarea":i=Bf(e,i),r=Bf(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fl)}Hf(n,r);var a;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var s=i[f];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ra.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var u=r[f];if(s=i?.[f],r.hasOwnProperty(f)&&u!==s&&(u!=null||s!=null))if(f==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ra.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&ke("scroll",e),o||s===u||(o=[])):(o=o||[]).push(f,u))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};Vg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Bo(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ib(e,t,n){var r=t.pendingProps;switch($c(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return _t(t.type)&&cl(),ot(t),null;case 3:return r=t.stateNode,Yi(),be(wt),be(st),Kc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,nn!==null&&(bc(nn),nn=null))),gc(e,t),ot(t),null;case 5:Qc(t);var i=Hr(ha.current);if(n=t.type,e!==null&&t.stateNode!=null)Wg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return ot(t),null}if(e=Hr(gn.current),Bs(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[mn]=t,r[pa]=o,e=(t.mode&1)!==0,n){case"dialog":ke("cancel",r),ke("close",r);break;case"iframe":case"object":case"embed":ke("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[mn]=t,e[pa]=r,Hg(e,t,!1,!1),t.stateNode=e;e:{switch(a=Wf(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;iZi&&(t.flags|=128,r=!0,Bo(o,!1),t.lanes=4194304)}else{if(!r)if(e=vl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ee)return ot(t),null}else 2*Ae()-o.renderingStartTime>Zi&&n!==1073741824&&(t.flags|=128,r=!0,Bo(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ae(),t.sibling=null,n=Ce.current,_e(Ce,r?n&1|2:n&1),t):(ot(t),null);case 22:case 23:return ld(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ct&1073741824&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function ob(e,t){switch($c(t),t.tag){case 1:return _t(t.type)&&cl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(),be(wt),be(st),Kc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qc(t),null;case 13:if(be(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return be(Ce),null;case 4:return Yi(),null;case 10:return Yc(t.type._context),null;case 22:case 23:return ld(),null;case 24:return null;default:return null}}var Ws=!1,at=!1,ab=typeof WeakSet=="function"?WeakSet:Set,V=null;function Di(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function yc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Jh=!1;function sb(e,t){if(ec=sl,e=q0(),zc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,f=0,l=0,d=e,c=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(u=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)c=d,d=p;for(;;){if(d===e)break t;if(c===n&&++f===i&&(s=a),c===o&&++l===r&&(u=a),(p=d.nextSibling)!==null)break;d=c,c=d.parentNode}d=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(tc={focusedElem:e,selectionRange:n},sl=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var S=v.memoizedProps,b=v.memoizedState,y=t.stateNode,w=y.getSnapshotBeforeUpdate(t.elementType===t.type?S:en(t.type,S),b);y.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(x){Ne(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=Jh,Jh=!1,v}function ea(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&yc(t,n,o)}i=i.next}while(i!==r)}}function Dl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Yg(e){var t=e.alternate;t!==null&&(e.alternate=null,Yg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mn],delete t[pa],delete t[ic],delete t[Hk],delete t[Wk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gg(e){return e.tag===5||e.tag===3||e.tag===4}function e0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fl));else if(r!==4&&(e=e.child,e!==null))for(wc(e,t,n),e=e.sibling;e!==null;)wc(e,t,n),e=e.sibling}function _c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(_c(e,t,n),e=e.sibling;e!==null;)_c(e,t,n),e=e.sibling}var Ke=null,tn=!1;function Jn(e,t,n){for(n=n.child;n!==null;)Zg(e,t,n),n=n.sibling}function Zg(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Ol,n)}catch{}switch(n.tag){case 5:at||Di(n,t);case 6:var r=Ke,i=tn;Ke=null,Jn(e,t,n),Ke=r,tn=i,Ke!==null&&(tn?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(tn?(e=Ke,n=n.stateNode,e.nodeType===8?kf(e.parentNode,n):e.nodeType===1&&kf(e,n),la(e)):kf(Ke,n.stateNode));break;case 4:r=Ke,i=tn,Ke=n.stateNode.containerInfo,tn=!0,Jn(e,t,n),Ke=r,tn=i;break;case 0:case 11:case 14:case 15:if(!at&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&yc(n,t,a),i=i.next}while(i!==r)}Jn(e,t,n);break;case 1:if(!at&&(Di(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ne(n,t,s)}Jn(e,t,n);break;case 21:Jn(e,t,n);break;case 22:n.mode&1?(at=(r=at)||n.memoizedState!==null,Jn(e,t,n),at=r):Jn(e,t,n);break;default:Jn(e,t,n)}}function t0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ab),t.forEach(function(r){var i=gb.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ub(r/1960))-r,10e?16:e,or===null)var r=!1;else{if(e=or,or=null,kl=0,le&6)throw Error(F(331));var i=le;for(le|=4,V=e.current;V!==null;){var o=V,a=o.child;if(V.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uAe()-ad?Wr(e,0):od|=n),xt(e,t)}function ny(e,t){t===0&&(e.mode&1?(t=Ps,Ps<<=1,!(Ps&130023424)&&(Ps=4194304)):t=1);var n=dt();e=Dn(e,t),e!==null&&(_a(e,t,n),xt(e,n))}function hb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ny(e,n)}function gb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),ny(e,n)}var ry;ry=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||wt.current)vt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vt=!1,rb(e,t,n);vt=!!(e.flags&131072)}else vt=!1,Ee&&t.flags&1048576&&ag(t,ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xs(e,t),e=t.pendingProps;var i=Hi(t,st.current);zi(t,n),i=Jc(null,t,r,e,i,n);var o=ed();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_t(r)?(o=!0,dl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zc(t),i.updater=Nl,t.stateNode=i,i._reactInternals=t,fc(t,r,e,n),t=pc(null,t,r,!0,o,n)):(t.tag=0,Ee&&o&&Bc(t),ct(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=vb(r),e=en(r,e),i){case 0:t=dc(null,t,r,e,n);break e;case 1:t=Qh(null,t,r,e,n);break e;case 11:t=Zh(null,t,r,e,n);break e;case 14:t=qh(null,t,r,en(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),dc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),Qh(e,t,r,i,n);case 3:e:{if(zg(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,fg(e,t),yl(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Gi(Error(F(423)),t),t=Kh(e,t,r,n,i);break e}else if(r!==i){i=Gi(Error(F(424)),t),t=Kh(e,t,r,n,i);break e}else for(Tt=ur(t.stateNode.containerInfo.firstChild),Rt=t,Ee=!0,nn=null,n=mg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wi(),r===i){t=Mn(e,t,n);break e}ct(e,t,r,n)}t=t.child}return t;case 5:return hg(t),e===null&&sc(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,nc(r,i)?a=null:o!==null&&nc(r,o)&&(t.flags|=32),jg(e,t),ct(e,t,a,n),t.child;case 6:return e===null&&sc(t),null;case 13:return Bg(e,t,n);case 4:return qc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vi(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),Zh(e,t,r,i,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,_e(hl,r._currentValue),r._currentValue=a,o!==null)if(an(o.value,a)){if(o.children===i.children&&!wt.current){t=Mn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Pn(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var l=f.pending;l===null?u.next=u:(u.next=l.next,l.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),lc(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(F(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),lc(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}ct(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zi(t,n),i=Ht(i),r=r(i),t.flags|=1,ct(e,t,r,n),t.child;case 14:return r=t.type,i=en(r,t.pendingProps),i=en(r.type,i),qh(e,t,r,i,n);case 15:return Ug(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),Xs(e,t),t.tag=1,_t(r)?(e=!0,dl(t)):e=!1,zi(t,n),dg(t,r,i),fc(t,r,i,n),pc(null,t,r,!0,e,n);case 19:return $g(e,t,n);case 22:return Fg(e,t,n)}throw Error(F(156,t.tag))};function iy(e,t){return I0(e,t)}function yb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,t,n,r){return new yb(e,t,n,r)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vb(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rc)return 11;if(e===Ic)return 14}return 2}function pr(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function tl(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")fd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ei:return Vr(n.children,i,o,t);case Tc:a=8,i|=8;break;case Df:return e=Bt(12,n,t,i|2),e.elementType=Df,e.lanes=o,e;case Mf:return e=Bt(13,n,t,i),e.elementType=Mf,e.lanes=o,e;case Lf:return e=Bt(19,n,t,i),e.elementType=Lf,e.lanes=o,e;case p0:return Ll(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c0:a=10;break e;case d0:a=9;break e;case Rc:a=11;break e;case Ic:a=14;break e;case er:a=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Bt(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Vr(e,t,n,r){return e=Bt(7,e,r,t),e.lanes=n,e}function Ll(e,t,n,r){return e=Bt(22,e,r,t),e.elementType=p0,e.lanes=n,e.stateNode={isHidden:!1},e}function Pf(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function Nf(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wb(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hf(0),this.expirationTimes=hf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function cd(e,t,n,r,i,o,a,s,u){return e=new wb(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Bt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zc(o),e}function _b(e,t,n){var r=3{"use strict";m();g();h();function uy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uy)}catch(e){console.error(e)}}uy(),fy.exports=ly()});var dy=Pe(gd=>{"use strict";m();g();h();var cy=hd();gd.createRoot=cy.createRoot,gd.hydrateRoot=cy.hydrateRoot;var fP});var my=Pe(wd=>{"use strict";m();g();h();var Ob=Symbol.for("react.fragment");wd.Fragment=Ob;wd.jsxDEV=void 0});var gy=Pe((ZP,hy)=>{"use strict";m();g();h();hy.exports=my()});var vy=Pe(Bl=>{"use strict";m();g();h();var Cb=Qe(),Tb=Symbol.for("react.element"),Rb=Symbol.for("react.fragment"),Ib=Object.prototype.hasOwnProperty,Pb=Cb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Nb={key:!0,ref:!0,__self:!0,__source:!0};function yy(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Ib.call(t,r)&&!Nb.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Tb,type:e,key:o,ref:a,props:i,_owner:Pb.current}}Bl.Fragment=Rb;Bl.jsx=yy;Bl.jsxs=yy});var ge=Pe((nN,wy)=>{"use strict";m();g();h();wy.exports=vy()});var kw=Pe((o5,Sw)=>{m();g();h();var vO=1/0,wO="[object Symbol]",_O=/^\s+|\s+$/g,_p="\\ud800-\\udfff",cw="\\u0300-\\u036f\\ufe20-\\ufe23",dw="\\u20d0-\\u20f0",pw="\\ufe0e\\ufe0f",xO="["+_p+"]",vp="["+cw+dw+"]",wp="\\ud83c[\\udffb-\\udfff]",SO="(?:"+vp+"|"+wp+")",mw="[^"+_p+"]",hw="(?:\\ud83c[\\udde6-\\uddff]){2}",gw="[\\ud800-\\udbff][\\udc00-\\udfff]",yw="\\u200d",vw=SO+"?",ww="["+pw+"]?",kO="(?:"+yw+"(?:"+[mw,hw,gw].join("|")+")"+ww+vw+")*",bO=ww+vw+kO,EO="(?:"+[mw+vp+"?",vp,hw,gw,xO].join("|")+")",OO=RegExp(wp+"(?="+wp+")|"+EO+bO,"g"),CO=RegExp("["+yw+_p+cw+dw+pw+"]"),TO=typeof global=="object"&&global&&global.Object===Object&&global,RO=typeof self=="object"&&self&&self.Object===Object&&self,IO=TO||RO||Function("return this")();function PO(e){return e.split("")}function NO(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function MO(e,t){for(var n=e.length;n--&&_w(t,e[n],0)>-1;);return n}function LO(e){return CO.test(e)}function sw(e){return LO(e)?UO(e):PO(e)}function UO(e){return e.match(OO)||[]}var FO=Object.prototype,jO=FO.toString,lw=IO.Symbol,uw=lw?lw.prototype:void 0,fw=uw?uw.toString:void 0;function zO(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:zO(e,t,n)}function $O(e){return!!e&&typeof e=="object"}function HO(e){return typeof e=="symbol"||$O(e)&&jO.call(e)==wO}function WO(e){return e==null?"":xw(e)}function VO(e,t,n){if(e=WO(e),e&&(n||t===void 0))return e.replace(_O,"");if(!e||!(t=xw(t)))return e;var r=sw(e),i=sw(t),o=DO(r,i),a=MO(r,i)+1;return BO(r,o,a).join("")}Sw.exports=VO});var Iw=Pe((_5,Rw)=>{"use strict";m();g();h();function GO(e,t){for(;e.length{"use strict";m();g();h();Object.defineProperty(tt,"__esModule",{value:!0});tt.output=tt.exists=tt.hash=tt.bytes=tt.bool=tt.number=tt.isBytes=void 0;function Iu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}tt.number=Iu;function J_(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}tt.bool=J_;function e1(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}tt.isBytes=e1;function Kp(e,...t){if(!e1(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}tt.bytes=Kp;function t1(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Iu(e.outputLen),Iu(e.blockLen)}tt.hash=t1;function n1(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}tt.exists=n1;function r1(e,t){Kp(e);let n=t.outputLen;if(e.length{"use strict";m();g();h();Object.defineProperty(K,"__esModule",{value:!0});K.add5L=K.add5H=K.add4H=K.add4L=K.add3H=K.add3L=K.add=K.rotlBL=K.rotlBH=K.rotlSL=K.rotlSH=K.rotr32L=K.rotr32H=K.rotrBL=K.rotrBH=K.rotrSL=K.rotrSH=K.shrSL=K.shrSH=K.toBig=K.split=K.fromBig=void 0;var Pu=BigInt(2**32-1),Jp=BigInt(32);function em(e,t=!1){return t?{h:Number(e&Pu),l:Number(e>>Jp&Pu)}:{h:Number(e>>Jp&Pu)|0,l:Number(e&Pu)|0}}K.fromBig=em;function i1(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);K.toBig=o1;var a1=(e,t,n)=>e>>>n;K.shrSH=a1;var s1=(e,t,n)=>e<<32-n|t>>>n;K.shrSL=s1;var l1=(e,t,n)=>e>>>n|t<<32-n;K.rotrSH=l1;var u1=(e,t,n)=>e<<32-n|t>>>n;K.rotrSL=u1;var f1=(e,t,n)=>e<<64-n|t>>>n-32;K.rotrBH=f1;var c1=(e,t,n)=>e>>>n-32|t<<64-n;K.rotrBL=c1;var d1=(e,t)=>t;K.rotr32H=d1;var p1=(e,t)=>e;K.rotr32L=p1;var m1=(e,t,n)=>e<>>32-n;K.rotlSH=m1;var h1=(e,t,n)=>t<>>32-n;K.rotlSL=h1;var g1=(e,t,n)=>t<>>64-n;K.rotlBH=g1;var y1=(e,t,n)=>e<>>64-n;K.rotlBL=y1;function v1(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}K.add=v1;var w1=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);K.add3L=w1;var _1=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;K.add3H=_1;var x1=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);K.add4L=x1;var S1=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;K.add4H=S1;var k1=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);K.add5L=k1;var b1=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;K.add5H=b1;var GR={fromBig:em,split:i1,toBig:o1,shrSH:a1,shrSL:s1,rotrSH:l1,rotrSL:u1,rotrBH:f1,rotrBL:c1,rotr32H:d1,rotr32L:p1,rotlSH:m1,rotlSL:h1,rotlBH:g1,rotlBL:y1,add:v1,add3L:w1,add3H:_1,add4L:x1,add4H:S1,add5H:b1,add5L:k1};K.default=GR});var O1=Pe(Nu=>{"use strict";m();g();h();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.crypto=void 0;Nu.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var R1=Pe(Z=>{"use strict";m();g();h();Object.defineProperty(Z,"__esModule",{value:!0});Z.randomBytes=Z.wrapXOFConstructorWithOpts=Z.wrapConstructorWithOpts=Z.wrapConstructor=Z.checkOpts=Z.Hash=Z.concatBytes=Z.toBytes=Z.utf8ToBytes=Z.asyncLoop=Z.nextTick=Z.hexToBytes=Z.bytesToHex=Z.byteSwap32=Z.byteSwapIfBE=Z.byteSwap=Z.isLE=Z.rotl=Z.rotr=Z.createView=Z.u32=Z.u8=Z.isBytes=void 0;var tm=O1(),rm=Xp();function ZR(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Z.isBytes=ZR;var qR=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);Z.u8=qR;var QR=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));Z.u32=QR;var KR=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);Z.createView=KR;var XR=(e,t)=>e<<32-t|e>>>t;Z.rotr=XR;var JR=(e,t)=>e<>>32-t>>>0;Z.rotl=JR;Z.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;var eI=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;Z.byteSwap=eI;Z.byteSwapIfBE=Z.isLE?e=>e:e=>(0,Z.byteSwap)(e);function tI(e){for(let t=0;tt.toString(16).padStart(2,"0"));function rI(e){(0,rm.bytes)(e);let t="";for(let n=0;n=Yn._0&&e<=Yn._9)return e-Yn._0;if(e>=Yn._A&&e<=Yn._F)return e-(Yn._A-10);if(e>=Yn._a&&e<=Yn._f)return e-(Yn._a-10)}function iI(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};Z.nextTick=oI;async function aI(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Au(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}Z.wrapConstructor=fI;function cI(e){let t=(r,i)=>e(i).update(Au(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}Z.wrapConstructorWithOpts=cI;function dI(e){let t=(r,i)=>e(i).update(Au(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}Z.wrapXOFConstructorWithOpts=dI;function pI(e=32){if(tm.crypto&&typeof tm.crypto.getRandomValues=="function")return tm.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}Z.randomBytes=pI});var U1=Pe(Se=>{"use strict";m();g();h();Object.defineProperty(Se,"__esModule",{value:!0});Se.shake256=Se.shake128=Se.keccak_512=Se.keccak_384=Se.keccak_256=Se.keccak_224=Se.sha3_512=Se.sha3_384=Se.sha3_256=Se.sha3_224=Se.Keccak=Se.keccakP=void 0;var wo=Xp(),ss=E1(),Gn=R1(),N1=[],A1=[],D1=[],mI=BigInt(0),as=BigInt(1),hI=BigInt(2),gI=BigInt(7),yI=BigInt(256),vI=BigInt(113);for(let e=0,t=as,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],N1.push(2*(5*r+n)),A1.push((e+1)*(e+2)/2%64);let i=mI;for(let o=0;o<7;o++)t=(t<>gI)*vI)%yI,t&hI&&(i^=as<<(as<n>32?(0,ss.rotlBH)(e,t,n):(0,ss.rotlSH)(e,t,n),P1=(e,t,n)=>n>32?(0,ss.rotlBL)(e,t,n):(0,ss.rotlSL)(e,t,n);function M1(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){let s=(a+8)%10,u=(a+2)%10,f=n[u],l=n[u+1],d=I1(f,l,1)^n[s],c=P1(f,l,1)^n[s+1];for(let p=0;p<50;p+=10)e[a+p]^=d,e[a+p+1]^=c}let i=e[2],o=e[3];for(let a=0;a<24;a++){let s=A1[a],u=I1(i,o,s),f=P1(i,o,s),l=N1[a];i=e[l],o=e[l+1],e[l]=u,e[l+1]=f}for(let a=0;a<50;a+=10){for(let s=0;s<10;s++)n[s]=e[a+s];for(let s=0;s<10;s++)e[a+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=wI[r],e[1]^=_I[r]}n.fill(0)}Se.keccakP=M1;var ls=class e extends Gn.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,wo.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Gn.u32)(this.state)}keccak(){Gn.isLE||(0,Gn.byteSwap32)(this.state32),M1(this.state32,this.rounds),Gn.isLE||(0,Gn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,wo.exists)(this);let{blockLen:n,state:r}=this;t=(0,Gn.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let a=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,wo.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,wo.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:a}=this;return t||(t=new e(n,r,i,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}};Se.Keccak=ls;var Dr=(e,t,n)=>(0,Gn.wrapConstructor)(()=>new ls(t,e,n));Se.sha3_224=Dr(6,144,224/8);Se.sha3_256=Dr(6,136,256/8);Se.sha3_384=Dr(6,104,384/8);Se.sha3_512=Dr(6,72,512/8);Se.keccak_224=Dr(1,144,224/8);Se.keccak_256=Dr(1,136,256/8);Se.keccak_384=Dr(1,104,384/8);Se.keccak_512=Dr(1,72,512/8);var L1=(e,t,n)=>(0,Gn.wrapXOFConstructorWithOpts)((r={})=>new ls(t,e,r.dkLen===void 0?n:r.dkLen,!0));Se.shake128=L1(31,168,128/8);Se.shake256=L1(31,136,256/8)});var V1=Pe((eB,Mr)=>{m();g();h();var{sha3_512:xI}=U1(),j1=24,us=32,im=(e=4,t=Math.random)=>{let n="";for(;n.lengthz1(xI(e)).toString(36).slice(1),F1=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),SI=e=>F1[Math.floor(e()*F1.length)],$1=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+im(us,t):im(us,t);return B1(r).substring(0,us)},H1=e=>()=>e++,kI=476782367,W1=({random:e=Math.random,counter:t=H1(Math.floor(e()*kI)),length:n=j1,fingerprint:r=$1({random:e})}={})=>function(){let o=SI(e),a=Date.now().toString(36),s=t().toString(36),u=im(n,e),f=`${a+u+s+r}`;return`${o+B1(f).substring(1,n)}`},bI=W1(),EI=(e,{minLength:t=2,maxLength:n=us}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};Mr.exports.getConstants=()=>({defaultLength:j1,bigLength:us});Mr.exports.init=W1;Mr.exports.createId=bI;Mr.exports.bufToBigInt=z1;Mr.exports.createCounter=H1;Mr.exports.createFingerprint=$1;Mr.exports.isCuid=EI});var Du=Pe((iB,fs)=>{m();g();h();var{createId:OI,init:CI,getConstants:TI,isCuid:RI}=V1();fs.exports.createId=OI;fs.exports.init=CI;fs.exports.getConstants=TI;fs.exports.isCuid=RI});var pm=Pe((l7,Ox)=>{m();g();h();var DI="Expected a function",vx="__lodash_hash_undefined__",wx=1/0,MI="[object Function]",LI="[object GeneratorFunction]",UI="[object Symbol]",FI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jI=/^\w*$/,zI=/^\./,BI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$I=/[\\^$.*+?()[\]{}|]/g,HI=/\\(\\)?/g,WI=/^\[object .+?Constructor\]$/,VI=typeof global=="object"&&global&&global.Object===Object&&global,YI=typeof self=="object"&&self&&self.Object===Object&&self,um=VI||YI||Function("return this")();function GI(e,t){return e?.[t]}function ZI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var qI=Array.prototype,QI=Function.prototype,_x=Object.prototype,lm=um["__core-js_shared__"],mx=function(){var e=/[^.]+$/.exec(lm&&lm.keys&&lm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xx=QI.toString,fm=_x.hasOwnProperty,Sx=_x.toString,KI=RegExp("^"+xx.call(fm).replace($I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hx=um.Symbol,XI=qI.splice,JI=kx(um,"Map"),ps=kx(Object,"create"),gx=hx?hx.prototype:void 0,yx=gx?gx.toString:void 0;function hi(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function u3(e,t){var n=this.__data__,r=Lu(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}So.prototype.clear=o3;So.prototype.delete=a3;So.prototype.get=s3;So.prototype.has=l3;So.prototype.set=u3;function gi(e){var t=-1,n=e?e.length:0;for(this.clear();++t{m();g();h();(function(e,t){"use strict";var n="1.0.38",r="",i="?",o="function",a="undefined",s="object",u="string",f="major",l="model",d="name",c="type",p="vendor",v="version",S="architecture",b="console",y="mobile",w="tablet",_="smarttv",x="wearable",N="embedded",D=500,A="Amazon",M="Apple",W="ASUS",U="BlackBerry",Y="Browser",je="Chrome",Qn="Edge",P="Firefox",j="Google",z="Huawei",L="LG",H="Microsoft",q="Motorola",te="Opera",X="Samsung",fe="Sharp",se="Sony",gt="Xiaomi",Ut="Zebra",Kn="Facebook",Cm="Chromium OS",Tm="Mac OS",oS=function(ie,me){var ee={};for(var ve in ie)me[ve]&&me[ve].length%2===0?ee[ve]=me[ve].concat(ie[ve]):ee[ve]=ie[ve];return ee},ys=function(ie){for(var me={},ee=0;ee0?pe.length===2?typeof pe[1]==o?this[pe[0]]=pe[1].call(this,fn):this[pe[0]]=pe[1]:pe.length===3?typeof pe[1]===o&&!(pe[1].exec&&pe[1].test)?this[pe[0]]=fn?pe[1].call(this,fn,pe[2]):t:this[pe[0]]=fn?fn.replace(pe[1],pe[2]):t:pe.length===4&&(this[pe[0]]=fn?pe[3].call(this,fn.replace(pe[1],pe[2])):t):this[pe]=fn||t;ee+=2}},Zu=function(ie,me){for(var ee in me)if(typeof me[ee]===s&&me[ee].length>0){for(var ve=0;ve2&&(J[l]="iPad",J[c]=w),J},this.getEngine=function(){var J={};return J[d]=t,J[v]=t,Po.call(J,ve,un.engine),J},this.getOS=function(){var J={};return J[d]=t,J[v]=t,Po.call(J,ve,un.os),pe&&!J[d]&&On&&On.platform&&On.platform!="Unknown"&&(J[d]=On.platform.replace(/chrome os/i,Cm).replace(/macos/i,Tm)),J},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ve},this.setUA=function(J){return ve=typeof J===u&&J.length>D?Gu(J,D):J,this},this.setUA(ve),this};Ot.VERSION=n,Ot.BROWSER=ys([d,v,f]),Ot.CPU=ys([S]),Ot.DEVICE=ys([l,p,c,b,y,_,w,x,N]),Ot.ENGINE=Ot.OS=ys([d,v]),typeof gs!==a?(typeof Yu!==a&&Yu.exports&&(gs=Yu.exports=Ot),gs.UAParser=Ot):typeof define===o&&define.amd?define(function(){return Ot}):typeof e!==a&&(e.UAParser=Ot);var _i=typeof e!==a&&(e.jQuery||e.Zepto);if(_i&&!_i.ua){var vs=new Ot;_i.ua=vs.getResult(),_i.ua.get=function(){return vs.getUA()},_i.ua.set=function(ie){vs.setUA(ie);var me=vs.getResult();for(var ee in me)_i.ua[ee]=me[ee]}}})(typeof window=="object"?window:gs)});m();g();h();var rS=G(dy());m();g();h();m();g();h();var Ki=G(Qe()),wr=(e,t,n)=>{let[,r]=(0,Ki.useState)({}),o=(0,Ki.useRef)({data:e,deps:n||[],ready:!1,_loading:{},lastRender:0,lastRenderCount:0}).current;if((0,Ki.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{if(o.ready){if(Date.now()-o.lastRender<300?o.lastRenderCount++:o.lastRenderCount=0,o.lastRenderCount>300)throw new Error("local.render more than 300 times in less than 300ms");o.lastRender=Date.now(),r({})}};else if(o.deps.length>0&&n){for(let[a,s]of Object.entries(n))if(o.deps[a]!==s){o.deps[a]=s,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};m();g();h();var py=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});m();g();h();var Eb=G(Qe());m();g();h();var Un=G(Qe());m();g();h();function yd(e){let t=new WeakMap;function n(r,i=[]){if(!(r!==null&&typeof r=="object"))return r;let o=t.get(r);if(o)return`[Circular *${o.join(".")}]`;t.set(r,i);let a=Array.isArray(r)?[]:{};for(let[s,u]of Object.entries(r))a[s]=n(u,[...i,s]);return t.delete(r),a}return n(e)}var vd=(0,Un.createContext)({global:{},render:()=>{}});var _r=(e,t)=>{let n=(0,Un.useContext)(vd),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Un.useEffect)(()=>{let a=null;return()=>{typeof a=="function"?a():a instanceof Promise&&a.then(s=>{typeof s=="function"&&s()})}},[]);let o=r[t];return o&&(o.render=a=>{a&&(r[t]=void 0),(0,Un.startTransition)(i)}),o},Xi=yd;var SN=G(Qe());m();g();h();m();g();h();m();g();h();var _d=G(Qe()),_y=G(hd()),xy=G(gy()),Sy=G(ge()),ky=()=>{let e=typeof window=="object"?window:globalThis;e.React=_d.default,e.ReactDOM=_y.default,e.JSXRuntime=Sy.default,e.JSXDevRuntime=xy.default,e.Fragment=_d.default.Fragment};m();g();h();m();g();h();var Ab={data:""},Ey=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ab,Oy=e=>{let t=Ey(e),n=t.data;return t.data="",n},Db=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Mb=/\/\*[^]*?\*\/| +/g,by=/\n+/g,Jr=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?Jr(a,o):o+"{"+Jr(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Jr(a,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Jr.p?Jr.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Fn={},Cy=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Cy(e[n]);return t}return e},Lb=(e,t,n,r,i)=>{let o=Cy(e),a=Fn[o]||(Fn[o]=(u=>{let f=0,l=11;for(;f>>0;return"go"+l})(o));if(!Fn[a]){let u=o!==e?e:(f=>{let l,d,c=[{}];for(;l=Db.exec(f.replace(Mb,""));)l[4]?c.shift():l[3]?(d=l[3].replace(by," ").trim(),c.unshift(c[0][d]=c[0][d]||{})):c[0][l[1]]=l[2].replace(by," ").trim();return c[0]})(e);Fn[a]=Jr(i?{["@keyframes "+a]:u}:u,n?"":"."+a)}let s=n&&Fn.g?Fn.g:null;return n&&(Fn.g=Fn[a]),((u,f,l,d)=>{d?f.data=f.data.replace(d,u):f.data.indexOf(u)===-1&&(f.data=l?u+f.data:f.data+u)})(Fn[a],t,r,s),a},Ub=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let s=a(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=u?"."+u:s&&typeof s=="object"?s.props?"":Jr(s,""):s===!1?"":s}return r+i+(a??"")},"");function $l(e){let t=this||{},n=e.call?e(t.p):e;return Lb(n.unshift?n.raw?Ub(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Ey(t.target),t.g,t.o,t.k)}var fN=$l.bind({g:1}),cN=$l.bind({k:1});var Ty=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await py(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let a=new URL(t.serverurl);(a.hostname==="localhost"||a.hostname==="127.0.0.1")&&(a.hostname=n.hostname,a.pathname=a.pathname==="/"?"":a.pathname,t.serverurl=a.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=$l,t.extractCss=Oy,t.pathname=n.pathname,t.cx=(...a)=>{let s=[];return a.filter(u=>u?(typeof u=="string"&&u.trim(),!0):!1).forEach(u=>{if(Array.isArray(u))for(let f of u)typeof f=="string"&&f.trim()&&s.push(f.trim());else s.push(u.trim())}),s.join(" ")},t.navigate=a=>{let s=a;if(typeof t.navigateOverride=="function"&&(s=t.navigateOverride(a),!s))return null;history.pushState({prevUrl:window.location.href},"",s),t.pathname=a,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let a=navigator.serviceWorker.controller;if(a&&a.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};m();g();h();var xd=window,B={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(B.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:xd._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},Ry=()=>{if(!B.root){let e=new URL(location.href);xd._prasi.basepath&&(e.pathname=xd._prasi.basepath),B.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),B.root.pathname.endsWith("/")&&(B.root.pathname=B.root.pathname.substring(0,B.root.length-1))}};m();g();h();m();g();h();m();g();h();function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ji(e)}m();g();h();function St(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}m();g();h();m();g();h();function ce(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function De(e){ce(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ji(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}m();g();h();function Sd(e,t){ce(2,arguments);var n=De(e).getTime(),r=St(t);return new Date(n+r)}m();g();h();var Fb={};function xr(){return Fb}m();g();h();function kd(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}m();g();h();m();g();h();function bd(e){return ce(1,arguments),e instanceof Date||Ji(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ed(e){if(ce(1,arguments),!bd(e)&&typeof e!="number")return!1;var t=De(e);return!isNaN(Number(t))}m();g();h();m();g();h();function Od(e,t){ce(2,arguments);var n=St(t);return Sd(e,-n)}m();g();h();m();g();h();var jb=864e5;function Cd(e){ce(1,arguments);var t=De(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/jb)+1}m();g();h();m();g();h();function Sr(e){ce(1,arguments);var t=1,n=De(e),r=n.getUTCDay(),i=(r=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Td(e){ce(1,arguments);var t=ba(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Sr(n);return r}var zb=6048e5;function Rd(e){ce(1,arguments);var t=De(e),n=Sr(t).getTime()-Td(t).getTime();return Math.round(n/zb)+1}m();g();h();m();g();h();function kr(e,t){var n,r,i,o,a,s,u,f;ce(1,arguments);var l=xr(),d=St((n=(r=(i=(o=t?.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:l.weekStartsOn)!==null&&r!==void 0?r:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=De(e),p=c.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,p),v.setUTCHours(0,0,0,0);var S=kr(v,t),b=new Date(0);b.setUTCFullYear(d,0,p),b.setUTCHours(0,0,0,0);var y=kr(b,t);return l.getTime()>=S.getTime()?d+1:l.getTime()>=y.getTime()?d:d-1}function Id(e,t){var n,r,i,o,a,s,u,f;ce(1,arguments);var l=xr(),d=St((n=(r=(i=(o=t?.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:l.firstWeekContainsDate)!==null&&r!==void 0?r:(u=l.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&n!==void 0?n:1),c=Ea(e,t),p=new Date(0);p.setUTCFullYear(c,0,d),p.setUTCHours(0,0,0,0);var v=kr(p,t);return v}var Bb=6048e5;function Pd(e,t){ce(1,arguments);var n=De(e),r=kr(n,t).getTime()-Id(n,t).getTime();return Math.round(r/Bb)+1}m();g();h();function ue(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return ue(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):ue(r+1,2)},d:function(t,n){return ue(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return ue(t.getUTCHours()%12||12,n.length)},H:function(t,n){return ue(t.getUTCHours(),n.length)},m:function(t,n){return ue(t.getUTCMinutes(),n.length)},s:function(t,n){return ue(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return ue(o,n.length)}},jn=$b;var eo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Hb={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return jn.y(t,n)},Y:function(t,n,r,i){var o=Ea(t,i),a=o>0?o:1-o;if(n==="YY"){var s=a%100;return ue(s,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):ue(a,n.length)},R:function(t,n){var r=ba(t);return ue(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return ue(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return ue(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return ue(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return jn.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return ue(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=Pd(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):ue(o,n.length)},I:function(t,n,r){var i=Rd(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):ue(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):jn.d(t,n)},D:function(t,n,r){var i=Cd(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):ue(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return ue(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return ue(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return ue(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=eo.noon:i===0?o=eo.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=eo.evening:i>=12?o=eo.afternoon:i>=4?o=eo.morning:o=eo.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return jn.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):jn.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):ue(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):ue(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):jn.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):jn.s(t,n)},S:function(t,n){return jn.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return Py(a);case"XXXX":case"XX":return ei(a);case"XXXXX":case"XXX":default:return ei(a,":")}},x:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"x":return Py(a);case"xxxx":case"xx":return ei(a);case"xxxxx":case"xxx":default:return ei(a,":")}},O:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Iy(a,":");case"OOOO":default:return"GMT"+ei(a,":")}},z:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Iy(a,":");case"zzzz":default:return"GMT"+ei(a,":")}},t:function(t,n,r,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return ue(a,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,a=o.getTime();return ue(a,n.length)}};function Iy(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var a=t||"";return n+String(i)+a+ue(o,2)}function Py(e,t){if(e%60===0){var n=e>0?"-":"+";return n+ue(Math.abs(e)/60,2)}return ei(e,t)}function ei(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=ue(Math.floor(i/60),2),a=ue(i%60,2);return r+o+n+a}var Ny=Hb;m();g();h();var Ay=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Dy=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Wb=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Ay(t,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",Ay(i,n)).replace("{{time}}",Dy(o,n))},Vb={p:Dy,P:Wb},My=Vb;m();g();h();var Yb=["D","DD"],Gb=["YY","YYYY"];function Ly(e){return Yb.indexOf(e)!==-1}function Uy(e){return Gb.indexOf(e)!==-1}function Nd(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}m();g();h();m();g();h();m();g();h();var Zb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qb=function(t,n,r){var i,o=Zb[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},Fy=qb;m();g();h();m();g();h();function Oa(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var Qb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jb={date:Oa({formats:Qb,defaultWidth:"full"}),time:Oa({formats:Kb,defaultWidth:"full"}),dateTime:Oa({formats:Xb,defaultWidth:"full"})},jy=Jb;m();g();h();var e2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},t2=function(t,n,r,i){return e2[t]},zy=t2;m();g();h();m();g();h();function ti(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[s]}var f=e.argumentCallback?e.argumentCallback(t):t;return i[f]}}var n2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},r2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},i2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},a2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},s2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},l2=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},u2={ordinalNumber:l2,era:ti({values:n2,defaultWidth:"wide"}),quarter:ti({values:r2,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ti({values:i2,defaultWidth:"wide"}),day:ti({values:o2,defaultWidth:"wide"}),dayPeriod:ti({values:a2,defaultWidth:"wide",formattingValues:s2,defaultFormattingWidth:"wide"})},By=u2;m();g();h();m();g();h();function ni(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?c2(s,function(d){return d.test(a)}):f2(s,function(d){return d.test(a)}),f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;var l=t.slice(a.length);return{value:f,rest:l}}}function f2(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function c2(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var d2=/^(\d+)(th|st|nd|rd)?/i,p2=/\d+/i,m2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},h2={any:[/^b/i,/^(a|c)/i]},g2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},y2={any:[/1/i,/2/i,/3/i,/4/i]},v2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},w2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},x2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},S2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},k2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},b2={ordinalNumber:Ad({matchPattern:d2,parsePattern:p2,valueCallback:function(t){return parseInt(t,10)}}),era:ni({matchPatterns:m2,defaultMatchWidth:"wide",parsePatterns:h2,defaultParseWidth:"any"}),quarter:ni({matchPatterns:g2,defaultMatchWidth:"wide",parsePatterns:y2,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ni({matchPatterns:v2,defaultMatchWidth:"wide",parsePatterns:w2,defaultParseWidth:"any"}),day:ni({matchPatterns:_2,defaultMatchWidth:"wide",parsePatterns:x2,defaultParseWidth:"any"}),dayPeriod:ni({matchPatterns:S2,defaultMatchWidth:"any",parsePatterns:k2,defaultParseWidth:"any"})},$y=b2;var E2={code:"en-US",formatDistance:Fy,formatLong:jy,formatRelative:zy,localize:By,match:$y,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hy=E2;var Wy=Hy;var O2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,C2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T2=/^'([^]*?)'?$/,R2=/''/g,I2=/[a-zA-Z]/;function Ca(e,t,n){var r,i,o,a,s,u,f,l,d,c,p,v,S,b,y,w,_,x;ce(2,arguments);var N=String(t),D=xr(),A=(r=(i=n?.locale)!==null&&i!==void 0?i:D.locale)!==null&&r!==void 0?r:Wy,M=St((o=(a=(s=(u=n?.firstWeekContainsDate)!==null&&u!==void 0?u:n==null||(f=n.locale)===null||f===void 0||(l=f.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&s!==void 0?s:D.firstWeekContainsDate)!==null&&a!==void 0?a:(d=D.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(M>=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=St((p=(v=(S=(b=n?.weekStartsOn)!==null&&b!==void 0?b:n==null||(y=n.locale)===null||y===void 0||(w=y.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&S!==void 0?S:D.weekStartsOn)!==null&&v!==void 0?v:(_=D.locale)===null||_===void 0||(x=_.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&p!==void 0?p:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var U=De(e);if(!Ed(U))throw new RangeError("Invalid time value");var Y=kd(U),je=Od(U,Y),Qn={firstWeekContainsDate:M,weekStartsOn:W,locale:A,_originalDate:U},P=N.match(C2).map(function(j){var z=j[0];if(z==="p"||z==="P"){var L=My[z];return L(j,A.formatLong)}return j}).join("").match(O2).map(function(j){if(j==="''")return"'";var z=j[0];if(z==="'")return P2(j);var L=Ny[z];if(L)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Uy(j)&&Nd(j,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ly(j)&&Nd(j,t,String(e)),L(je,j,A.localize,Qn);if(z.match(I2))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");return j}).join("");return P}function P2(e){var t=e.match(T2);return t?t[1].replace(R2,"'"):e}m();g();h();m();g();h();m();g();h();var Md;try{Md=new TextDecoder}catch{}var $,Yt,E=0;var nv=[],Ld=nv,Ud=0,xe={},oe,br,Vt=0,yn=0,Ge,zn,kt=[],re,Vy={useRecords:!1,mapsAsObjects:!0},Ta=class{},jd=new Ta;jd.name="MessagePack 0xC1";var Er=!1,rv=2,Yy,Gy,Zy;try{new Function("")}catch{rv=1/0}var ii=class e{constructor(t){t&&(t.useRecords===!1&&t.mapsAsObjects===void 0&&(t.mapsAsObjects=!0),t.sequential&&t.trusted!==!1&&(t.trusted=!0,!t.structures&&t.useRecords!=!1&&(t.structures=[],t.maxSharedStructures||(t.maxSharedStructures=0))),t.structures?t.structures.sharedLength=t.structures.length:t.getStructures&&((t.structures=[]).uninitialized=!0,t.structures.sharedLength=0),t.int64AsNumber&&(t.int64AsType="number")),Object.assign(this,t)}unpack(t,n){if($)return lv(()=>(Wl(),this?this.unpack(t,n):e.prototype.unpack.call(Vy,t,n)));!t.buffer&&t.constructor===ArrayBuffer&&(t=typeof k<"u"?k.from(t):new Uint8Array(t)),typeof n=="object"?(Yt=n.end||t.length,E=n.start||0):(E=0,Yt=n>-1?n:t.length),Ud=0,yn=0,br=null,Ld=nv,Ge=null,$=t;try{re=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(r){throw $=null,t instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(t&&typeof t=="object"?t.constructor.name:typeof t))}if(this instanceof e){if(xe=this,this.structures)return oe=this.structures,Hl(n);(!oe||oe.length>0)&&(oe=[])}else xe=Vy,(!oe||oe.length>0)&&(oe=[]);return Hl(n)}unpackMultiple(t,n){let r,i=0;try{Er=!0;let o=t.length,a=this?this.unpack(t,o):Yl.unpack(t,o);if(n){if(n(a,i,E)===!1)return;for(;Er.slice(0)));for(let r=0,i=t.length;r=32&&(o.highByte=r-32>>5))}t.sharedLength=t.length;for(let r in n||[])if(r>=0){let i=t[r],o=n[r];o&&(i&&((t.restoreStructures||(t.restoreStructures=[]))[r]=i),t[r]=o)}return this.structures=t}decode(t,n){return this.unpack(t,n)}};function Hl(e){try{if(!xe.trusted&&!Er){let n=oe.sharedLength||0;n=32&&Yy?(t=Yy($,E,Yt,xe),$=null,!(e&&e.lazy)&&t&&(t=t.toJSON()),E=Yt):t=Me(),Ge&&(E=Ge.postBundlePosition,Ge=null),Er&&(oe.restoreStructures=null),E==Yt)oe&&oe.restoreStructures&&qy(),oe=null,$=null,zn&&(zn=null);else{if(E>Yt)throw new Error("Unexpected end of MessagePack data");if(!Er){let n;try{n=JSON.stringify(t,(r,i)=>typeof i=="bigint"?`${i}n`:i).slice(0,100)}catch(r){n="(JSON view not available "+r+")"}throw new Error("Data read, but end of buffer not reached "+n)}}return t}catch(t){throw oe&&oe.restoreStructures&&qy(),Wl(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer")||E>Yt)&&(t.incomplete=!0),t}}function qy(){for(let e in oe.restoreStructures)oe[e]=oe.restoreStructures[e];oe.restoreStructures=null}function Me(){let e=$[E++];if(e<160)if(e<128){if(e<64)return e;{let t=oe[e&63]||xe.getStructures&&iv()[e&63];return t?(t.read||(t.read=zd(t,e&63)),t.read()):e}}else if(e<144)if(e-=128,xe.mapsAsObjects){let t={};for(let n=0;n=E)return br.slice(E-Vt,(E+=t)-Vt);if(yn==0&&Yt<140){let n=t<16?Bd(t):ov(t);if(n!=null)return n}return Fd(t)}else{let t;switch(e){case 192:return null;case 193:return Ge?(t=Me(),t>0?Ge[1].slice(Ge.position1,Ge.position1+=t):Ge[0].slice(Ge.position0,Ge.position0-=t)):jd;case 194:return!1;case 195:return!0;case 196:if(t=$[E++],t===void 0)throw new Error("Unexpected end of buffer");return Dd(t);case 197:return t=re.getUint16(E),E+=2,Dd(t);case 198:return t=re.getUint32(E),E+=4,Dd(t);case 199:return ri($[E++]);case 200:return t=re.getUint16(E),E+=2,ri(t);case 201:return t=re.getUint32(E),E+=4,ri(t);case 202:if(t=re.getFloat32(E),xe.useFloat32>2){let n=Vl[($[E]&127)<<1|$[E+1]>>7];return E+=4,(n*t+(t>0?.5:-.5)>>0)/n}return E+=4,t;case 203:return t=re.getFloat64(E),E+=8,t;case 204:return $[E++];case 205:return t=re.getUint16(E),E+=2,t;case 206:return t=re.getUint32(E),E+=4,t;case 207:return xe.int64AsType==="number"?(t=re.getUint32(E)*4294967296,t+=re.getUint32(E+4)):xe.int64AsType==="string"?t=re.getBigUint64(E).toString():xe.int64AsType==="auto"?(t=re.getBigUint64(E),t<=BigInt(2)<=BigInt(-2)<=E?br.slice(E-Vt,(E+=t)-Vt):A2(t);case 218:return t=re.getUint16(E),E+=2,yn>=E?br.slice(E-Vt,(E+=t)-Vt):D2(t);case 219:return t=re.getUint32(E),E+=4,yn>=E?br.slice(E-Vt,(E+=t)-Vt):M2(t);case 220:return t=re.getUint16(E),E+=2,Ky(t);case 221:return t=re.getUint32(E),E+=4,Ky(t);case 222:return t=re.getUint16(E),E+=2,Xy(t);case 223:return t=re.getUint32(E),E+=4,Xy(t);default:if(e>=224)return e-256;if(e===void 0){let n=new Error("Unexpected end of MessagePack data");throw n.incomplete=!0,n}throw new Error("Unknown MessagePack token "+e)}}}var N2=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function zd(e,t){function n(){if(n.count++>rv){let i=e.read=new Function("r","return function(){return "+(xe.freezeData?"Object.freeze":"")+"({"+e.map(o=>o==="__proto__"?"__proto_:r()":N2.test(o)?o+":r()":"["+JSON.stringify(o)+"]:r()").join(",")+"})}")(Me);return e.highByte===0&&(e.read=Qy(t,e.read)),i()}let r={};for(let i=0,o=e.length;ifunction(){let n=$[E++];if(n===0)return t();let r=e<32?-(e+(n<<5)):e+(n<<5),i=oe[r]||iv()[r];if(!i)throw new Error("Record id is not defined for "+r);return i.read||(i.read=zd(i,e)),i.read()};function iv(){let e=lv(()=>($=null,xe.getStructures()));return oe=xe._mergeStructures(e,oe)}var Fd=Ra,A2=Ra,D2=Ra,M2=Ra;function Ra(e){let t;if(e<16&&(t=Bd(e)))return t;if(e>64&&Md)return Md.decode($.subarray(E,E+=e));let n=E+e,r=[];for(t="";E65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|u&1023),r.push(u)}else r.push(i);r.length>=4096&&(t+=Ye.apply(String,r),r.length=0)}return r.length>0&&(t+=Ye.apply(String,r)),t}function Ky(e){let t=new Array(e);for(let n=0;n0){E=t;return}n[r]=i}return Ye.apply(String,n)}function Bd(e){if(e<4)if(e<2){if(e===0)return"";{let t=$[E++];if((t&128)>1){E-=1;return}return Ye(t)}}else{let t=$[E++],n=$[E++];if((t&128)>0||(n&128)>0){E-=2;return}if(e<3)return Ye(t,n);let r=$[E++];if((r&128)>0){E-=3;return}return Ye(t,n,r)}else{let t=$[E++],n=$[E++],r=$[E++],i=$[E++];if((t&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){E-=4;return}if(e<6){if(e===4)return Ye(t,n,r,i);{let o=$[E++];if((o&128)>0){E-=5;return}return Ye(t,n,r,i,o)}}else if(e<8){let o=$[E++],a=$[E++];if((o&128)>0||(a&128)>0){E-=6;return}if(e<7)return Ye(t,n,r,i,o,a);let s=$[E++];if((s&128)>0){E-=7;return}return Ye(t,n,r,i,o,a,s)}else{let o=$[E++],a=$[E++],s=$[E++],u=$[E++];if((o&128)>0||(a&128)>0||(s&128)>0||(u&128)>0){E-=8;return}if(e<10){if(e===8)return Ye(t,n,r,i,o,a,s,u);{let f=$[E++];if((f&128)>0){E-=9;return}return Ye(t,n,r,i,o,a,s,u,f)}}else if(e<12){let f=$[E++],l=$[E++];if((f&128)>0||(l&128)>0){E-=10;return}if(e<11)return Ye(t,n,r,i,o,a,s,u,f,l);let d=$[E++];if((d&128)>0){E-=11;return}return Ye(t,n,r,i,o,a,s,u,f,l,d)}else{let f=$[E++],l=$[E++],d=$[E++],c=$[E++];if((f&128)>0||(l&128)>0||(d&128)>0||(c&128)>0){E-=12;return}if(e<14){if(e===12)return Ye(t,n,r,i,o,a,s,u,f,l,d,c);{let p=$[E++];if((p&128)>0){E-=13;return}return Ye(t,n,r,i,o,a,s,u,f,l,d,c,p)}}else{let p=$[E++],v=$[E++];if((p&128)>0||(v&128)>0){E-=14;return}if(e<15)return Ye(t,n,r,i,o,a,s,u,f,l,d,c,p,v);let S=$[E++];if((S&128)>0){E-=15;return}return Ye(t,n,r,i,o,a,s,u,f,l,d,c,p,v,S)}}}}}function Jy(){let e=$[E++],t;if(e<192)t=e-160;else switch(e){case 217:t=$[E++];break;case 218:t=re.getUint16(E),E+=2;break;case 219:t=re.getUint32(E),E+=4;break;default:throw new Error("Expected string")}return Ra(t)}function Dd(e){return xe.copyBuffers?Uint8Array.prototype.slice.call($,E,E+=e):$.subarray(E,E+=e)}function ri(e){let t=$[E++];if(kt[t]){let n;return kt[t]($.subarray(E,n=E+=e),r=>{E=r;try{return Me()}finally{E=n}})}else throw new Error("Unknown extension type "+t)}var ev=new Array(4096);function av(){let e=$[E++];if(e>=160&&e<192){if(e=e-160,yn>=E)return br.slice(E-Vt,(E+=e)-Vt);if(!(yn==0&&Yt<180))return Fd(e)}else return E--,sv(Me());let t=(e<<5^(e>1?re.getUint16(E):e>0?$[E]:0))&4095,n=ev[t],r=E,i=E+e-3,o,a=0;if(n&&n.bytes==e){for(;r{let n=Me().map(sv),r=e;t!==void 0&&(e=e<32?-((t<<5)+e):(t<<5)+e,n.highByte=t);let i=oe[e];return i&&(i.isShared||Er)&&((oe.restoreStructures||(oe.restoreStructures=[]))[e]=i),oe[e]=n,n.read=zd(n,r),n.read()};kt[0]=()=>{};kt[0].noBuffer=!0;kt[66]=e=>{let t=e.length,n=BigInt(e[0]&128?e[0]-256:e[0]);for(let r=1;r{let e=Me();return(L2[e[0]]||Error)(e[1],{cause:e[2]})};kt[105]=e=>{if(xe.structuredClone===!1)throw new Error("Structured clone extension is disabled");let t=re.getUint32(E-4);zn||(zn=new Map);let n=$[E],r;n>=144&&n<160||n==220||n==221?r=[]:r={};let i={target:r};zn.set(t,i);let o=Me();return i.used?Object.assign(r,o):(i.target=o,o)};kt[112]=e=>{if(xe.structuredClone===!1)throw new Error("Structured clone extension is disabled");let t=re.getUint32(E-4),n=zn.get(t);return n.used=!0,n.target};kt[115]=()=>new Set(Me());var $d=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(e=>e+"Array"),U2=typeof globalThis=="object"?globalThis:window;kt[116]=e=>{let t=e[0],n=$d[t];if(!n){if(t===16){let r=new ArrayBuffer(e.length-1);return new Uint8Array(r).set(e.subarray(1)),r}throw new Error("Could not find typed array for code "+t)}return new U2[n](Uint8Array.prototype.slice.call(e,1).buffer)};kt[120]=()=>{let e=Me();return new RegExp(e[0],e[1])};var F2=[];kt[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],n=E;return E+=t-e.length,Ge=F2,Ge=[Jy(),Jy()],Ge.position0=0,Ge.position1=0,Ge.postBundlePosition=E,E=n,Me()};kt[255]=e=>e.length==4?new Date((e[0]*16777216+(e[1]<<16)+(e[2]<<8)+e[3])*1e3):e.length==8?new Date(((e[0]<<22)+(e[1]<<14)+(e[2]<<6)+(e[3]>>2))/1e6+((e[3]&3)*4294967296+e[4]*16777216+(e[5]<<16)+(e[6]<<8)+e[7])*1e3):e.length==12?new Date(((e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3])/1e6+((e[4]&128?-281474976710656:0)+e[6]*1099511627776+e[7]*4294967296+e[8]*16777216+(e[9]<<16)+(e[10]<<8)+e[11])*1e3):new Date("invalid");function lv(e){Zy&&Zy();let t=Yt,n=E,r=Ud,i=Vt,o=yn,a=br,s=Ld,u=zn,f=Ge,l=new Uint8Array($.slice(0,Yt)),d=oe,c=oe.slice(0,oe.length),p=xe,v=Er,S=e();return Yt=t,E=n,Ud=r,Vt=i,yn=o,br=a,Ld=s,zn=u,Ge=f,$=l,Er=v,oe=d,oe.splice(0,oe.length,...c),xe=p,re=new DataView($.buffer,$.byteOffset,$.byteLength),S}function Wl(){$=null,zn=null,oe=null}var Vl=new Array(147);for(let e=0;e<256;e++)Vl[e]=+("1e"+Math.floor(45.15-e*.30103));var Yl=new ii({useRecords:!1}),j2=Yl.unpack,z2=Yl.unpackMultiple,B2=Yl.unpack,Gl={NEVER:0,ALWAYS:1,DECIMAL_ROUND:3,DECIMAL_FIT:4},$2=new Float32Array(1),GM=new Uint8Array($2.buffer,0,4);var ql;try{ql=new TextEncoder}catch{}var Hd,pv,Ql=typeof k<"u",Zl=Ql?function(e){return k.allocUnsafeSlow(e)}:Uint8Array,mv=Ql?k:Uint8Array,uv=Ql?4294967296:2144337920,R,Ia,ye,T=0,mt,Ie=null,H2,W2=21760,V2=/[\u0080-\uFFFF]/,to=Symbol("record-id"),oi=class extends ii{constructor(t){super(t),this.offset=0;let n,r,i,o,a,s=mv.prototype.utf8Write?function(P,j){return R.utf8Write(P,j,4294967295)}:ql&&ql.encodeInto?function(P,j){return ql.encodeInto(P,R.subarray(j)).written}:!1,u=this;t||(t={});let f=t&&t.sequential,l=t.structures||t.saveStructures,d=t.maxSharedStructures;if(d==null&&(d=l?32:0),d>8160)throw new Error("Maximum maxSharedStructure is 8160");t.structuredClone&&t.moreTypes==null&&(this.moreTypes=!0);let c=t.maxOwnStructures;c==null&&(c=l?32:64),!this.structures&&t.useRecords!=!1&&(this.structures=[]);let p=d>32||c+d>64,v=d+64,S=d+c+64;if(S>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let b=[],y=0,w=0;this.pack=this.encode=function(P,j){if(R||(R=new Zl(8192),ye=R.dataView||(R.dataView=new DataView(R.buffer,0,8192)),T=0),mt=R.length-10,mt-T<2048?(R=new Zl(R.length),ye=R.dataView||(R.dataView=new DataView(R.buffer,0,R.length)),mt=R.length-10,T=0):T=T+7&2147483640,r=T,j&nE&&(T+=j&255),a=u.structuredClone?new Map:null,u.bundleStrings&&typeof P!="string"?(Ie=[],Ie.size=1/0):Ie=null,o=u.structures,o){o.uninitialized&&(o=u._mergeStructures(u.getStructures()));let L=o.sharedLength||0;if(L>d)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+o.sharedLength);if(!o.transitions){o.transitions=Object.create(null);for(let H=0;Hfe.offset>se.offset?1:-1),q=H.length,te=-1;for(;L&&q>0;){let fe=H[--q].offset+r;feL.position+r?te>=0&&(te+=6):(te>=0&&(ye.setUint32(L.position+r,ye.getUint32(L.position+r)+te),te=-1),L=L.previous,q++)}te>=0&&L&&ye.setUint32(L.position+r,ye.getUint32(L.position+r)+te),T+=H.length*6,T>mt&&U(T),u.offset=T;let X=G2(R.subarray(r,T),H);return a=null,X}return u.offset=T,j&gv?(R.start=r,R.end=T,R):R.subarray(r,T)}catch(L){throw z=L,L}finally{if(o&&(_(),i&&u.saveStructures)){let L=o.sharedLength||0,H=R.subarray(r,T),q=Z2(o,u);if(!z)return u.saveStructures(q,q.isCompatible)===!1?u.pack(P,j):(u.lastNamedStructuresLength=L,R.length>1073741824&&(R=null),H)}R.length>1073741824&&(R=null),j&tE&&(T=r)}};let _=()=>{w<10&&w++;let P=o.sharedLength||0;if(o.length>P&&!f&&(o.length=P),y>1e4)o.transitions=null,w=0,y=0,b.length>0&&(b=[]);else if(b.length>0&&!f){for(let j=0,z=b.length;j{var j=P.length;j<16?R[T++]=144|j:j<65536?(R[T++]=220,R[T++]=j>>8,R[T++]=j&255):(R[T++]=221,ye.setUint32(T,j),T+=4);for(let z=0;z{T>mt&&(R=U(T));var j=typeof P,z;if(j==="string"){let L=P.length;if(Ie&&L>=4&&L<4096){if((Ie.size+=L)>W2){let X,fe=(Ie[0]?Ie[0].length*3+Ie[1].length:0)+10;T+fe>mt&&(R=U(T+fe));let se;Ie.position?(se=Ie,R[T]=200,T+=3,R[T++]=98,X=T-r,T+=4,dv(r,N,0),ye.setUint16(X+r-3,T-r-X)):(R[T++]=214,R[T++]=98,X=T-r,T+=4),Ie=["",""],Ie.previous=se,Ie.size=0,Ie.position=X}let te=V2.test(P);Ie[te?0:1]+=P,R[T++]=193,N(te?-L:L);return}let H;L<32?H=1:L<256?H=2:L<65536?H=3:H=5;let q=L*3;if(T+q>mt&&(R=U(T+q)),L<64||!s){let te,X,fe,se=T+H;for(te=0;te>6|192,R[se++]=X&63|128):(X&64512)===55296&&((fe=P.charCodeAt(te+1))&64512)===56320?(X=65536+((X&1023)<<10)+(fe&1023),te++,R[se++]=X>>18|240,R[se++]=X>>12&63|128,R[se++]=X>>6&63|128,R[se++]=X&63|128):(R[se++]=X>>12|224,R[se++]=X>>6&63|128,R[se++]=X&63|128);z=se-T-H}else z=s(P,T+H);z<32?R[T++]=160|z:z<256?(H<2&&R.copyWithin(T+2,T+1,T+1+z),R[T++]=217,R[T++]=z):z<65536?(H<3&&R.copyWithin(T+3,T+2,T+2+z),R[T++]=218,R[T++]=z>>8,R[T++]=z&255):(H<5&&R.copyWithin(T+5,T+3,T+3+z),R[T++]=219,ye.setUint32(T,z),T+=4),T+=z}else if(j==="number")if(P>>>0===P)P<32||P<128&&this.useRecords===!1||P<64&&!this.randomAccessStructure?R[T++]=P:P<256?(R[T++]=204,R[T++]=P):P<65536?(R[T++]=205,R[T++]=P>>8,R[T++]=P&255):(R[T++]=206,ye.setUint32(T,P),T+=4);else if(P>>0===P)P>=-32?R[T++]=256+P:P>=-128?(R[T++]=208,R[T++]=P+256):P>=-32768?(R[T++]=209,ye.setInt16(T,P),T+=2):(R[T++]=210,ye.setInt32(T,P),T+=4);else{let L;if((L=this.useFloat32)>0&&P<4294967296&&P>=-2147483648){R[T++]=202,ye.setFloat32(T,P);let H;if(L<4||(H=P*Vl[(R[T]&127)<<1|R[T+1]>>7])>>0===H){T+=4;return}else T--}R[T++]=203,ye.setFloat64(T,P),T+=8}else if(j==="object"||j==="function")if(!P)R[T++]=192;else{if(a){let H=a.get(P);if(H){if(!H.id){let q=a.idsToInsert||(a.idsToInsert=[]);H.id=q.push(H)}R[T++]=214,R[T++]=112,ye.setUint32(T,H.id),T+=4;return}else a.set(P,{offset:T-r})}let L=P.constructor;if(L===Object)W(P);else if(L===Array)x(P);else if(L===Map)if(this.mapAsEmptyObject)R[T++]=128;else{z=P.size,z<16?R[T++]=128|z:z<65536?(R[T++]=222,R[T++]=z>>8,R[T++]=z&255):(R[T++]=223,ye.setUint32(T,z),T+=4);for(let[H,q]of P)N(H),N(q)}else{for(let H=0,q=Hd.length;H(R=fe,fe=null,T+=Kn,T>mt&&U(T),{target:R,targetView:ye,position:T-Kn}),N)}finally{fe&&(R=fe,ye=se,T=gt,mt=R.length-10)}Ut&&(Ut.length+T>mt&&U(Ut.length+T),T=Y2(Ut,R,T,X.type));return}}if(Array.isArray(P))x(P);else{if(P.toJSON){let H=P.toJSON();if(H!==P)return N(H)}if(j==="function")return N(this.writeFunction&&this.writeFunction(P));W(P)}}}else if(j==="boolean")R[T++]=P?195:194;else if(j==="bigint"){if(P=-(BigInt(1)<0)R[T++]=207,ye.setBigUint64(T,P);else if(this.largeBigIntToFloat)R[T++]=203,ye.setFloat64(T,Number(P));else if(this.useBigIntExtension&&P<2n**1023n&&P>-(2n**1023n)){R[T++]=199,T++,R[T++]=66;let L=[],H;do{let q=P&0xffn;H=(q&0x80n)===(P<0n?0x80n:0n),L.push(q),P>>=8n}while(!((P===0n||P===-1n)&&H));R[T-2]=L.length;for(let q=L.length;q>0;)R[T++]=Number(L[--q]);return}else throw new RangeError(P+" was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension or set largeBigIntToFloat to convert to float-64");T+=8}else if(j==="undefined")this.encodeUndefinedAsNil?R[T++]=192:(R[T++]=212,R[T++]=0,R[T++]=0);else throw new Error("Unknown type: "+j)},D=this.variableMapSize||this.coercibleKeyAsNumber?P=>{let j=Object.keys(P),z=j.length;z<16?R[T++]=128|z:z<65536?(R[T++]=222,R[T++]=z>>8,R[T++]=z&255):(R[T++]=223,ye.setUint32(T,z),T+=4);let L;if(this.coercibleKeyAsNumber)for(let H=0;H{R[T++]=222;let j=T-r;T+=2;let z=0;for(let L in P)(typeof P.hasOwnProperty!="function"||P.hasOwnProperty(L))&&(N(L),N(P[L]),z++);R[j+++r]=z>>8,R[j+r]=z&255},A=this.useRecords===!1?D:t.progressiveRecords&&!p?P=>{let j,z=o.transitions||(o.transitions=Object.create(null)),L=T++-r,H;for(let q in P)if(typeof P.hasOwnProperty!="function"||P.hasOwnProperty(q)){if(j=z[q],j)z=j;else{let te=Object.keys(P),X=z;z=o.transitions;let fe=0;for(let se=0,gt=te.length;se{let j,z=o.transitions||(o.transitions=Object.create(null)),L=0;for(let q in P)(typeof P.hasOwnProperty!="function"||P.hasOwnProperty(q))&&(j=z[q],j||(j=z[q]=Object.create(null),L++),z=j);let H=z[to];H?H>=96&&p?(R[T++]=((H-=96)&31)+96,R[T++]=H>>5):R[T++]=H:Y(z,z.__keys__||Object.keys(P),L);for(let q in P)(typeof P.hasOwnProperty!="function"||P.hasOwnProperty(q))&&N(P[q])},M=typeof this.useRecords=="function"&&this.useRecords,W=M?P=>{M(P)?A(P):D(P)}:A,U=P=>{let j;if(P>16777216){if(P-r>uv)throw new Error("Packed buffer would be larger than maximum buffer size");j=Math.min(uv,Math.round(Math.max((P-r)*(P>67108864?1.25:2),4194304)/4096)*4096)}else j=(Math.max(P-r<<2,R.length-1)>>12)+1<<12;let z=new Zl(j);return ye=z.dataView||(z.dataView=new DataView(z.buffer,0,j)),P=Math.min(P,R.length),R.copy?R.copy(z,0,r,P):z.set(R.slice(r,P)),T-=r,r=0,mt=z.length-10,R=z},Y=(P,j,z)=>{let L=o.nextId;L||(L=64),L=S&&(L=v),o.nextId=L+1);let H=j.highByte=L>=96&&p?L-96>>5:-1;P[to]=L,P.__keys__=j,o[L-64]=j,L=0?(R[T++]=(L&31)+96,R[T++]=H):R[T++]=L):(H>=0?(R[T++]=213,R[T++]=114,R[T++]=(L&31)+96,R[T++]=H):(R[T++]=212,R[T++]=114,R[T++]=L),z&&(y+=w*z),b.length>=c&&(b.shift()[to]=0),b.push(P),N(j))},je=(P,j,z,L)=>{let H=R,q=T,te=mt,X=r;R=Ia,T=0,r=0,R||(Ia=R=new Zl(8192)),mt=R.length-10,Y(P,j,L),Ia=R;let fe=T;if(R=H,T=q,mt=te,r=X,fe>1){let se=T+fe-1;se>mt&&U(se);let gt=z+r;R.copyWithin(gt+fe,gt+1,T),R.set(Ia.slice(0,fe),gt),T=se}else R[z+r]=Ia[0]},Qn=P=>{let j=H2(P,R,r,T,o,U,(z,L,H)=>{if(H)return i=!0;T=L;let q=R;return N(z),_(),q!==R?{position:T,targetView:ye,target:R}:T},this);if(j===0)return W(P);T=j}}useBuffer(t){R=t,ye=new DataView(R.buffer,R.byteOffset,R.byteLength),T=0}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}};pv=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,Ta];Hd=[{pack(e,t,n){let r=e.getTime()/1e3;if((this.useTimestamp32||e.getMilliseconds()===0)&&r>=0&&r<4294967296){let{target:i,targetView:o,position:a}=t(6);i[a++]=214,i[a++]=255,o.setUint32(a,r)}else if(r>0&&r<4294967296){let{target:i,targetView:o,position:a}=t(10);i[a++]=215,i[a++]=255,o.setUint32(a,e.getMilliseconds()*4e6+(r/1e3/4294967296>>0)),o.setUint32(a+4,r)}else if(isNaN(r)){if(this.onInvalidDate)return t(0),n(this.onInvalidDate());let{target:i,targetView:o,position:a}=t(3);i[a++]=212,i[a++]=255,i[a++]=255}else{let{target:i,targetView:o,position:a}=t(15);i[a++]=199,i[a++]=12,i[a++]=255,o.setUint32(a,e.getMilliseconds()*1e6),o.setBigInt64(a+4,BigInt(Math.floor(r)))}}},{pack(e,t,n){if(this.setAsEmptyObject)return t(0),n({});let r=Array.from(e),{target:i,position:o}=t(this.moreTypes?3:0);this.moreTypes&&(i[o++]=212,i[o++]=115,i[o++]=0),n(r)}},{pack(e,t,n){let{target:r,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=101,r[i++]=0),n([e.name,e.message,e.cause])}},{pack(e,t,n){let{target:r,position:i}=t(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=120,r[i++]=0),n([e.source,e.flags])}},{pack(e,t){this.moreTypes?fv(e,16,t):cv(Ql?k.from(e):new Uint8Array(e),t)}},{pack(e,t){let n=e.constructor;n!==mv&&this.moreTypes?fv(e,$d.indexOf(n.name),t):cv(e,t)}},{pack(e,t){let{target:n,position:r}=t(1);n[r]=193}}];function fv(e,t,n,r){let i=e.byteLength;if(i+1<256){var{target:o,position:a}=n(4+i);o[a++]=199,o[a++]=i+1}else if(i+1<65536){var{target:o,position:a}=n(5+i);o[a++]=200,o[a++]=i+1>>8,o[a++]=i+1&255}else{var{target:o,position:a,targetView:s}=n(7+i);o[a++]=201,s.setUint32(a,i+1),a+=4}o[a++]=116,o[a++]=t,e.buffer||(e=new Uint8Array(e)),o.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a)}function cv(e,t){let n=e.byteLength;var r,i;if(n<256){var{target:r,position:i}=t(n+2);r[i++]=196,r[i++]=n}else if(n<65536){var{target:r,position:i}=t(n+3);r[i++]=197,r[i++]=n>>8,r[i++]=n&255}else{var{target:r,position:i,targetView:o}=t(n+5);r[i++]=198,o.setUint32(i,n),i+=4}r.set(e,i)}function Y2(e,t,n,r){let i=e.length;switch(i){case 1:t[n++]=212;break;case 2:t[n++]=213;break;case 4:t[n++]=214;break;case 8:t[n++]=215;break;case 16:t[n++]=216;break;default:i<256?(t[n++]=199,t[n++]=i):i<65536?(t[n++]=200,t[n++]=i>>8,t[n++]=i&255):(t[n++]=201,t[n++]=i>>24,t[n++]=i>>16&255,t[n++]=i>>8&255,t[n++]=i&255)}return t[n++]=r,t.set(e,n),n+=i,n}function G2(e,t){let n,r=t.length*6,i=e.length-r;for(;n=t.pop();){let o=n.offset,a=n.id;e.copyWithin(o+r,o,i),r-=6;let s=o+r;e[s++]=214,e[s++]=105,e[s++]=a>>24,e[s++]=a>>16&255,e[s++]=a>>8&255,e[s++]=a&255,i=o}return e}function dv(e,t,n){if(Ie.length>0){ye.setUint32(Ie.position+e,T+n-Ie.position-e),Ie.stringsPosition=T-e;let r=Ie;Ie=null,t(r[0]),t(r[1])}}function Z2(e,t){return e.isCompatible=n=>{let r=!n||(t.lastNamedStructuresLength||0)===n.length;return r||t._mergeStructures(n),r},e}var hv=new oi({useRecords:!1}),q2=hv.pack,Q2=hv.pack;var{NEVER:K2,ALWAYS:X2,DECIMAL_ROUND:J2,DECIMAL_FIT:eE}=Gl,gv=512,tE=1024,nE=2048;m();g();h();m();g();h();m();g();h();var At=window;m();g();h();m();g();h();function Vd(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Yd(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Vd(n);return(i,o)=>r.then(a=>o(a.transaction(t,i).objectStore(t)))}var Wd;function yv(){return Wd||(Wd=Yd("keyval-store","keyval")),Wd}function Gd(e,t=yv()){return t("readonly",n=>Vd(n.get(e)))}function Kl(e,t,n=yv()){return n("readwrite",r=>(r.put(t,e),Vd(r.transaction)))}var Or=async(e,t)=>{let n=B.comp;for(let i of e)i&&i.type!=="text"&&Xl(i,t);let r=Object.keys(n.pending);if(r.length>0)try{let i=await(await fetch(B.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,a]of Object.entries(i))delete n.pending[o],n.list[o]=a,await Kl(`comp-${o}`,a);if(Object.keys(n.pending).length>0){console.error(`Warning: component not found: ${Object.keys(n.pending)}`);return}await Or(Object.values(i))}catch(i){console.error(i)}},Xl=(e,t)=>{let n=B.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&Xl(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&Xl(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&Xl(i,t)}};m();g();h();m();g();h();var no={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Jl(e={}){let t={options:e,rootNode:wv(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)vv(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>rE(t,n(r)),insert:(r,i)=>vv(t,n(r),i),remove:r=>iE(t,n(r))}}function rE(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,a=null,s=e.rootNode,u=null;for(let f=0;f1){let c=r.length-f;s=s.placeholderChildren.find(p=>p.maxDepth===c)||null}else s=s.placeholderChildren[0]||null;if(!s)break;s.paramName&&(i[s.paramName]=l),o=!0}else s=d}return(s===null||s.data===null)&&a!==null&&(s=a,i[s.paramName||"_"]=u,o=!0),s?o?{...s.data,params:o?i:void 0}:s.data:null}function vv(e,t,n){let r=!0,i=t.split("/"),o=e.rootNode,a=0,s=[o];for(let u of i){let f;if(f=o.children.get(u))o=f;else{let l=oE(u);f=wv({type:l,parent:o}),o.children.set(u,f),l===no.PLACEHOLDER?(f.paramName=u==="*"?`_${a++}`:u.slice(1),o.placeholderChildren.push(f),r=!1):l===no.WILDCARD&&(o.wildcardChildNode=f,f.paramName=u.slice(3)||"_",r=!1),s.push(f),o=f}}for(let[u,f]of s.entries())f.maxDepth=Math.max(s.length-u,f.maxDepth||0);return o.data=n,r===!0&&(e.staticRoutesMap[t]=o),o}function iE(e,t){let n=!1,r=t.split("/"),i=e.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r.at(-1)||"";i.data=null,Object.keys(i.children).length===0&&i.parent&&(i.parent.children.delete(o),i.parent.wildcardChildNode=null,i.parent.placeholderChildren=[]),n=!0}return n}function wv(e={}){return{type:e.type||no.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function oE(e){return e.startsWith("**")?no.WILDCARD:e[0]===":"||e==="*"?no.PLACEHOLDER:no.NORMAL}m();g();h();m();g();h();m();g();h();m();g();h();m();g();h();m();g();h();function Pa(e,t){return function(){return e.apply(t,arguments)}}var{toString:aE}=Object.prototype,{getPrototypeOf:Qd}=Object,tu=(e=>t=>{let n=aE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sn=e=>(e=e.toLowerCase(),t=>tu(t)===e),nu=e=>t=>typeof t===e,{isArray:ro}=Array,Na=nu("undefined");function sE(e){return e!==null&&!Na(e)&&e.constructor!==null&&!Na(e.constructor)&&Gt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Sv=sn("ArrayBuffer");function lE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sv(e.buffer),t}var uE=nu("string"),Gt=nu("function"),kv=nu("number"),ru=e=>e!==null&&typeof e=="object",fE=e=>e===!0||e===!1,eu=e=>{if(tu(e)!=="object")return!1;let t=Qd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cE=sn("Date"),dE=sn("File"),pE=sn("Blob"),mE=sn("FileList"),hE=e=>ru(e)&&Gt(e.pipe),gE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Gt(e.append)&&((t=tu(e))==="formdata"||t==="object"&&Gt(e.toString)&&e.toString()==="[object FormData]"))},yE=sn("URLSearchParams"),[vE,wE,_E,xE]=["ReadableStream","Request","Response","Headers"].map(sn),SE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Aa(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ro(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Ev=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ov=e=>!Na(e)&&e!==Ev;function qd(){let{caseless:e}=Ov(this)&&this||{},t={},n=(r,i)=>{let o=e&&bv(t,i)||i;eu(t[o])&&eu(r)?t[o]=qd(t[o],r):eu(r)?t[o]=qd({},r):ro(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Aa(t,(i,o)=>{n&&Gt(i)?e[o]=Pa(i,n):e[o]=i},{allOwnKeys:r}),e),bE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EE=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},OE=(e,t,n,r)=>{let i,o,a,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Qd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CE=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},TE=e=>{if(!e)return null;if(ro(e))return e;let t=e.length;if(!kv(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},RE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Qd(Uint8Array)),IE=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},PE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},NE=sn("HTMLFormElement"),AE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),_v=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),DE=sn("RegExp"),Cv=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Aa(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},ME=e=>{Cv(e,(t,n)=>{if(Gt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(Gt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},LE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ro(e)?r(e):r(String(e).split(t)),n},UE=()=>{},FE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Zd="abcdefghijklmnopqrstuvwxyz",xv="0123456789",Tv={DIGIT:xv,ALPHA:Zd,ALPHA_DIGIT:Zd+Zd.toUpperCase()+xv},jE=(e=16,t=Tv.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function zE(e){return!!(e&&Gt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var BE=e=>{let t=new Array(10),n=(r,i)=>{if(ru(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ro(r)?[]:{};return Aa(r,(a,s)=>{let u=n(a,i+1);!Na(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},$E=sn("AsyncFunction"),HE=e=>e&&(ru(e)||Gt(e))&&Gt(e.then)&&Gt(e.catch),I={isArray:ro,isArrayBuffer:Sv,isBuffer:sE,isFormData:gE,isArrayBufferView:lE,isString:uE,isNumber:kv,isBoolean:fE,isObject:ru,isPlainObject:eu,isReadableStream:vE,isRequest:wE,isResponse:_E,isHeaders:xE,isUndefined:Na,isDate:cE,isFile:dE,isBlob:pE,isRegExp:DE,isFunction:Gt,isStream:hE,isURLSearchParams:yE,isTypedArray:RE,isFileList:mE,forEach:Aa,merge:qd,extend:kE,trim:SE,stripBOM:bE,inherits:EE,toFlatObject:OE,kindOf:tu,kindOfTest:sn,endsWith:CE,toArray:TE,forEachEntry:IE,matchAll:PE,isHTMLForm:NE,hasOwnProperty:_v,hasOwnProp:_v,reduceDescriptors:Cv,freezeMethods:ME,toObjectSet:LE,toCamelCase:AE,noop:UE,toFiniteNumber:FE,findKey:bv,global:Ev,isContextDefined:Ov,ALPHABET:Tv,generateString:jE,isSpecCompliantForm:zE,toJSONObject:BE,isAsyncFn:$E,isThenable:HE};m();g();h();m();g();h();m();g();h();m();g();h();m();g();h();function io(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}I.inherits(io,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Rv=io.prototype,Iv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Iv[e]={value:e}});Object.defineProperties(io,Iv);Object.defineProperty(Rv,"isAxiosError",{value:!0});io.from=(e,t,n,r,i,o)=>{let a=Object.create(Rv);return I.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),io.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var Q=io;m();g();h();var iu=null;function Kd(e){return I.isPlainObject(e)||I.isArray(e)}function Nv(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function Pv(e,t,n){return e?e.concat(t).map(function(i,o){return i=Nv(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function WE(e){return I.isArray(e)&&!e.some(Kd)}var VE=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function YE(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new(iu||FormData),n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!I.isUndefined(b[S])});let r=n.metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(I.isDate(v))return v.toISOString();if(!u&&I.isBlob(v))throw new Q("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(v)||I.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):k.from(v):v}function l(v,S,b){let y=v;if(v&&!b&&typeof v=="object"){if(I.endsWith(S,"{}"))S=r?S:S.slice(0,-2),v=JSON.stringify(v);else if(I.isArray(v)&&WE(v)||(I.isFileList(v)||I.endsWith(S,"[]"))&&(y=I.toArray(v)))return S=Nv(S),y.forEach(function(_,x){!(I.isUndefined(_)||_===null)&&t.append(a===!0?Pv([S],x,o):a===null?S:S+"[]",f(_))}),!1}return Kd(v)?!0:(t.append(Pv(b,S,o),f(v)),!1)}let d=[],c=Object.assign(VE,{defaultVisitor:l,convertValue:f,isVisitable:Kd});function p(v,S){if(!I.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));d.push(v),I.forEach(v,function(y,w){(!(I.isUndefined(y)||y===null)&&i.call(t,y,I.isString(w)?w.trim():w,S,c))===!0&&p(y,S?S.concat(w):[w])}),d.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Cr=YE;function Av(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Dv(e,t){this._pairs=[],e&&Cr(e,this,t)}var Mv=Dv.prototype;Mv.append=function(t,n){this._pairs.push([t,n])};Mv.toString=function(t){let n=t?function(r){return t.call(this,r,Av)}:Av;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var ou=Dv;function GE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Da(e,t,n){if(!t)return e;let r=n&&n.encode||GE,i=n&&n.serialize,o;if(i?o=i(t,n):o=I.isURLSearchParams(t)?t.toString():new ou(t,n).toString(r),o){let a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}m();g();h();var Xd=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(r){r!==null&&t(r)})}},Jd=Xd;m();g();h();m();g();h();m();g();h();m();g();h();var au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};m();g();h();m();g();h();m();g();h();m();g();h();var Lv=typeof URLSearchParams<"u"?URLSearchParams:ou;m();g();h();var Uv=typeof FormData<"u"?FormData:null;m();g();h();var Fv=typeof Blob<"u"?Blob:null;var jv={isBrowser:!0,classes:{URLSearchParams:Lv,FormData:Uv,Blob:Fv},protocols:["http","https","file","blob","url","data"]};var tp={};lS(tp,{hasBrowserEnv:()=>ep,hasStandardBrowserEnv:()=>ZE,hasStandardBrowserWebWorkerEnv:()=>qE,origin:()=>QE});m();g();h();var ep=typeof window<"u"&&typeof document<"u",ZE=(e=>ep&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),qE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QE=ep&&window.location.href||"http://localhost";var Ze={...tp,...jv};function np(e,t){return Cr(e,new Ze.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ze.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}m();g();h();function KE(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function XE(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return a=!a&&I.isArray(i)?i.length:a,u?(I.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!I.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&I.isArray(i[a])&&(i[a]=XE(i[a])),!s)}if(I.isFormData(e)&&I.isFunction(e.entries)){let n={};return I.forEachEntry(e,(r,i)=>{t(KE(r),i,n,0)}),n}return null}var su=JE;function eO(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var rp={transitional:au,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=I.isObject(t);if(o&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return i?JSON.stringify(su(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return np(t,this.formSerializer).toString();if((s=I.isFileList(t))||r.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Cr(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),eO(t)):t}],transformResponse:[function(t){let n=this.transitional||rp.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(r&&!this.responseType||i)){let a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Q.from(s,Q.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ze.classes.FormData,Blob:Ze.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{rp.headers[e]={}});var oo=rp;m();g();h();m();g();h();var tO=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zv=e=>{let t={},n,r,i;return e&&e.split(` +`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&tO[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var Bv=Symbol("internals");function Ma(e){return e&&String(e).trim().toLowerCase()}function lu(e){return e===!1||e==null?e:I.isArray(e)?e.map(lu):String(e)}function nO(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var rO=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ip(e,t,n,r,i){if(I.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function iO(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oO(e,t){let n=I.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}var ao=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,u,f){let l=Ma(u);if(!l)throw new Error("header name must be a non-empty string");let d=I.findKey(i,l);(!d||i[d]===void 0||f===!0||f===void 0&&i[d]!==!1)&&(i[d||u]=lu(s))}let a=(s,u)=>I.forEach(s,(f,l)=>o(f,l,u));if(I.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(I.isString(t)&&(t=t.trim())&&!rO(t))a(zv(t),n);else if(I.isHeaders(t))for(let[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ma(t),t){let r=I.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return nO(i);if(I.isFunction(n))return n.call(this,i,r);if(I.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ma(t),t){let r=I.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ip(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(a){if(a=Ma(a),a){let s=I.findKey(r,a);s&&(!n||ip(r,r[s],s,n))&&(delete r[s],i=!0)}}return I.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||ip(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return I.forEach(this,(i,o)=>{let a=I.findKey(r,o);if(a){n[a]=lu(i),delete n[o];return}let s=t?iO(o):String(o).trim();s!==o&&delete n[o],n[s]=lu(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return I.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&I.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[Bv]=this[Bv]={accessors:{}}).accessors,i=this.prototype;function o(a){let s=Ma(a);r[s]||(oO(i,a),r[s]=!0)}return I.isArray(t)?t.forEach(o):o(t),this}};ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(ao.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(ao);var $e=ao;function La(e,t){let n=this||oo,r=t||n,i=$e.from(r.headers),o=r.data;return I.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}m();g();h();function Ua(e){return!!(e&&e.__CANCEL__)}m();g();h();function $v(e,t,n){Q.call(this,e??"canceled",Q.ERR_CANCELED,t,n),this.name="CanceledError"}I.inherits($v,Q,{__CANCEL__:!0});var vn=$v;m();g();h();m();g();h();m();g();h();function Fa(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}m();g();h();function op(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}m();g();h();m();g();h();function aO(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){let f=Date.now(),l=r[o];a||(a=f),n[i]=u,r[i]=f;let d=o,c=0;for(;d!==i;)c+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-ar)return i&&(clearTimeout(i),i=null),n=s,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(s-n)))}}var Wv=sO;var so=(e,t,n=3)=>{let r=0,i=Hv(50,250);return Wv(o=>{let a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,f=i(u),l=a<=s;r=a;let d={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:f||void 0,estimated:f&&s&&l?(s-a)/f:void 0,event:o,lengthComputable:s!=null};d[t?"download":"upload"]=!0,e(d)},n)};m();g();h();m();g();h();var Vv=Ze.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){let s=I.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();m();g();h();var Yv=Ze.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let a=[e+"="+encodeURIComponent(t)];I.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),I.isString(r)&&a.push("path="+r),I.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};m();g();h();m();g();h();function ap(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}m();g();h();function sp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ja(e,t){return e&&!ap(t)?sp(e,t):t}m();g();h();var Gv=e=>e instanceof $e?{...e}:e;function ln(e,t){t=t||{};let n={};function r(f,l,d){return I.isPlainObject(f)&&I.isPlainObject(l)?I.merge.call({caseless:d},f,l):I.isPlainObject(l)?I.merge({},l):I.isArray(l)?l.slice():l}function i(f,l,d){if(I.isUndefined(l)){if(!I.isUndefined(f))return r(void 0,f,d)}else return r(f,l,d)}function o(f,l){if(!I.isUndefined(l))return r(void 0,l)}function a(f,l){if(I.isUndefined(l)){if(!I.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function s(f,l,d){if(d in t)return r(f,l);if(d in e)return r(void 0,f)}let u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(f,l)=>i(Gv(f),Gv(l),!0)};return I.forEach(Object.keys(Object.assign({},e,t)),function(l){let d=u[l]||i,c=d(e[l],t[l],l);I.isUndefined(c)&&d!==s||(n[l]=c)}),n}var uu=e=>{let t=ln({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=$e.from(a),t.url=Da(ja(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(I.isFormData(n)){if(Ze.hasStandardBrowserEnv||Ze.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){let[f,...l]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([f||"multipart/form-data",...l].join("; "))}}if(Ze.hasStandardBrowserEnv&&(r&&I.isFunction(r)&&(r=r(t)),r||r!==!1&&Vv(t.url))){let f=i&&o&&Yv.read(o);f&&a.set(i,f)}return t};var lO=typeof XMLHttpRequest<"u",Zv=lO&&function(e){return new Promise(function(n,r){let i=uu(e),o=i.data,a=$e.from(i.headers).normalize(),{responseType:s}=i,u;function f(){i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let l=new XMLHttpRequest;l.open(i.method.toUpperCase(),i.url,!0),l.timeout=i.timeout;function d(){if(!l)return;let p=$e.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),S={data:!s||s==="text"||s==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};Fa(function(y){n(y),f()},function(y){r(y),f()},S),l=null}"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(r(new Q("Request aborted",Q.ECONNABORTED,i,l)),l=null)},l.onerror=function(){r(new Q("Network Error",Q.ERR_NETWORK,i,l)),l=null},l.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",S=i.transitional||au;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new Q(v,S.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,i,l)),l=null},o===void 0&&a.setContentType(null),"setRequestHeader"in l&&I.forEach(a.toJSON(),function(v,S){l.setRequestHeader(S,v)}),I.isUndefined(i.withCredentials)||(l.withCredentials=!!i.withCredentials),s&&s!=="json"&&(l.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&l.addEventListener("progress",so(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",so(i.onUploadProgress)),(i.cancelToken||i.signal)&&(u=p=>{l&&(r(!p||p.type?new vn(null,e,l):p),l.abort(),l=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));let c=op(i.url);if(c&&Ze.protocols.indexOf(c)===-1){r(new Q("Unsupported protocol "+c+":",Q.ERR_BAD_REQUEST,e));return}l.send(o||null)})};m();g();h();m();g();h();var uO=(e,t)=>{let n=new AbortController,r,i=function(u){if(!r){r=!0,a();let f=u instanceof Error?u:this.reason;n.abort(f instanceof Q?f:new vn(f instanceof Error?f.message:f))}},o=t&&setTimeout(()=>{i(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",i):u.unsubscribe(i))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",i));let{signal:s}=n;return s.unsubscribe=a,[s,()=>{o&&clearTimeout(o),o=null}]},qv=uO;m();g();h();var fO=function*(e,t){let n=e.byteLength;if(!t||n{let o=cO(e,t,i),a=0;return new ReadableStream({type:"bytes",async pull(s){let{done:u,value:f}=await o.next();if(u){s.close(),r();return}let l=f.byteLength;n&&n(a+=l),s.enqueue(new Uint8Array(f))},cancel(s){return r(s),o.return()}},{highWaterMark:2})};var Qv=(e,t)=>{let n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},cu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xv=cu&&typeof ReadableStream=="function",up=cu&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dO=Xv&&(()=>{let e=!1,t=new Request(Ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Kv=64*1024,fp=Xv&&!!(()=>{try{return I.isReadableStream(new Response("").body)}catch{}})(),fu={stream:fp&&(e=>e.body)};cu&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fu[t]&&(fu[t]=I.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Q(`Response type '${t}' is not supported`,Q.ERR_NOT_SUPPORT,r)})})})(new Response);var pO=async e=>{if(e==null)return 0;if(I.isBlob(e))return e.size;if(I.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(I.isArrayBufferView(e))return e.byteLength;if(I.isURLSearchParams(e)&&(e=e+""),I.isString(e))return(await up(e)).byteLength},mO=async(e,t)=>{let n=I.toFiniteNumber(e.getContentLength());return n??pO(t)},Jv=cu&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:f,headers:l,withCredentials:d="same-origin",fetchOptions:c}=uu(e);f=f?(f+"").toLowerCase():"text";let[p,v]=i||o||a?qv([i,o],a):[],S,b,y=()=>{!S&&setTimeout(()=>{p&&p.unsubscribe()}),S=!0},w;try{if(u&&dO&&n!=="get"&&n!=="head"&&(w=await mO(l,r))!==0){let D=new Request(t,{method:"POST",body:r,duplex:"half"}),A;I.isFormData(r)&&(A=D.headers.get("content-type"))&&l.setContentType(A),D.body&&(r=lp(D.body,Kv,Qv(w,so(u)),null,up))}I.isString(d)||(d=d?"cors":"omit"),b=new Request(t,{...c,signal:p,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let _=await fetch(b),x=fp&&(f==="stream"||f==="response");if(fp&&(s||x)){let D={};["status","statusText","headers"].forEach(M=>{D[M]=_[M]});let A=I.toFiniteNumber(_.headers.get("content-length"));_=new Response(lp(_.body,Kv,s&&Qv(A,so(s,!0)),x&&y,up),D)}f=f||"text";let N=await fu[I.findKey(fu,f)||"text"](_,e);return!x&&y(),v&&v(),await new Promise((D,A)=>{Fa(D,A,{data:N,headers:$e.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:b})})}catch(_){throw y(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,b),{cause:_.cause||_}):Q.from(_,_&&_.code,e,b)}});var cp={http:iu,xhr:Zv,fetch:Jv};I.forEach(cp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var ew=e=>`- ${e}`,hO=e=>I.isFunction(e)||e===null||e===!1,du={getAdapter:e=>{e=I.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build")),a=t?o.length>1?`since : +`+o.map(ew).join(` +`):" "+ew(o[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:cp};function dp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vn(null,e)}function pu(e){return dp(e),e.headers=$e.from(e.headers),e.data=La.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),du.getAdapter(e.adapter||oo.adapter)(e).then(function(r){return dp(e),r.data=La.call(e,e.transformResponse,r),r.headers=$e.from(r.headers),r},function(r){return Ua(r)||(dp(e),r&&r.response&&(r.response.data=La.call(e,e.transformResponse,r.response),r.response.headers=$e.from(r.response.headers))),Promise.reject(r)})}m();g();h();m();g();h();var mu="1.7.2";var pp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var tw={};pp.transitional=function(t,n,r){function i(o,a){return"[Axios v"+mu+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Q(i(a," has been removed"+(n?" in "+n:"")),Q.ERR_DEPRECATED);return n&&!tw[a]&&(tw[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function gO(e,t,n){if(typeof e!="object")throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],a=t[o];if(a){let s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Q("option "+o+" must be "+u,Q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Q("Unknown option "+o,Q.ERR_BAD_OPTION)}}var hu={assertOptions:gO,validators:pp};var Tr=hu.validators,lo=class{constructor(t){this.defaults=t,this.interceptors={request:new Jd,response:new Jd}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ln(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&hu.assertOptions(r,{silentJSONParsing:Tr.transitional(Tr.boolean),forcedJSONParsing:Tr.transitional(Tr.boolean),clarifyTimeoutError:Tr.transitional(Tr.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:hu.assertOptions(i,{encode:Tr.function,serialize:Tr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&I.merge(o.common,o[n.method]);o&&I.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=$e.concat(a,o);let s=[],u=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(u=u&&S.synchronous,s.unshift(S.fulfilled,S.rejected))});let f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let l,d=0,c;if(!u){let v=[pu.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,f),c=v.length,l=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new vn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},nw=mp;m();g();h();function hp(e){return function(n){return e.apply(null,n)}}m();g();h();function gp(e){return I.isObject(e)&&e.isAxiosError===!0}m();g();h();var yp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yp).forEach(([e,t])=>{yp[t]=e});var rw=yp;function iw(e){let t=new za(e),n=Pa(za.prototype.request,t);return I.extend(n,za.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return iw(ln(e,i))},n}var Fe=iw(oo);Fe.Axios=za;Fe.CanceledError=vn;Fe.CancelToken=nw;Fe.isCancel=Ua;Fe.VERSION=mu;Fe.toFormData=Cr;Fe.AxiosError=Q;Fe.Cancel=Fe.CanceledError;Fe.all=function(t){return Promise.all(t)};Fe.spread=hp;Fe.isAxiosError=gp;Fe.mergeConfig=ln;Fe.AxiosHeaders=$e;Fe.formToJSON=e=>su(I.isHTMLForm(e)?new FormData(e):e);Fe.getAdapter=du.getAdapter;Fe.HttpStatusCode=rw;Fe.default=Fe;var gu=Fe;var{Axios:Dz,AxiosError:Mz,CanceledError:Lz,isCancel:Uz,CancelToken:Fz,VERSION:jz,all:zz,Cancel:Bz,isAxiosError:$z,spread:Hz,toFormData:Wz,AxiosHeaders:Vz,HttpStatusCode:Yz,formToJSON:Gz,getAdapter:Zz,mergeConfig:qz}=gu;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var yO=typeof window<"u"?window:null,ow=typeof global<"u"?global:void 0,yu=async(e,t,n,r)=>{let i={...n},o=null,a=!1,s=null,u=[];if(Array.isArray(t))for(let c of t)c instanceof File&&(u.push(c),a=!0),typeof c=="function"&&(s=c);else t instanceof File&&(a=!0,u.push(t));if(!a)o=JSON.stringify(t),i["content-type"]="aplication/json";else{let c=new FormData;for(let p of u)c.append(p.name,p);o=c,delete i["content-type"],i.enctype="multipart/form-data;"}let f=new URL(e);if(yO!==null){let c=new URL(location.href),p="";if(f.host===c.host||ow&&typeof ow.server_hook=="function"?p=f.toString():p=`${c.protocol}//${c.host}/_proxy/${encodeURIComponent(f.toString())}`,p){if(s)return(await gu({method:t?"post":void 0,url:p,data:o,onUploadProgress:s})).data;{let S=await(await fetch(p,t?{method:"POST",body:o,headers:i}:void 0)).text();if(r===!1)return S;try{return JSON.parse(S,aw)}catch{return S}}}}let d=await(await fetch(f,t?{method:"POST",body:o,headers:i}:void 0)).text();try{return JSON.parse(d,aw)}catch{return d}},aw=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;m();g();h();var bw=G(kw()),Ew=async(e,t)=>{let n=(0,bw.default)(e,"/"),r=YO(n);await new Promise(i=>{let o=document,a=o.createElement("script");a.onload=async()=>{i()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let s=localStorage.getItem("api-ts-"+n),u=new URL(n),f=new URL(location.href),l="";u.host!==f.host&&(l="&remote=1"),t?a.src=`/_prasi/load.js?url=${n}&v3&dev=1&ts=${s}${l}`:a.src=`/_prasi/load.js?url=${n}&v3&ts=${s}${l}`,a.onerror=()=>{i()},document.querySelector(`script[src="${a.src}"]`)?i():o.body.appendChild(a)})},YO=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`};var Ba={},Cw=e=>{At.prasiApi||(At.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return At.prasiApi[n]||Ba[n]||(Ba[n]=Ew(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(a,s)=>{let u=new URL(n);u.pathname=a.split("/").filter(d=>d).join("/");let f=new URL(location.href),l="";return u.host===f.host||s===!1?l=u.toString():l=`${f.protocol}//${f.host}/_proxy/${encodeURIComponent(u.toString())}`,l};let o=a=>function(...s){return new Promise(async(u,f)=>{try{let l=At.prasiApi[n];if(!l&&Ba&&typeof Ba[n]=="object"&&(await Ba[n],l=At.prasiApi[n]),l){if(a==="_raw"){let p=s[0],v=`${n}${p}`,S=await Ow(v,s.slice(1));u(S);return}if(l.apiEntry||(l.apiEntry={}),l.apiEntry&&!l.apiEntry[a]){f(`API ${a.toString()} not found, existing API: + - ${Object.keys(l.apiEntry||{}).join(` + - `)}`);return}let d=l.apiEntry[a].url,c=l.apiEntry[a].args;if(d&&c){if(s.length>0&&c.length>0)for(let[S,b]of Object.entries(s)){let y=c[parseInt(S)];c&&c.includes(y)&&b&&typeof b!="string"&&typeof b!="number"||(d=d.replace(`:${y}?`,b+""),d=d.replace(`:${y}`,b+""))}let p=`${n}${d}`,v=await Ow(p,s);u(v)}else console.error(`API Not Found: ${a.toString()}`)}else f("Failed to load API [Proxy]: "+n)}catch(l){f(l)}})};return i==="then"?new Proxy({},{get:(a,s)=>o(s)}):o(i)}})}catch{return null}},Ow=async(e,t)=>await yu(e,t,{"content-type":"application/json"});m();g();h();var K_=G(Iw());m();g();h();function ho(e){let t=e.length;for(;--t>=0;)e[t]=0}var KO=0,h_=1,XO=2,JO=3,eC=258,Wp=29,ns=256,Za=ns+1+Wp,co=30,Vp=19,g_=2*Za+1,ai=15,xp=16,tC=7,Yp=256,y_=16,v_=17,w_=18,Mp=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ku=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),nC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),__=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rC=512,Hn=new Array((Za+2)*2);ho(Hn);var Va=new Array(co*2);ho(Va);var qa=new Array(rC);ho(qa);var Qa=new Array(eC-JO+1);ho(Qa);var Gp=new Array(Wp);ho(Gp);var bu=new Array(co);ho(bu);function Sp(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var x_,S_,k_;function kp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var b_=e=>e<256?qa[e]:qa[256+(e>>>7)],Ka=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},bt=(e,t,n)=>{e.bi_valid>xp-n?(e.bi_buf|=t<>xp-e.bi_valid,e.bi_valid+=n-xp):(e.bi_buf|=t<{bt(e,n[t*2],n[t*2+1])},E_=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},iC=e=>{e.bi_valid===16?(Ka(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},oC=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,f,l,d,c,p,v,S=0;for(c=0;c<=ai;c++)e.bl_count[c]=0;for(n[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;fu&&(c=u,S++),n[l*2+1]=c,!(l>r)&&(e.bl_count[c]++,p=0,l>=s&&(p=a[l-s]),v=n[l*2],e.opt_len+=v*(c+p),o&&(e.static_len+=v*(i[l*2+1]+p)));if(S!==0){do{for(c=u-1;e.bl_count[c]===0;)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[u]--,S-=2}while(S>0);for(c=u;c!==0;c--)for(l=e.bl_count[c];l!==0;)d=e.heap[--f],!(d>r)&&(n[d*2+1]!==c&&(e.opt_len+=(c-n[d*2+1])*n[d*2],n[d*2+1]=c),l--)}},O_=(e,t,n)=>{let r=new Array(ai+1),i=0,o,a;for(o=1;o<=ai;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=E_(r[s]++,s))}},aC=()=>{let e,t,n,r,i,o=new Array(ai+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?Ka(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Pw=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?_n(e,i,t):(a=Qa[i],_n(e,a+ns+1,t),s=Mp[a],s!==0&&(i-=Gp[a],bt(e,i,s)),r--,a=b_(r),_n(e,a,n),s=ku[a],s!==0&&(r-=bu[a],bt(e,r,s)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,u=-1,f;for(e.heap_len=0,e.heap_max=g_,a=0;a>1;a>=1;a--)bp(e,n,a);f=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],bp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[f*2]=n[a*2]+n[s*2],e.depth[f]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=f,e.heap[1]=f++,bp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],oC(e,t),O_(n,u,e.bl_count)},Aw=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,u=7,f=4;for(a===0&&(u=138,f=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s{let r,i=-1,o,a=t[0*2+1],s=0,u=7,f=4;for(a===0&&(u=138,f=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s{let t;for(Aw(e,e.dyn_ltree,e.l_desc.max_code),Aw(e,e.dyn_dtree,e.d_desc.max_code),Lp(e,e.bl_desc),t=Vp-1;t>=3&&e.bl_tree[__[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},lC=(e,t,n,r)=>{let i;for(bt(e,t-257,5),bt(e,n-1,5),bt(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{Mw||(aC(),Mw=!0),e.l_desc=new kp(e.dyn_ltree,x_),e.d_desc=new kp(e.dyn_dtree,S_),e.bl_desc=new kp(e.bl_tree,k_),e.bi_buf=0,e.bi_valid=0,C_(e)},R_=(e,t,n,r)=>{bt(e,(KO<<1)+(r?1:0),3),T_(e),Ka(e,n),Ka(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},cC=e=>{bt(e,h_<<1,3),_n(e,Yp,Hn),iC(e)},dC=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=uC(e)),Lp(e,e.l_desc),Lp(e,e.d_desc),a=sC(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?R_(e,t,n,r):e.strategy===4||o===i?(bt(e,(h_<<1)+(r?1:0),3),Nw(e,Hn,Va)):(bt(e,(XO<<1)+(r?1:0),3),lC(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Nw(e,e.dyn_ltree,e.dyn_dtree)),C_(e),r&&T_(e)},pC=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Qa[n]+ns+1)*2]++,e.dyn_dtree[b_(t)*2]++),e.sym_next===e.sym_end),mC=fC,hC=R_,gC=dC,yC=pC,vC=cC,wC={_tr_init:mC,_tr_stored_block:hC,_tr_flush_block:gC,_tr_tally:yC,_tr_align:vC},_C=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0},Xa=_C,xC=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},SC=new Uint32Array(xC()),kC=(e,t,n,r)=>{let i=SC,o=r+n;e^=-1;for(let a=r;a>>8^i[(e^t[a])&255];return e^-1},qe=kC,ui={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},di={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:bC,_tr_stored_block:Up,_tr_flush_block:EC,_tr_tally:Pr,_tr_align:OC}=wC,{Z_NO_FLUSH:Nr,Z_PARTIAL_FLUSH:CC,Z_FULL_FLUSH:TC,Z_FINISH:Zt,Z_BLOCK:Lw,Z_OK:et,Z_STREAM_END:Uw,Z_STREAM_ERROR:xn,Z_DATA_ERROR:RC,Z_BUF_ERROR:Ep,Z_DEFAULT_COMPRESSION:IC,Z_FILTERED:PC,Z_HUFFMAN_ONLY:vu,Z_RLE:NC,Z_FIXED:AC,Z_DEFAULT_STRATEGY:DC,Z_UNKNOWN:MC,Z_DEFLATED:Cu}=di,LC=9,UC=15,FC=8,jC=29,zC=256,Fp=zC+1+jC,BC=30,$C=19,HC=2*Fp+1,WC=15,ae=3,Ir=258,Sn=Ir+ae+1,VC=32,po=42,Zp=57,jp=69,zp=73,Bp=91,$p=103,si=113,Ha=666,ht=1,go=2,fi=3,yo=4,YC=3,li=(e,t)=>(e.msg=ui[t],t),Fw=e=>e*2-(e>4?9:0),Rr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},GC=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},ZC=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Mt=(e,t)=>{EC(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Dt(e.strm)},de=(e,t)=>{e.pending_buf[e.pending++]=t},$a=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Hp=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Xa(e.adler,t,i,n):e.state.wrap===2&&(e.adler=qe(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},I_=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Sn?e.strstart-(e.w_size-Sn):0,f=e.window,l=e.w_mask,d=e.prev,c=e.strstart+Ir,p=f[r+a-1],v=f[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(f[i+a]!==v||f[i+a-1]!==p||f[i]!==f[r]||f[++i]!==f[r+1])){r+=2,i++;do;while(f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&f[++r]===f[++i]&&ra){if(e.match_start=t,a=o,o>=s)break;p=f[r+a-1],v=f[r+a]}}while((t=d[t&l])>u&&--n!==0);return a<=e.lookahead?a:e.lookahead},mo=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Sn)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),GC(e),r+=t),e.strm.avail_in===0)break;if(n=Hp(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ae)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Ar(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Ar(e,e.ins_h,e.window[i+ae-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Dt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Hp(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(a===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Hp(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===Zt)&&t!==Nr&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===Zt&&e.strm.avail_in===0&&r===i?1:0,Up(e,e.block_start,r,a),e.block_start+=r,Dt(e.strm)),a?fi:ht)},Op=(e,t)=>{let n,r;for(;;){if(e.lookahead=ae&&(e.ins_h=Ar(e,e.ins_h,e.window[e.strstart+ae-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Sn&&(e.match_length=I_(e,n)),e.match_length>=ae)if(r=Pr(e,e.strstart-e.match_start,e.match_length-ae),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ae){e.match_length--;do e.strstart++,e.ins_h=Ar(e,e.ins_h,e.window[e.strstart+ae-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Ar(e,e.ins_h,e.window[e.strstart+1]);else r=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Mt(e,!1),e.strm.avail_out===0))return ht}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=ae&&(e.ins_h=Ar(e,e.ins_h,e.window[e.strstart+ae-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ae-1,n!==0&&e.prev_length4096)&&(e.match_length=ae-1)),e.prev_length>=ae&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ae,r=Pr(e,e.strstart-1-e.prev_match,e.prev_length-ae),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Ar(e,e.ins_h,e.window[e.strstart+ae-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ae-1,e.strstart++,r&&(Mt(e,!1),e.strm.avail_out===0))return ht}else if(e.match_available){if(r=Pr(e,0,e.window[e.strstart-1]),r&&Mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ht}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Pr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,a=e.window;for(;;){if(e.lookahead<=Ir){if(mo(e),e.lookahead<=Ir&&t===Nr)return ht;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ae&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+Ir;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ae?(n=Pr(e,1,e.match_length-ae),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Mt(e,!1),e.strm.avail_out===0))return ht}return e.insert=0,t===Zt?(Mt(e,!0),e.strm.avail_out===0?fi:yo):e.sym_next&&(Mt(e,!1),e.strm.avail_out===0)?ht:go},QC=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(mo(e),e.lookahead===0)){if(t===Nr)return ht;break}if(e.match_length=0,n=Pr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Mt(e,!1),e.strm.avail_out===0))return ht}return e.insert=0,t===Zt?(Mt(e,!0),e.strm.avail_out===0?fi:yo):e.sym_next&&(Mt(e,!1),e.strm.avail_out===0)?ht:go};function wn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Wa=[new wn(0,0,0,0,P_),new wn(4,4,8,4,Op),new wn(4,5,16,8,Op),new wn(4,6,32,32,Op),new wn(4,4,16,16,uo),new wn(8,16,32,32,uo),new wn(8,16,128,128,uo),new wn(8,32,128,256,uo),new wn(32,128,258,1024,uo),new wn(32,258,258,4096,uo)],KC=e=>{e.window_size=2*e.w_size,Rr(e.head),e.max_lazy_match=Wa[e.level].max_lazy,e.good_match=Wa[e.level].good_length,e.nice_match=Wa[e.level].nice_length,e.max_chain_length=Wa[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ae-1,e.match_available=0,e.ins_h=0};function XC(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Cu,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HC*2),this.dyn_dtree=new Uint16Array((2*BC+1)*2),this.bl_tree=new Uint16Array((2*$C+1)*2),Rr(this.dyn_ltree),Rr(this.dyn_dtree),Rr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(WC+1),this.heap=new Uint16Array(2*Fp+1),Rr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Fp+1),Rr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var rs=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==po&&t.status!==Zp&&t.status!==jp&&t.status!==zp&&t.status!==Bp&&t.status!==$p&&t.status!==si&&t.status!==Ha?1:0},N_=e=>{if(rs(e))return li(e,xn);e.total_in=e.total_out=0,e.data_type=MC;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Zp:t.wrap?po:si,e.adler=t.wrap===2?0:1,t.last_flush=-2,bC(t),et},A_=e=>{let t=N_(e);return t===et&&KC(e.state),t},JC=(e,t)=>rs(e)||e.state.wrap!==2?xn:(e.state.gzhead=t,et),D_=(e,t,n,r,i,o)=>{if(!e)return xn;let a=1;if(t===IC&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>LC||n!==Cu||r<8||r>15||t<0||t>9||o<0||o>AC||r===8&&a!==1)return li(e,xn);r===8&&(r=9);let s=new XC;return e.state=s,s.strm=e,s.status=po,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<D_(e,t,Cu,UC,FC,DC),tT=(e,t)=>{if(rs(e)||t>Lw||t<0)return e?li(e,xn):xn;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ha&&t!==Zt)return li(e,e.avail_out===0?Ep:xn);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Dt(e),e.avail_out===0)return n.last_flush=-1,et}else if(e.avail_in===0&&Fw(t)<=Fw(r)&&t!==Zt)return li(e,Ep);if(n.status===Ha&&e.avail_in!==0)return li(e,Ep);if(n.status===po&&n.wrap===0&&(n.status=si),n.status===po){let i=Cu+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=vu||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=VC),i+=31-i%31,$a(n,i),n.strstart!==0&&($a(n,e.adler>>>16),$a(n,e.adler&65535)),e.adler=1,n.status=si,Dt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===Zp){if(e.adler=0,de(n,31),de(n,139),de(n,8),n.gzhead)de(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),de(n,n.gzhead.time&255),de(n,n.gzhead.time>>8&255),de(n,n.gzhead.time>>16&255),de(n,n.gzhead.time>>24&255),de(n,n.level===9?2:n.strategy>=vu||n.level<2?4:0),de(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(de(n,n.gzhead.extra.length&255),de(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=qe(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=jp;else if(de(n,0),de(n,0),de(n,0),de(n,0),de(n,0),de(n,n.level===9?2:n.strategy>=vu||n.level<2?4:0),de(n,YC),n.status=si,Dt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===jp){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Dt(e),n.pending!==0)return n.last_flush=-1,et;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=zp}if(n.status===zp){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i)),Dt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Bp}if(n.status===Bp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i)),Dt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=qe(e.adler,n.pending_buf,n.pending-i,i))}n.status=$p}if(n.status===$p){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Dt(e),n.pending!==0))return n.last_flush=-1,et;de(n,e.adler&255),de(n,e.adler>>8&255),e.adler=0}if(n.status=si,Dt(e),n.pending!==0)return n.last_flush=-1,et}if(e.avail_in!==0||n.lookahead!==0||t!==Nr&&n.status!==Ha){let i=n.level===0?P_(n,t):n.strategy===vu?QC(n,t):n.strategy===NC?qC(n,t):Wa[n.level].func(n,t);if((i===fi||i===yo)&&(n.status=Ha),i===ht||i===fi)return e.avail_out===0&&(n.last_flush=-1),et;if(i===go&&(t===CC?OC(n):t!==Lw&&(Up(n,0,0,!1),t===TC&&(Rr(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Dt(e),e.avail_out===0))return n.last_flush=-1,et}return t!==Zt?et:n.wrap<=0?Uw:(n.wrap===2?(de(n,e.adler&255),de(n,e.adler>>8&255),de(n,e.adler>>16&255),de(n,e.adler>>24&255),de(n,e.total_in&255),de(n,e.total_in>>8&255),de(n,e.total_in>>16&255),de(n,e.total_in>>24&255)):($a(n,e.adler>>>16),$a(n,e.adler&65535)),Dt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?et:Uw)},nT=e=>{if(rs(e))return xn;let t=e.state.status;return e.state=null,t===si?li(e,RC):et},rT=(e,t)=>{let n=t.length;if(rs(e))return xn;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==po||r.lookahead)return xn;if(i===1&&(e.adler=Xa(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Rr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}let o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,mo(r);r.lookahead>=ae;){let u=r.strstart,f=r.lookahead-(ae-1);do r.ins_h=Ar(r,r.ins_h,r.window[u+ae-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--f);r.strstart=u,r.lookahead=ae-1,mo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ae-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,et},iT=eT,oT=D_,aT=A_,sT=N_,lT=JC,uT=tT,fT=nT,cT=rT,dT="pako deflate (from Nodeca project)",Ya={deflateInit:iT,deflateInit2:oT,deflateReset:aT,deflateResetKeep:sT,deflateSetHeader:lT,deflate:uT,deflateEnd:fT,deflateSetDictionary:cT,deflateInfo:dT},pT=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),mT=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)pT(n,r)&&(e[r]=n[r])}}return e},hT=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Ja[254]=Ja[254]=1;var gT=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},yT=(e,t)=>{if(t<65534&&e.subarray&&M_)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return yT(o,i)},wT=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Ja[e[n]]>t?n:t},es={string2buf:gT,buf2string:vT,utf8border:wT};function _T(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var L_=_T,U_=Object.prototype.toString,{Z_NO_FLUSH:xT,Z_SYNC_FLUSH:ST,Z_FULL_FLUSH:kT,Z_FINISH:bT,Z_OK:Eu,Z_STREAM_END:ET,Z_DEFAULT_COMPRESSION:OT,Z_DEFAULT_STRATEGY:CT,Z_DEFLATED:TT}=di;function is(e){this.options=Tu.assign({level:OT,method:TT,chunkSize:16384,windowBits:15,memLevel:8,strategy:CT},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new L_,this.strm.avail_out=0;let n=Ya.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Eu)throw new Error(ui[n]);if(t.header&&Ya.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=es.string2buf(t.dictionary):U_.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ya.deflateSetDictionary(this.strm,r),n!==Eu)throw new Error(ui[n]);this._dict_set=!0}}is.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?bT:xT,typeof e=="string"?n.input=es.string2buf(e):U_.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===ST||o===kT)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Ya.deflate(n,o),i===ET)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ya.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Eu;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};is.prototype.onData=function(e){this.chunks.push(e)};is.prototype.onEnd=function(e){e===Eu&&(this.result=Tu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function qp(e,t){let n=new is(t);if(n.push(e,!0),n.err)throw n.msg||ui[n.err];return n.result}function RT(e,t){return t=t||{},t.raw=!0,qp(e,t)}function IT(e,t){return t=t||{},t.gzip=!0,qp(e,t)}var PT=is,NT=qp,AT=RT,DT=IT,MT=di,LT={Deflate:PT,deflate:NT,deflateRaw:AT,gzip:DT,constants:MT},wu=16209,UT=16191,FT=function(t,n){let r,i,o,a,s,u,f,l,d,c,p,v,S,b,y,w,_,x,N,D,A,M,W,U,Y=t.state;r=t.next_in,W=t.input,i=r+(t.avail_in-5),o=t.next_out,U=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),u=Y.dmax,f=Y.wsize,l=Y.whave,d=Y.wnext,c=Y.window,p=Y.hold,v=Y.bits,S=Y.lencode,b=Y.distcode,y=(1<>>24,p>>>=x,v-=x,x=_>>>16&255,x===0)U[o++]=_&65535;else if(x&16){N=_&65535,x&=15,x&&(v>>=x,v-=x),v<15&&(p+=W[r++]<>>24,p>>>=x,v-=x,x=_>>>16&255,x&16){if(D=_&65535,x&=15,vu){t.msg="invalid distance too far back",Y.mode=wu;break e}if(p>>>=x,v-=x,x=o-a,D>x){if(x=D-x,x>l&&Y.sane){t.msg="invalid distance too far back",Y.mode=wu;break e}if(A=0,M=c,d===0){if(A+=f-x,x2;)U[o++]=M[A++],U[o++]=M[A++],U[o++]=M[A++],N-=3;N&&(U[o++]=M[A++],N>1&&(U[o++]=M[A++]))}else{A=o-D;do U[o++]=U[A++],U[o++]=U[A++],U[o++]=U[A++],N-=3;while(N>2);N&&(U[o++]=U[A++],N>1&&(U[o++]=U[A++]))}}else if(x&64){t.msg="invalid distance code",Y.mode=wu;break e}else{_=b[(_&65535)+(p&(1<>3,r-=N,v-=N<<3,p&=(1<{let u=s.bits,f=0,l=0,d=0,c=0,p=0,v=0,S=0,b=0,y=0,w=0,_,x,N,D,A,M=null,W,U=new Uint16Array(fo+1),Y=new Uint16Array(fo+1),je=null,Qn,P,j;for(f=0;f<=fo;f++)U[f]=0;for(l=0;l=1&&U[c]===0;c--);if(p>c&&(p=c),c===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d0&&(e===Bw||c!==1))return-1;for(Y[1]=0,f=1;fjw||e===$w&&y>zw)return 1;for(;;){Qn=f-S,a[l]+1=W?(P=je[a[l]-W],j=M[a[l]-W]):(P=96,j=0),_=1<>S)+x]=Qn<<24|P<<16|j|0;while(x!==0);for(_=1<>=1;if(_!==0?(w&=_-1,w+=_):w=0,l++,--U[f]===0){if(f===c)break;f=t[n+a[l]]}if(f>p&&(w&D)!==N){for(S===0&&(S=p),A+=d,v=f-S,b=1<jw||e===$w&&y>zw)return 1;N=w&D,i[N]=p<<24|v<<16|A-o|0}}return w!==0&&(i[A+w]=f-S<<24|64<<16|0),s.bits=p,0},Ga=HT,WT=0,F_=1,j_=2,{Z_FINISH:Hw,Z_BLOCK:VT,Z_TREES:_u,Z_OK:ci,Z_STREAM_END:YT,Z_NEED_DICT:GT,Z_STREAM_ERROR:qt,Z_DATA_ERROR:z_,Z_MEM_ERROR:B_,Z_BUF_ERROR:ZT,Z_DEFLATED:Ww}=di,Ru=16180,Vw=16181,Yw=16182,Gw=16183,Zw=16184,qw=16185,Qw=16186,Kw=16187,Xw=16188,Jw=16189,Ou=16190,$n=16191,Tp=16192,e_=16193,Rp=16194,t_=16195,n_=16196,r_=16197,i_=16198,xu=16199,Su=16200,o_=16201,a_=16202,s_=16203,l_=16204,u_=16205,Ip=16206,f_=16207,c_=16208,Oe=16209,$_=16210,H_=16211,qT=852,QT=592,KT=15,XT=KT,d_=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function JT(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var pi=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modeH_?1:0},W_=e=>{if(pi(e))return qt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ru,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(qT),t.distcode=t.distdyn=new Int32Array(QT),t.sane=1,t.back=-1,ci},V_=e=>{if(pi(e))return qt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,W_(e)},Y_=(e,t)=>{let n;if(pi(e))return qt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?qt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,V_(e))},G_=(e,t)=>{if(!e)return qt;let n=new JT;e.state=n,n.strm=e,n.window=null,n.mode=Ru;let r=Y_(e,t);return r!==ci&&(e.state=null),r},eR=e=>G_(e,XT),p_=!0,Pp,Np,tR=e=>{if(p_){Pp=new Int32Array(512),Np=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ga(F_,e.lens,0,288,Pp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ga(j_,e.lens,0,32,Np,0,e.work,{bits:5}),p_=!1}e.lencode=Pp,e.lenbits=9,e.distcode=Np,e.distbits=5},Z_=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,a,s,u,f,l,d,c,p,v,S,b=0,y,w,_,x,N,D,A,M,W=new Uint8Array(4),U,Y,je=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pi(e)||!e.output||!e.input&&e.avail_in!==0)return qt;n=e.state,n.mode===$n&&(n.mode=Tp),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,f=n.hold,l=n.bits,d=s,c=u,M=ci;e:for(;;)switch(n.mode){case Ru:if(n.wrap===0){n.mode=Tp;break}for(;l<16;){if(s===0)break e;s--,f+=r[o++]<>>8&255,n.check=qe(n.check,W,2,0),f=0,l=0,n.mode=Vw;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",n.mode=Oe;break}if((f&15)!==Ww){e.msg="unknown compression method",n.mode=Oe;break}if(f>>>=4,l-=4,A=(f&15)+8,n.wbits===0&&(n.wbits=A),A>15||A>n.wbits){e.msg="invalid window size",n.mode=Oe;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(W[0]=f&255,W[1]=f>>>8&255,n.check=qe(n.check,W,2,0)),f=0,l=0,n.mode=Yw;case Yw:for(;l<32;){if(s===0)break e;s--,f+=r[o++]<>>8&255,W[2]=f>>>16&255,W[3]=f>>>24&255,n.check=qe(n.check,W,4,0)),f=0,l=0,n.mode=Gw;case Gw:for(;l<16;){if(s===0)break e;s--,f+=r[o++]<>8),n.flags&512&&n.wrap&4&&(W[0]=f&255,W[1]=f>>>8&255,n.check=qe(n.check,W,2,0)),f=0,l=0,n.mode=Zw;case Zw:if(n.flags&1024){for(;l<16;){if(s===0)break e;s--,f+=r[o++]<>>8&255,n.check=qe(n.check,W,2,0)),f=0,l=0}else n.head&&(n.head.extra=null);n.mode=qw;case qw:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+p),A)),n.flags&512&&n.wrap&4&&(n.check=qe(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=Qw;case Qw:if(n.flags&2048){if(s===0)break e;p=0;do A=r[o+p++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A));while(A&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=$n;break;case Jw:for(;l<32;){if(s===0)break e;s--,f+=r[o++]<>>=l&7,l-=l&7,n.mode=Ip;break}for(;l<3;){if(s===0)break e;s--,f+=r[o++]<>>=1,l-=1,f&3){case 0:n.mode=e_;break;case 1:if(tR(n),n.mode=xu,t===_u){f>>>=2,l-=2;break e}break;case 2:n.mode=n_;break;case 3:e.msg="invalid block type",n.mode=Oe}f>>>=2,l-=2;break;case e_:for(f>>>=l&7,l-=l&7;l<32;){if(s===0)break e;s--,f+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=Oe;break}if(n.length=f&65535,f=0,l=0,n.mode=Rp,t===_u)break e;case Rp:n.mode=t_;case t_:if(p=n.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break e;i.set(r.subarray(o,o+p),a),s-=p,o+=p,u-=p,a+=p,n.length-=p;break}n.mode=$n;break;case n_:for(;l<14;){if(s===0)break e;s--,f+=r[o++]<>>=5,l-=5,n.ndist=(f&31)+1,f>>>=5,l-=5,n.ncode=(f&15)+4,f>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Oe;break}n.have=0,n.mode=r_;case r_:for(;n.have>>=3,l-=3}for(;n.have<19;)n.lens[je[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},M=Ga(WT,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,M){e.msg="invalid code lengths set",n.mode=Oe;break}n.have=0,n.mode=i_;case i_:for(;n.have>>24,w=b>>>16&255,_=b&65535,!(y<=l);){if(s===0)break e;s--,f+=r[o++]<>>=y,l-=y,n.lens[n.have++]=_;else{if(_===16){for(Y=y+2;l>>=y,l-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=Oe;break}A=n.lens[n.have-1],p=3+(f&3),f>>>=2,l-=2}else if(_===17){for(Y=y+3;l>>=y,l-=y,A=0,p=3+(f&7),f>>>=3,l-=3}else{for(Y=y+7;l>>=y,l-=y,A=0,p=11+(f&127),f>>>=7,l-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Oe;break}for(;p--;)n.lens[n.have++]=A}}if(n.mode===Oe)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Oe;break}if(n.lenbits=9,U={bits:n.lenbits},M=Ga(F_,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,M){e.msg="invalid literal/lengths set",n.mode=Oe;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},M=Ga(j_,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,M){e.msg="invalid distances set",n.mode=Oe;break}if(n.mode=xu,t===_u)break e;case xu:n.mode=Su;case Su:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=f,n.bits=l,FT(e,c),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,f=n.hold,l=n.bits,n.mode===$n&&(n.back=-1);break}for(n.back=0;b=n.lencode[f&(1<>>24,w=b>>>16&255,_=b&65535,!(y<=l);){if(s===0)break e;s--,f+=r[o++]<>x)],y=b>>>24,w=b>>>16&255,_=b&65535,!(x+y<=l);){if(s===0)break e;s--,f+=r[o++]<>>=x,l-=x,n.back+=x}if(f>>>=y,l-=y,n.back+=y,n.length=_,w===0){n.mode=u_;break}if(w&32){n.back=-1,n.mode=$n;break}if(w&64){e.msg="invalid literal/length code",n.mode=Oe;break}n.extra=w&15,n.mode=o_;case o_:if(n.extra){for(Y=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=a_;case a_:for(;b=n.distcode[f&(1<>>24,w=b>>>16&255,_=b&65535,!(y<=l);){if(s===0)break e;s--,f+=r[o++]<>x)],y=b>>>24,w=b>>>16&255,_=b&65535,!(x+y<=l);){if(s===0)break e;s--,f+=r[o++]<>>=x,l-=x,n.back+=x}if(f>>>=y,l-=y,n.back+=y,w&64){e.msg="invalid distance code",n.mode=Oe;break}n.offset=_,n.extra=w&15,n.mode=s_;case s_:if(n.extra){for(Y=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Oe;break}n.mode=l_;case l_:if(u===0)break e;if(p=c-u,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Oe;break}p>n.wnext?(p-=n.wnext,v=n.wsize-p):v=n.wnext-p,p>n.length&&(p=n.length),S=n.window}else S=i,v=a-n.offset,p=n.length;p>u&&(p=u),u-=p,n.length-=p;do i[a++]=S[v++];while(--p);n.length===0&&(n.mode=Su);break;case u_:if(u===0)break e;i[a++]=n.length,u--,n.mode=Su;break;case Ip:if(n.wrap){for(;l<32;){if(s===0)break e;s--,f|=r[o++]<{if(pi(e))return qt;let t=e.state;return t.window&&(t.window=null),e.state=null,ci},iR=(e,t)=>{if(pi(e))return qt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,ci):qt},oR=(e,t)=>{let n=t.length,r,i,o;return pi(e)||(r=e.state,r.wrap!==0&&r.mode!==Ou)?qt:r.mode===Ou&&(i=1,i=Xa(i,t,n,0),i!==r.check)?z_:(o=Z_(e,t,n,n),o?(r.mode=$_,B_):(r.havedict=1,ci))},aR=V_,sR=Y_,lR=W_,uR=eR,fR=G_,cR=nR,dR=rR,pR=iR,mR=oR,hR="pako inflate (from Nodeca project)",Wn={inflateReset:aR,inflateReset2:sR,inflateResetKeep:lR,inflateInit:uR,inflateInit2:fR,inflate:cR,inflateEnd:dR,inflateGetHeader:pR,inflateSetDictionary:mR,inflateInfo:hR};function gR(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var yR=gR,q_=Object.prototype.toString,{Z_NO_FLUSH:vR,Z_FINISH:wR,Z_OK:ts,Z_STREAM_END:Ap,Z_NEED_DICT:Dp,Z_STREAM_ERROR:_R,Z_DATA_ERROR:m_,Z_MEM_ERROR:xR}=di;function os(e){this.options=Tu.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new L_,this.strm.avail_out=0;let n=Wn.inflateInit2(this.strm,t.windowBits);if(n!==ts)throw new Error(ui[n]);if(this.header=new yR,Wn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=es.string2buf(t.dictionary):q_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Wn.inflateSetDictionary(this.strm,t.dictionary),n!==ts)))throw new Error(ui[n])}os.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?wR:vR,q_.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Wn.inflate(n,a),o===Dp&&i&&(o=Wn.inflateSetDictionary(n,i),o===ts?o=Wn.inflate(n,a):o===m_&&(o=Dp));n.avail_in>0&&o===Ap&&n.state.wrap>0&&e[n.next_in]!==0;)Wn.inflateReset(n),o=Wn.inflate(n,a);switch(o){case _R:case m_:case Dp:case xR:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Ap))if(this.options.to==="string"){let u=es.utf8border(n.output,n.next_out),f=n.next_out-u,l=es.buf2string(n.output,u);n.next_out=f,n.avail_out=r-f,f&&n.output.set(n.output.subarray(u,u+f),0),this.onData(l)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===ts&&s===0)){if(o===Ap)return o=Wn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};os.prototype.onData=function(e){this.chunks.push(e)};os.prototype.onEnd=function(e){e===ts&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Tu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Qp(e,t){let n=new os(t);if(n.push(e),n.err)throw n.msg||ui[n.err];return n.result}function SR(e,t){return t=t||{},t.raw=!0,Qp(e,t)}var kR=os,bR=Qp,ER=SR,OR=Qp,CR=di,TR={Inflate:kR,inflate:bR,inflateRaw:ER,ungzip:OR,constants:CR},{Deflate:RR,deflate:IR,deflateRaw:PR,gzip:NR}=LT,{Inflate:AR,inflate:DR,inflateRaw:MR,ungzip:LR}=TR,UR=RR,FR=IR,jR=PR,zR=NR,BR=AR,$R=DR,HR=MR,WR=LR,VR=di,Q_={Deflate:UR,deflate:FR,deflateRaw:jR,gzip:zR,Inflate:BR,inflate:$R,inflateRaw:HR,ungzip:WR,constants:VR};var Vn={tables:{},columns:{},rels:{}},X_=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>mi({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>mi({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(Vn.tables[e]||(Vn.tables[e]=mi({name:t,action:"schema_tables",table:"",params:[]},e)),await Vn.tables[e]),columns:async i=>(Vn.columns[e+"_"+i]||(Vn.columns[e+"_"+i]=mi({name:t,action:"schema_columns",table:i,params:[]},e)),await Vn.columns[e+"_"+i]),rels:async i=>(Vn.rels[e+"_"+i]||(Vn.rels[e+"_"+i]=mi({name:t,action:"schema_rels",table:i,params:[]},e)),await Vn.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=Q_.gzip(JSON.stringify(i));return mi({name:t,action:"query",table:r,params:btoa(o.reduce((a,s)=>a+String.fromCharCode(s),""))},e)}:new Proxy({},{get(i,o){return async(...a)=>(r==="query"&&(r=o,o="query"),await mi({name:t,action:o,table:r,params:a},e))}})}})},vo={},mi=async(e,t)=>{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,K_.default)(e),o=vo[i];if(!o||o&&Date.now()-o.timestamp>1e3){vo[i]={timestamp:Date.now(),promise:yu(r,e,{"content-type":"application/json"},!1),result:null};let s=await vo[i].promise;o=vo[i];try{return typeof s=="string"?(s=JSON.parse(s),vo[i].result=s,s):(vo[i].result=s,s)}catch{if(s)throw new Error(`DBQuery failed: +`+s);return null}}if(o.result)return o.result;let a=await o.promise;if(a)try{return typeof a=="string"&&(a=JSON.parse(a)),a}catch{console.error("DBQuery failed:",a)}return null};m();g();h();m();g();h();m();g();h();var Y1=G(Du());var G1=e=>{let{item:t,item_comp:n,ids:r}=e,i=Xi(n);if(Z1(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let a=t.component.props[o],s=i.component.props[o];a&&(s.value=a.value,s.valueBuilt=a.valueBuilt,s.jsxCalledBy=a.jsxCalledBy,s.content=a.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,a]of Object.entries(i))t[o]=a},Z1=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,Y1.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)Z1(n,t)};m();g();h();var q1=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=Xi(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};m();g();h();var Mu=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var Q1=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let a=i[n.id];i[n.id]||(i[n.id]={},a=i[n.id]),G1({item:n,item_comp:r,ids:a})}let o={item:Mu(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),q1({item:n,item_comp:r,instance:i?i[n.id]:{},each(a,s){let u=n.component?.id;s.meta?.type==="content-element"&&u&&s.content&&(s.content.name=a,_o({...e},{item:s.content,root:t.root||s.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:u,name:a},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let a of Object.values(n.childs))a?.name?.startsWith("jsx:")||a&&Object.keys(a).length>3&&_o({...e,mode:"comp"},{item:a,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var _o=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){Q1(e,t);return}let r={item:Mu(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let a={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(a.jsx_prop={...t.jsx_prop,is_root:!1}),_o(e,a)}}};var II=()=>new Promise(async e=>{let t=!1,n=await fetch(B.url`_prasi/route`);t||(n.headers.get("content-encoding")||fetch(B.url`_prasi/compress/only-gz`),e(await n.json()))}),K1=async()=>{let e=Jl(),t=[];try{let n=await II();if(n&&n.site&&n.urls){n.layout&&(B.layout.id=n.layout.id,B.layout.root=n.layout.root,B.layout.meta={},B.layout.root&&(await Or(B.layout.root.childs),xo(B.layout.meta,B.layout.root))),B.site=n.site,B.site.code={mode:"vsc"},await PI(),B.site.api=Cw(B.site.api_url),B.site.db=X_(B.site.api_url);let r=window;r.serverurl=B.site.api_url,r.db=B.site.db,r.api=B.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},PI=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=B.site.api_url;r==="*"&&(r=`${location.protocol}//${location.host}`,B.site.api_url=r),localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r),o=new URL(location.href);if(o.pathname="",!["prasi.avolut.com"].includes(o.hostname)&&o.host!=="localhost:4550"){let a=o.toString();n.src=`${a.endsWith("/")?a:`${a}/`}_prasi/load.js?url=${a}&v3&ts=${i}`,B.site.api_url=`${o.protocol}//${o.host}`}else n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`;n.onerror=()=>{e()},document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),xo=(e,t)=>{for(let n of t.childs)_o({set_meta:!0,comps:B.comp.list,meta:e,mode:"page"},{item:n})};var X1=new oi({structuredClone:!0}),Lr={debug:!!localStorage.getItem("prasi-ws-debug"),reconnectTimeout:1e3,id_client:"",id_site:"",ws:null},J1=()=>{if(location.host==="localhost:4550"||location.host==="prasi.avolut.com"){let t=location.pathname.split("/")[2],n=()=>{let r=new URL(At.basehost||location.href);r.pathname="/sync",r.protocol=r.protocol==="http:"?"ws:":"wss:";let i=new WebSocket(`${r.protocol}//${r.host}${r.pathname}`),o=setTimeout(()=>{clearTimeout(o),i.close(),n()},2e3);Lr.ws=i,Lr.id_site=t,i.onopen=()=>{clearTimeout(o),At.offline=!1,At.editorRender?.()},i.onmessage=async a=>{let s=a.data,u=X1.unpack(k.from(await s.arrayBuffer()));if(Lr.debug&&console.log("%c\u2B07","color:red",nx(s.size,0),u),u.type===0)Lr.id_client=u.client_id,tx(i,{type:"preview",mode:"init",data:{site_id:t,client_id:u.client_id}});else if(u.type===2){if(u.event==="page_changed"){let f=u.data.map.id,l=B.page.cache[f],d=u.data.map.root;l.root=d;let c={id:l.id,url:l.url,root:d,meta:{}};await Or(d.childs,!0),xo(c.meta,d),B.page.cache[c.id]=c,At.prasiContext.render()}else if(u.event==="code_changes"){let{mode:f,ts:l,status:d}=u.data;if(f==="frontend")if(d==="ok"){console.clear(),console.log(`${Ca(Date.now(),"HH:mm:ss")} \u{1F6A7} Code updated from vscode `);let c=`/prod/${t}/_prasi/code/index.js?ts=${l}`,p=new Function("callback",` + import("${c}") + .catch((e) => console.error("Failed to load site code\\n\\n", e)) + .then(callback)`);try{await new Promise(v=>{try{p(S=>{let b=window;for(let[y,w]of Object.entries(S))b[y]=w;v(S),b.prasiContext.render()})}catch(S){console.log("Failed to load site code",S)}})}catch{}}else d==="building"&&console.log(`${Ca(Date.now(),"HH:mm:ss")} \u23F3 Code changed from vscode, rebuilding...`)}}}};n()}},ex=e=>{Lr.ws&&tx(Lr.ws,{type:"preview",mode:"listen",data:{...e,client_id:Lr.id_client}})},tx=(e,t)=>{let n=X1.pack(t);Lr.debug&&console.log("%c\u2B06","color:blue",nx(n.length,0),t),e.send(n)};function nx(e,t){if(e==0)return"0 Bytes";var n=1024,r=t||2,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(r))+" "+i[o]}m();g();h();var tS=G(Qe());m();g();h();m();g();h();m();g();h();var rx=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function NI(e){return typeof e=="string"&&rx.test(e)}var om=NI;m();g();h();var cs=G(ge()),am=({children:e,back:t})=>(0,cs.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,cs.jsx)("div",{children:e}),(0,cs.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});m();g();h();var ox=G(Qe());var lt=G(ge()),ix=window,ds=({children:e,className:t,show:n,backdrop:r,note:i,alt:o,pointer:a})=>{let s=wr({icon:(0,lt.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,ox.useEffect)(()=>(s.ival=setInterval(()=>{s.value+=.1333,s.value>=1.3&&(s.value=0),s.render()},200),ix.loadingIcon&&(s.icon=(0,lt.jsx)("img",{alt:"loading",src:ix.loadingIcon,className:css` width: 42px; height: 42px; - `}),l.render()),()=>{clearInterval(l.ival)}),[]),(0,Oe.jsxs)(Oe.Fragment,{children:[r!==!1&&(0,Oe.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:c=>{c.preventDefault()}}),e?(0,Oe.jsx)("div",{onContextMenuCapture:c=>{c.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Oe.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,Oe.jsx)("div",{className:"text-sm",children:e})})}):(0,Oe.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 transition-all",s!==!0&&"pointer-events-none",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Oe.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css` + `}),s.render()),()=>{clearInterval(s.ival)}),[]),(0,lt.jsxs)(lt.Fragment,{children:[r!==!1&&(0,lt.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:u=>{u.preventDefault()}}),e?(0,lt.jsx)("div",{onContextMenuCapture:u=>{u.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,lt.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,lt.jsx)("div",{className:"text-sm",children:e})})}):(0,lt.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 transition-all",a!==!0&&"pointer-events-none",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,lt.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css` min-width: 30px; .pr-outer { background: rgba(0, 0, 0, 0.1) !important; } - `),children:[(0,Oe.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,Oe.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,Oe.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` - transform: translate(${-100+l.value*200}%); - `)})}),o]})})]})};var Yl=P(_e());var lg=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var An={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{},preload:[]},comp:{load:async()=>null},on_preload:void 0};var Uy=P(_e());var de=P(_e()),vf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},wk=()=>!1,ag=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:wk});function ug({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(ag.Provider,{value:i},de.default.createElement(vf,{error:t,onError:(o,s)=>{n(o),r.current?.(o,s)}},e))}ug.displayName="ReactUseErrorBoundaryContext";function cg(e){function t(n){return de.default.createElement(ug,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function fg(e){let t=(0,de.useContext)(ag);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var at=P(G()),Nt=cg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Nn({retrying:!1,meta:t}),[o,s]=fg((c,u)=>{r!==!0&&console.error(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(s));let l=t;return o?(0,at.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,at.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",l?.item.name?"["+l.item.name+"]:":""]}),(0,at.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,at.jsx)(at.Fragment,{children:"Retrying..."}):(0,at.jsx)(at.Fragment,{children:o.message})}),(0,at.jsx)("div",{className:"p-1",children:(0,at.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),s()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var dg=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` + `),children:[(0,lt.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,lt.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,lt.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` + transform: translate(${-100+s.value*200}%); + `)})}),o]})})]})};m();g();h();var Vu=G(Qe());m();g();h();var ax=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};m();g();h();var Ur={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{},preload:[]},comp:{load:async()=>null},on_preload:void 0};m();g();h();var Vx=G(Qe());m();g();h();m();g();h();var He=G(Qe()),sm=class extends He.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},AI=()=>!1,sx=(0,He.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:AI});function lx({children:e}){let[t,n]=(0,He.useState)(),r=(0,He.useRef)(),i=(0,He.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return He.default.createElement(sx.Provider,{value:i},He.default.createElement(sm,{error:t,onError:(o,a)=>{n(o),r.current?.(o,a)}},e))}lx.displayName="ReactUseErrorBoundaryContext";function ux(e){function t(n){return He.default.createElement(lx,null,He.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function fx(e){let t=(0,He.useContext)(sx);t.componentDidCatch.current=e;let n=(0,He.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var Qt=G(ge()),kn=ux(({children:e,meta:t,id:n,silent:r=!0})=>{let i=wr({retrying:!1,meta:t}),[o,a]=fx((u,f)=>{r!==!0&&console.error(u)});t&&i.meta!==t&&(i.meta=t,setTimeout(a));let s=t;return o?(0,Qt.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,Qt.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",s?.item.name?"["+s.item.name+"]:":""]}),(0,Qt.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,Qt.jsx)(Qt.Fragment,{children:"Retrying..."}):(0,Qt.jsx)(Qt.Fragment,{children:o.message})}),(0,Qt.jsx)("div",{className:"p-1",children:(0,Qt.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),a()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});m();g();h();m();g();h();m();g();h();m();g();h();var Et=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var dx=(e,t)=>{let n=Et(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` ${n.css} - `,t):""};var pg=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` + `,t):""};m();g();h();var px=(e,t)=>{let n=Et(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` background-repeat: no-repeat; `,n.color&&` background-color: ${n.color}; @@ -25,7 +36,7 @@ Error generating stack: `+o.message+` background-size: ${n.size}; `,n.pos&&` background-position: ${n.pos}; - `)};var Cg=P(bf());var Ig=(e,t)=>{let n=He(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(Pt(n,"stroke.l","border-left-width"),Pt(n,"stroke.r","border-right-width"),Pt(n,"stroke.b","border-bottom-width"),Pt(n,"stroke.t","border-top-width"),Pt(n,"color","border-color","transparent"),Pt(n,"style","border-style","dashed"),Pt(n,"rounded.tl","border-top-left-radius"),Pt(n,"rounded.tr","border-top-right-radius"),Pt(n,"rounded.bl","border-bottom-left-radius"),Pt(n,"rounded.br","border-bottom-right-radius"))},Pt=(e,t,n,r)=>{let i=(0,Cg.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var Tg=(e,t,n)=>{let r=He(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` + `)};m();g();h();var Cx=G(pm());var Tx=(e,t)=>{let n=Et(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(bn(n,"stroke.l","border-left-width"),bn(n,"stroke.r","border-right-width"),bn(n,"stroke.b","border-bottom-width"),bn(n,"stroke.t","border-top-width"),bn(n,"color","border-color","transparent"),bn(n,"style","border-style","dashed"),bn(n,"rounded.tl","border-top-left-radius"),bn(n,"rounded.tr","border-top-right-radius"),bn(n,"rounded.bl","border-bottom-left-radius"),bn(n,"rounded.br","border-bottom-right-radius"))},bn=(e,t,n,r)=>{let i=(0,Cx.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};m();g();h();var Rx=(e,t,n)=>{let r=Et(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` width:100%; height:100%; flex:1; @@ -44,7 +55,7 @@ Error generating stack: `+o.message+` `,r.h&&typeof r.h=="number"&&r.h>=0&&` height: ${r.h}${r.hUnit||"px"}; overflow-y: clip; - `)};var Og=({item:e,hover:t,active:n})=>cx(t&&css` + `)};m();g();h();var Ix=({item:e,hover:t,active:n})=>cx(t&&css` & { box-shadow: inset 0 0 0px 3px #bae3fd; > img { @@ -56,7 +67,7 @@ Error generating stack: `+o.message+` > img { opacity: 0.6; } - `);var ei=window,Ng=(e,t)=>{let n=He(e,"font",t,{});if(n.family){ei.loadedFonts||(ei.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(ei.loadedFonts.indexOf(n.family)<0){ei.loadedFonts.push(n.family);let s=document,l=`https://fonts.googleapis.com/css2?family=${o}${i}&display=swap`;if(!s.querySelector(`link[href="${l}]`)){let c=s.createElement("link");c.type="text/css",c.rel="stylesheet",c.crossOrigin="anonymous",c.href=l,s.head.appendChild(c)}}}return!n.family&&ei.defaultFont&&(n.family=ei.defaultFont),cx(n.color&&` + `);m();g();h();var ko=window,Px=(e,t)=>{let n=Et(e,"font",t,{});if(n.family){ko.loadedFonts||(ko.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(ko.loadedFonts.indexOf(n.family)<0){ko.loadedFonts.push(n.family);let a=document,s=`https://fonts.googleapis.com/css2?family=${o}${i}&display=swap`;if(!a.querySelector(`link[href="${s}]`)){let u=a.createElement("link");u.type="text/css",u.rel="stylesheet",u.crossOrigin="anonymous",u.href=s,a.head.appendChild(u)}}}return!n.family&&ko.defaultFont&&(n.family=ko.defaultFont),cx(n.color&&` color: ${n.color}; `,n.whitespace==="whitespace-normal"&&` word-break: break-word; @@ -72,10 +83,10 @@ Error generating stack: `+o.message+` line-height: ${n.height==="auto"?"normal":`${n.height}%`}; `,n.family&&` font-family: ${n.family}; - `)};var Pg=(e,t)=>{let n=[],r=He(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` + `)};m();g();h();var Nx=(e,t)=>{let n=[],r=Et(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` gap: ${r.gap}px; `),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:start; justify-content: center;"),r.align==="top-right"&&n.push("align-items:start; justify-content: end;"),r.align==="left"&&n.push("align-items:center; justify-content: start;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-left"&&n.push("align-items:end; justify-content: start;"),r.align==="bottom-center"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;")));else return"flex-direction:column; align-items:start; justify-content: start;";return n.join(` - `).trim()};var Ag=(e,t)=>{let n=He(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` + `).trim()};m();g();h();var Ax=(e,t)=>{let n=Et(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` padding-left: ${n.l}px; `,n.r!==void 0&&` padding-right: ${n.r}px; @@ -83,21 +94,21 @@ Error generating stack: `+o.message+` padding-bottom: ${n.b}px; `,n.t!==void 0&&` padding-top: ${n.t}px; - `)};var Rf=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` + `)};var mm=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` display: flex; position: relative; user-select: none; - ${Pg(e,t.mode)} - ${Ag(e,t.mode)} - ${Tg(e,t.mode,t?.editor)} - ${Ig(e,t.mode)} - ${pg(e,t.mode)} - ${Ng(e,t.mode)} - `,(t?.hover||t?.active)&&Og({item:e,hover:t?.hover,active:t?.active}),dg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Lg=P(G()),bo=(e,t,n,r,i)=>{let o=t.item,s;o.component?.style&&(s={style:o.component.style,className:Rf(o.component.style,{mode:e.mode})});let l={className:Rf(o,{mode:e.mode}),inherit:s},c={},u=t.item.childs,a;return t.item.type==="text"?(a=null,l.dangerouslySetInnerHTML={__html:t.item.html||""}):a=Array.isArray(u)&&u?.map(p=>{if(!p)return null;let{id:f}=p,d=n?e.layout?.meta[f]:e.meta[f];return d?(0,Lg.jsx)(en,{meta:d,is_layout:n,passprop:{...r},depth:i+1},f):(p.type==="item"&&p.component?.id&&console.error(`Warning component ${p.name} - ${p.component.id} failed to load.`),null)}),l.children=a,t.item.adv?.html?(delete l.children,l.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete l.children,delete l.dangerouslySetInnerHTML),{props:l,text_props:c}};var Fy=P(_e());var My=P(Vl());var ni={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Wl(e={}){let t={options:e,rootNode:Ty(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)Iy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>tE(t,n(r)),insert:(r,i)=>Iy(t,n(r),i),remove:r=>nE(t,n(r))}}function tE(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,s=null,l=e.rootNode,c=null;for(let u=0;u1){let f=r.length-u;l=l.placeholderChildren.find(d=>d.maxDepth===f)||null}else l=l.placeholderChildren[0]||null;if(!l)break;l.paramName&&(i[l.paramName]=a),o=!0}else l=p}return(l===null||l.data===null)&&s!==null&&(l=s,i[l.paramName||"_"]=c,o=!0),l?o?{...l.data,params:o?i:void 0}:l.data:null}function Iy(e,t,n){let r=!0,i=t.split("/"),o=e.rootNode,s=0,l=[o];for(let c of i){let u;if(u=o.children.get(c))o=u;else{let a=rE(c);u=Ty({type:a,parent:o}),o.children.set(c,u),a===ni.PLACEHOLDER?(u.paramName=c==="*"?`_${s++}`:c.slice(1),o.placeholderChildren.push(u),r=!1):a===ni.WILDCARD&&(o.wildcardChildNode=u,u.paramName=c.slice(3)||"_",r=!1),l.push(u),o=u}}for(let[c,u]of l.entries())u.maxDepth=Math.max(l.length-c,u.maxDepth||0);return o.data=n,r===!0&&(e.staticRoutesMap[t]=o),o}function nE(e,t){let n=!1,r=t.split("/"),i=e.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r.at(-1)||"";i.data=null,Object.keys(i.children).length===0&&i.parent&&(i.parent.children.delete(o),i.parent.wildcardChildNode=null,i.parent.placeholderChildren=[]),n=!0}return n}function Ty(e={}){return{type:e.type||ni.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function rE(e){return e.startsWith("**")?ni.WILDCARD:e[0]===":"||e==="*"?ni.PLACEHOLDER:ni.NORMAL}var iE={id:"",name:"",domain:"",config:{api_url:""},js:"",js_compiled:"",responsive:"",layout:{id:"--",meta:void 0,entry:[]}},oE={id:"",name:"",url:"",snapshot:null,comps:{}};var Ne={active_id:!1,comp_id:!1,instance_comp_id:!1,instance_item_id:!1},ri={should_render_main:!0,hover:{id:""},scope:{},script_nav:{list:[],idx:-1},text:{id:"",content:"",timeout:null,el:null},get item_id(){return Ne.active_id===!1&&(Ne.active_id=localStorage.getItem("prasi-active-id")||""),Ne.active_id||""},set item_id(e){localStorage.setItem("prasi-active-id",e||""),Ne.active_id=e||""},get comp_id(){return Ne.comp_id===!1&&(Ne.comp_id=localStorage.getItem("prasi-comp-id")||""),Ne.comp_id||""},set comp_id(e){localStorage.setItem("prasi-comp-id",e||""),Ne.comp_id=e||""},instance:{get comp_id(){return Ne.instance_comp_id===!1&&(Ne.instance_comp_id=localStorage.getItem("prasi-instance-comp-id")||""),Ne.instance_comp_id||""},set comp_id(e){localStorage.setItem("prasi-instance-comp-id",e||""),Ne.instance_comp_id=e||""},get item_id(){return Ne.instance_item_id===!1&&(Ne.instance_item_id=localStorage.getItem("prasi-instance-item-id")||""),Ne.instance_item_id||""},set item_id(e){localStorage.setItem("prasi-instance-item-id",e||""),Ne.instance_item_id=e||""}}},HI={mode:"",user:{id:"",username:"",client_id:""},clients:{},status:"init",preview:{url_cache:new Set,route_cache:Wl(),page_cache:{},meta_cache:{}},sync:null,sync_assigned:!1,site:Jr(iE),site_tstamp:Date.now(),site_exports:{},site_dts:"",site_dts_entry:{},prisma_ext:"",script:{site_types:{},loaded:!1,do_edit:async(e,t)=>{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:oE,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open_all:!1,open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,rebuilding:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};var Gl=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var cr=P(_e());var Mn=window;var sE=hf("prasi-cache","prasi-cache-store"),Oy={timeout:null,store:sE},Zl=(e,t)=>{let n=[...Ny(t,"navigate(",")"),...Ny(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(Oy.timeout),Oy.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Ny=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let s=e.indexOf(t,r);if(i=r,s>=0){let l=e[s+t.length];if(l==='"'||l==="'"||l==="`"){let c=e.indexOf(`${l}${n}`,s+t.length+1),u=e.substring(s+t.length+1,c);r=c+2+n.length,o.push(u)}}if(i===r)break}return o};var ur=P(_e());var Py=P(bf()),ar=P(_e());var Mf=P(G()),Ay=(e,t,n,r,i)=>o=>{let[s,l]=(0,ar.useState)({}),c=o.idx||o.internal_key;n.item.script||(n.item.script={});let u=n.item.script;typeof c<"u"&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[c]||(n.item.script_keyed[c]={}),u=n.item.script_keyed[c]),u.passprop||(u.passprop={});let a={},p=!1;for(let[h,v]of Object.entries(o))["children","key"].includes(h)||(p=!0,a[h]=v);let f={...r,...a};if(typeof c<"u"&&((typeof u.passprop.internal_key>"u"||c===u.passprop.internal_key)&&(u.passprop=f),f=u.passprop),n.editor_props=f,!Array.isArray(o.children)&&(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let h=(0,Py.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(h)){let v=!0;for(let w of h)!(0,ar.isValidElement)(w)&&typeof w=="object"||(v=!1);if(v)return h.map(w=>{let m=e.meta[w.id];if(m||(e.meta[w.id]={item:w},m=e.meta[w.id]),m){if(Object.keys(m.item).length<=3&&m.mitem){let g={...m.item},y=m.mitem.toJSON();m.item={...y,...g}}return(0,Mf.jsx)(en,{is_layout:t,meta:m,passprop:f,parent_key:o.internal_key,depth:i},w.id)}return null})}}if(!Array.isArray(o.children)&&!(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let h=o.children.id;if(h){let v=e.meta[h];if(!v){e.meta[h]={item:o.children},v=e.meta[h];let w=v.item.component?.id;w&&e.comp.load(w).then(m=>{if(m){for(let[y,_]of Object.entries(m)){let S=v.item;S[y]||(S[y]=_)}let g=v.item.component?.props;for(let[y,_]of Object.entries(m.component?.props||{}))g[y]||(g[y]=_);l({})}})}return(0,Mf.jsx)(en,{is_layout:t,meta:v,passprop:f,parent_key:o.internal_key,depth:i})}}return zf(o,f,c?{parent_key:c}:void 0)},zf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return Df(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(Df(o,r,t,n));return i}return Df(r.children,r,t,n)},Df=(e,t,n,r)=>{if((0,ar.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ii={},Ly=(e,t,n)=>r=>{let i=(["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550")&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:s,parent_key:l}=r,c=e.script?.init_local_effect,u=t?e.layout?.meta:e.meta,a=(0,ur.useRef)(ii[o]?ii[o]:r.value),[p,f]=(0,ur.useState)({}),d=a.current;return d.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Kl(e,n,n.script?.scope,l),r.hook&&r.hook(d),(0,ur.useEffect)(()=>{if(n.parent?.instance_id&&u){let v=u[n.parent?.instance_id];if(v&&v.instances){for(let[w,m]of Object.entries(v.instances[n.parent.instance_id]))if(m===n.item.id){o=w;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()),()=>{}},[...r.deps||[],location.pathname]),(0,ur.useEffect)(()=>{i&&ii[o]===null&&(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()},[ii[o]]),zf(s,{...n.script?.scope,[r.name]:d})};var jf=P(Vl()),No=window,oi=(e,t,n,r)=>{let i=r||{},o=t.get("id")||"";No.prasiEditDevItem||(No.prasiEditDevItem={});let s=No.prasiEditDevItem[n];s||(No.prasiEditDevItem[n]={},s=No.prasiEditDevItem[n]);let l=()=>{let a=t.get("id")||"",p=s[a];return p||(s[a]=[],p=s[a]),p},c=t.toJSON(),u={...c,edit:{get props(){if(c.component?.props){let a={};for(let[p,f]of Object.entries(c.component.props))if(f.content){let d=t.get("component")?.get("props")?.get(p)?.get("content");if(d){let h=d.get("id")||"";i[h]?a[p]={mode:"jsx",value:i[h]}:a[p]={mode:"jsx",value:oi(e,d,n,i)}}else a[p]={mode:"jsx",value:null}}else{let d=typeof f.valueBuilt=="string"?f.valueBuilt.trim():"";if(d.endsWith(`; -`)&&(d=d.substring(0,d.length-2)),d&&d===f.value.trim()){let h=new Function(`return ${f.value}`);a[p]={mode:"string",value:h()}}else a[p]={mode:"raw",value:f.value,valueBuilt:f.valueBuilt}}return a}},get pending(){return[]},async commit(){let a={},p={};if(t){for(let[f,d]of Object.entries(s)){let h=e[f];if(!h||!h.mitem)continue;let w=h.mitem.toJSON();if(w&&w.component){let m=w?.component?.props;if(!m){console.log(w,m);return}let g={};for(let _ of d)if(_.type==="prop"&&m)m[_.name]&&(_.mode==="string"?(m[_.name].value=JSON.stringify(_.value),m[_.name].valueBuilt=JSON.stringify(_.value)):_.mode==="raw"?(m[_.name].value=_.value,_.valueBuilt?m[_.name].valueBuilt=_.valueBuilt:g[_.name]=_.value):_.mode==="jsx"&&(m[_.name]||(m[_.name]={meta:{type:"content-element"}}),_.value&&(m[_.name].content=si([_.value],p)[0])));else if(_.type==="set"&&typeof _.value=="object")for(let[S,E]of Object.entries(_.value))w[S]=E;else if(_.type==="child"&&Array.isArray(_.childs))if(w.component?.id)w.component.props||(w.component.props={}),w.component.props.child={meta:{type:"content-element"},content:{type:"item",id:(0,jf.createId)(),name:"child",childs:si(_.childs.filter(S=>S),p)}};else{let S=si(_.childs.filter(E=>E),p);w.childs=S}for(let[_,S]of Object.entries(p))g[_]=S.value;let y=await _api.code_build(g);if(m)for(let[_,S]of Object.entries(y))m[_]?m[_].valueBuilt=S:p[_]&&(p[_].valueBuilt=S);a[f]=w}}t.doc?.transact(()=>{for(let[f,d]of Object.entries(a)){let h=e[f];h.mitem&&syncronize(h.mitem,d)}})}},setValue(a,p){let f=l(),d=p;if(a==="childs")throw new Error("Please modify childs via .child");f.push({type:"set",name:a,value:d})},setProp(a,p){let f=l();typeof p=="string"?f.push({type:"prop",mode:"string",name:a,value:p}):p.mode==="string"?f.push({type:"prop",mode:"string",name:a,value:p.value}):p.mode==="raw"?f.push({type:"prop",mode:"raw",name:a,value:p.value,valueBuilt:p.valueBuilt}):p.mode==="jsx"&&f.push({type:"prop",mode:"jsx",name:a,value:p.value})},setChilds(a){l().push({type:"child",childs:a})},get childs(){if(c.component?.id){let a=c.component?.props.child;if(a&&a.content){let p=t.get("component")?.get("props")?.get("child")?.get("content");if(p){let f=p.get("id")||"";return i[f]?[i[f]]:[oi(e,p,n,i)]}}return[]}return c.childs?c.childs.map(a=>{if(a){let p=e[a.id];if(i[a.id])return i[a.id];if(p&&p.mitem)return oi(e,p.mitem,n,i)}}).filter(a=>a):[]},get parent(){if(t){let a=t.parent.toJSON(),p=null;if(Array.isArray(a))p=(t.parent?.parent).get("id");else{let d=t.parent?.parent?.parent?.parent;typeof d=="object"&&typeof d.get=="function"&&(p=d.get("id"))}let f=e[p]?.mitem;if(f){let d=i[p]?i[p]:oi(e,f,n,i);return Array.isArray(a)?{item:d,child_type:"child",child_idx:a.findIndex(h=>h.id===d.id)}:{item:d,child_type:"prop"}}}return null}}};return i[o]=u,u},lE=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))i.mode?i.mode==="string"?n[r]={value:JSON.stringify(i.value),valueBuilt:JSON.stringify(i.value),meta:{type:"text"}}:i.mode==="jsx"&&i.value?n[r]={value:"",valueBuilt:"",content:si([i.value],t)[0],meta:{type:"content-element"}}:i.mode==="raw"&&(n[r]={value:i.value,valueBuilt:i.valueBuilt,meta:{type:"text"}}):n[r]=i;return n},si=(e,t)=>{let n=t||{};return e.map(i=>{let o={...i};if(delete o.edit,o.id||(o.id=(0,jf.createId)()),o.component&&(o.component.instances||(o.component.instances={}),o.component.ref_ids||(o.component.ref_ids={}),o.component?.props)){o.component.props=lE(o.component.props,n);for(let[s,l]of Object.entries(o.component.props))!l.valueBuilt&&l.value&&(n[o.id+"|||"+s]=l),l.content&&(l.content=si([l.content],n)[0])}return o.childs?o.childs=si(o.childs,n):o.childs=[],o})};var li=(e,t,n)=>({...t,edit:{setChilds(r){},get childs(){if(t.component?.id){let r=t.component?.props.child;return r.content?[li(e,r.content,n)]:[]}return t.childs?t.childs.map(r=>{if(r){let i=e[r.id];if(i&&i.item)return li(e,i.item,n)}}).filter(r=>r):[]},get props(){if(t.component?.props){let r={};for(let[i,o]of Object.entries(t.component.props))if(o.content){let s=t.component?.props?.[i]?.content;s?r[i]={mode:"jsx",value:li(e,s,n)}:r[i]={mode:"jsx",value:null}}else{let s=typeof o.valueBuilt=="string"?o.valueBuilt.trim():"";if(s.endsWith(`; -`)&&(s=s.substring(0,s.length-2)),s&&s===o.value.trim()){let l=new Function(`return ${o.value}`);r[i]={mode:"string",value:l()}}else r[i]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return r}},async commit(){},get parent(){let r=e[t.id];if(r&&r.parent?.id){let i=e[r.parent.id];return li(e,i.item,n)}return null},pending:[],setProp(r,i){},setValue(r,i){}}});var Ff=P(G()),Dy=(e,t,n,r,i,o)=>{let s=bo(e,t,n,r,i);e.visit&&e.visit(t,s),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:Ly(e,n,t),PassProp:Ay(e,n,t,r,i)};let l=t.script,c=window.exports,u={useEffect:cr.useEffect,children:s.props.children,props:s.props,Local:l?.Local,db:e.site.db,api:e.site.api,PassProp:l?.PassProp,ErrorBox:Nt,newElement:()=>{},__props:r,_item:t.mitem?oi(e.meta,t.mitem,e.page.cur.id):li(e.meta,t.item,e.page.cur.id),_meta:e.meta,render:d=>{let h=d;if((0,cr.isValidElement)(d)&&d.props.children){let v=m=>{let g=!1,y=[];if((0,cr.isValidElement)(m)){if(m.type===t.script?.PassProp)return{should_replace:!0,el:{...m,props:{...m.props,internal_key:m.key}}};if(Array.isArray(m.props?.children))for(let _ of m.props?.children)if(Array.isArray(_)){let S=[],E=!1;for(let k of _){let b=v(k);b.should_replace?(S.push(b.el),E=!0):S.push(k)}E?(g=!0,y.push(S)):y.push(_)}else typeof _=="object"&&_?_.type===t.script?.PassProp&&(g=!0,y.push({..._,props:{..._.props,internal_key:_.props.key}})):y.push(_)}return{should_replace:g,el:{...m,props:{...m.props,children:y}}}},w=v(d);w.should_replace&&(h=w.el)}l&&(l.result=(0,Ff.jsx)(cr.Suspense,{children:h}))},params,...Gl(e),...c,...r};if(typeof r=="object"){for(let[d,h]of Object.entries(r))if(typeof h=="object"&&h&&h._jsx){let v=h;u[d]=(0,Ff.jsx)(aE,{fn:v.fn,passprop:{...r},meta:t})}}!Mn.isEditor&&t.item.adv?.js&&Zl(e,t.item.adv.js);let a=t.item.adv?.jsBuilt||"",p=Bf(a,Uf)||"",f=`// ${t.item.name}: ${t.item.id} + ${Nx(e,t.mode)} + ${Ax(e,t.mode)} + ${Rx(e,t.mode,t?.editor)} + ${Tx(e,t.mode)} + ${px(e,t.mode)} + ${Px(e,t.mode)} + `,(t?.hover||t?.active)&&Ix({item:e,hover:t?.hover,active:t?.active}),dx(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Dx=G(ge()),ms=(e,t,n,r,i)=>{let o=t.item,a;o.component?.style&&(a={style:o.component.style,className:mm(o.component.style,{mode:e.mode})});let s={className:mm(o,{mode:e.mode}),inherit:a},u={},f=t.item.childs,l;return t.item.type==="text"?(l=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):l=Array.isArray(f)&&f?.map(d=>{if(!d)return null;let{id:c}=d,p=n?e.layout?.meta[c]:e.meta[c];return p?(0,Dx.jsx)(Zn,{meta:p,is_layout:n,passprop:{...r},depth:i+1},c):(d.type==="item"&&d.component?.id&&console.error(`Warning component ${d.name} - ${d.component.id} failed to load.`),null)}),s.children=l,t.item.adv?.html?(delete s.children,s.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete s.children,delete s.dangerouslySetInnerHTML),{props:s,text_props:u}};m();g();h();var Wx=G(Qe());m();g();h();var Bx=G(Du());m();g();h();var I3={id:"",name:"",domain:"",config:{api_url:""},js:"",js_compiled:"",responsive:"",layout:{id:"--",meta:void 0,entry:[]}},P3={id:"",name:"",url:"",snapshot:null,comps:{}};var ut={active_id:!1,comp_id:!1,instance_comp_id:!1,instance_item_id:!1},bo={should_render_main:!0,hover:{id:""},scope:{},script_nav:{list:[],idx:-1},text:{id:"",content:"",timeout:null,el:null},get item_id(){return ut.active_id===!1&&(ut.active_id=localStorage.getItem("prasi-active-id")||""),ut.active_id||""},set item_id(e){localStorage.setItem("prasi-active-id",e||""),ut.active_id=e||""},get comp_id(){return ut.comp_id===!1&&(ut.comp_id=localStorage.getItem("prasi-comp-id")||""),ut.comp_id||""},set comp_id(e){localStorage.setItem("prasi-comp-id",e||""),ut.comp_id=e||""},instance:{get comp_id(){return ut.instance_comp_id===!1&&(ut.instance_comp_id=localStorage.getItem("prasi-instance-comp-id")||""),ut.instance_comp_id||""},set comp_id(e){localStorage.setItem("prasi-instance-comp-id",e||""),ut.instance_comp_id=e||""},get item_id(){return ut.instance_item_id===!1&&(ut.instance_item_id=localStorage.getItem("prasi-instance-item-id")||""),ut.instance_item_id||""},set item_id(e){localStorage.setItem("prasi-instance-item-id",e||""),ut.instance_item_id=e||""}}},sH={mode:"",user:{id:"",username:"",client_id:""},clients:{},status:"init",preview:{url_cache:new Set,route_cache:Jl(),page_cache:{},meta_cache:{}},sync:null,sync_assigned:!1,site:Xi(I3),site_tstamp:Date.now(),site_exports:{},site_dts:"",site_dts_entry:{},prisma_ext:"",script:{site_types:{},loaded:!1,do_edit:async(e,t)=>{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:P3,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open_all:!1,open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,rebuilding:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};m();g();h();var Fu=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});m();g();h();var wi=G(Qe());m();g();h();var N3=Yd("prasi-cache","prasi-cache-store"),Mx={timeout:null,store:N3},ju=(e,t)=>{let n=[...Lx(t,"navigate(",")"),...Lx(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(Mx.timeout),Mx.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Lx=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let a=e.indexOf(t,r);if(i=r,a>=0){let s=e[a+t.length];if(s==='"'||s==="'"||s==="`"){let u=e.indexOf(`${s}${n}`,a+t.length+1),f=e.substring(a+t.length+1,u);r=u+2+n.length,o.push(f)}}if(i===r)break}return o};m();g();h();var vi=G(Qe());m();g();h();var Ux=G(pm()),yi=G(Qe());var gm=G(ge()),Fx=(e,t,n,r,i)=>o=>{let[a,s]=(0,yi.useState)({}),u=o.idx||o.internal_key;n.item.script||(n.item.script={});let f=n.item.script;typeof u<"u"&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[u]||(n.item.script_keyed[u]={}),f=n.item.script_keyed[u]),f.passprop||(f.passprop={});let l={},d=!1;for(let[v,S]of Object.entries(o))["children","key"].includes(v)||(d=!0,l[v]=S);let c={...r,...l};if(typeof u<"u"&&((typeof f.passprop.internal_key>"u"||u===f.passprop.internal_key)&&(f.passprop=c),c=f.passprop),n.editor_props=c,!Array.isArray(o.children)&&(0,yi.isValidElement)(o.children)&&typeof o.children=="object"){let v=(0,Ux.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(v)){let S=!0;for(let b of v)!(0,yi.isValidElement)(b)&&typeof b=="object"||(S=!1);if(S)return v.map(b=>{let y=e.meta[b.id];if(y||(e.meta[b.id]={item:b},y=e.meta[b.id]),y){if(Object.keys(y.item).length<=3&&y.mitem){let w={...y.item},_=y.mitem.toJSON();y.item={..._,...w}}return(0,gm.jsx)(Zn,{is_layout:t,meta:y,passprop:c,parent_key:o.internal_key,depth:i},b.id)}return null})}}if(!Array.isArray(o.children)&&!(0,yi.isValidElement)(o.children)&&typeof o.children=="object"){let v=o.children.id;if(v){let S=e.meta[v];if(!S){e.meta[v]={item:o.children},S=e.meta[v];let b=S.item.component?.id;b&&e.comp.load(b).then(y=>{if(y){for(let[_,x]of Object.entries(y)){let N=S.item;N[_]||(N[_]=x)}let w=S.item.component?.props;for(let[_,x]of Object.entries(y.component?.props||{}))w[_]||(w[_]=x);s({})}})}return(0,gm.jsx)(Zn,{is_layout:t,meta:S,passprop:c,parent_key:o.internal_key,depth:i})}}return ym(o,c,u?{parent_key:u}:void 0)},ym=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return hm(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(hm(o,r,t,n));return i}return hm(r.children,r,t,n)},hm=(e,t,n,r)=>{if((0,yi.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var Eo={},jx=(e,t,n)=>r=>{let i=(["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550")&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:a,parent_key:s}=r,u=e.script?.init_local_effect,f=t?e.layout?.meta:e.meta,l=(0,vi.useRef)(Eo[o]?Eo[o]:r.value),[d,c]=(0,vi.useState)({}),p=l.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():c({})},zu(e,n,n.script?.scope,s),r.hook&&r.hook(p),(0,vi.useEffect)(()=>{if(n.parent?.instance_id&&f){let S=f[n.parent?.instance_id];if(S&&S.instances){for(let[b,y]of Object.entries(S.instances[n.parent.instance_id]))if(y===n.item.id){o=b;break}}}return!u[o]&&(typeof u=="object"&&(u[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(Eo[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,vi.useEffect)(()=>{i&&Eo[o]===null&&(async()=>r.effect&&(await r.effect(p),i&&(Eo[o]=p)))()},[Eo[o]]),ym(a,{...n.script?.scope,[r.name]:p})};m();g();h();var vm=G(Du()),hs=window,Oo=(e,t,n,r)=>{let i=r||{},o=t.get("id")||"";hs.prasiEditDevItem||(hs.prasiEditDevItem={});let a=hs.prasiEditDevItem[n];a||(hs.prasiEditDevItem[n]={},a=hs.prasiEditDevItem[n]);let s=()=>{let l=t.get("id")||"",d=a[l];return d||(a[l]=[],d=a[l]),d},u=t.toJSON(),f={...u,edit:{get props(){if(u.component?.props){let l={};for(let[d,c]of Object.entries(u.component.props))if(c.content){let p=t.get("component")?.get("props")?.get(d)?.get("content");if(p){let v=p.get("id")||"";i[v]?l[d]={mode:"jsx",value:i[v]}:l[d]={mode:"jsx",value:Oo(e,p,n,i)}}else l[d]={mode:"jsx",value:null}}else{let p=typeof c.valueBuilt=="string"?c.valueBuilt.trim():"";if(p.endsWith(`; +`)&&(p=p.substring(0,p.length-2)),p&&p===c.value.trim()){let v=new Function(`return ${c.value}`);l[d]={mode:"string",value:v()}}else l[d]={mode:"raw",value:c.value,valueBuilt:c.valueBuilt}}return l}},get pending(){return[]},async commit(){let l={},d={};if(t){for(let[c,p]of Object.entries(a)){let v=e[c];if(!v||!v.mitem)continue;let b=v.mitem.toJSON();if(b&&b.component){let y=b?.component?.props;if(!y){console.log(b,y);return}let w={};for(let x of p)if(x.type==="prop"&&y)y[x.name]&&(x.mode==="string"?(y[x.name].value=JSON.stringify(x.value),y[x.name].valueBuilt=JSON.stringify(x.value)):x.mode==="raw"?(y[x.name].value=x.value,x.valueBuilt?y[x.name].valueBuilt=x.valueBuilt:w[x.name]=x.value):x.mode==="jsx"&&(y[x.name]||(y[x.name]={meta:{type:"content-element"}}),x.value&&(y[x.name].content=Co([x.value],d)[0])));else if(x.type==="set"&&typeof x.value=="object")for(let[N,D]of Object.entries(x.value))b[N]=D;else if(x.type==="child"&&Array.isArray(x.childs))if(b.component?.id)b.component.props||(b.component.props={}),b.component.props.child={meta:{type:"content-element"},content:{type:"item",id:(0,vm.createId)(),name:"child",childs:Co(x.childs.filter(N=>N),d)}};else{let N=Co(x.childs.filter(D=>D),d);b.childs=N}for(let[x,N]of Object.entries(d))w[x]=N.value;let _=await _api.code_build(w);if(y)for(let[x,N]of Object.entries(_))y[x]?y[x].valueBuilt=N:d[x]&&(d[x].valueBuilt=N);l[c]=b}}t.doc?.transact(()=>{for(let[c,p]of Object.entries(l)){let v=e[c];v.mitem&&syncronize(v.mitem,p)}})}},setValue(l,d){let c=s(),p=d;if(l==="childs")throw new Error("Please modify childs via .child");c.push({type:"set",name:l,value:p})},setProp(l,d){let c=s();typeof d=="string"?c.push({type:"prop",mode:"string",name:l,value:d}):d.mode==="string"?c.push({type:"prop",mode:"string",name:l,value:d.value}):d.mode==="raw"?c.push({type:"prop",mode:"raw",name:l,value:d.value,valueBuilt:d.valueBuilt}):d.mode==="jsx"&&c.push({type:"prop",mode:"jsx",name:l,value:d.value})},setChilds(l){s().push({type:"child",childs:l})},get childs(){if(u.component?.id){let l=u.component?.props.child;if(l&&l.content){let d=t.get("component")?.get("props")?.get("child")?.get("content");if(d){let c=d.get("id")||"";return i[c]?[i[c]]:[Oo(e,d,n,i)]}}return[]}return u.childs?u.childs.map(l=>{if(l){let d=e[l.id];if(i[l.id])return i[l.id];if(d&&d.mitem)return Oo(e,d.mitem,n,i)}}).filter(l=>l):[]},get parent(){if(t){let l=t.parent.toJSON(),d=null;if(Array.isArray(l))d=(t.parent?.parent).get("id");else{let p=t.parent?.parent?.parent?.parent;typeof p=="object"&&typeof p.get=="function"&&(d=p.get("id"))}let c=e[d]?.mitem;if(c){let p=i[d]?i[d]:Oo(e,c,n,i);return Array.isArray(l)?{item:p,child_type:"child",child_idx:l.findIndex(v=>v.id===p.id)}:{item:p,child_type:"prop"}}}return null}}};return i[o]=f,f},A3=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))i.mode?i.mode==="string"?n[r]={value:JSON.stringify(i.value),valueBuilt:JSON.stringify(i.value),meta:{type:"text"}}:i.mode==="jsx"&&i.value?n[r]={value:"",valueBuilt:"",content:Co([i.value],t)[0],meta:{type:"content-element"}}:i.mode==="raw"&&(n[r]={value:i.value,valueBuilt:i.valueBuilt,meta:{type:"text"}}):n[r]=i;return n},Co=(e,t)=>{let n=t||{};return e.map(i=>{let o={...i};if(delete o.edit,o.id||(o.id=(0,vm.createId)()),o.component&&(o.component.instances||(o.component.instances={}),o.component.ref_ids||(o.component.ref_ids={}),o.component?.props)){o.component.props=A3(o.component.props,n);for(let[a,s]of Object.entries(o.component.props))!s.valueBuilt&&s.value&&(n[o.id+"|||"+a]=s),s.content&&(s.content=Co([s.content],n)[0])}return o.childs?o.childs=Co(o.childs,n):o.childs=[],o})};m();g();h();var To=(e,t,n)=>({...t,edit:{setChilds(r){},get childs(){if(t.component?.id){let r=t.component?.props.child;return r.content?[To(e,r.content,n)]:[]}return t.childs?t.childs.map(r=>{if(r){let i=e[r.id];if(i&&i.item)return To(e,i.item,n)}}).filter(r=>r):[]},get props(){if(t.component?.props){let r={};for(let[i,o]of Object.entries(t.component.props))if(o.content){let a=t.component?.props?.[i]?.content;a?r[i]={mode:"jsx",value:To(e,a,n)}:r[i]={mode:"jsx",value:null}}else{let a=typeof o.valueBuilt=="string"?o.valueBuilt.trim():"";if(a.endsWith(`; +`)&&(a=a.substring(0,a.length-2)),a&&a===o.value.trim()){let s=new Function(`return ${o.value}`);r[i]={mode:"string",value:s()}}else r[i]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return r}},async commit(){},get parent(){let r=e[t.id];if(r&&r.parent?.id){let i=e[r.parent.id];return To(e,i.item,n)}return null},pending:[],setProp(r,i){},setValue(r,i){}}});var wm=G(ge()),zx=(e,t,n,r,i,o)=>{let a=ms(e,t,n,r,i);e.visit&&e.visit(t,a),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:jx(e,n,t),PassProp:Fx(e,n,t,r,i)};let s=t.script,u=window.exports,f={useEffect:wi.useEffect,children:a.props.children,props:a.props,Local:s?.Local,db:e.site.db,api:e.site.api,PassProp:s?.PassProp,ErrorBox:kn,newElement:()=>{},__props:r,_item:t.mitem?Oo(e.meta,t.mitem,e.page.cur.id):To(e.meta,t.item,e.page.cur.id),_meta:e.meta,render:p=>{let v=p;if((0,wi.isValidElement)(p)&&p.props.children){let S=y=>{let w=!1,_=[];if((0,wi.isValidElement)(y)){if(y.type===t.script?.PassProp)return{should_replace:!0,el:{...y,props:{...y.props,internal_key:y.key}}};if(Array.isArray(y.props?.children))for(let x of y.props?.children)if(Array.isArray(x)){let N=[],D=!1;for(let A of x){let M=S(A);M.should_replace?(N.push(M.el),D=!0):N.push(A)}D?(w=!0,_.push(N)):_.push(x)}else typeof x=="object"&&x?x.type===t.script?.PassProp&&(w=!0,_.push({...x,props:{...x.props,internal_key:x.props.key}})):_.push(x)}return{should_replace:w,el:{...y,props:{...y.props,children:_}}}},b=S(p);b.should_replace&&(v=b.el)}s&&(s.result=(0,wm.jsx)(wi.Suspense,{children:v}))},params,...Fu(e),...u,...r};if(typeof r=="object"){for(let[p,v]of Object.entries(r))if(typeof v=="object"&&v&&v._jsx){let S=v;f[p]=(0,wm.jsx)(D3,{fn:S.fn,passprop:{...r},meta:t})}}!At.isEditor&&t.item.adv?.js&&ju(e,t.item.adv.js);let l=t.item.adv?.jsBuilt||"",d=xm(l,_m)||"",c=`// ${t.item.name}: ${t.item.id} try { - ${p} + ${d} } catch (e) { console.error(\`\\ Error in item ${t.item.name}: ${t.item.id} @@ -107,29 +118,21 @@ Error in item ${t.item.name}: ${t.item.id} ERROR: \${e.message} \`) } - `;try{new Function(...Object.keys(u),"__js",f)(...Object.values(u),t.item.adv?.js)}catch(d){console.error(` + `;try{new Function(...Object.keys(f),"__js",c)(...Object.values(f),t.item.adv?.js)}catch(p){console.error(` // Syntax Error in ${t.item.name}: ${t.item.id} -// arg: ${Object.keys(u).join(", ")} +// arg: ${Object.keys(f).join(", ")} -${f} +${c} -${d.message} -`)}Kl(e,t,r,o)},aE=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),Uf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},Bf=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var jy=P(G());var zy=(e,t,n,r,i,o)=>{if(t.item.component?.id){let s=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),s=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),s=t.item.script),!s)return;let c={...window.exports,db:e.site.db,api:e.site.api,...Gl(e),...r,params};s.props={};let u=new Set;if(t.item.component.props){let a={};for(let[p,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let m={_jsx:!0,fn:g=>{let y=f.content?.id;if(y){let _=n?e.layout?.meta[y]:e.meta[y];if(!_)return null;let S=t.instances;if(!g.meta.item.originalId||!S||!S[t.item.id])return null;let k=g.meta.item.originalId;if(_.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let b=t.mitem?.get("component")?.get("props")?.get(p);if(b){let O=b.get("jsxCalledBy");!O||typeof O!="object"?b.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&b.set("jsxCalledBy",[t.item.id,k])}}return(0,jy.jsx)(en,{meta:_,passprop:g.passprop,is_layout:n,depth:i+1})}return null}};c[p]=m,r&&(r[p]=m);continue}if(f.value&&Zl(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let m=t.mitem?.get("component")?.get("props")?.get(p);if(m){uE(m,f.value);return}}let d=f.valueBuilt||"",h=Bf(d,Uf)||"",v=new Function(...Object.keys(c),`// [${t.item.name}] ${p}: ${t.item.id} - return ${h} - `);s.props[p]={value:h,valueBuilt:h};let w=v(...Object.values(c));typeof w=="function"&&(w=(...m)=>new Function(...Object.keys(c),`// [${t.item.name}] ${p}: ${t.item.id} -return ${h.trim()} -`)(...Object.values(c))(...m)),c[p]=w,a[p]=w,r&&(r[p]=w)}catch{u.add(p)}if(location.pathname.startsWith("/ed/")&&ri.item_id&&t.item.id===ri.item_id){ri.scope={};for(let[p,f]of Object.entries(r))ri.scope[p]=f;ri.scope.self_props=a}}}},ut={timeout:null,set:new WeakSet,map:{},src:{}},uE=(e,t)=>{if(!ut.set.has(e)){ut.set.add(e);let n=(0,My.createId)();ut.map[n]={mprop:e},ut.src[n]=t}clearTimeout(ut.timeout),ut.timeout=setTimeout(async()=>{let n=await _api.code_build(ut.src),r=null;for(let[i,o]of Object.entries(n)){let s=ut.map[i].mprop;if(!r&&s.doc){r=s.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ut.map[i].mprop.set("valueBuilt",o)}),ut.set=new WeakSet,ut.map={},ut.src={})},300)},Kl=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[s,l]of Object.entries(i.props))if(l.fn){let c=new Function(...Object.keys(o),`// [${t.item.name}] ${s}: ${t.item.id} - return ${l.value||""} - `);l.fn=c(...Object.values(o))}}};var $f=P(G()),Hf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Pn(An,"VI"),[s,l]=(0,Fy.useState)({});e.render=()=>{l({})};let c=t;return e.item.component?.id&&(c||(c={}),zy(o,e,n,c,i,r)),e.item.adv?.html?(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(Dy(o,e,n,c,i,r),e.script)?e.script.result:(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i})};var Se=P(G()),cE=70,fE={debug:!!localStorage.getItem("prasi-js-debug")},ql={enabled:!1,meta:{}},en=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(ql.enabled){let o=ql.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>cE)return(0,Se.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,Se.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,Se.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(fE.debug){let o="";for(let s=0;s{let o=Pn(An,"VI");if(n&&e.item.name==="children"){let l=[];for(let c of o.entry){let u=o.meta[c];if(u.item.adv?.js||u.item.component?.id)l.push((0,Se.jsx)(Nt,{meta:u,children:(0,Se.jsx)(Hf,{meta:u,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let a=bo(o,u,!1,t,i);o.visit&&o.visit(u,a),l.push((0,Se.jsx)("div",{...a.props}))}}return(0,Se.jsx)(Se.Fragment,{children:l.map((c,u)=>(0,Se.jsx)(Uy.Fragment,{children:c},u))})}let s=bo(o,e,n,t,i);return o.visit&&o.visit(e,s),(0,Se.jsx)("div",{...s.props})};var Je=window,By=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Je.notif?.onTap){let s=null,l=0;await new Promise(()=>{s=setInterval(()=>{l++,l>20&&clearInterval(s),o()&&clearInterval(s)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Je.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Je.notif?.onTap){i(()=>Je.notif?.onTap?(Je.notif?.onTap(r.notif),!0):!1);return}Je.notif?.onTap&&Je.notif?.onTap(r.notif);break;case"notification-receive":Je.notif?.onReceive||i(()=>Je.notif?.onReceive?(Je.notif?.onReceive(r.notif),!0):!1),Je.notif?.onReceive&&Je.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Je.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};var Vf=window;Vf.prasi_ext||(Vf.prasi_ext={});var Xl=Vf.prasi_ext;var $y=async e=>{let t=Xl[e.site.id];if(t||(Xl[e.site.id]={status:"init"},t=Xl[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await By(e,t),t.status="ready"}};var ai=P(G()),Hy=({})=>{let e=Pn(An,"VI"),t=Nn({tick:Date.now()});if(e.tick=t.tick,$y(e),e.status!=="ready")return(0,ai.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ai.jsx)(So,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,ai.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,ai.jsx)(Nt,{children:(0,ai.jsx)(en,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Jl=P(G()),At=window;At.prasi_internal||(At.prasi_internal={page:{id:""}});var Vy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:s,visit:l,script:c,preloaded:u,page_id:a,render_stat:p,on_status_changed:f,on_preload:d,layout:h,comp_load:v})=>{let w=Pn(An,"VI");return w.mode=o,w.entry=t,w.on_preload=d,w.comp.load=v,a&&(At.prasi_internal.page.id=a),At.siteurl=(m,g)=>{if(m.startsWith("http://")||m.startsWith("https://"))return m;try{["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550"?w.site.api_url&&(w.site_url||(w.site_url=new URL(w.site.api_url))):w.site_url||(g&&w.site.api_url?w.site_url=new URL(w.site.api_url):w.site_url=new URL(location.href),w.site_url.pathname="")}catch{}if(w.site_url){let y=w.site_url,_=m;return _.startsWith("/")||(_="/"+_),At.prasiContext.siteUrl&&(_=At.prasiContext.siteUrl(_)),`${y.protocol}//${y.host}${_}`}return m},At.isMobile=o==="mobile",At.isDesktop=o==="desktop",At.preloaded=u||(m=>{}),At.preload=(m,g)=>{if(w.on_preload)return new Promise(y=>{w.page.navs[a]||(w.page.navs[a]=new Set);let _=w.page.navs[a],S=typeof m=="string"?[m]:m,E=!0;for(let k of S)_.has(k)||(_.add(k),E=!1);E?y():(w.page.preload.push(y),w.on_preload?.({urls:Array.from(w.page.navs[a]),opt:{on_load:(...k)=>{g?.on_load?.(...k);for(let b of w.page.preload)b();w.page.preload=[],w.render()}}}))})},w.layout=h,w.page.cur.id=a,w.on_status_changes=f,p==="disabled"&&(ql.enabled=!1),w.meta!==e&&(w.meta=e),c&&(w.script.init_local_effect=c.init_local_effect),w.visit=l,w.status==="init"&&(w.site.db=s,w.site.api=i,lg(w,{api_url:n,site_id:r})),d&&(0,Yl.useEffect)(()=>{setTimeout(()=>{let m=w.page.navs[w.page.cur.id];m&&d({urls:Array.from(m),opt:{on_load(g){}}})},500)},[w.page.cur.id]),(0,Jl.jsx)(Nt,{children:(0,Jl.jsx)(Yl.Suspense,{children:(0,Jl.jsx)(Hy,{})})})};var ui=async(e,t)=>{let n=C.comp;for(let i of e)i&&i.type!=="text"&&ea(i,t);let r=Object.keys(n.pending);if(r.length>0)try{let i=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,s]of Object.entries(i))delete n.pending[o],n.list[o]=s,await zl(`comp-${o}`,s);if(Object.keys(n.pending).length>0){console.error(`Warning: component not found: ${Object.keys(n.pending)}`);return}await ui(Object.values(i))}catch(i){console.error(i)}},ea=(e,t)=>{let n=C.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&ea(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&ea(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&ea(i,t)}};var Wy=e=>new Promise(async t=>{let n=!1,r=await gf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(C.url`_prasi/page/${e}`)).json();n||t(i)}),dE=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await gf(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(C.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Gy=async e=>{let t=e.map(r=>C.route.router?.lookup(r)).filter(r=>r&&r.id);return await dE(t.map(r=>r?.id))};var Ky=P(Zy()),Qy=()=>{let e=C;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Ky.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};function Ao(e,t){return function(){return e.apply(t,arguments)}}var{toString:pE}=Object.prototype,{getPrototypeOf:Zf}=Object,ra=(e=>t=>{let n=pE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>ra(t)===e),ia=e=>t=>typeof t===e,{isArray:ci}=Array,Lo=ia("undefined");function mE(e){return e!==null&&!Lo(e)&&e.constructor!==null&&!Lo(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Jy=xt("ArrayBuffer");function hE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Jy(e.buffer),t}var gE=ia("string"),ct=ia("function"),Yy=ia("number"),oa=e=>e!==null&&typeof e=="object",yE=e=>e===!0||e===!1,na=e=>{if(ra(e)!=="object")return!1;let t=Zf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_E=xt("Date"),vE=xt("File"),wE=xt("Blob"),xE=xt("FileList"),kE=e=>oa(e)&&ct(e.pipe),SE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=ra(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},EE=xt("URLSearchParams"),[bE,RE,CE,IE]=["ReadableStream","Request","Response","Headers"].map(xt),TE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Do(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ci(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var t_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,n_=e=>!Lo(e)&&e!==t_;function Gf(){let{caseless:e}=n_(this)&&this||{},t={},n=(r,i)=>{let o=e&&e_(t,i)||i;na(t[o])&&na(r)?t[o]=Gf(t[o],r):na(r)?t[o]=Gf({},r):ci(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Do(t,(i,o)=>{n&&ct(i)?e[o]=Ao(i,n):e[o]=i},{allOwnKeys:r}),e),NE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PE=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},AE=(e,t,n,r)=>{let i,o,s,l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Zf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LE=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},DE=e=>{if(!e)return null;if(ci(e))return e;let t=e.length;if(!Yy(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ME=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zf(Uint8Array)),zE=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},jE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FE=xt("HTMLFormElement"),UE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),qy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BE=xt("RegExp"),r_=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Do(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},$E=e=>{r_(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},HE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ci(e)?r(e):r(String(e).split(t)),n},VE=()=>{},WE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Wf="abcdefghijklmnopqrstuvwxyz",Xy="0123456789",i_={DIGIT:Xy,ALPHA:Wf,ALPHA_DIGIT:Wf+Wf.toUpperCase()+Xy},GE=(e=16,t=i_.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ZE(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var KE=e=>{let t=new Array(10),n=(r,i)=>{if(oa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ci(r)?[]:{};return Do(r,(s,l)=>{let c=n(s,i+1);!Lo(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},QE=xt("AsyncFunction"),qE=e=>e&&(oa(e)||ct(e))&&ct(e.then)&&ct(e.catch),x={isArray:ci,isArrayBuffer:Jy,isBuffer:mE,isFormData:SE,isArrayBufferView:hE,isString:gE,isNumber:Yy,isBoolean:yE,isObject:oa,isPlainObject:na,isReadableStream:bE,isRequest:RE,isResponse:CE,isHeaders:IE,isUndefined:Lo,isDate:_E,isFile:vE,isBlob:wE,isRegExp:BE,isFunction:ct,isStream:kE,isURLSearchParams:EE,isTypedArray:ME,isFileList:xE,forEach:Do,merge:Gf,extend:OE,trim:TE,stripBOM:NE,inherits:PE,toFlatObject:AE,kindOf:ra,kindOfTest:xt,endsWith:LE,toArray:DE,forEachEntry:zE,matchAll:jE,isHTMLForm:FE,hasOwnProperty:qy,hasOwnProp:qy,reduceDescriptors:r_,freezeMethods:$E,toObjectSet:HE,toCamelCase:UE,noop:VE,toFiniteNumber:WE,findKey:e_,global:t_,isContextDefined:n_,ALPHABET:i_,generateString:GE,isSpecCompliantForm:ZE,toJSONObject:KE,isAsyncFn:QE,isThenable:qE};function fi(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}x.inherits(fi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o_=fi.prototype,s_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{s_[e]={value:e}});Object.defineProperties(fi,s_);Object.defineProperty(o_,"isAxiosError",{value:!0});fi.from=(e,t,n,r,i,o)=>{let s=Object.create(o_);return x.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),fi.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var D=fi;var sa=null;function Kf(e){return x.isPlainObject(e)||x.isArray(e)}function a_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function l_(e,t,n){return e?e.concat(t).map(function(i,o){return i=a_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function XE(e){return x.isArray(e)&&!e.some(Kf)}var JE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function YE(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(sa||FormData),n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!x.isUndefined(w[v])});let r=n.metaTokens,i=n.visitor||a,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(x.isDate(h))return h.toISOString();if(!c&&x.isBlob(h))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(h)||x.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function a(h,v,w){let m=h;if(h&&!w&&typeof h=="object"){if(x.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(x.isArray(h)&&XE(h)||(x.isFileList(h)||x.endsWith(v,"[]"))&&(m=x.toArray(h)))return v=a_(v),m.forEach(function(y,_){!(x.isUndefined(y)||y===null)&&t.append(s===!0?l_([v],_,o):s===null?v:v+"[]",u(y))}),!1}return Kf(h)?!0:(t.append(l_(w,v,o),u(h)),!1)}let p=[],f=Object.assign(JE,{defaultVisitor:a,convertValue:u,isVisitable:Kf});function d(h,v){if(!x.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(h),x.forEach(h,function(m,g){(!(x.isUndefined(m)||m===null)&&i.call(t,m,x.isString(g)?g.trim():g,v,f))===!0&&d(m,v?v.concat(g):[g])}),p.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return d(e),t}var zn=YE;function u_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function c_(e,t){this._pairs=[],e&&zn(e,this,t)}var f_=c_.prototype;f_.append=function(t,n){this._pairs.push([t,n])};f_.toString=function(t){let n=t?function(r){return t.call(this,r,u_)}:u_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var la=c_;function e2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(e,t,n){if(!t)return e;let r=n&&n.encode||e2,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),o){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Qf=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}},qf=Qf;var aa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var d_=typeof URLSearchParams<"u"?URLSearchParams:la;var p_=typeof FormData<"u"?FormData:null;var m_=typeof Blob<"u"?Blob:null;var h_={isBrowser:!0,classes:{URLSearchParams:d_,FormData:p_,Blob:m_},protocols:["http","https","file","blob","url","data"]};var Jf={};$1(Jf,{hasBrowserEnv:()=>Xf,hasStandardBrowserEnv:()=>t2,hasStandardBrowserWebWorkerEnv:()=>n2,origin:()=>r2});var Xf=typeof window<"u"&&typeof document<"u",t2=(e=>Xf&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),n2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r2=Xf&&window.location.href||"http://localhost";var ge={...Jf,...h_};function Yf(e,t){return zn(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ge.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function i2(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function o2(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=o2(i[s])),!l)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(i2(r),i,n,0)}),n}return null}var ua=s2;function l2(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var ed={transitional:aa,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(ua(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yf(t,this.formSerializer).toString();if((l=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return zn(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),l2(t)):t}],transformResponse:[function(t){let n=this.transitional||ed.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){let s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?D.from(l,D.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{ed.headers[e]={}});var di=ed;var a2=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g_=e=>{let t={},n,r,i;return e&&e.split(` -`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&a2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var y_=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function ca(e){return e===!1||e==null?e:x.isArray(e)?e.map(ca):String(e)}function u2(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var c2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function td(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function f2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function d2(e,t){let n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}var pi=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(l,c,u){let a=zo(c);if(!a)throw new Error("header name must be a non-empty string");let p=x.findKey(i,a);(!p||i[p]===void 0||u===!0||u===void 0&&i[p]!==!1)&&(i[p||c]=ca(l))}let s=(l,c)=>x.forEach(l,(u,a)=>o(u,a,c));if(x.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(x.isString(t)&&(t=t.trim())&&!c2(t))s(g_(t),n);else if(x.isHeaders(t))for(let[l,c]of t.entries())o(c,l,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=zo(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return u2(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=zo(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||td(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(s){if(s=zo(s),s){let l=x.findKey(r,s);l&&(!n||td(r,r[l],l,n))&&(delete r[l],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||td(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return x.forEach(this,(i,o)=>{let s=x.findKey(r,o);if(s){n[s]=ca(i),delete n[o];return}let l=t?f2(o):String(o).trim();l!==o&&delete n[o],n[l]=ca(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[y_]=this[y_]={accessors:{}}).accessors,i=this.prototype;function o(s){let l=zo(s);r[l]||(d2(i,s),r[l]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};pi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(pi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(pi);var pe=pi;function jo(e,t){let n=this||di,r=t||n,i=pe.from(r.headers),o=r.data;return x.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Fo(e){return!!(e&&e.__CANCEL__)}function __(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(__,D,{__CANCEL__:!0});var Lt=__;function Uo(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nd(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function p2(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),a=r[o];s||(s=u),n[i]=c,r[i]=u;let p=o,f=0;for(;p!==i;)f+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-sr)return i&&(clearTimeout(i),i=null),n=l,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(l-n)))}}var w_=m2;var mi=(e,t,n=3)=>{let r=0,i=v_(50,250);return w_(o=>{let s=o.loaded,l=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),a=s<=l;r=s;let p={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&a?(l-s)/u:void 0,event:o,lengthComputable:l!=null};p[t?"download":"upload"]=!0,e(p)},n)};var x_=ge.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){let l=x.isString(s)?i(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();var k_=ge.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let s=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),x.isString(r)&&s.push("path="+r),x.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function rd(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function id(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bo(e,t){return e&&!rd(t)?id(e,t):t}var S_=e=>e instanceof pe?{...e}:e;function kt(e,t){t=t||{};let n={};function r(u,a,p){return x.isPlainObject(u)&&x.isPlainObject(a)?x.merge.call({caseless:p},u,a):x.isPlainObject(a)?x.merge({},a):x.isArray(a)?a.slice():a}function i(u,a,p){if(x.isUndefined(a)){if(!x.isUndefined(u))return r(void 0,u,p)}else return r(u,a,p)}function o(u,a){if(!x.isUndefined(a))return r(void 0,a)}function s(u,a){if(x.isUndefined(a)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,a)}function l(u,a,p){if(p in t)return r(u,a);if(p in e)return r(void 0,u)}let c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,a)=>i(S_(u),S_(a),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(a){let p=c[a]||i,f=p(e[a],t[a],a);x.isUndefined(f)&&p!==l||(n[a]=f)}),n}var fa=e=>{let t=kt({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;t.headers=s=pe.from(s),t.url=Mo(Bo(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(x.isFormData(n)){if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){let[u,...a]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...a].join("; "))}}if(ge.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&x_(t.url))){let u=i&&o&&k_.read(o);u&&s.set(i,u)}return t};var h2=typeof XMLHttpRequest<"u",E_=h2&&function(e){return new Promise(function(n,r){let i=fa(e),o=i.data,s=pe.from(i.headers).normalize(),{responseType:l}=i,c;function u(){i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let a=new XMLHttpRequest;a.open(i.method.toUpperCase(),i.url,!0),a.timeout=i.timeout;function p(){if(!a)return;let d=pe.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),v={data:!l||l==="text"||l==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:d,config:e,request:a};Uo(function(m){n(m),u()},function(m){r(m),u()},v),a=null}"onloadend"in a?a.onloadend=p:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(p)},a.onabort=function(){a&&(r(new D("Request aborted",D.ECONNABORTED,i,a)),a=null)},a.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,i,a)),a=null},a.ontimeout=function(){let h=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",v=i.transitional||aa;i.timeoutErrorMessage&&(h=i.timeoutErrorMessage),r(new D(h,v.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,i,a)),a=null},o===void 0&&s.setContentType(null),"setRequestHeader"in a&&x.forEach(s.toJSON(),function(h,v){a.setRequestHeader(v,h)}),x.isUndefined(i.withCredentials)||(a.withCredentials=!!i.withCredentials),l&&l!=="json"&&(a.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&a.addEventListener("progress",mi(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&a.upload&&a.upload.addEventListener("progress",mi(i.onUploadProgress)),(i.cancelToken||i.signal)&&(c=d=>{a&&(r(!d||d.type?new Lt(null,e,a):d),a.abort(),a=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let f=nd(i.url);if(f&&ge.protocols.indexOf(f)===-1){r(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e));return}a.send(o||null)})};var g2=(e,t)=>{let n=new AbortController,r,i=function(c){if(!r){r=!0,s();let u=c instanceof Error?c:this.reason;n.abort(u instanceof D?u:new Lt(u instanceof Error?u.message:u))}},o=t&&setTimeout(()=>{i(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));let{signal:l}=n;return l.unsubscribe=s,[l,()=>{o&&clearTimeout(o),o=null}]},b_=g2;var y2=function*(e,t){let n=e.byteLength;if(!t||n{let o=_2(e,t,i),s=0;return new ReadableStream({type:"bytes",async pull(l){let{done:c,value:u}=await o.next();if(c){l.close(),r();return}let a=u.byteLength;n&&n(s+=a),l.enqueue(new Uint8Array(u))},cancel(l){return r(l),o.return()}},{highWaterMark:2})};var R_=(e,t)=>{let n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},pa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",I_=pa&&typeof ReadableStream=="function",sd=pa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),v2=I_&&(()=>{let e=!1,t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),C_=64*1024,ld=I_&&!!(()=>{try{return x.isReadableStream(new Response("").body)}catch{}})(),da={stream:ld&&(e=>e.body)};pa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!da[t]&&(da[t]=x.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);var w2=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(x.isArrayBufferView(e))return e.byteLength;if(x.isURLSearchParams(e)&&(e=e+""),x.isString(e))return(await sd(e)).byteLength},x2=async(e,t)=>{let n=x.toFiniteNumber(e.getContentLength());return n??w2(t)},T_=pa&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:a,withCredentials:p="same-origin",fetchOptions:f}=fa(e);u=u?(u+"").toLowerCase():"text";let[d,h]=i||o||s?b_([i,o],s):[],v,w,m=()=>{!v&&setTimeout(()=>{d&&d.unsubscribe()}),v=!0},g;try{if(c&&v2&&n!=="get"&&n!=="head"&&(g=await x2(a,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),k;x.isFormData(r)&&(k=E.headers.get("content-type"))&&a.setContentType(k),E.body&&(r=od(E.body,C_,R_(g,mi(c)),null,sd))}x.isString(p)||(p=p?"cors":"omit"),w=new Request(t,{...f,signal:d,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let y=await fetch(w),_=ld&&(u==="stream"||u==="response");if(ld&&(l||_)){let E={};["status","statusText","headers"].forEach(b=>{E[b]=y[b]});let k=x.toFiniteNumber(y.headers.get("content-length"));y=new Response(od(y.body,C_,l&&R_(k,mi(l,!0)),_&&m,sd),E)}u=u||"text";let S=await da[x.findKey(da,u)||"text"](y,e);return!_&&m(),h&&h(),await new Promise((E,k)=>{Uo(E,k,{data:S,headers:pe.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:w})})}catch(y){throw m(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,w),{cause:y.cause||y}):D.from(y,y&&y.code,e,w)}});var ad={http:sa,xhr:E_,fetch:T_};x.forEach(ad,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var O_=e=>`- ${e}`,k2=e=>x.isFunction(e)||e===null||e===!1,ma={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build")),s=t?o.length>1?`since : -`+o.map(O_).join(` -`):" "+O_(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ad};function ud(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lt(null,e)}function ha(e){return ud(e),e.headers=pe.from(e.headers),e.data=jo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ma.getAdapter(e.adapter||di.adapter)(e).then(function(r){return ud(e),r.data=jo.call(e,e.transformResponse,r),r.headers=pe.from(r.headers),r},function(r){return Fo(r)||(ud(e),r&&r.response&&(r.response.data=jo.call(e,e.transformResponse,r.response),r.response.headers=pe.from(r.response.headers))),Promise.reject(r)})}var ga="1.7.2";var cd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{cd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var N_={};cd.transitional=function(t,n,r){function i(o,s){return"[Axios v"+ga+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new D(i(s," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!N_[s]&&(N_[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};function S2(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],s=t[o];if(s){let l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new D("option "+o+" must be "+c,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var ya={assertOptions:S2,validators:cd};var jn=ya.validators,hi=class{constructor(t){this.defaults=t,this.interceptors={request:new qf,response:new qf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=kt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ya.assertOptions(r,{silentJSONParsing:jn.transitional(jn.boolean),forcedJSONParsing:jn.transitional(jn.boolean),clarifyTimeoutError:jn.transitional(jn.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:ya.assertOptions(i,{encode:jn.function,serialize:jn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=pe.concat(s,o);let l=[],c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});let u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,p=0,f;if(!c){let h=[ha.bind(this),void 0];for(h.unshift.apply(h,l),h.push.apply(h,u),f=h.length,a=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new Lt(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},P_=fd;function dd(e){return function(n){return e.apply(null,n)}}function pd(e){return x.isObject(e)&&e.isAxiosError===!0}var md={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(md).forEach(([e,t])=>{md[t]=e});var A_=md;function L_(e){let t=new $o(e),n=Ao($o.prototype.request,t);return x.extend(n,$o.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return L_(kt(e,i))},n}var ue=L_(di);ue.Axios=$o;ue.CanceledError=Lt;ue.CancelToken=P_;ue.isCancel=Fo;ue.VERSION=ga;ue.toFormData=zn;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=dd;ue.isAxiosError=pd;ue.mergeConfig=kt;ue.AxiosHeaders=pe;ue.formToJSON=e=>ua(x.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=ma.getAdapter;ue.HttpStatusCode=A_;ue.default=ue;var _a=ue;var{Axios:_A,AxiosError:vA,CanceledError:wA,isCancel:xA,CancelToken:kA,VERSION:SA,all:EA,Cancel:bA,isAxiosError:RA,spread:CA,toFormData:IA,AxiosHeaders:TA,HttpStatusCode:OA,formToJSON:NA,getAdapter:PA,mergeConfig:AA}=_a;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var E2=typeof window<"u"?window:null,D_=typeof global<"u"?global:void 0,va=async(e,t,n,r)=>{let i={...n},o=null,s=!1,l=null,c=[];if(Array.isArray(t))for(let f of t)f instanceof File&&(c.push(f),s=!0),typeof f=="function"&&(l=f);else t instanceof File&&(s=!0,c.push(t));if(!s)o=JSON.stringify(t),i["content-type"]="aplication/json";else{let f=new FormData;for(let d of c)f.append(d.name,d);o=f,delete i["content-type"],i.enctype="multipart/form-data;"}let u=new URL(e);if(E2!==null){let f=new URL(location.href),d="";if(u.host===f.host||D_&&typeof D_.server_hook=="function"?d=u.toString():d=`${f.protocol}//${f.host}/_proxy/${encodeURIComponent(u.toString())}`,d){if(l)return(await _a({method:t?"post":void 0,url:d,data:o,onUploadProgress:l})).data;{let v=await(await fetch(d,t?{method:"POST",body:o,headers:i}:void 0)).text();if(r===!1)return v;try{return JSON.parse(v,M_)}catch{return v}}}}let p=await(await fetch(u,t?{method:"POST",body:o,headers:i}:void 0)).text();try{return JSON.parse(p,M_)}catch{return p}},M_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var ev=P(Y_()),tv=async(e,t)=>{let n=(0,ev.default)(e,"/"),r=Y2(n);await new Promise(i=>{let o=document,s=o.createElement("script");s.onload=async()=>{i()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let l=localStorage.getItem("api-ts-"+n),c=new URL(n),u=new URL(location.href),a="";c.host!==u.host&&(a="&remote=1"),t?s.src=`/_prasi/load.js?url=${n}&v3&dev=1&ts=${l}${a}`:s.src=`/_prasi/load.js?url=${n}&v3&ts=${l}${a}`,s.onerror=()=>{i()},document.querySelector(`script[src="${s.src}"]`)?i():o.body.appendChild(s)})},Y2=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`};var Ho={},rv=e=>{Mn.prasiApi||(Mn.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return Mn.prasiApi[n]||Ho[n]||(Ho[n]=tv(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(s,l)=>{let c=new URL(n);c.pathname=s.split("/").filter(p=>p).join("/");let u=new URL(location.href),a="";return c.host===u.host||l===!1?a=c.toString():a=`${u.protocol}//${u.host}/_proxy/${encodeURIComponent(c.toString())}`,a};let o=s=>function(...l){return new Promise(async(c,u)=>{try{let a=Mn.prasiApi[n];if(!a&&Ho&&typeof Ho[n]=="object"&&(await Ho[n],a=Mn.prasiApi[n]),a){if(s==="_raw"){let d=l[0],h=`${n}${d}`,v=await nv(h,l.slice(1));c(v);return}if(a.apiEntry||(a.apiEntry={}),a.apiEntry&&!a.apiEntry[s]){u(`API ${s.toString()} not found, existing API: - - ${Object.keys(a.apiEntry||{}).join(` - - `)}`);return}let p=a.apiEntry[s].url,f=a.apiEntry[s].args;if(p&&f){if(l.length>0&&f.length>0)for(let[v,w]of Object.entries(l)){let m=f[parseInt(v)];f&&f.includes(m)&&w&&typeof w!="string"&&typeof w!="number"||(p=p.replace(`:${m}?`,w+""),p=p.replace(`:${m}`,w+""))}let d=`${n}${p}`,h=await nv(d,l);c(h)}else console.error(`API Not Found: ${s.toString()}`)}else u("Failed to load API [Proxy]: "+n)}catch(a){u(a)}})};return i==="then"?new Proxy({},{get:(s,l)=>o(l)}):o(i)}})}catch{return null}},nv=async(e,t)=>await va(e,t,{"content-type":"application/json"});var C1=P(sv());function xi(e){let t=e.length;for(;--t>=0;)e[t]=0}var ib=0,Wv=1,ob=2,sb=3,lb=258,Bd=29,is=256,qo=is+1+Bd,_i=30,$d=19,Gv=2*qo+1,fr=15,_d=16,ab=7,Hd=256,Zv=16,Kv=17,Qv=18,Pd=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ba=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ub=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),qv=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cb=512,sn=new Array((qo+2)*2);xi(sn);var Zo=new Array(_i*2);xi(Zo);var Xo=new Array(cb);xi(Xo);var Jo=new Array(lb-sb+1);xi(Jo);var Vd=new Array(Bd);xi(Vd);var Ra=new Array(_i);xi(Ra);function vd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var Xv,Jv,Yv;function wd(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var e1=e=>e<256?Xo[e]:Xo[256+(e>>>7)],Yo=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ve=(e,t,n)=>{e.bi_valid>_d-n?(e.bi_buf|=t<>_d-e.bi_valid,e.bi_valid+=n-_d):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},t1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},fb=e=>{e.bi_valid===16?(Yo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},db=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,c=t.stat_desc.max_length,u,a,p,f,d,h,v=0;for(f=0;f<=fr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;uc&&(f=c,v++),n[a*2+1]=f,!(a>r)&&(e.bl_count[f]++,d=0,a>=l&&(d=s[a-l]),h=n[a*2],e.opt_len+=h*(f+d),o&&(e.static_len+=h*(i[a*2+1]+d)));if(v!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,v-=2}while(v>0);for(f=c;f!==0;f--)for(a=e.bl_count[f];a!==0;)p=e.heap[--u],!(p>r)&&(n[p*2+1]!==f&&(e.opt_len+=(f-n[p*2+1])*n[p*2],n[p*2+1]=f),a--)}},n1=(e,t,n)=>{let r=new Array(fr+1),i=0,o,s;for(o=1;o<=fr;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let l=e[s*2+1];l!==0&&(e[s*2]=t1(r[l]++,l))}},pb=()=>{let e,t,n,r,i,o=new Array(fr+1);for(n=0,r=0;r>=7;r<_i;r++)for(Ra[r]=i<<7,e=0;e<1<{let t;for(t=0;t{e.bi_valid>8?Yo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},lv=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,s,l;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Mt(e,i,t):(s=Jo[i],Mt(e,s+is+1,t),l=Pd[s],l!==0&&(i-=Vd[s],Ve(e,i,l)),r--,s=e1(r),Mt(e,s,n),l=ba[s],l!==0&&(r-=Ra[s],Ve(e,r,l)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,l,c=-1,u;for(e.heap_len=0,e.heap_max=Gv,s=0;s>1;s>=1;s--)xd(e,n,s);u=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],xd(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,n[u*2]=n[s*2]+n[l*2],e.depth[u]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,n[s*2+1]=n[l*2+1]=u,e.heap[1]=u++,xd(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],db(e,t),n1(n,c,e.bl_count)},uv=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],l=0,c=7,u=4;for(s===0&&(c=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++l{let r,i=-1,o,s=t[0*2+1],l=0,c=7,u=4;for(s===0&&(c=138,u=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++l{let t;for(uv(e,e.dyn_ltree,e.l_desc.max_code),uv(e,e.dyn_dtree,e.d_desc.max_code),Ad(e,e.bl_desc),t=$d-1;t>=3&&e.bl_tree[qv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},hb=(e,t,n,r)=>{let i;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{fv||(pb(),fv=!0),e.l_desc=new wd(e.dyn_ltree,Xv),e.d_desc=new wd(e.dyn_dtree,Jv),e.bl_desc=new wd(e.bl_tree,Yv),e.bi_buf=0,e.bi_valid=0,r1(e)},o1=(e,t,n,r)=>{Ve(e,(ib<<1)+(r?1:0),3),i1(e),Yo(e,n),Yo(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},_b=e=>{Ve(e,Wv<<1,3),Mt(e,Hd,sn),fb(e)},vb=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=gb(e)),Ad(e,e.l_desc),Ad(e,e.d_desc),s=mb(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?o1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(Wv<<1)+(r?1:0),3),av(e,sn,Zo)):(Ve(e,(ob<<1)+(r?1:0),3),hb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),av(e,e.dyn_ltree,e.dyn_dtree)),r1(e),r&&i1(e)},wb=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Jo[n]+is+1)*2]++,e.dyn_dtree[e1(t)*2]++),e.sym_next===e.sym_end),xb=yb,kb=o1,Sb=vb,Eb=wb,bb=_b,Rb={_tr_init:xb,_tr_stored_block:kb,_tr_flush_block:Sb,_tr_tally:Eb,_tr_align:bb},Cb=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0},es=Cb,Ib=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},Tb=new Uint32Array(Ib()),Ob=(e,t,n,r)=>{let i=Tb,o=r+n;e^=-1;for(let s=r;s>>8^i[(e^t[s])&255];return e^-1},ye=Ob,mr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},yr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:Nb,_tr_stored_block:Ld,_tr_flush_block:Pb,_tr_tally:Bn,_tr_align:Ab}=Rb,{Z_NO_FLUSH:$n,Z_PARTIAL_FLUSH:Lb,Z_FULL_FLUSH:Db,Z_FINISH:ft,Z_BLOCK:dv,Z_OK:Ee,Z_STREAM_END:pv,Z_STREAM_ERROR:zt,Z_DATA_ERROR:Mb,Z_BUF_ERROR:kd,Z_DEFAULT_COMPRESSION:zb,Z_FILTERED:jb,Z_HUFFMAN_ONLY:wa,Z_RLE:Fb,Z_FIXED:Ub,Z_DEFAULT_STRATEGY:Bb,Z_UNKNOWN:$b,Z_DEFLATED:Ta}=yr,Hb=9,Vb=15,Wb=8,Gb=29,Zb=256,Dd=Zb+1+Gb,Kb=30,Qb=19,qb=2*Dd+1,Xb=15,U=3,Un=258,jt=Un+U+1,Jb=32,vi=42,Wd=57,Md=69,zd=73,jd=91,Fd=103,dr=113,Wo=666,Me=1,ki=2,hr=3,Si=4,Yb=3,pr=(e,t)=>(e.msg=mr[t],t),mv=e=>e*2-(e>4?9:0),Fn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},eR=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},tR=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},et=(e,t)=>{Pb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ye(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},Vo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Ud=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=es(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ye(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},s1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-jt?e.strstart-(e.w_size-jt):0,u=e.window,a=e.w_mask,p=e.prev,f=e.strstart+Un,d=u[r+s-1],h=u[r+s];e.prev_length>=e.good_match&&(n>>=2),l>e.lookahead&&(l=e.lookahead);do if(i=t,!(u[i+s]!==h||u[i+s-1]!==d||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&rs){if(e.match_start=t,s=o,o>=l)break;d=u[r+s-1],h=u[r+s]}}while((t=p[t&a])>c&&--n!==0);return s<=e.lookahead?s:e.lookahead},wi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-jt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),eR(e),r+=t),e.strm.avail_in===0)break;if(n=Ud(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=U)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Hn(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Hn(e,e.ins_h,e.window[i+U-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,l=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ye(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Ud(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Ud(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===ft)&&t!==$n&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===ft&&e.strm.avail_in===0&&r===i?1:0,Ld(e,e.block_start,r,s),e.block_start+=r,Ye(e.strm)),s?hr:Me)},Sd=(e,t)=>{let n,r;for(;;){if(e.lookahead=U&&(e.ins_h=Hn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-jt&&(e.match_length=s1(e,n)),e.match_length>=U)if(r=Bn(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=Hn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Hn(e,e.ins_h,e.window[e.strstart+1]);else r=Bn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=U&&(e.ins_h=Hn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,n!==0&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=Bn(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Hn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=U-1,e.strstart++,r&&(et(e,!1),e.strm.avail_out===0))return Me}else if(e.match_available){if(r=Bn(e,0,e.window[e.strstart-1]),r&&et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Me}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Bn(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,s=e.window;for(;;){if(e.lookahead<=Un){if(wi(e),e.lookahead<=Un&&t===$n)return Me;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+Un;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=Bn(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Bn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===ft?(et(e,!0),e.strm.avail_out===0?hr:Si):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:ki},rR=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(wi(e),e.lookahead===0)){if(t===$n)return Me;break}if(e.match_length=0,n=Bn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===ft?(et(e,!0),e.strm.avail_out===0?hr:Si):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:ki};function Dt(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Go=[new Dt(0,0,0,0,l1),new Dt(4,4,8,4,Sd),new Dt(4,5,16,8,Sd),new Dt(4,6,32,32,Sd),new Dt(4,4,16,16,gi),new Dt(8,16,32,32,gi),new Dt(8,16,128,128,gi),new Dt(8,32,128,256,gi),new Dt(32,128,258,1024,gi),new Dt(32,258,258,4096,gi)],iR=e=>{e.window_size=2*e.w_size,Fn(e.head),e.max_lazy_match=Go[e.level].max_lazy,e.good_match=Go[e.level].good_length,e.nice_match=Go[e.level].nice_length,e.max_chain_length=Go[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function oR(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ta,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(qb*2),this.dyn_dtree=new Uint16Array((2*Kb+1)*2),this.bl_tree=new Uint16Array((2*Qb+1)*2),Fn(this.dyn_ltree),Fn(this.dyn_dtree),Fn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Xb+1),this.heap=new Uint16Array(2*Dd+1),Fn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Dd+1),Fn(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var os=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==vi&&t.status!==Wd&&t.status!==Md&&t.status!==zd&&t.status!==jd&&t.status!==Fd&&t.status!==dr&&t.status!==Wo?1:0},a1=e=>{if(os(e))return pr(e,zt);e.total_in=e.total_out=0,e.data_type=$b;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Wd:t.wrap?vi:dr,e.adler=t.wrap===2?0:1,t.last_flush=-2,Nb(t),Ee},u1=e=>{let t=a1(e);return t===Ee&&iR(e.state),t},sR=(e,t)=>os(e)||e.state.wrap!==2?zt:(e.state.gzhead=t,Ee),c1=(e,t,n,r,i,o)=>{if(!e)return zt;let s=1;if(t===zb&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Hb||n!==Ta||r<8||r>15||t<0||t>9||o<0||o>Ub||r===8&&s!==1)return pr(e,zt);r===8&&(r=9);let l=new oR;return e.state=l,l.strm=e,l.status=vi,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<c1(e,t,Ta,Vb,Wb,Bb),aR=(e,t)=>{if(os(e)||t>dv||t<0)return e?pr(e,zt):zt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Wo&&t!==ft)return pr(e,e.avail_out===0?kd:zt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Ye(e),e.avail_out===0)return n.last_flush=-1,Ee}else if(e.avail_in===0&&mv(t)<=mv(r)&&t!==ft)return pr(e,kd);if(n.status===Wo&&e.avail_in!==0)return pr(e,kd);if(n.status===vi&&n.wrap===0&&(n.status=dr),n.status===vi){let i=Ta+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=wa||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=Jb),i+=31-i%31,Vo(n,i),n.strstart!==0&&(Vo(n,e.adler>>>16),Vo(n,e.adler&65535)),e.adler=1,n.status=dr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(n.status===Wd){if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,n.gzhead.time&255),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,n.level===9?2:n.strategy>=wa||n.level<2?4:0),$(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&($(n,n.gzhead.extra.length&255),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ye(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Md;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=wa||n.level<2?4:0),$(n,Yb),n.status=dr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(n.status===Md){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let l=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+l),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=l,Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0,o-=l}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=zd}if(n.status===zd){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0}n.gzindexi&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=jd}if(n.status===jd){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,Ee;i=0}n.gzindexi&&(e.adler=ye(e.adler,n.pending_buf,n.pending-i,i))}n.status=Fd}if(n.status===Fd){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ye(e),n.pending!==0))return n.last_flush=-1,Ee;$(n,e.adler&255),$(n,e.adler>>8&255),e.adler=0}if(n.status=dr,Ye(e),n.pending!==0)return n.last_flush=-1,Ee}if(e.avail_in!==0||n.lookahead!==0||t!==$n&&n.status!==Wo){let i=n.level===0?l1(n,t):n.strategy===wa?rR(n,t):n.strategy===Fb?nR(n,t):Go[n.level].func(n,t);if((i===hr||i===Si)&&(n.status=Wo),i===Me||i===hr)return e.avail_out===0&&(n.last_flush=-1),Ee;if(i===ki&&(t===Lb?Ab(n):t!==dv&&(Ld(n,0,0,!1),t===Db&&(Fn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ye(e),e.avail_out===0))return n.last_flush=-1,Ee}return t!==ft?Ee:n.wrap<=0?pv:(n.wrap===2?($(n,e.adler&255),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,e.total_in&255),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):(Vo(n,e.adler>>>16),Vo(n,e.adler&65535)),Ye(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ee:pv)},uR=e=>{if(os(e))return zt;let t=e.state.status;return e.state=null,t===dr?pr(e,Mb):Ee},cR=(e,t)=>{let n=t.length;if(os(e))return zt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==vi||r.lookahead)return zt;if(i===1&&(e.adler=es(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Fn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}let o=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,wi(r);r.lookahead>=U;){let c=r.strstart,u=r.lookahead-(U-1);do r.ins_h=Hn(r,r.ins_h,r.window[c+U-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--u);r.strstart=c,r.lookahead=U-1,wi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=o,r.wrap=i,Ee},fR=lR,dR=c1,pR=u1,mR=a1,hR=sR,gR=aR,yR=uR,_R=cR,vR="pako deflate (from Nodeca project)",Ko={deflateInit:fR,deflateInit2:dR,deflateReset:pR,deflateResetKeep:mR,deflateSetHeader:hR,deflate:gR,deflateEnd:yR,deflateSetDictionary:_R,deflateInfo:vR},wR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xR=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)wR(n,r)&&(e[r]=n[r])}}return e},kR=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ts[254]=ts[254]=1;var SR=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,l=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},ER=(e,t)=>{if(t<65534&&e.subarray&&f1)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&r1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return ER(o,i)},RR=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+ts[e[n]]>t?n:t},ns={string2buf:SR,buf2string:bR,utf8border:RR};function CR(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var d1=CR,p1=Object.prototype.toString,{Z_NO_FLUSH:IR,Z_SYNC_FLUSH:TR,Z_FULL_FLUSH:OR,Z_FINISH:NR,Z_OK:Ca,Z_STREAM_END:PR,Z_DEFAULT_COMPRESSION:AR,Z_DEFAULT_STRATEGY:LR,Z_DEFLATED:DR}=yr;function ss(e){this.options=Oa.assign({level:AR,method:DR,chunkSize:16384,windowBits:15,memLevel:8,strategy:LR},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d1,this.strm.avail_out=0;let n=Ko.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Ca)throw new Error(mr[n]);if(t.header&&Ko.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=ns.string2buf(t.dictionary):p1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ko.deflateSetDictionary(this.strm,r),n!==Ca)throw new Error(mr[n]);this._dict_set=!0}}ss.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?NR:IR,typeof e=="string"?n.input=ns.string2buf(e):p1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===TR||o===OR)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Ko.deflate(n,o),i===PR)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ko.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Ca;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};ss.prototype.onData=function(e){this.chunks.push(e)};ss.prototype.onEnd=function(e){e===Ca&&(this.result=Oa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Gd(e,t){let n=new ss(t);if(n.push(e,!0),n.err)throw n.msg||mr[n.err];return n.result}function MR(e,t){return t=t||{},t.raw=!0,Gd(e,t)}function zR(e,t){return t=t||{},t.gzip=!0,Gd(e,t)}var jR=ss,FR=Gd,UR=MR,BR=zR,$R=yr,HR={Deflate:jR,deflate:FR,deflateRaw:UR,gzip:BR,constants:$R},xa=16209,VR=16191,WR=function(t,n){let r,i,o,s,l,c,u,a,p,f,d,h,v,w,m,g,y,_,S,E,k,b,O,I,N=t.state;r=t.next_in,O=t.input,i=r+(t.avail_in-5),o=t.next_out,I=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),c=N.dmax,u=N.wsize,a=N.whave,p=N.wnext,f=N.window,d=N.hold,h=N.bits,v=N.lencode,w=N.distcode,m=(1<>>24,d>>>=_,h-=_,_=y>>>16&255,_===0)I[o++]=y&65535;else if(_&16){S=y&65535,_&=15,_&&(h<_&&(d+=O[r++]<>>=_,h-=_),h<15&&(d+=O[r++]<>>24,d>>>=_,h-=_,_=y>>>16&255,_&16){if(E=y&65535,_&=15,h<_&&(d+=O[r++]<c){t.msg="invalid distance too far back",N.mode=xa;break e}if(d>>>=_,h-=_,_=o-s,E>_){if(_=E-_,_>a&&N.sane){t.msg="invalid distance too far back",N.mode=xa;break e}if(k=0,b=f,p===0){if(k+=u-_,_2;)I[o++]=b[k++],I[o++]=b[k++],I[o++]=b[k++],S-=3;S&&(I[o++]=b[k++],S>1&&(I[o++]=b[k++]))}else{k=o-E;do I[o++]=I[k++],I[o++]=I[k++],I[o++]=I[k++],S-=3;while(S>2);S&&(I[o++]=I[k++],S>1&&(I[o++]=I[k++]))}}else if(_&64){t.msg="invalid distance code",N.mode=xa;break e}else{y=w[(y&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){N.mode=VR;break e}else{t.msg="invalid literal/length code",N.mode=xa;break e}else{y=v[(y&65535)+(d&(1<<_)-1)];continue t}break}}while(r>3,r-=S,h-=S<<3,d&=(1<{let c=l.bits,u=0,a=0,p=0,f=0,d=0,h=0,v=0,w=0,m=0,g=0,y,_,S,E,k,b=null,O,I=new Uint16Array(yi+1),N=new Uint16Array(yi+1),ze=null,as,Ft,Ut;for(u=0;u<=yi;u++)I[u]=0;for(a=0;a=1&&I[f]===0;f--);if(d>f&&(d=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p0&&(e===yv||f!==1))return-1;for(N[1]=0,u=1;uhv||e===_v&&m>gv)return 1;for(;;){as=u-v,s[a]+1=O?(Ft=ze[s[a]-O],Ut=b[s[a]-O]):(Ft=96,Ut=0),y=1<>v)+_]=as<<24|Ft<<16|Ut|0;while(_!==0);for(y=1<>=1;if(y!==0?(g&=y-1,g+=y):g=0,a++,--I[u]===0){if(u===f)break;u=t[n+s[a]]}if(u>d&&(g&E)!==S){for(v===0&&(v=d),k+=p,h=u-v,w=1<hv||e===_v&&m>gv)return 1;S=g&E,i[S]=d<<24|h<<16|k-o|0}}return g!==0&&(i[k+g]=u-v<<24|64<<16|0),l.bits=d,0},Qo=qR,XR=0,m1=1,h1=2,{Z_FINISH:vv,Z_BLOCK:JR,Z_TREES:ka,Z_OK:gr,Z_STREAM_END:YR,Z_NEED_DICT:eC,Z_STREAM_ERROR:dt,Z_DATA_ERROR:g1,Z_MEM_ERROR:y1,Z_BUF_ERROR:tC,Z_DEFLATED:wv}=yr,Na=16180,xv=16181,kv=16182,Sv=16183,Ev=16184,bv=16185,Rv=16186,Cv=16187,Iv=16188,Tv=16189,Ia=16190,on=16191,bd=16192,Ov=16193,Rd=16194,Nv=16195,Pv=16196,Av=16197,Lv=16198,Sa=16199,Ea=16200,Dv=16201,Mv=16202,zv=16203,jv=16204,Fv=16205,Cd=16206,Uv=16207,Bv=16208,ee=16209,_1=16210,v1=16211,nC=852,rC=592,iC=15,oC=iC,$v=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function sC(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var _r=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modev1?1:0},w1=e=>{if(_r(e))return dt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Na,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(nC),t.distcode=t.distdyn=new Int32Array(rC),t.sane=1,t.back=-1,gr},x1=e=>{if(_r(e))return dt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,w1(e)},k1=(e,t)=>{let n;if(_r(e))return dt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?dt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,x1(e))},S1=(e,t)=>{if(!e)return dt;let n=new sC;e.state=n,n.strm=e,n.window=null,n.mode=Na;let r=k1(e,t);return r!==gr&&(e.state=null),r},lC=e=>S1(e,oC),Hv=!0,Id,Td,aC=e=>{if(Hv){Id=new Int32Array(512),Td=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Qo(m1,e.lens,0,288,Id,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Qo(h1,e.lens,0,32,Td,0,e.work,{bits:5}),Hv=!1}e.lencode=Id,e.lenbits=9,e.distcode=Td,e.distbits=5},E1=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,s,l,c,u,a,p,f,d,h,v,w=0,m,g,y,_,S,E,k,b,O=new Uint8Array(4),I,N,ze=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(_r(e)||!e.output||!e.input&&e.avail_in!==0)return dt;n=e.state,n.mode===on&&(n.mode=bd),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,u=n.hold,a=n.bits,p=l,f=c,b=gr;e:for(;;)switch(n.mode){case Na:if(n.wrap===0){n.mode=bd;break}for(;a<16;){if(l===0)break e;l--,u+=r[o++]<>>8&255,n.check=ye(n.check,O,2,0),u=0,a=0,n.mode=xv;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=ee;break}if((u&15)!==wv){e.msg="unknown compression method",n.mode=ee;break}if(u>>>=4,a-=4,k=(u&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=ee;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(O[0]=u&255,O[1]=u>>>8&255,n.check=ye(n.check,O,2,0)),u=0,a=0,n.mode=kv;case kv:for(;a<32;){if(l===0)break e;l--,u+=r[o++]<>>8&255,O[2]=u>>>16&255,O[3]=u>>>24&255,n.check=ye(n.check,O,4,0)),u=0,a=0,n.mode=Sv;case Sv:for(;a<16;){if(l===0)break e;l--,u+=r[o++]<>8),n.flags&512&&n.wrap&4&&(O[0]=u&255,O[1]=u>>>8&255,n.check=ye(n.check,O,2,0)),u=0,a=0,n.mode=Ev;case Ev:if(n.flags&1024){for(;a<16;){if(l===0)break e;l--,u+=r[o++]<>>8&255,n.check=ye(n.check,O,2,0)),u=0,a=0}else n.head&&(n.head.extra=null);n.mode=bv;case bv:if(n.flags&1024&&(d=n.length,d>l&&(d=l),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),k)),n.flags&512&&n.wrap&4&&(n.check=ye(n.check,r,d,o)),l-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Rv;case Rv:if(n.flags&2048){if(l===0)break e;d=0;do k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&d>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=on;break;case Tv:for(;a<32;){if(l===0)break e;l--,u+=r[o++]<>>=a&7,a-=a&7,n.mode=Cd;break}for(;a<3;){if(l===0)break e;l--,u+=r[o++]<>>=1,a-=1,u&3){case 0:n.mode=Ov;break;case 1:if(aC(n),n.mode=Sa,t===ka){u>>>=2,a-=2;break e}break;case 2:n.mode=Pv;break;case 3:e.msg="invalid block type",n.mode=ee}u>>>=2,a-=2;break;case Ov:for(u>>>=a&7,a-=a&7;a<32;){if(l===0)break e;l--,u+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=ee;break}if(n.length=u&65535,u=0,a=0,n.mode=Rd,t===ka)break e;case Rd:n.mode=Nv;case Nv:if(d=n.length,d){if(d>l&&(d=l),d>c&&(d=c),d===0)break e;i.set(r.subarray(o,o+d),s),l-=d,o+=d,c-=d,s+=d,n.length-=d;break}n.mode=on;break;case Pv:for(;a<14;){if(l===0)break e;l--,u+=r[o++]<>>=5,a-=5,n.ndist=(u&31)+1,u>>>=5,a-=5,n.ncode=(u&15)+4,u>>>=4,a-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=Av;case Av:for(;n.have>>=3,a-=3}for(;n.have<19;)n.lens[ze[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,I={bits:n.lenbits},b=Qo(XR,n.lens,0,19,n.lencode,0,n.work,I),n.lenbits=I.bits,b){e.msg="invalid code lengths set",n.mode=ee;break}n.have=0,n.mode=Lv;case Lv:for(;n.have>>24,g=w>>>16&255,y=w&65535,!(m<=a);){if(l===0)break e;l--,u+=r[o++]<>>=m,a-=m,n.lens[n.have++]=y;else{if(y===16){for(N=m+2;a>>=m,a-=m,n.have===0){e.msg="invalid bit length repeat",n.mode=ee;break}k=n.lens[n.have-1],d=3+(u&3),u>>>=2,a-=2}else if(y===17){for(N=m+3;a>>=m,a-=m,k=0,d=3+(u&7),u>>>=3,a-=3}else{for(N=m+7;a>>=m,a-=m,k=0,d=11+(u&127),u>>>=7,a-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ee;break}for(;d--;)n.lens[n.have++]=k}}if(n.mode===ee)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=ee;break}if(n.lenbits=9,I={bits:n.lenbits},b=Qo(m1,n.lens,0,n.nlen,n.lencode,0,n.work,I),n.lenbits=I.bits,b){e.msg="invalid literal/lengths set",n.mode=ee;break}if(n.distbits=6,n.distcode=n.distdyn,I={bits:n.distbits},b=Qo(h1,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,I),n.distbits=I.bits,b){e.msg="invalid distances set",n.mode=ee;break}if(n.mode=Sa,t===ka)break e;case Sa:n.mode=Ea;case Ea:if(l>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=l,n.hold=u,n.bits=a,WR(e,f),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,u=n.hold,a=n.bits,n.mode===on&&(n.back=-1);break}for(n.back=0;w=n.lencode[u&(1<>>24,g=w>>>16&255,y=w&65535,!(m<=a);){if(l===0)break e;l--,u+=r[o++]<>_)],m=w>>>24,g=w>>>16&255,y=w&65535,!(_+m<=a);){if(l===0)break e;l--,u+=r[o++]<>>=_,a-=_,n.back+=_}if(u>>>=m,a-=m,n.back+=m,n.length=y,g===0){n.mode=Fv;break}if(g&32){n.back=-1,n.mode=on;break}if(g&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=g&15,n.mode=Dv;case Dv:if(n.extra){for(N=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Mv;case Mv:for(;w=n.distcode[u&(1<>>24,g=w>>>16&255,y=w&65535,!(m<=a);){if(l===0)break e;l--,u+=r[o++]<>_)],m=w>>>24,g=w>>>16&255,y=w&65535,!(_+m<=a);){if(l===0)break e;l--,u+=r[o++]<>>=_,a-=_,n.back+=_}if(u>>>=m,a-=m,n.back+=m,g&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=g&15,n.mode=zv;case zv:if(n.extra){for(N=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=jv;case jv:if(c===0)break e;if(d=f-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ee;break}d>n.wnext?(d-=n.wnext,h=n.wsize-d):h=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,h=s-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do i[s++]=v[h++];while(--d);n.length===0&&(n.mode=Ea);break;case Fv:if(c===0)break e;i[s++]=n.length,c--,n.mode=Ea;break;case Cd:if(n.wrap){for(;a<32;){if(l===0)break e;l--,u|=r[o++]<{if(_r(e))return dt;let t=e.state;return t.window&&(t.window=null),e.state=null,gr},fC=(e,t)=>{if(_r(e))return dt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,gr):dt},dC=(e,t)=>{let n=t.length,r,i,o;return _r(e)||(r=e.state,r.wrap!==0&&r.mode!==Ia)?dt:r.mode===Ia&&(i=1,i=es(i,t,n,0),i!==r.check)?g1:(o=E1(e,t,n,n),o?(r.mode=_1,y1):(r.havedict=1,gr))},pC=x1,mC=k1,hC=w1,gC=lC,yC=S1,_C=uC,vC=cC,wC=fC,xC=dC,kC="pako inflate (from Nodeca project)",ln={inflateReset:pC,inflateReset2:mC,inflateResetKeep:hC,inflateInit:gC,inflateInit2:yC,inflate:_C,inflateEnd:vC,inflateGetHeader:wC,inflateSetDictionary:xC,inflateInfo:kC};function SC(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var EC=SC,b1=Object.prototype.toString,{Z_NO_FLUSH:bC,Z_FINISH:RC,Z_OK:rs,Z_STREAM_END:Od,Z_NEED_DICT:Nd,Z_STREAM_ERROR:CC,Z_DATA_ERROR:Vv,Z_MEM_ERROR:IC}=yr;function ls(e){this.options=Oa.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d1,this.strm.avail_out=0;let n=ln.inflateInit2(this.strm,t.windowBits);if(n!==rs)throw new Error(mr[n]);if(this.header=new EC,ln.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ns.string2buf(t.dictionary):b1.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ln.inflateSetDictionary(this.strm,t.dictionary),n!==rs)))throw new Error(mr[n])}ls.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,l;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?RC:bC,b1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=ln.inflate(n,s),o===Nd&&i&&(o=ln.inflateSetDictionary(n,i),o===rs?o=ln.inflate(n,s):o===Vv&&(o=Nd));n.avail_in>0&&o===Od&&n.state.wrap>0&&e[n.next_in]!==0;)ln.inflateReset(n),o=ln.inflate(n,s);switch(o){case CC:case Vv:case Nd:case IC:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(n.avail_out===0||o===Od))if(this.options.to==="string"){let c=ns.utf8border(n.output,n.next_out),u=n.next_out-c,a=ns.buf2string(n.output,c);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(c,c+u),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===rs&&l===0)){if(o===Od)return o=ln.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};ls.prototype.onData=function(e){this.chunks.push(e)};ls.prototype.onEnd=function(e){e===rs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Oa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Zd(e,t){let n=new ls(t);if(n.push(e),n.err)throw n.msg||mr[n.err];return n.result}function TC(e,t){return t=t||{},t.raw=!0,Zd(e,t)}var OC=ls,NC=Zd,PC=TC,AC=Zd,LC=yr,DC={Inflate:OC,inflate:NC,inflateRaw:PC,ungzip:AC,constants:LC},{Deflate:MC,deflate:zC,deflateRaw:jC,gzip:FC}=HR,{Inflate:UC,inflate:BC,inflateRaw:$C,ungzip:HC}=DC,VC=MC,WC=zC,GC=jC,ZC=FC,KC=UC,QC=BC,qC=$C,XC=HC,JC=yr,R1={Deflate:VC,deflate:WC,deflateRaw:GC,gzip:ZC,Inflate:KC,inflate:QC,inflateRaw:qC,ungzip:XC,constants:JC};var an={tables:{},columns:{},rels:{}},I1=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>vr({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>vr({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(an.tables[e]||(an.tables[e]=vr({name:t,action:"schema_tables",table:"",params:[]},e)),await an.tables[e]),columns:async i=>(an.columns[e+"_"+i]||(an.columns[e+"_"+i]=vr({name:t,action:"schema_columns",table:i,params:[]},e)),await an.columns[e+"_"+i]),rels:async i=>(an.rels[e+"_"+i]||(an.rels[e+"_"+i]=vr({name:t,action:"schema_rels",table:i,params:[]},e)),await an.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=R1.gzip(JSON.stringify(i));return vr({name:t,action:"query",table:r,params:btoa(o.reduce((s,l)=>s+String.fromCharCode(l),""))},e)}:new Proxy({},{get(i,o){return async(...s)=>(r==="query"&&(r=o,o="query"),await vr({name:t,action:o,table:r,params:s},e))}})}})},Ei={},vr=async(e,t)=>{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,C1.default)(e),o=Ei[i];if(!o||o&&Date.now()-o.timestamp>1e3){Ei[i]={timestamp:Date.now(),promise:va(r,e,{"content-type":"application/json"},!1),result:null};let l=await Ei[i].promise;o=Ei[i];try{return typeof l=="string"?(l=JSON.parse(l),Ei[i].result=l,l):(Ei[i].result=l,l)}catch{if(l)throw new Error(`DBQuery failed: -`+l);return null}}if(o.result)return o.result;let s=await o.promise;if(s)try{return typeof s=="string"&&(s=JSON.parse(s)),s}catch{console.error("DBQuery failed:",s)}return null};var T1=P(Vl());var O1=e=>{let{item:t,item_comp:n,ids:r}=e,i=Jr(n);if(N1(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let s=t.component.props[o],l=i.component.props[o];s&&(l.value=s.value,l.valueBuilt=s.valueBuilt,l.jsxCalledBy=s.jsxCalledBy,l.content=s.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,s]of Object.entries(i))t[o]=s},N1=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,T1.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)N1(n,t)};var P1=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=Jr(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};var Pa=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var A1=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let s=i[n.id];i[n.id]||(i[n.id]={},s=i[n.id]),O1({item:n,item_comp:r,ids:s})}let o={item:Pa(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),P1({item:n,item_comp:r,instance:i?i[n.id]:{},each(s,l){let c=n.component?.id;l.meta?.type==="content-element"&&c&&l.content&&(l.content.name=s,bi({...e},{item:l.content,root:t.root||l.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:c,name:s},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let s of Object.values(n.childs))s?.name?.startsWith("jsx:")||s&&Object.keys(s).length>3&&bi({...e,mode:"comp"},{item:s,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var bi=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){A1(e,t);return}let r={item:Pa(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let s={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(s.jsx_prop={...t.jsx_prop,is_root:!1}),bi(e,s)}}};var YC=()=>new Promise(async e=>{let t=!1,n=await fetch(C.url`_prasi/route`);t||(n.headers.get("content-encoding")||fetch(C.url`_prasi/compress/only-gz`),e(await n.json()))}),L1=async()=>{let e=Wl(),t=[];try{let n=await YC();if(n&&n.site&&n.urls){n.layout&&(C.layout.id=n.layout.id,C.layout.root=n.layout.root,C.layout.meta={},C.layout.root&&(await ui(C.layout.root.childs),Aa(C.layout.meta,C.layout.root))),C.site=n.site,C.site.code={mode:"vsc"},await e3(),C.site.api=rv(C.site.api_url),C.site.db=I1(C.site.api_url);let r=window;r.serverurl=C.site.api_url,r.db=C.site.db,r.api=C.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},e3=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=C.site.api_url;r==="*"&&(r=`${location.protocol}//${location.host}`,C.site.api_url=r),localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r),o=new URL(location.href);if(o.pathname="",!["prasi.avolut.com"].includes(o.hostname)&&o.host!=="localhost:4550"){let s=o.toString();n.src=`${s.endsWith("/")?s:`${s}/`}_prasi/load.js?url=${s}&v3&ts=${i}`,C.site.api_url=`${o.protocol}//${o.host}`}else n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`;n.onerror=()=>{e()},document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),Aa=(e,t)=>{for(let n of t.childs)bi({set_meta:!0,comps:C.comp.list,meta:e,mode:"page"},{item:n})};var le=window;var un=P(G()),Qd=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",M1=()=>{let e=Nn({page_id:""}),[t,n]=(0,D1.useState)({}),r=()=>n({});le.prasiContext.render=r;let i=uf.Provider,o=Qd()&&location.pathname.startsWith("/prod");if(C.route.status!=="ready")return C.route.status==="init"&&(C.route.status="loading",L1().then(async({router:a,pages:p})=>{Qy(),C.route.status="ready",C.route.router=a,C.route.pages=p;let f=le._prasi.basepath,d=`${f.endsWith("/")?f:`${f}/`}_prasi/code/index.js`,h=new URL(location.href);d.startsWith("/")&&(d=`${h.protocol}//${h.host}${d}`);let v=new Function("callback",`import("${d}").then(callback)`);await new Promise(w=>{v(m=>{for(let[g,y]of Object.entries(m))le[g]=y;w()})}),r()})),(0,un.jsx)(So,{});let s=C.route.router;if(!s)return(0,un.jsx)(_f,{children:"Failed to create Router"});let l="";if(o){let a=location.pathname.split("/");yf(a[3])&&(l=a[3])}let c=null;if(le._prasi.page_id)s.insert(C.pathname,{id:le._prasi.page_id,url:C.pathname}),c={id:le._prasi.page_id,url:"",params:le._prasi.params},le._prasi.routed={page_id:le._prasi.page_id,params:le._prasi.params},delete le._prasi.page_id,delete le._prasi.params;else{if(c=s.lookup(C.pathname),l){let a=C.route.pages.find(p=>l===p.id);a&&(c=a)}c&&le._prasi.routed&&le._prasi.routed.page_id===c.id&&le._prasi.routed.params&&(c.params=le._prasi.routed.params)}if(!c)return(0,un.jsx)(_f,{children:"Page Not Found"});c.id!==e.page_id&&(C.init_local_effect={}),le.params=c.params||{},C.page.id=c.id,C.page.url=c.url;let u=C.page.cache[c.id];if(u)C.page.root=u.root,C.page.meta=u.meta;else return Wy(c.id).then(async({root:a})=>{if(c){let p={id:c.id,url:c.url,root:a,meta:{}};await ui(a.childs,!0),Aa(p.meta,a),C.page.cache[p.id]=p,r()}}).catch(()=>{r()}),(0,un.jsx)(So,{note:"Loading page"});return(0,un.jsx)(i,{value:le.prasiContext,children:(0,un.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,un.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",C.mode==="mobile"?css` +${p.message} +`)}zu(e,t,r,o)},D3=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),_m={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},xm=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var Hx=G(ge());var $x=(e,t,n,r,i,o)=>{if(t.item.component?.id){let a=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),a=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),a=t.item.script),!a)return;let u={...window.exports,db:e.site.db,api:e.site.api,...Fu(e),...r,params};a.props={};let f=new Set;if(t.item.component.props){let l={};for(let[d,c]of Object.entries(t.item.component.props))try{if(c.meta?.type==="content-element"){let y={_jsx:!0,fn:w=>{let _=c.content?.id;if(_){let x=n?e.layout?.meta[_]:e.meta[_];if(!x)return null;let N=t.instances;if(!w.meta.item.originalId||!N||!N[t.item.id])return null;let A=w.meta.item.originalId;if(x.mitem&&(c.jsxCalledBy&&(!c.jsxCalledBy.includes(A)||c.jsxCalledBy.length!==2)||!c.jsxCalledBy)){let M=t.mitem?.get("component")?.get("props")?.get(d);if(M){let W=M.get("jsxCalledBy");!W||typeof W!="object"?M.set("jsxCalledBy",[t.item.id,A]):Array.isArray(W)&&(!W.includes(A)||W.length!==2||W[0]!==t.item.id||W[1]!==A)&&M.set("jsxCalledBy",[t.item.id,A])}}return(0,Hx.jsx)(Zn,{meta:x,passprop:w.passprop,is_layout:n,depth:i+1})}return null}};u[d]=y,r&&(r[d]=y);continue}if(c.value&&ju(e,c.value),!c.valueBuilt&&c.value&&t.mitem){let y=t.mitem?.get("component")?.get("props")?.get(d);if(y){M3(y,c.value);return}}let p=c.valueBuilt||"",v=xm(p,_m)||"",S=new Function(...Object.keys(u),`// [${t.item.name}] ${d}: ${t.item.id} + return ${v} + `);a.props[d]={value:v,valueBuilt:v};let b=S(...Object.values(u));typeof b=="function"&&(b=(...y)=>new Function(...Object.keys(u),`// [${t.item.name}] ${d}: ${t.item.id} +return ${v.trim()} +`)(...Object.values(u))(...y)),u[d]=b,l[d]=b,r&&(r[d]=b)}catch{f.add(d)}if(location.pathname.startsWith("/ed/")&&bo.item_id&&t.item.id===bo.item_id){bo.scope={};for(let[d,c]of Object.entries(r))bo.scope[d]=c;bo.scope.self_props=l}}}},Kt={timeout:null,set:new WeakSet,map:{},src:{}},M3=(e,t)=>{if(!Kt.set.has(e)){Kt.set.add(e);let n=(0,Bx.createId)();Kt.map[n]={mprop:e},Kt.src[n]=t}clearTimeout(Kt.timeout),Kt.timeout=setTimeout(async()=>{let n=await _api.code_build(Kt.src),r=null;for(let[i,o]of Object.entries(n)){let a=Kt.map[i].mprop;if(!r&&a.doc){r=a.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))Kt.map[i].mprop.set("valueBuilt",o)}),Kt.set=new WeakSet,Kt.map={},Kt.src={})},300)},zu=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[a,s]of Object.entries(i.props))if(s.fn){let u=new Function(...Object.keys(o),`// [${t.item.name}] ${a}: ${t.item.id} + return ${s.value||""} + `);s.fn=u(...Object.values(o))}}};var Sm=G(ge()),km=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=_r(Ur,"VI"),[a,s]=(0,Wx.useState)({});e.render=()=>{s({})};let u=t;return e.item.component?.id&&(u||(u={}),$x(o,e,n,u,i,r)),e.item.adv?.html?(0,Sm.jsx)(Bu,{meta:e,passprop:u,is_layout:n,depth:i}):e.item.adv?.js&&(zx(o,e,n,u,i,r),e.script)?e.script.result:(0,Sm.jsx)(Bu,{meta:e,passprop:u,is_layout:n,depth:i})};var nt=G(ge()),L3=70,U3={debug:!!localStorage.getItem("prasi-js-debug")},$u={enabled:!1,meta:{}},Zn=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if($u.enabled){let o=$u.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>L3)return(0,nt.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,nt.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,nt.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(U3.debug){let o="";for(let a=0;a{let o=_r(Ur,"VI");if(n&&e.item.name==="children"){let s=[];for(let u of o.entry){let f=o.meta[u];if(f.item.adv?.js||f.item.component?.id)s.push((0,nt.jsx)(kn,{meta:f,children:(0,nt.jsx)(km,{meta:f,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let l=ms(o,f,!1,t,i);o.visit&&o.visit(f,l),s.push((0,nt.jsx)("div",{...l.props}))}}return(0,nt.jsx)(nt.Fragment,{children:s.map((u,f)=>(0,nt.jsx)(Vx.Fragment,{children:u},f))})}let a=ms(o,e,n,t,i);return o.visit&&o.visit(e,a),(0,nt.jsx)("div",{...a.props})};m();g();h();m();g();h();m();g();h();var Lt=window,Yx=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Lt.notif?.onTap){let a=null,s=0;await new Promise(()=>{a=setInterval(()=>{s++,s>20&&clearInterval(a),o()&&clearInterval(a)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Lt.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Lt.notif?.onTap){i(()=>Lt.notif?.onTap?(Lt.notif?.onTap(r.notif),!0):!1);return}Lt.notif?.onTap&&Lt.notif?.onTap(r.notif);break;case"notification-receive":Lt.notif?.onReceive||i(()=>Lt.notif?.onReceive?(Lt.notif?.onReceive(r.notif),!0):!1),Lt.notif?.onReceive&&Lt.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Lt.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};m();g();h();var bm=window;bm.prasi_ext||(bm.prasi_ext={});var Hu=bm.prasi_ext;var Gx=async e=>{let t=Hu[e.site.id];if(t||(Hu[e.site.id]={status:"init"},t=Hu[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await Yx(e,t),t.status="ready"}};var Ro=G(ge()),Zx=({})=>{let e=_r(Ur,"VI"),t=wr({tick:Date.now()});if(e.tick=t.tick,Gx(e),e.status!=="ready")return(0,Ro.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,Ro.jsx)(ds,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,Ro.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,Ro.jsx)(kn,{children:(0,Ro.jsx)(Zn,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Wu=G(ge()),En=window;En.prasi_internal||(En.prasi_internal={page:{id:""}});var qx=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:a,visit:s,script:u,preloaded:f,page_id:l,render_stat:d,on_status_changed:c,on_preload:p,layout:v,comp_load:S})=>{let b=_r(Ur,"VI");return b.mode=o,b.entry=t,b.on_preload=p,b.comp.load=S,l&&(En.prasi_internal.page.id=l),En.siteurl=(y,w)=>{if(y.startsWith("http://")||y.startsWith("https://"))return y;try{["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550"?b.site.api_url&&(b.site_url||(b.site_url=new URL(b.site.api_url))):b.site_url||(w&&b.site.api_url?b.site_url=new URL(b.site.api_url):b.site_url=new URL(location.href),b.site_url.pathname="")}catch{}if(b.site_url){let _=b.site_url,x=y;return x.startsWith("/")||(x="/"+x),En.prasiContext.siteUrl&&(x=En.prasiContext.siteUrl(x)),`${_.protocol}//${_.host}${x}`}return y},En.isMobile=o==="mobile",En.isDesktop=o==="desktop",En.preloaded=f||(y=>{}),En.preload=(y,w)=>{if(b.on_preload)return new Promise(_=>{b.page.navs[l]||(b.page.navs[l]=new Set);let x=b.page.navs[l],N=typeof y=="string"?[y]:y,D=!0;for(let A of N)x.has(A)||(x.add(A),D=!1);D?_():(b.page.preload.push(_),b.on_preload?.({urls:Array.from(b.page.navs[l]),opt:{on_load:(...A)=>{w?.on_load?.(...A);for(let M of b.page.preload)M();b.page.preload=[],b.render()}}}))})},b.layout=v,b.page.cur.id=l,b.on_status_changes=c,d==="disabled"&&($u.enabled=!1),b.meta!==e&&(b.meta=e),u&&(b.script.init_local_effect=u.init_local_effect),b.visit=s,b.status==="init"&&(b.site.db=a,b.site.api=i,ax(b,{api_url:n,site_id:r})),p&&(0,Vu.useEffect)(()=>{setTimeout(()=>{let y=b.page.navs[b.page.cur.id];y&&p({urls:Array.from(y),opt:{on_load(w){}}})},500)},[b.page.cur.id]),(0,Wu.jsx)(kn,{children:(0,Wu.jsx)(Vu.Suspense,{children:(0,Wu.jsx)(Zx,{})})})};m();g();h();var Qx=e=>new Promise(async t=>{let n=!1,r=await Gd(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(B.url`_prasi/page/${e}`)).json();n||t(i)}),F3=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let a of r){let s=await Gd(`page-${a}`);if(s)n[a]=s;else{i=!1;break}}i&&t(n);let o=await(await fetch(B.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Kx=async e=>{let t=e.map(r=>B.route.router?.lookup(r)).filter(r=>r&&r.id);return await F3(t.map(r=>r?.id))};m();g();h();var Jx=G(Xx()),eS=()=>{let e=B;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Jx.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};m();g();h();var Le=window;var qn=G(ge()),Om=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",nS=()=>{let e=wr({page_id:""}),[t,n]=(0,tS.useState)({}),r=()=>n({});Le.prasiContext.render=r;let i=vd.Provider,o=Om()&&location.pathname.startsWith("/prod");if(B.route.status!=="ready")return B.route.status==="init"&&(B.route.status="loading",K1().then(async({router:l,pages:d})=>{eS(),B.route.status="ready",B.route.router=l,B.route.pages=d;let c=Le._prasi.basepath,p=`${c.endsWith("/")?c:`${c}/`}_prasi/code/index.js`,v=new URL(location.href);p.startsWith("/")&&(p=`${v.protocol}//${v.host}${p}`);let S=new Function("callback",`import("${p}").then(callback)`);await new Promise(b=>{S(y=>{for(let[w,_]of Object.entries(y))Le[w]=_;b()})}),r()})),(0,qn.jsx)(ds,{});let a=B.route.router;if(!a)return(0,qn.jsx)(am,{children:"Failed to create Router"});let s="";if(o){let l=location.pathname.split("/");om(l[3])&&(s=l[3])}let u=null;if(Le._prasi.page_id)a.insert(B.pathname,{id:Le._prasi.page_id,url:B.pathname}),u={id:Le._prasi.page_id,url:"",params:Le._prasi.params},Le._prasi.routed={page_id:Le._prasi.page_id,params:Le._prasi.params},delete Le._prasi.page_id,delete Le._prasi.params;else{if(u=a.lookup(B.pathname),s){let l=B.route.pages.find(d=>s===d.id);l&&(u=l)}u&&Le._prasi.routed&&Le._prasi.routed.page_id===u.id&&Le._prasi.routed.params&&(u.params=Le._prasi.routed.params)}if(!u)return(0,qn.jsx)(am,{children:"Page Not Found"});u.id!==e.page_id&&(B.init_local_effect={},ex({type:"page",id:u.id})),Le.params=u.params||{},B.page.id=u.id,B.page.url=u.url;let f=B.page.cache[u.id];if(f)B.page.root=f.root,B.page.meta=f.meta;else return Qx(u.id).then(async({root:l})=>{if(u){let d={id:u.id,url:u.url,root:l,meta:{}};await Or(l.childs,!0),xo(d.meta,l),B.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,qn.jsx)(ds,{note:"Loading page"});return(0,qn.jsx)(i,{value:Le.prasiContext,children:(0,qn.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,qn.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",B.mode==="mobile"?css` @media (min-width: 768px) { border-left: 1px solid #ccc; border-right: 1px solid #ccc; @@ -148,7 +151,7 @@ return ${h.trim()} } `:"inset-0 overflow-auto",css` contain: content; - `),children:(0,un.jsx)(Vy,{api_url:C.site.api_url,entry:Object.values(C.page.root.childs).filter(a=>a).map(a=>a.id),meta:C.page.meta,mode:C.mode,page_id:C.page.id,site_id:C.site.id,db:C.site.db,api:C.site.api,preloaded:a=>{let p=C.route.router?.lookup(a);return!!(p&&C.page.cache[p.id])},comp_load:async a=>{let p=C.comp;if(p.list[a])return p.list[a];try{let f=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[a]})})).json();for(let[d,h]of Object.entries(f))delete p.pending[d],p.list[d]=h,await zl(`comp-${d}`,h)}catch{}return p.list[a]},layout:C.layout.id&&C.layout.root&&C.layout.meta?{id:C.layout.id,meta:C.layout.meta,entry:Object.values(C.layout.root.childs).filter(a=>a).map(a=>a.id)}:void 0,script:{init_local_effect:C.init_local_effect},on_preload:async({urls:a,opt:p})=>{let f=[];if(C.cache.urls)for(let d of a)C.cache.urls.has(d)||(f.push(d),C.cache.urls.add(d));if(f.length>0){let d=await Gy(f);if(p?.on_load&&p.on_load(d,t3),Array.isArray(d))for(let h of d){let v={id:h.id,url:h.url,root:h.root,meta:{}};await ui(h.root.childs),Aa(v.meta,h.root),C.page.cache[v.id]=v}}}})})})})},t3=(e,t)=>{for(let n of e)for(let r of n.root.childs)Kd(r,t)},Kd=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&Kd(n.content,t);for(let n of e.childs)Kd(n,t)}};var j1=P(G());(async()=>{import("./font-ULAYMU2A.js"),ng();let e=document.getElementById("root");if(e){await tg(!1);let t={root:(0,z1.createRoot)(e)};q0(),le.navigateOverride=n=>(n&&n.startsWith("/")&&Qd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,j1.jsx)(M1,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); + `),children:(0,qn.jsx)(qx,{api_url:B.site.api_url,entry:Object.values(B.page.root.childs).filter(l=>l).map(l=>l.id),meta:B.page.meta,mode:B.mode,page_id:B.page.id,site_id:B.site.id,db:B.site.db,api:B.site.api,preloaded:l=>{let d=B.route.router?.lookup(l);return!!(d&&B.page.cache[d.id])},comp_load:async l=>{let d=B.comp;if(d.list[l])return d.list[l];try{let c=await(await fetch(B.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[l]})})).json();for(let[p,v]of Object.entries(c))delete d.pending[p],d.list[p]=v,await Kl(`comp-${p}`,v)}catch{}return d.list[l]},layout:B.layout.id&&B.layout.root&&B.layout.meta?{id:B.layout.id,meta:B.layout.meta,entry:Object.values(B.layout.root.childs).filter(l=>l).map(l=>l.id)}:void 0,script:{init_local_effect:B.init_local_effect},on_preload:async({urls:l,opt:d})=>{let c=[];if(B.cache.urls)for(let p of l)B.cache.urls.has(p)||(c.push(p),B.cache.urls.add(p));if(c.length>0){let p=await Kx(c);if(d?.on_load&&d.on_load(p,j3),Array.isArray(p))for(let v of p){let S={id:v.id,url:v.url,root:v.root,meta:{}};await Or(v.root.childs),xo(S.meta,v.root),B.page.cache[S.id]=S}}}})})})})},j3=(e,t)=>{for(let n of e)for(let r of n.root.childs)Em(r,t)},Em=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&Em(n.content,t);for(let n of e.childs)Em(n,t)}};var iS=G(ge());(async()=>{import("./font-PYFUZD3A.js"),J1(),Ry();let e=document.getElementById("root");if(e){await Ty(!1);let t={root:(0,rS.createRoot)(e)};ky(),Le.navigateOverride=n=>(n&&n.startsWith("/")&&Om()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,iS.jsx)(nS,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/app/srv/ws/sync/actions/page_load.ts b/app/srv/ws/sync/actions/page_load.ts index 2b066cd3..f9f7beb4 100644 --- a/app/srv/ws/sync/actions/page_load.ts +++ b/app/srv/ws/sync/actions/page_load.ts @@ -10,6 +10,7 @@ import { gzipAsync } from "../entity/zlib"; import { sendWS } from "../sync-handler"; import { SyncConnection, SyncType } from "../type"; import { validate } from "uuid"; + export const page_load: SAction["page"]["load"] = async function ( this: SyncConnection, id: string @@ -45,24 +46,48 @@ export const page_load: SAction["page"]["load"] = async function ( delete g.route_cache[snap.id_site]; } - const client_ids = new Set(); - user.active.findAll({ page_id: id }).forEach((e) => { - client_ids.add(e.client_id); - }); + const found = user.active.findAll({ page_id: id }); - client_ids.forEach((client_id) => { - if (origin !== um) { - if (client_id === origin) return; + if (!g.preview_page_timeout) g.preview_page_timeout = {}; + clearTimeout(g.preview_page_timeout[id]); + g.preview_page_timeout[id] = setTimeout(() => { + let json = doc.toJSON(); + for (const f of found) { + const client_id = f.client_id; + const ws = conns.get(client_id)?.ws; + + if (client_id && ws) { + if (!f.user_id) { + console.log(client_id); + sendWS(ws, { + type: SyncType.Event, + event: "page_changed", + data: json, + }); + } + } } + }, 1000); + for (const f of found) { + const client_id = f.client_id; const ws = conns.get(client_id)?.ws; - if (ws) - sendWS(ws, { - type: SyncType.Event, - event: "remote_svlocal", - data: { type: "page", sv_local, id }, - }); - }); + if (client_id && ws) { + if (!!f.user_id) { + if (ws) { + if (origin !== um) { + if (client_id === origin) return; + } + + sendWS(ws, { + type: SyncType.Event, + event: "remote_svlocal", + data: { type: "page", sv_local, id }, + }); + } + } + } + } }); }; diff --git a/app/srv/ws/sync/code/parts/init/frontend.ts b/app/srv/ws/sync/code/parts/init/frontend.ts index 0c3772e6..a57362ad 100644 --- a/app/srv/ws/sync/code/parts/init/frontend.ts +++ b/app/srv/ws/sync/code/parts/init/frontend.ts @@ -85,6 +85,9 @@ export const initFrontEnd = async ( async setup(setup) { try { setup.onEnd(async (res) => { + const client_ids = user.active + .findAll({ site_id: id_site }) + .map((e) => e.client_id); if (res.errors.length > 0) { await codeError( id_site, @@ -92,13 +95,6 @@ export const initFrontEnd = async ( "\n\n" ) ); - } else { - await codeError(id_site, ""); - - const client_ids = new Set(); - user.active.findAll({ site_id: id_site }).forEach((e) => { - client_ids.add(e.client_id); - }); const now = Date.now(); client_ids.forEach((client_id) => { @@ -107,13 +103,26 @@ export const initFrontEnd = async ( sendWS(ws, { type: SyncType.Event, event: "code_changes", - data: { ts: now, mode: "frontend" }, + data: { ts: now, mode: "frontend", status: "error" }, }); }); + } else { + await codeError(id_site, ""); await $`rm -rf ${out_dir_switch}`.quiet(); await $`mv ${out_dir} ${out_dir_switch}`.quiet(); await $`mv ${out_dir_temp} ${out_dir}`.quiet(); + + const now = Date.now(); + client_ids.forEach((client_id) => { + const ws = conns.get(client_id)?.ws; + if (ws) + sendWS(ws, { + type: SyncType.Event, + event: "code_changes", + data: { ts: now, mode: "frontend", status: "ok" }, + }); + }); } }); } catch (e) { @@ -123,6 +132,24 @@ export const initFrontEnd = async ( }, ], }); + const broadcastLoading = async () => { + const client_ids = user.active + .findAll({ site_id: id_site }) + .map((e) => e.client_id); + + const now = Date.now(); + + client_ids.forEach((client_id) => { + const ws = conns.get(client_id)?.ws; + if (ws) + sendWS(ws, { + type: SyncType.Event, + event: "code_changes", + data: { ts: now, mode: "frontend", status: "building" }, + }); + }); + }; + code.internal.frontend[id_site] = { ctx: build_ctx, timeout: null, @@ -135,7 +162,7 @@ export const initFrontEnd = async ( async (event, filename) => { const fe = code.internal.frontend[id_site]; const srv = code.internal.server[id_site]; - if (filename?.startsWith("node_modules")) return; + if (filename?.startsWith("node_modules") || filename?.startsWith("typings")) return; if ( filename?.endsWith(".tsx") || filename?.endsWith(".ts") || @@ -144,10 +171,14 @@ export const initFrontEnd = async ( ) { if (typeof fe !== "undefined" && !fe.rebuilding) { fe.rebuilding = true; - try { - await fe.ctx.rebuild(); - } catch (e) {} - fe.rebuilding = false; + clearTimeout(fe.timeout); + fe.timeout = setTimeout(async () => { + try { + broadcastLoading(); + await fe.ctx.rebuild(); + } catch (e) {} + fe.rebuilding = false; + }, 500); } if (typeof srv !== "undefined" && !srv.rebuilding && srv.ctx) { diff --git a/app/srv/ws/sync/editor/load-component.ts b/app/srv/ws/sync/editor/load-component.ts index 63c9eff1..da06671d 100644 --- a/app/srv/ws/sync/editor/load-component.ts +++ b/app/srv/ws/sync/editor/load-component.ts @@ -28,12 +28,9 @@ export const loadComponent = async (comp_id: string, sync?: SyncConnection) => { const sv_local = await gzipAsync(update); - user.active.findAll({ comp_id: comp_id }); - - const client_ids = new Set(); - user.active.findAll({ comp_id: comp_id }).forEach((e) => { - client_ids.add(e.client_id); - }); + const client_ids = user.active + .findAll({ comp_id: comp_id }) + .map((e) => e.client_id); client_ids.forEach((client_id) => { if (origin !== um) { diff --git a/app/srv/ws/sync/entity/user.ts b/app/srv/ws/sync/entity/user.ts index 7661d98e..ea6f573f 100644 --- a/app/srv/ws/sync/entity/user.ts +++ b/app/srv/ws/sync/entity/user.ts @@ -1,53 +1,85 @@ -import { dir } from "dir"; -import { IndexedMap } from "../../../../web/src/utils/sync/idx-map"; - const defaultConf = { site_id: "", page_id: "", }; export type UserConf = typeof defaultConf; -export const user = { - active: IndexedMap.create< - { - user_id: string; - site_id: string; - page_id: string; - comp_id?: string; - client_id: string; - }, - "client_id" - >("client_id"), - conf: { - _db: {} as any, - init() { - return this._db; - }, - async getOrCreate(id: string) { - let res = this._db[id]; +export type TUser = { + select?: "" | "comp" | "item" | "section" | "text"; + client_id: string; + user_id: string; + site_id: string; + page_id: string; + comp_id: string | string[]; +}; - if (!res || !res.id) { - this._db[id] = structuredClone(defaultConf); - res = this._db[id]; - } - return res as UserConf; +const g = global as unknown as { _active_user: any; _conf_user: any }; + +if (!g._conf_user) { + g._conf_user = {}; +} +if (!g._active_user) { + g._active_user = []; +} + +export const user = { + conf: { + db: g._conf_user as Record, + init() {}, + async getOrCreate(user_id: string) { + if (!this.db[user_id]) this.db[user_id] = { ...defaultConf }; + return this.db[user_id]; + }, + + async set(user_id: string, key: keyof UserConf, value: any) { + const conf = await this.getOrCreate(user_id); + conf[key] = value; }, get(user_id: string) { - return this._db[user_id]; + if (!this.db[user_id]) this.db[user_id] = { ...defaultConf }; + return this.db[user_id]; }, - async set( - user_id: string, - key: T, - value: UserConf[T] - ) { - let current = this.get(user_id); - if (!current) { - this._db[user_id] = structuredClone(defaultConf) - current = this.get(user_id); + }, + active: { + db: g._active_user as TUser[], + comps: {} as Record>, + findAll(where: Partial) { + return this.db.filter((e: any) => { + for (const [k, v] of Object.entries(where)) { + if (k === "comp_id" && where.client_id) { + if (!this.comps[where.client_id].has(v as any)) return false; + } else if (e[k] !== v) return false; + } + return true; + }); + }, + delAll(where: Partial) { + const res = this.findAll(where); + this.db = this.db.filter((e) => !res.includes(e)); + }, + add(user: Partial) { + let found = null; + if (user.client_id) { + found = this.db.find((e: any) => { + return e.client_id === user.client_id; + }); } - if (current) { - this._db[user_id] = { ...current, [key]: value } + if (found) { + for (const [k, v] of Object.entries(user)) { + (found as any)[k] = v; + } + } else { + this.db.push(user as any); + found = user; + } + + if (typeof found.comp_id === "string") { + let cid = found.client_id || ""; + if (cid && !this.comps[cid]) { + this.comps[cid] = new Set(); + } + this.comps[cid].add(found.comp_id); } }, }, diff --git a/app/srv/ws/sync/preview/live-reload.ts b/app/srv/ws/sync/preview/live-reload.ts new file mode 100644 index 00000000..2010b53e --- /dev/null +++ b/app/srv/ws/sync/preview/live-reload.ts @@ -0,0 +1,27 @@ +import { ServerWebSocket } from "bun"; +import { WSData } from "../../../../../pkgs/core/server/create"; +import { user } from "../entity/user"; + +export const previewLiveReload = ( + ws: ServerWebSocket, + msg: + | { mode: "init"; data: { client_id: string; site_id: string } } + | { + mode: "listen"; + data: { type: "page"; id: string; client_id: string }; + } +) => { + if (msg.mode === "init") { + user.active.add({ + client_id: msg.data.client_id, + site_id: msg.data.site_id, + }); + } else if (msg.mode === "listen") { + if (msg.data.type === "page") { + user.active.add({ + client_id: msg.data.client_id, + page_id: msg.data.id, + }); + } + } +}; diff --git a/app/srv/ws/sync/sync-handler.ts b/app/srv/ws/sync/sync-handler.ts index a1a68b56..95307e26 100644 --- a/app/srv/ws/sync/sync-handler.ts +++ b/app/srv/ws/sync/sync-handler.ts @@ -10,6 +10,7 @@ import { loadSitePage } from "./editor/load-sitepage"; import { conns, wconns } from "./entity/conn"; import { UserConf, user } from "./entity/user"; import { SyncType } from "./type"; +import { previewLiveReload } from "./preview/live-reload"; const packr = new Packr({ structuredClone: true }); export const sendWS = (ws: ServerWebSocket, msg: any) => { @@ -43,6 +44,9 @@ export const syncHandler: WebSocketHandler = { const conn = conns.get(conn_id); if (conn) { const msg = packr.unpack(Buffer.from(raw)); + if (msg.type === "preview") { + previewLiveReload(ws, msg); + } if (msg.type === SyncType.UserID) { const { user_id, page_id, site_id } = msg; conn.user_id = user_id; diff --git a/app/web/src/nova/ed/logic/code-loader.ts b/app/web/src/nova/ed/logic/code-loader.ts index a30a7d94..087b0ccf 100644 --- a/app/web/src/nova/ed/logic/code-loader.ts +++ b/app/web/src/nova/ed/logic/code-loader.ts @@ -1,8 +1,8 @@ -import getTime from "date-fns/getTime"; -import { PG } from "./ed-global"; import { format } from "date-fns"; +import { PG } from "./ed-global"; export const loadFrontEnd = async (p: PG, ts?: number) => { + const id_site = p.site.id; const url = `/prod/${id_site}/_prasi/code/index.js?ts=${ts}`; const fn = new Function( @@ -17,12 +17,12 @@ import("${url}") try { fn((exports: any) => { const w = window as any; + for (const [k, v] of Object.entries(exports)) { w[k] = v; p.site_exports[k] = v; } resolve(exports); - console.log(`🚧 Code updated from vscode - ${format(Date.now(), "HH:mm:ss")}`); }); } catch (e) { console.log("Failed to load site code", e); diff --git a/app/web/src/nova/ed/logic/ed-sync.tsx b/app/web/src/nova/ed/logic/ed-sync.tsx index 48665669..e8bc9980 100644 --- a/app/web/src/nova/ed/logic/ed-sync.tsx +++ b/app/web/src/nova/ed/logic/ed-sync.tsx @@ -12,6 +12,7 @@ import { EmptySite, PG } from "./ed-global"; import { reloadPage } from "./ed-route"; import { loadSite } from "./ed-site"; import { treeRebuild } from "./tree/build"; +import { format } from "date-fns"; const decoder = new TextDecoder(); @@ -151,6 +152,7 @@ export const edInitSync = (p: PG) => { }, shakehand(client_id) { p.user.client_id = client_id; + console.log(`Prasi connected: ${client_id}`); }, disconnected() { console.log("offline, reconnecting..."); @@ -185,9 +187,23 @@ export const edInitSync = (p: PG) => { } p.render(); }, - async code_changes({ ts, mode }) { + async code_changes({ ts, mode, status }) { if (mode === "frontend") { - await loadFrontEnd(p, ts); + if (status === "ok") { + console.clear(); + console.log( + `${format(Date.now(), "HH:mm:ss")} 🚧 Code updated from vscode ` + ); + + await loadFrontEnd(p, ts); + } else if (status === "building") { + console.log( + `${format( + Date.now(), + "HH:mm:ss" + )} ā³ Code changed from vscode, rebuilding...` + ); + } } else { await loadTypings(p); if (p.ui.monaco) { diff --git a/app/web/src/nova/prod/base/live-reload/dev-live-reload.ts b/app/web/src/nova/prod/base/live-reload/dev-live-reload.ts new file mode 100644 index 00000000..010e7f2a --- /dev/null +++ b/app/web/src/nova/prod/base/live-reload/dev-live-reload.ts @@ -0,0 +1,164 @@ +import { format } from "date-fns"; +import { get } from "idb-keyval"; +import { Packr } from "msgpackr"; +import { SyncType } from "../../../../../../srv/ws/sync/type"; +import { w } from "../../../../utils/types/general"; +import { base } from "../base"; +import { scanComponent } from "../component"; +import { rebuildMeta } from "../route"; +const packr = new Packr({ structuredClone: true }); + +/** CONSTANT */ +const WS_CONFIG = { + debug: !!localStorage.getItem("prasi-ws-debug"), + reconnectTimeout: 1000, + id_client: "", + id_site: "", + ws: null as any, +}; + +export const initDevLiveReload = () => { + if ( + location.host === "localhost:4550" || + location.host === "prasi.avolut.com" + ) { + const patharr = location.pathname.split("/"); + const id_site = patharr[2]; + const retry = () => { + const url = new URL(w.basehost || location.href); + url.pathname = "/sync"; + url.protocol = url.protocol === "http:" ? "ws:" : "wss:"; + + const ws = new WebSocket(`${url.protocol}//${url.host}${url.pathname}`); + + let timeout = setTimeout(() => { + clearTimeout(timeout); + ws.close(); + retry(); + }, 2000); + + WS_CONFIG.ws = ws; + WS_CONFIG.id_site = id_site; + ws.onopen = () => { + clearTimeout(timeout); + w.offline = false; + w.editorRender?.(); + }; + ws.onmessage = async (e) => { + const raw = e.data as Blob; + const msg = packr.unpack(Buffer.from(await raw.arrayBuffer())); + + if (WS_CONFIG.debug) + console.log(`%c⬇`, `color:red`, formatBytes(raw.size, 0), msg); + + if (msg.type === SyncType.ClientID) { + WS_CONFIG.id_client = msg.client_id; + send(ws, { + type: "preview", + mode: "init", + data: { + site_id: id_site, + client_id: msg.client_id, + }, + }); + } else if (msg.type === SyncType.Event) { + if (msg.event === "page_changed") { + const id = msg.data.map.id; + const page = base.page.cache[id]; + const root = msg.data.map.root; + page.root = root; + const p = { + id: page.id, + url: page.url, + root, + meta: {}, + }; + await scanComponent(root.childs, true); + rebuildMeta(p.meta, root); + base.page.cache[p.id] = p; + w.prasiContext.render(); + } else if (msg.event === "code_changes") { + const { mode, ts, status } = msg.data; + if (mode === "frontend") { + if (status === "ok") { + console.clear(); + console.log( + `${format( + Date.now(), + "HH:mm:ss" + )} 🚧 Code updated from vscode ` + ); + + const url = `/prod/${id_site}/_prasi/code/index.js?ts=${ts}`; + const fn = new Function( + "callback", + ` + import("${url}") + .catch((e) => console.error("Failed to load site code\\n\\n", e)) + .then(callback)` + ); + + try { + await new Promise((resolve) => { + try { + fn((exports: any) => { + const w = window as any; + for (const [k, v] of Object.entries(exports)) { + w[k] = v; + } + resolve(exports); + w.prasiContext.render(); + }); + } catch (e) { + console.log("Failed to load site code", e); + } + }); + } catch (e) {} + } else if (status === "building") { + console.log( + `${format( + Date.now(), + "HH:mm:ss" + )} ā³ Code changed from vscode, rebuilding...` + ); + } + } + } + } + }; + }; + + retry(); + } +}; + +export const listenChanges = ( + arg: { type: "page"; id: string } | { type: "comp"; ids: string[] } +) => { + if (WS_CONFIG.ws) { + send(WS_CONFIG.ws, { + type: "preview", + mode: "listen", + data: { + ...arg, + client_id: WS_CONFIG.id_client, + }, + }); + } +}; + +const send = (ws: WebSocket, msg: any) => { + const raw = packr.pack(msg); + if (WS_CONFIG.debug) + console.log(`%c⬆`, "color:blue", formatBytes(raw.length, 0), msg); + ws.send(raw); +}; + +function formatBytes(bytes: number, decimals: number) { + if (bytes == 0) return "0 Bytes"; + var k = 1024, + dm = decimals || 2, + sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], + i = Math.floor(Math.log(bytes) / Math.log(k)); + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i]; +} diff --git a/app/web/src/nova/prod/base/page.tsx b/app/web/src/nova/prod/base/page.tsx index 9d6399e8..ec819fa9 100644 --- a/app/web/src/nova/prod/base/page.tsx +++ b/app/web/src/nova/prod/base/page.tsx @@ -48,6 +48,7 @@ export const loadPages = (page_ids: string[]) => { break; } } + if (is_done) { done(result); } diff --git a/app/web/src/nova/prod/main.tsx b/app/web/src/nova/prod/main.tsx index c1b99c94..7d137d0c 100644 --- a/app/web/src/nova/prod/main.tsx +++ b/app/web/src/nova/prod/main.tsx @@ -1,11 +1,13 @@ import { createRoot } from "react-dom/client"; import { defineReact, defineWindow } from "web-utils"; import { initBaseConfig } from "./base/base"; +import { initDevLiveReload } from "./base/live-reload/dev-live-reload"; import { Root, isPreview } from "./root"; import { w } from "./w"; (async () => { import("./font"); + initDevLiveReload(); initBaseConfig(); const div = document.getElementById("root"); if (div) { @@ -35,6 +37,5 @@ import { w } from "./w"; if (document.body.classList.contains("opacity-0")) { document.body.classList.remove("opacity-0"); } - } })(); diff --git a/app/web/src/nova/prod/root.tsx b/app/web/src/nova/prod/root.tsx index 165c9df8..2d0da85c 100644 --- a/app/web/src/nova/prod/root.tsx +++ b/app/web/src/nova/prod/root.tsx @@ -15,6 +15,7 @@ import { detectResponsiveMode } from "./base/responsive"; import { initBaseRoute, rebuildMeta } from "./base/route"; import { w } from "./w"; import { MatchedRoute } from "radix3"; +import { listenChanges } from "./base/live-reload/dev-live-reload"; export const isPreview = () => { return ( @@ -129,6 +130,8 @@ export const Root = () => { if (page.id !== local.page_id) { base.init_local_effect = {}; + + listenChanges({ type: "page", id: page.id }); } w.params = page.params || {}; diff --git a/app/web/src/utils/sync/idx-map.ts b/app/web/src/utils/sync/idx-map.ts deleted file mode 100644 index 51a31e01..00000000 --- a/app/web/src/utils/sync/idx-map.ts +++ /dev/null @@ -1,70 +0,0 @@ -import hash_sum from "hash-sum"; - -const match = (item: any, where: any) => { - for (const [k, v] of Object.entries(where)) { - if (item[k] !== v) return false; - } - - return true; -}; - -export const IndexedMap = { - create: , KEY extends string>(id: KEY) => { - const all = {} as Record>; - - return { - add(item: OBJ & Record) { - const pk = item[id] as KEY; - - if (!all[pk]) { - all[pk] = {}; - } - const _id = hash_sum(item) as any; - - const items = all[pk] as Record; - items[_id] = item; - - return pk; - }, - findAll(where: Partial>, withId?: boolean) { - const founds = []; - if (where[id]) { - const _id = where[id] as KEY; - - if (all[_id]) { - for (const [k, item] of Object.entries(all[_id])) { - if (match(item, where)) { - if (withId) { - founds.push({ ...item, _id: k }); - } else { - founds.push(item); - } - } - } - } - } else { - for (const _items of Object.values(all)) { - const items = _items as Record; - - for (const [k, item] of Object.entries(items)) { - if (match(item, where)) { - if (withId) { - founds.push({ ...item, _id: k }); - } else { - founds.push(item); - } - } - } - } - } - - return founds; - }, - delAll(where: Partial>) { - for (const item of this.findAll(where, true)) { - delete all[item[id]][item._id]; - } - }, - }; - }, -}; diff --git a/app/web/src/utils/sync/ws-client.ts b/app/web/src/utils/sync/ws-client.ts index de0c9b9b..784c0dae 100644 --- a/app/web/src/utils/sync/ws-client.ts +++ b/app/web/src/utils/sync/ws-client.ts @@ -97,7 +97,11 @@ export const clientStartSync = async (arg: { } > ) => void; - code_changes: (arg: { ts: number; mode: "frontend" | "typings" }) => void; + code_changes: (arg: { + ts: number; + mode: "frontend" | "typings"; + status: "error" | "ok" | "building"; + }) => void; disconnected: () => { reconnect: boolean }; opened: () => void; shakehand: (client_id: string) => void; @@ -180,7 +184,7 @@ const connect = ( conf.ws = ws; event.opened(); }; - + ws.onmessage = async (e) => { const raw = e.data as Blob; const msg = packr.unpack(Buffer.from(await raw.arrayBuffer())); diff --git a/bun.lockb b/bun.lockb index 601a10f5a8a1055d0b102d271ca5b2ac819d5646..d0aaf1f265824bc597cff0ec2265a572e7350b8a 100755 GIT binary patch delta 5690 zcmeHLdstOf7T@Qbdy#{R@&O^@8^KVxyuBa-Dw(LM_?8?IR8$N^gnVU_uc^jIK2EuP zky55&Q6lLrd?1J^prS(fM1iu&#u`z_Nl2UDx@TYW`(~!^t8f08KW2Y!*82U{I%}`J z&fe#4cin2IAK!6WXY%Q@^l+~pZ?sQc^vGlO_s#M5s#aw?mS4CzZ)~sZ^#e!kv70%> zz^I*AKfbdZcqD(pI_FVCPBZ4l*pdjyHjo|9Fy;tZGnKKHkSeeXWJ+ez+_^~$*(3P1 z0yaUmhU_M=8zlKVp4MJ;8Q!(5LWf;0=;1Txq^4vAG4^B_t<0rId~+3JDjsS9*%tC} zHDgYYt?`sIWYc+F-hw3ll8|R19e|hD=*g4{dGx9d!ovdZ zhop>hAt{6O*~wWcX~`@tB`syD-}KqU-vS+TlwmWHG zS6rIhYV?Qq{_$SGmw!9umB1df_H1{tAkjB=n^djko{CnJQ0H-YP|^a!%#ua(DT`Kn z;T=6^O*FlzZGvziAK2PA9x!DjUlP;cGwlvxcv%UC}v${%VrW&#b+@`59b z2Z-0w`bJ29*L*6X)sRZY`oNEAjlpJVww7BFE$z~7;cuevYva*cIy-69i&f zMxrWQDASgYKOO_qx?_IY7|f?Y%R46^jZPjQ* zZhe4gmXek~!K`Kh#R4hTY|a1;0YXiYjoX)u4Y%58PRRnH!axN;~9VD?)VRWS{|>-?RuRM@y-WR{gO9#=wfvW}4OIKyg5JT40b_tpcKY z>N9u0f+vCW`Ah_&obhf^`K>^-(iE*R!mM5fdNQJ{Ue#vRL>a@cBD9uP6Jh)_wBc6m zBD5E*n&&kXOUtY2Yp^QhX0d6igq=jyGHO^WQlyr0DO#NmE(n~x^*!7N(%%DBaKLpv zQ@t81fGATStinkE_IA0!ltkFY@lD(#b1HwIeq7Kt+$Pk5olJY0|moouLZ`K<<0fl-m6jSWsqi& z7#1(3Z3AN?fUNsmoeV@N=>weyqD5}dXd$_Nr6YSS$2Yj3d+h?}*IXE5%MI2q3|j+9 zjbsbRw;?6ScLe`?Bt5@TJWrC;E%-zHRs)*_VO5w6nJpYilEb?KKP?@>e*~WVKNfb9 zM&JTSdhS!fKP_b~yU|TM-54;EJU$a1zem!@g<_;bkS(>yyPZ=g>PZpx-%0%9u?xcf zTO`G;5~Ec^s@jpeZray(+v2x_vFj93yLq?sa0N<(i2t;t=f4s>Ny1+X{IsN5eIxj9 z3?PrAz6L(nF&wTTx zC7Z4nc6#(ZQVvot8k=!Bz;Gf$G` z8TbV;NM)9IlN@Z=*i-6Dn6C?x?TwS_v9rl%wB=5aJmd`?=Phdv3y$c8IaR`+E0p`q zW{-c?8`WwRY)I1j;j>|S&-BPEV&%Rie28BrxV3^K_<#&(>z<1BtxmD^ys=PrerhvPC!flh6c&N>Rm8_~S^<<_ptS!Lj1q;aJho(2+k zC#Z{XrwQ!?N3Xm)dW9I#BK*9-oea5^GpvQxw$0`LE3SI0{c8=#$hzr7m6B;`P zom!RPa3EwfQEJtYq=us>5rJ02r6Pp5DBL4Jd0|A#=91uW(zSAw&1JzwLO%tavbn-X zQi!X<6b-5rI*oiyaQ&c9L8p;x!C?f}AALG{KlD1DgAm^J!aW8Q9n{FBL2y6Pt3g|F zmR~87H%iMaX~*O$$w)_vn|xr2>~EygMgw11B2PBnfLg~dm&l&RYfvw6>A37^cOGh# z#Csl>JEO`JuY`Pu7tYUl6_omAv@90he}PQrBYV$ z11IFpY946%!Ty}rpOBq>Xm8`3$+n@>`IGkbCUiREu0>ymz8+n(xPKvElv*EzPRGUr z=-HM>CuM)R>nZ5;`AS6ZjyY$e*Fuk$^l!ojKCE2!RO$3dJ8OewVYzHCskCg+VjHMJ z-7Nbmw@Ti$f#|1^xTEMBV5e6}J7595 z2(;=X%YYm5xU5jywSnzspqp-oOY(x`sY#Hp#>aO|ysvfWCMATK0!&!NMZ93NvQ#SL zp<|Q-vg2ufdyLXfc00}O#wtOfw)>h*yYpTdHLv}3S^8rjp2NDc-RQhhxB5%FgrY`a zLBt52Hdb->uw51Py0;^I3v0htIA9Mx;yGiLVX}IL-@zDCNA5XJ874*WjB!f6)Wk=R zSJFN9pVx0j)SuUHPt2;9WGNvC17klO;UE4Pwv+s3m-XAaj^@aF#0&WZi3QYZc)X5nxIU_l%~cj!BR8lBo6b6cqFu(FMSbW z6#qFM)3s*l(#1?6E?m;Dzbe=6zF&Rr=QK80ZZ!i zD=gbBm56|1u7t%I|39_eW5E(^3gCC*6c_upQctW}Y}vb$lsK==4f<`PXU)puoSlp3 z!!yJbW_=-3==;Ukj%f;Sjxn^iEKN`b$+#-x<%vosd3OW?vSK(ayU0lclU|4 z1SKhD6&;c@r@Wk!I?ZoR>dP}yX8X-aPhB`YB{kJ=cKWnrOS7+Gu}jjgx%m6}|C-qk z1xAsxW-RJAD|1eo|J3xk$th`b(&uLRr6p%2`OQtvOi!K1bB-t-_>Fl=i*8S`$%y^0 zzR7&;M#anNmvHc+sJ#Du#mh3kzrjy-m>G)?5!#!v{Noq{eG7PHjG?Q;Il-?R%$s5i ij~$K;*8T1bw)*kz0}UY#VdC<4<`8o7;I9reeDzQL;u#bG delta 4956 zcmeHLdsJ0b8sGbzd+{C=m4`3T07=x8D=)by$n}w>l}y?!0UzYeR4@@=jb%R28P`mf zB^_ZWkCMu=lxgsF)g(eg(F-YRAU=R=(;Az`m724bv(RRK-#PoT{A2#<-&wO4oA3Mm zzHfi~+mEx)zUN+1V8@$*+w8+bf?oS;&HADbZaYgS_U-=qmdDal63R!;`SbOFzJGD( zv+kaoY++Q67iNSjV~DV^vFsHE$7YfE0-_d)stFKRZE*)8$=kQA?2pW0{Wn50W)ipz4B=F_kr z0QZIU2S^&yWk?!wqx7qVq@f+sKkf4*|4_f(r{9#iYi1^gA!)dKA<1W%YgJCnOAB7z zDRD6*WwaHNGRR-LU{!A30+yGXmpeaZ;Zi-PZ>+M`yT7DwTc7>gMouZ?hxOKar#2bW zHxvF`cO^S`sh)M(srAAVJZ^B_Q4Z}npfn(>?zKC#LZD}X6y2NP(7ZrNhG#{+L+keq zW8=+sPdls`Koj+A2`Sbc#Ovj$DZEwB@;J5rXBis{Kc+_}I`|B|)#Kz_^Z^Y{UaMy{ zI5pcj#u8yyjXqK(VtU0mhqeredSp7~_AyYhfm}%r?eAU4`?*6KjI|gITX&su%K&l$ z`Rgv^9ftKbM_m!)(3S&He-@q4E}$n26baM`WX=V8=T1HAtkb$0yCzXDAD5!-Aq~EM zy7y^^b^}Px#@J-rMRSl`_hve@OrR-nRE=b+fSv-vlp>i%H0*E{n z-GwOLE<{T)qM5N&qn!($D}l_(r{V6GHVo-mhxQW?O}I*ntPO8rEX9cF-Q=*o2$ZbP z-IAh}K}!N}HF7);lxVb}Jp8aVV-1Ap)=5AU^|>#m@Xh*;i%u=Lm9gK#ir#V@+9IH5 zf&BEy%w!t?&89i<2S5{n%;7jMn<-;uG1D7>XrHNiWU51}2I}fixp`SHX-=~ax`N1h zc}uDVO1fU&oMQa~+B1gM?JB0q(5823r9Msj9$G4*TXpOd9;xrRcdIh3^>ddbx^?HEW0NK7YY`e&fu02vRjHqq;Q ztSHF?K(ui!I_-{o64~^okqP@l+Fl9H3TBLLvKXfZdlQlh$!?H3B!}EC`ClbPV>jM! z1GU^C!<5J{Bo**w5|gBE$|ZhS_5{C2`d3OjNh|n$kkoF!>y`cJ%wgT->L zEW){E;g#-Fr^a`6! z_$5LVN)tUyo2BU;$>CbWwt%Cab;;4g+f({&7cL4>BuxP@Erw2|SaNh2y(BpyIo#aX zYRSDTst{ts4rvO6$x0cclt_*aq)`ULSgGXb2(FS@lu0fGT(RWJCD#WW9lA?jz|J2JT;EMA;=OD8$Fo zGzgTHW)bBR$vpy{>{ND3E*yHAe6bTc(6=;-uBsUoPC~!2Qy^@Q9-h#|% zK$T*`R|s)HnudU?lUW>;Tr{{n;3)Y+;K)1_bqo~B`iLl`5XYqZa8S!osZ>kuG3a=g z8s$sLjQ~nOW|Vb}@KT7cq$vi}bVR3~Yb9rg{+#5FgTtS(?(v9?6rw?zMuVaOP-&DQaJyhNk~=H?aAjbWIhAvw zi9$3<_c5SchJmpQ(jC_oHUvFVHWwwAB00+DTM>C2A)2LW94Hz9Wz!}8?h~QsNUlwClYkeal7GA8d?PFHh_}8`28+AL zl~wK~CzNyCN^eN7m{6yTvbIBQ6ED{(&+`kSwN8n$(o4Hu@RLfEUm9oZs6{+>Qh7u> z0s3pyaxwj+5*D}%>L;kXQ9ni9B-Wi&!ucESijzt=CGZ-k^GJlIj;89oI8v{K2kZsy zMm>yLDZKSc@DRHEl%f`)(gQ9~>Av+A>f5N>P~UM6I<2(u09;^<%gq7EGB@`qqm;-~ z(CHYPhx#anUye%m1t)T+!=X@2Z&ac*x*O3GR_I>WsMxsXK~gBm?Z)KLT)RL2MyU>r zq&-3#-H!HSP-!30148F~Hrxif3pdo&s0PC zhvM2ybtA77&u6Fy2j20Rzd~26A60U;V|;|d*T>r9?1_wZdPHod8XxBS+5YY)m9NeC zU1%FT;_R{H5hT`SssqA&Kh!-pt(g;|Ym(p)Z%?peciTl39Jp6_GSz9y%?1&grN(nE zre&$qc(^FdQoX!Qted6g^I~yx7Gn8+me=3t6A|E2j_oIK`qC@T%@kYUTSZko(NA%Fl1C$u}%sLG(5C5`bbcIJTIc>s0)$y);VedZx^)?VZQGVy)O(4&wDf@2+c;D z%@&DXbCFt-7(Q2>7Uui@5R;J+FuQ1M4g3=94hnxr6q29m9_IU^5WHq#-SGIK>);n_ zk0-xI(GI^b-zSKcmXA(k?Cm+g2xR1GOhPEXB<$H(F5jn%KfLda?p3oU6MmQpI}QVj zcr6; main_cache: Record; br: BrotliWasmType; + preview_page_timeout: Record };