#!/usr/bin/env node
// (c) Anthropic PBC. All rights reserved. Use is subject to the Legal Agreements outlined here: https://code.claude.com/docs/en/legal-and-compliance.

// Version: 2.1.71

// Want to see the unminified source? We're hiring!
// https://job-boards.greenhouse.io/anthropic/jobs/4816199008
import{createRequire as Utq}from"node:module";var xtq=Object.create;var{getPrototypeOf:utq,defineProperty:cy6,getOwnPropertyNames:nAA,getOwnPropertyDescriptor:Btq}=Object,rAA=Object.prototype.hasOwnProperty;function oAA(A){return this[A]}var mtq,gtq,e=(A,q,K)=>{var Y=A!=null&&typeof A==="object";if(Y){var z=q?mtq??=new WeakMap:gtq??=new WeakMap,w=z.get(A);if(w)return w}K=A!=null?xtq(utq(A)):{};let _=q||!A||!A.__esModule?cy6(K,"default",{value:A,enumerable:!0}):K;for(let $ of nAA(A))if(!rAA.call(_,$))cy6(_,$,{get:oAA.bind(A,$),enumerable:!0});if(Y)z.set(A,_);return _},W3=(A)=>{var q=(iAA??=new WeakMap).get(A),K;if(q)return q;if(q=cy6({},"__esModule",{value:!0}),A&&typeof A==="object"||typeof A==="function"){for(var Y of nAA(A))if(!rAA.call(q,Y))cy6(q,Y,{get:oAA.bind(A,Y),enumerable:!(K=Btq(A,Y))||K.enumerable})}return iAA.set(A,q),q},iAA,C=(A,q)=>()=>(q||A((q={exports:{}}).exports,q),q.exports);var Ftq=(A)=>A;function Qtq(A,q){this[A]=Ftq.bind(null,q)}var m1=(A,q)=>{for(var K in q)cy6(A,K,{get:q[K],enumerable:!0,configurable:!0,set:Qtq.bind(q,K)})};var k=(A,q)=>()=>(A&&(q=A(A=0)),q);var g6=Utq(import.meta.url),ptq=Symbol.dispose||Symbol.for("Symbol.dispose"),dtq=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),oY=(A,q,K)=>{if(q!=null){if(typeof q!=="object"&&typeof q!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var Y;if(K)Y=q[dtq];if(Y===void 0)Y=q[ptq];if(typeof Y!=="function")throw TypeError("Object not disposable");A.push([K,Y,q])}else if(K)A.push([K]);return q},aY=(A,q,K)=>{var Y=typeof SuppressedError==="function"?SuppressedError:function(_,$,O,H){return H=Error(O),H.name="SuppressedError",H.error=_,H.suppressed=$,H},z=(_)=>q=K?new Y(_,q,"An error was suppressed during disposal"):(K=!0,_),w=(_)=>{while(_=A.pop())try{var $=_[1]&&_[1].call(_[2]);if(_[0])return Promise.resolve($).then(w,(O)=>(z(O),w()))}catch(O){z(O)}if(K)throw q};return w()};var ctq,J11;var rm1=k(()=>{ctq=typeof global=="object"&&global&&global.Object===Object&&global,J11=ctq});var ltq,itq,vj;var yy=k(()=>{rm1();ltq=typeof self=="object"&&self&&self.Object===Object&&self,itq=J11||ltq||Function("return this")(),vj=itq});var ntq,IX;var Z46=k(()=>{yy();ntq=vj.Symbol,IX=ntq});function atq(A){var q=rtq.call(A,ly6),K=A[ly6];try{A[ly6]=void 0;var Y=!0}catch(w){}var z=otq.call(A);if(Y)if(q)A[ly6]=K;else delete A[ly6];return z}var aAA,rtq,otq,ly6,sAA;var tAA=k(()=>{Z46();aAA=Object.prototype,rtq=aAA.hasOwnProperty,otq=aAA.toString,ly6=IX?IX.toStringTag:void 0;sAA=atq});function etq(A){return ttq.call(A)}var stq,ttq,eAA;var A7A=k(()=>{stq=Object.prototype,ttq=stq.toString;eAA=etq});function Keq(A){if(A==null)return A===void 0?qeq:Aeq;return q7A&&q7A in Object(A)?sAA(A):eAA(A)}var Aeq="[object Null]",qeq="[object Undefined]",q7A,vk;var G46=k(()=>{Z46();tAA();A7A();q7A=IX?IX.toStringTag:void 0;vk=Keq});function Yeq(A){var q=typeof A;return A!=null&&(q=="object"||q=="function")}var Bw;var Pf=k(()=>{Bw=Yeq});function Oeq(A){if(!Bw(A))return!1;var q=vk(A);return q==weq||q==_eq||q==zeq||q==$eq}var zeq="[object AsyncFunction]",weq="[object Function]",_eq="[object GeneratorFunction]",$eq="[object Proxy]",nO6;var M11=k(()=>{G46();Pf();nO6=Oeq});var Heq,D11;var K7A=k(()=>{yy();Heq=vj["__core-js_shared__"],D11=Heq});function jeq(A){return!!Y7A&&Y7A in A}var Y7A,z7A;var w7A=k(()=>{K7A();Y7A=function(){var A=/[^.]+$/.exec(D11&&D11.keys&&D11.keys.IE_PROTO||"");return A?"Symbol(src)_1."+A:""}();z7A=jeq});function Deq(A){if(A!=null){try{return Meq.call(A)}catch(q){}try{return A+""}catch(q){}}return""}var Jeq,Meq,Lp;var om1=k(()=>{Jeq=Function.prototype,Meq=Jeq.toString;Lp=Deq});function Veq(A){if(!Bw(A)||z7A(A))return!1;var q=nO6(A)?Teq:Peq;return q.test(Lp(A))}var Xeq,Peq,Weq,Zeq,Geq,feq,Teq,_7A;var $7A=k(()=>{M11();w7A();Pf();om1();Xeq=/[\\^$.*+?()[\]{}|]/g,Peq=/^\[object .+?Constructor\]$/,Weq=Function.prototype,Zeq=Object.prototype,Geq=Weq.toString,feq=Zeq.hasOwnProperty,Teq=RegExp("^"+Geq.call(feq).replace(Xeq,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");_7A=Veq});function Neq(A,q){return A==null?void 0:A[q]}var O7A;var H7A=k(()=>{O7A=Neq});function veq(A,q){var K=O7A(A,q);return _7A(K)?K:void 0}var kV;var yo=k(()=>{$7A();H7A();kV=veq});var keq,yp;var iy6=k(()=>{yo();keq=kV(Object,"create"),yp=keq});function Eeq(){this.__data__=yp?yp(null):{},this.size=0}var j7A;var J7A=k(()=>{iy6();j7A=Eeq});function Leq(A){var q=this.has(A)&&delete this.__data__[A];return this.size-=q?1:0,q}var M7A;var D7A=k(()=>{M7A=Leq});function Ceq(A){var q=this.__data__;if(yp){var K=q[A];return K===yeq?void 0:K}return Seq.call(q,A)?q[A]:void 0}var yeq="__lodash_hash_undefined__",Req,Seq,X7A;var P7A=k(()=>{iy6();Req=Object.prototype,Seq=Req.hasOwnProperty;X7A=Ceq});function beq(A){var q=this.__data__;return yp?q[A]!==void 0:Ieq.call(q,A)}var heq,Ieq,W7A;var Z7A=k(()=>{iy6();heq=Object.prototype,Ieq=heq.hasOwnProperty;W7A=beq});function ueq(A,q){var K=this.__data__;return this.size+=this.has(A)?0:1,K[A]=yp&&q===void 0?xeq:q,this}var xeq="__lodash_hash_undefined__",G7A;var f7A=k(()=>{iy6();G7A=ueq});function rO6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var am1;var T7A=k(()=>{J7A();D7A();P7A();Z7A();f7A();rO6.prototype.clear=j7A;rO6.prototype.delete=M7A;rO6.prototype.get=X7A;rO6.prototype.has=W7A;rO6.prototype.set=G7A;am1=rO6});function Beq(){this.__data__=[],this.size=0}var V7A;var N7A=k(()=>{V7A=Beq});function meq(A,q){return A===q||A!==A&&q!==q}var kB;var oO6=k(()=>{kB=meq});function geq(A,q){var K=A.length;while(K--)if(kB(A[K][0],q))return K;return-1}var Ro;var ny6=k(()=>{oO6();Ro=geq});function Ueq(A){var q=this.__data__,K=Ro(q,A);if(K<0)return!1;var Y=q.length-1;if(K==Y)q.pop();else Qeq.call(q,K,1);return--this.size,!0}var Feq,Qeq,v7A;var k7A=k(()=>{ny6();Feq=Array.prototype,Qeq=Feq.splice;v7A=Ueq});function peq(A){var q=this.__data__,K=Ro(q,A);return K<0?void 0:q[K][1]}var E7A;var L7A=k(()=>{ny6();E7A=peq});function deq(A){return Ro(this.__data__,A)>-1}var y7A;var R7A=k(()=>{ny6();y7A=deq});function ceq(A,q){var K=this.__data__,Y=Ro(K,A);if(Y<0)++this.size,K.push([A,q]);else K[Y][1]=q;return this}var S7A;var C7A=k(()=>{ny6();S7A=ceq});function aO6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var So;var ry6=k(()=>{N7A();k7A();L7A();R7A();C7A();aO6.prototype.clear=V7A;aO6.prototype.delete=v7A;aO6.prototype.get=E7A;aO6.prototype.has=y7A;aO6.prototype.set=S7A;So=aO6});var leq,Co;var X11=k(()=>{yo();yy();leq=kV(vj,"Map"),Co=leq});function ieq(){this.size=0,this.__data__={hash:new am1,map:new(Co||So),string:new am1}}var h7A;var I7A=k(()=>{T7A();ry6();X11();h7A=ieq});function neq(A){var q=typeof A;return q=="string"||q=="number"||q=="symbol"||q=="boolean"?A!=="__proto__":A===null}var b7A;var x7A=k(()=>{b7A=neq});function req(A,q){var K=A.__data__;return b7A(q)?K[typeof q=="string"?"string":"hash"]:K.map}var ho;var oy6=k(()=>{x7A();ho=req});function oeq(A){var q=ho(this,A).delete(A);return this.size-=q?1:0,q}var u7A;var B7A=k(()=>{oy6();u7A=oeq});function aeq(A){return ho(this,A).get(A)}var m7A;var g7A=k(()=>{oy6();m7A=aeq});function seq(A){return ho(this,A).has(A)}var F7A;var Q7A=k(()=>{oy6();F7A=seq});function teq(A,q){var K=ho(this,A),Y=K.size;return K.set(A,q),this.size+=K.size==Y?0:1,this}var U7A;var p7A=k(()=>{oy6();U7A=teq});function sO6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var f46;var P11=k(()=>{I7A();B7A();g7A();Q7A();p7A();sO6.prototype.clear=h7A;sO6.prototype.delete=u7A;sO6.prototype.get=m7A;sO6.prototype.has=F7A;sO6.prototype.set=U7A;f46=sO6});function sm1(A,q){if(typeof A!="function"||q!=null&&typeof q!="function")throw TypeError(eeq);var K=function(){var Y=arguments,z=q?q.apply(this,Y):Y[0],w=K.cache;if(w.has(z))return w.get(z);var _=A.apply(this,Y);return K.cache=w.set(z,_)||w,_};return K.cache=new(sm1.Cache||f46),K}var eeq="Expected a function",T8;var Eq=k(()=>{P11();sm1.Cache=f46;T8=sm1});function d7A(A){return(q)=>{if(q.code==="EPIPE")A.destroy()}}function c7A(){process.stdout.on("error",d7A(process.stdout)),process.stderr.on("error",d7A(process.stderr))}function l7A(A,q){if(A.destroyed)return;A.write(q)}function I4(A){l7A(process.stdout,A)}function Io(A){l7A(process.stderr,A)}function A6K(A){let q=[],K=A.match(/^MCP server ["']([^"']+)["']/);if(K&&K[1])q.push("mcp"),q.push(K[1].toLowerCase());else{let w=A.match(/^([^:[]+):/);if(w&&w[1])q.push(w[1].trim().toLowerCase())}let Y=A.match(/^\[([^\]]+)]/);if(Y&&Y[1])q.push(Y[1].trim().toLowerCase());if(A.toLowerCase().includes("1p event:"))q.push("1p");let z=A.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(z&&z[1]){let w=z[1].trim().toLowerCase();if(w.length<30&&!w.includes(" "))q.push(w)}return Array.from(new Set(q))}function q6K(A,q){if(!q)return!0;if(A.length===0)return!1;if(q.isExclusive)return!A.some((K)=>q.exclude.includes(K));else return A.some((K)=>q.include.includes(K))}function n7A(A,q){if(!q)return!0;let K=A6K(A);return q6K(K,q)}var i7A;var r7A=k(()=>{Eq();i7A=T8((A)=>{if(!A||A.trim()==="")return null;let q=A.split(",").map((w)=>w.trim()).filter(Boolean);if(q.length===0)return null;let K=q.some((w)=>w.startsWith("!")),Y=q.some((w)=>!w.startsWith("!"));if(K&&Y)return null;let z=q.map((w)=>w.replace(/^!/,"").toLowerCase());return{include:K?[]:z,exclude:K?z:[],isExclusive:K}})});function K6K(){this.__data__=new So,this.size=0}var o7A;var a7A=k(()=>{ry6();o7A=K6K});function Y6K(A){var q=this.__data__,K=q.delete(A);return this.size=q.size,K}var s7A;var t7A=k(()=>{s7A=Y6K});function z6K(A){return this.__data__.get(A)}var e7A;var A4A=k(()=>{e7A=z6K});function w6K(A){return this.__data__.has(A)}var q4A;var K4A=k(()=>{q4A=w6K});function $6K(A,q){var K=this.__data__;if(K instanceof So){var Y=K.__data__;if(!Co||Y.length<_6K-1)return Y.push([A,q]),this.size=++K.size,this;K=this.__data__=new f46(Y)}return K.set(A,q),this.size=K.size,this}var _6K=200,Y4A;var z4A=k(()=>{ry6();X11();P11();Y4A=$6K});function tO6(A){var q=this.__data__=new So(A);this.size=q.size}var EB;var ay6=k(()=>{ry6();a7A();t7A();A4A();K4A();z4A();tO6.prototype.clear=o7A;tO6.prototype.delete=s7A;tO6.prototype.get=e7A;tO6.prototype.has=q4A;tO6.prototype.set=Y4A;EB=tO6});function H6K(A){return this.__data__.set(A,O6K),this}var O6K="__lodash_hash_undefined__",w4A;var _4A=k(()=>{w4A=H6K});function j6K(A){return this.__data__.has(A)}var $4A;var O4A=k(()=>{$4A=j6K});function W11(A){var q=-1,K=A==null?0:A.length;this.__data__=new f46;while(++q<K)this.add(A[q])}var Z11;var tm1=k(()=>{P11();_4A();O4A();W11.prototype.add=W11.prototype.push=w4A;W11.prototype.has=$4A;Z11=W11});function J6K(A,q){var K=-1,Y=A==null?0:A.length;while(++K<Y)if(q(A[K],K,A))return!0;return!1}var H4A;var j4A=k(()=>{H4A=J6K});function M6K(A,q){return A.has(q)}var G11;var em1=k(()=>{G11=M6K});function P6K(A,q,K,Y,z,w){var _=K&D6K,$=A.length,O=q.length;if($!=O&&!(_&&O>$))return!1;var H=w.get(A),j=w.get(q);if(H&&j)return H==q&&j==A;var J=-1,M=!0,D=K&X6K?new Z11:void 0;w.set(A,q),w.set(q,A);while(++J<$){var X=A[J],P=q[J];if(Y)var W=_?Y(P,X,J,q,A,w):Y(X,P,J,A,q,w);if(W!==void 0){if(W)continue;M=!1;break}if(D){if(!H4A(q,function(Z,G){if(!G11(D,G)&&(X===Z||z(X,Z,K,Y,w)))return D.push(G)})){M=!1;break}}else if(!(X===P||z(X,P,K,Y,w))){M=!1;break}}return w.delete(A),w.delete(q),M}var D6K=1,X6K=2,f11;var Ag1=k(()=>{tm1();j4A();em1();f11=P6K});var W6K,eO6;var qg1=k(()=>{yy();W6K=vj.Uint8Array,eO6=W6K});function Z6K(A){var q=-1,K=Array(A.size);return A.forEach(function(Y,z){K[++q]=[z,Y]}),K}var J4A;var M4A=k(()=>{J4A=Z6K});function G6K(A){var q=-1,K=Array(A.size);return A.forEach(function(Y){K[++q]=Y}),K}var AH6;var T11=k(()=>{AH6=G6K});function I6K(A,q,K,Y,z,w,_){switch(K){case h6K:if(A.byteLength!=q.byteLength||A.byteOffset!=q.byteOffset)return!1;A=A.buffer,q=q.buffer;case C6K:if(A.byteLength!=q.byteLength||!w(new eO6(A),new eO6(q)))return!1;return!0;case V6K:case N6K:case E6K:return kB(+A,+q);case v6K:return A.name==q.name&&A.message==q.message;case L6K:case R6K:return A==q+"";case k6K:var $=J4A;case y6K:var O=Y&f6K;if($||($=AH6),A.size!=q.size&&!O)return!1;var H=_.get(A);if(H)return H==q;Y|=T6K,_.set(A,q);var j=f11($(A),$(q),Y,z,w,_);return _.delete(A),j;case S6K:if(Kg1)return Kg1.call(A)==Kg1.call(q)}return!1}var f6K=1,T6K=2,V6K="[object Boolean]",N6K="[object Date]",v6K="[object Error]",k6K="[object Map]",E6K="[object Number]",L6K="[object RegExp]",y6K="[object Set]",R6K="[object String]",S6K="[object Symbol]",C6K="[object ArrayBuffer]",h6K="[object DataView]",D4A,Kg1,X4A;var P4A=k(()=>{Z46();qg1();oO6();Ag1();M4A();T11();D4A=IX?IX.prototype:void 0,Kg1=D4A?D4A.valueOf:void 0;X4A=I6K});function b6K(A,q){var K=-1,Y=q.length,z=A.length;while(++K<Y)A[z+K]=q[K];return A}var qH6;var V11=k(()=>{qH6=b6K});var x6K,mw;var Wf=k(()=>{x6K=Array.isArray,mw=x6K});function u6K(A,q,K){var Y=q(A);return mw(A)?Y:qH6(Y,K(A))}var N11;var Yg1=k(()=>{V11();Wf();N11=u6K});function B6K(A,q){var K=-1,Y=A==null?0:A.length,z=0,w=[];while(++K<Y){var _=A[K];if(q(_,K,A))w[z++]=_}return w}var v11;var zg1=k(()=>{v11=B6K});function m6K(){return[]}var k11;var wg1=k(()=>{k11=m6K});var g6K,F6K,W4A,Q6K,KH6;var E11=k(()=>{zg1();wg1();g6K=Object.prototype,F6K=g6K.propertyIsEnumerable,W4A=Object.getOwnPropertySymbols,Q6K=!W4A?k11:function(A){if(A==null)return[];return A=Object(A),v11(W4A(A),function(q){return F6K.call(A,q)})},KH6=Q6K});function U6K(A,q){var K=-1,Y=Array(A);while(++K<A)Y[K]=q(K);return Y}var Z4A;var G4A=k(()=>{Z4A=U6K});function p6K(A){return A!=null&&typeof A=="object"}var CD;var LB=k(()=>{CD=p6K});function c6K(A){return CD(A)&&vk(A)==d6K}var d6K="[object Arguments]",_g1;var f4A=k(()=>{G46();LB();_g1=c6K});var T4A,l6K,i6K,n6K,Rp;var sy6=k(()=>{f4A();LB();T4A=Object.prototype,l6K=T4A.hasOwnProperty,i6K=T4A.propertyIsEnumerable,n6K=_g1(function(){return arguments}())?_g1:function(A){return CD(A)&&l6K.call(A,"callee")&&!i6K.call(A,"callee")},Rp=n6K});function r6K(){return!1}var V4A;var N4A=k(()=>{V4A=r6K});var y11={};m1(y11,{default:()=>yB});var E4A,v4A,o6K,k4A,a6K,s6K,yB;var ty6=k(()=>{yy();N4A();E4A=typeof y11=="object"&&y11&&!y11.nodeType&&y11,v4A=E4A&&typeof L11=="object"&&L11&&!L11.nodeType&&L11,o6K=v4A&&v4A.exports===E4A,k4A=o6K?vj.Buffer:void 0,a6K=k4A?k4A.isBuffer:void 0,s6K=a6K||V4A,yB=s6K});function A1K(A,q){var K=typeof A;return q=q==null?t6K:q,!!q&&(K=="number"||K!="symbol"&&e6K.test(A))&&(A>-1&&A%1==0&&A<q)}var t6K=9007199254740991,e6K,bo;var ey6=k(()=>{e6K=/^(?:0|[1-9]\d*)$/;bo=A1K});function K1K(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=q1K}var q1K=9007199254740991,YH6;var R11=k(()=>{YH6=K1K});function y1K(A){return CD(A)&&YH6(A.length)&&!!p$[vk(A)]}var Y1K="[object Arguments]",z1K="[object Array]",w1K="[object Boolean]",_1K="[object Date]",$1K="[object Error]",O1K="[object Function]",H1K="[object Map]",j1K="[object Number]",J1K="[object Object]",M1K="[object RegExp]",D1K="[object Set]",X1K="[object String]",P1K="[object WeakMap]",W1K="[object ArrayBuffer]",Z1K="[object DataView]",G1K="[object Float32Array]",f1K="[object Float64Array]",T1K="[object Int8Array]",V1K="[object Int16Array]",N1K="[object Int32Array]",v1K="[object Uint8Array]",k1K="[object Uint8ClampedArray]",E1K="[object Uint16Array]",L1K="[object Uint32Array]",p$,L4A;var y4A=k(()=>{G46();R11();LB();p$={};p$[G1K]=p$[f1K]=p$[T1K]=p$[V1K]=p$[N1K]=p$[v1K]=p$[k1K]=p$[E1K]=p$[L1K]=!0;p$[Y1K]=p$[z1K]=p$[W1K]=p$[w1K]=p$[Z1K]=p$[_1K]=p$[$1K]=p$[O1K]=p$[H1K]=p$[j1K]=p$[J1K]=p$[M1K]=p$[D1K]=p$[X1K]=p$[P1K]=!1;L4A=y1K});function R1K(A){return function(q){return A(q)}}var zH6;var S11=k(()=>{zH6=R1K});var h11={};m1(h11,{default:()=>RB});var R4A,AR6,S1K,$g1,C1K,RB;var I11=k(()=>{rm1();R4A=typeof h11=="object"&&h11&&!h11.nodeType&&h11,AR6=R4A&&typeof C11=="object"&&C11&&!C11.nodeType&&C11,S1K=AR6&&AR6.exports===R4A,$g1=S1K&&J11.process,C1K=function(){try{var A=AR6&&AR6.require&&AR6.require("util").types;if(A)return A;return $g1&&$g1.binding&&$g1.binding("util")}catch(q){}}(),RB=C1K});var S4A,h1K,wH6;var b11=k(()=>{y4A();S11();I11();S4A=RB&&RB.isTypedArray,h1K=S4A?zH6(S4A):L4A,wH6=h1K});function x1K(A,q){var K=mw(A),Y=!K&&Rp(A),z=!K&&!Y&&yB(A),w=!K&&!Y&&!z&&wH6(A),_=K||Y||z||w,$=_?Z4A(A.length,String):[],O=$.length;for(var H in A)if((q||b1K.call(A,H))&&!(_&&(H=="length"||z&&(H=="offset"||H=="parent")||w&&(H=="buffer"||H=="byteLength"||H=="byteOffset")||bo(H,O))))$.push(H);return $}var I1K,b1K,x11;var Og1=k(()=>{G4A();sy6();Wf();ty6();ey6();b11();I1K=Object.prototype,b1K=I1K.hasOwnProperty;x11=x1K});function B1K(A){var q=A&&A.constructor,K=typeof q=="function"&&q.prototype||u1K;return A===K}var u1K,_H6;var u11=k(()=>{u1K=Object.prototype;_H6=B1K});function m1K(A,q){return function(K){return A(q(K))}}var B11;var Hg1=k(()=>{B11=m1K});var g1K,C4A;var h4A=k(()=>{Hg1();g1K=B11(Object.keys,Object),C4A=g1K});function U1K(A){if(!_H6(A))return C4A(A);var q=[];for(var K in Object(A))if(Q1K.call(A,K)&&K!="constructor")q.push(K);return q}var F1K,Q1K,I4A;var b4A=k(()=>{u11();h4A();F1K=Object.prototype,Q1K=F1K.hasOwnProperty;I4A=U1K});function p1K(A){return A!=null&&YH6(A.length)&&!nO6(A)}var SB;var $H6=k(()=>{M11();R11();SB=p1K});function d1K(A){return SB(A)?x11(A):I4A(A)}var Ry;var T46=k(()=>{Og1();b4A();$H6();Ry=d1K});function c1K(A){return N11(A,Ry,KH6)}var qR6;var jg1=k(()=>{Yg1();E11();T46();qR6=c1K});function r1K(A,q,K,Y,z,w){var _=K&l1K,$=qR6(A),O=$.length,H=qR6(q),j=H.length;if(O!=j&&!_)return!1;var J=O;while(J--){var M=$[J];if(!(_?M in q:n1K.call(q,M)))return!1}var D=w.get(A),X=w.get(q);if(D&&X)return D==q&&X==A;var P=!0;w.set(A,q),w.set(q,A);var W=_;while(++J<O){M=$[J];var Z=A[M],G=q[M];if(Y)var f=_?Y(G,Z,M,q,A,w):Y(Z,G,M,A,q,w);if(!(f===void 0?Z===G||z(Z,G,K,Y,w):f)){P=!1;break}W||(W=M=="constructor")}if(P&&!W){var V=A.constructor,N=q.constructor;if(V!=N&&(("constructor"in A)&&("constructor"in q))&&!(typeof V=="function"&&V instanceof V&&typeof N=="function"&&N instanceof N))P=!1}return w.delete(A),w.delete(q),P}var l1K=1,i1K,n1K,x4A;var u4A=k(()=>{jg1();i1K=Object.prototype,n1K=i1K.hasOwnProperty;x4A=r1K});var o1K,m11;var B4A=k(()=>{yo();yy();o1K=kV(vj,"DataView"),m11=o1K});var a1K,g11;var m4A=k(()=>{yo();yy();a1K=kV(vj,"Promise"),g11=a1K});var s1K,xo;var Jg1=k(()=>{yo();yy();s1K=kV(vj,"Set"),xo=s1K});var t1K,F11;var g4A=k(()=>{yo();yy();t1K=kV(vj,"WeakMap"),F11=t1K});var F4A="[object Map]",e1K="[object Object]",Q4A="[object Promise]",U4A="[object Set]",p4A="[object WeakMap]",d4A="[object DataView]",A8K,q8K,K8K,Y8K,z8K,V46,Sp;var KR6=k(()=>{B4A();X11();m4A();Jg1();g4A();G46();om1();A8K=Lp(m11),q8K=Lp(Co),K8K=Lp(g11),Y8K=Lp(xo),z8K=Lp(F11),V46=vk;if(m11&&V46(new m11(new ArrayBuffer(1)))!=d4A||Co&&V46(new Co)!=F4A||g11&&V46(g11.resolve())!=Q4A||xo&&V46(new xo)!=U4A||F11&&V46(new F11)!=p4A)V46=function(A){var q=vk(A),K=q==e1K?A.constructor:void 0,Y=K?Lp(K):"";if(Y)switch(Y){case A8K:return d4A;case q8K:return F4A;case K8K:return Q4A;case Y8K:return U4A;case z8K:return p4A}return q};Sp=V46});function $8K(A,q,K,Y,z,w){var _=mw(A),$=mw(q),O=_?l4A:Sp(A),H=$?l4A:Sp(q);O=O==c4A?Q11:O,H=H==c4A?Q11:H;var j=O==Q11,J=H==Q11,M=O==H;if(M&&yB(A)){if(!yB(q))return!1;_=!0,j=!1}if(M&&!j)return w||(w=new EB),_||wH6(A)?f11(A,q,K,Y,z,w):X4A(A,q,O,K,Y,z,w);if(!(K&w8K)){var D=j&&i4A.call(A,"__wrapped__"),X=J&&i4A.call(q,"__wrapped__");if(D||X){var P=D?A.value():A,W=X?q.value():q;return w||(w=new EB),z(P,W,K,Y,w)}}if(!M)return!1;return w||(w=new EB),x4A(A,q,K,Y,z,w)}var w8K=1,c4A="[object Arguments]",l4A="[object Array]",Q11="[object Object]",_8K,i4A,n4A;var r4A=k(()=>{ay6();Ag1();P4A();u4A();KR6();Wf();ty6();b11();_8K=Object.prototype,i4A=_8K.hasOwnProperty;n4A=$8K});function o4A(A,q,K,Y,z){if(A===q)return!0;if(A==null||q==null||!CD(A)&&!CD(q))return A!==A&&q!==q;return n4A(A,q,K,Y,o4A,z)}var OH6;var U11=k(()=>{r4A();LB();OH6=o4A});function j8K(A,q,K,Y){var z=K.length,w=z,_=!Y;if(A==null)return!w;A=Object(A);while(z--){var $=K[z];if(_&&$[2]?$[1]!==A[$[0]]:!($[0]in A))return!1}while(++z<w){$=K[z];var O=$[0],H=A[O],j=$[1];if(_&&$[2]){if(H===void 0&&!(O in A))return!1}else{var J=new EB;if(Y)var M=Y(H,j,O,A,q,J);if(!(M===void 0?OH6(j,H,O8K|H8K,Y,J):M))return!1}}return!0}var O8K=1,H8K=2,a4A;var s4A=k(()=>{ay6();U11();a4A=j8K});function J8K(A){return A===A&&!Bw(A)}var p11;var Mg1=k(()=>{Pf();p11=J8K});function M8K(A){var q=Ry(A),K=q.length;while(K--){var Y=q[K],z=A[Y];q[K]=[Y,z,p11(z)]}return q}var t4A;var e4A=k(()=>{Mg1();T46();t4A=M8K});function D8K(A,q){return function(K){if(K==null)return!1;return K[A]===q&&(q!==void 0||(A in Object(K)))}}var d11;var Dg1=k(()=>{d11=D8K});function X8K(A){var q=t4A(A);if(q.length==1&&q[0][2])return d11(q[0][0],q[0][1]);return function(K){return K===A||a4A(K,A,q)}}var AqA;var qqA=k(()=>{s4A();e4A();Dg1();AqA=X8K});function W8K(A){return typeof A=="symbol"||CD(A)&&vk(A)==P8K}var P8K="[object Symbol]",uo;var YR6=k(()=>{G46();LB();uo=W8K});function f8K(A,q){if(mw(A))return!1;var K=typeof A;if(K=="number"||K=="symbol"||K=="boolean"||A==null||uo(A))return!0;return G8K.test(A)||!Z8K.test(A)||q!=null&&A in Object(q)}var Z8K,G8K,HH6;var c11=k(()=>{Wf();YR6();Z8K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G8K=/^\w*$/;HH6=f8K});function V8K(A){var q=T8(A,function(Y){if(K.size===T8K)K.clear();return Y}),K=q.cache;return q}var T8K=500,KqA;var YqA=k(()=>{Eq();KqA=V8K});var N8K,v8K,k8K,zqA;var wqA=k(()=>{YqA();N8K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,v8K=/\\(\\)?/g,k8K=KqA(function(A){var q=[];if(A.charCodeAt(0)===46)q.push("");return A.replace(N8K,function(K,Y,z,w){q.push(z?w.replace(v8K,"$1"):Y||K)}),q}),zqA=k8K});function E8K(A,q){var K=-1,Y=A==null?0:A.length,z=Array(Y);while(++K<Y)z[K]=q(A[K],K,A);return z}var jH6;var l11=k(()=>{jH6=E8K});function OqA(A){if(typeof A=="string")return A;if(mw(A))return jH6(A,OqA)+"";if(uo(A))return $qA?$qA.call(A):"";var q=A+"";return q=="0"&&1/A==-L8K?"-0":q}var L8K=1/0,_qA,$qA,HqA;var jqA=k(()=>{Z46();l11();Wf();YR6();_qA=IX?IX.prototype:void 0,$qA=_qA?_qA.toString:void 0;HqA=OqA});function y8K(A){return A==null?"":HqA(A)}var JH6;var i11=k(()=>{jqA();JH6=y8K});function R8K(A,q){if(mw(A))return A;return HH6(A,q)?[A]:zqA(JH6(A))}var CB;var MH6=k(()=>{Wf();c11();wqA();i11();CB=R8K});function C8K(A){if(typeof A=="string"||uo(A))return A;var q=A+"";return q=="0"&&1/A==-S8K?"-0":q}var S8K=1/0,Sy;var N46=k(()=>{YR6();Sy=C8K});function h8K(A,q){q=CB(q,A);var K=0,Y=q.length;while(A!=null&&K<Y)A=A[Sy(q[K++])];return K&&K==Y?A:void 0}var DH6;var n11=k(()=>{MH6();N46();DH6=h8K});function I8K(A,q,K){var Y=A==null?void 0:DH6(A,q);return Y===void 0?K:Y}var JqA;var MqA=k(()=>{n11();JqA=I8K});function b8K(A,q){return A!=null&&q in Object(A)}var DqA;var XqA=k(()=>{DqA=b8K});function x8K(A,q,K){q=CB(q,A);var Y=-1,z=q.length,w=!1;while(++Y<z){var _=Sy(q[Y]);if(!(w=A!=null&&K(A,_)))break;A=A[_]}if(w||++Y!=z)return w;return z=A==null?0:A.length,!!z&&YH6(z)&&bo(_,z)&&(mw(A)||Rp(A))}var PqA;var WqA=k(()=>{MH6();sy6();Wf();ey6();R11();N46();PqA=x8K});function u8K(A,q){return A!=null&&PqA(A,q,DqA)}var ZqA;var GqA=k(()=>{XqA();WqA();ZqA=u8K});function g8K(A,q){if(HH6(A)&&p11(q))return d11(Sy(A),q);return function(K){var Y=JqA(K,A);return Y===void 0&&Y===q?ZqA(K,A):OH6(q,Y,B8K|m8K)}}var B8K=1,m8K=2,fqA;var TqA=k(()=>{U11();MqA();GqA();c11();Mg1();Dg1();N46();fqA=g8K});function F8K(A){return A}var XH6;var r11=k(()=>{XH6=F8K});function Q8K(A){return function(q){return q==null?void 0:q[A]}}var VqA;var NqA=k(()=>{VqA=Q8K});function U8K(A){return function(q){return DH6(q,A)}}var vqA;var kqA=k(()=>{n11();vqA=U8K});function p8K(A){return HH6(A)?VqA(Sy(A)):vqA(A)}var EqA;var LqA=k(()=>{NqA();kqA();c11();N46();EqA=p8K});function d8K(A){if(typeof A=="function")return A;if(A==null)return XH6;if(typeof A=="object")return mw(A)?fqA(A[0],A[1]):AqA(A);return EqA(A)}var hB;var PH6=k(()=>{qqA();TqA();r11();Wf();LqA();hB=d8K});function c8K(A,q){var K,Y=-1,z=A.length;while(++Y<z){var w=q(A[Y]);if(w!==void 0)K=K===void 0?w:K+w}return K}var yqA;var RqA=k(()=>{yqA=c8K});function l8K(A,q){return A&&A.length?yqA(A,hB(q,2)):0}var WH6;var SqA=k(()=>{PH6();RqA();WH6=l8K});function CqA(){return Xg1}function hqA(A){Xg1=A}function HM(){Xg1=null}function o11(){return Pg1}function IqA(A){Pg1=A}function bqA(){Pg1=void 0}var Xg1=null,Pg1;var kF1={};m1(kF1,{updateLastInteractionTime:()=>k46,switchSession:()=>$0,setUseCoworkPlugins:()=>Lk,setTracerProvider:()=>z81,setTeleportedSessionInfo:()=>GR6,setSystemPromptSectionCacheEntry:()=>GF1,setStatsStore:()=>Cg1,setSessionTrustAccepted:()=>ZR6,setSessionSource:()=>ng1,setSessionPersistenceDisabled:()=>$F1,setSessionIngressToken:()=>C46,setSessionBypassPermissionsMode:()=>wF1,setSdkBetas:()=>mg1,setScheduledTasksEnabled:()=>XR6,setQuestionPreviewFormat:()=>_81,setPromptId:()=>VR6,setPromptCache1hAllowlist:()=>NF1,setOriginalCwd:()=>v46,setOauthTokenFromFd:()=>h46,setNeedsPlanModeExitAttachment:()=>eh,setModelStrings:()=>$R6,setMeterProvider:()=>Y81,setMeter:()=>gg1,setMainThreadAgentType:()=>Ip,setMainLoopModelOverride:()=>LZ,setLspRecommendationShownThisSession:()=>JF1,setLoggerProvider:()=>q81,setLastEmittedDate:()=>yH6,setLastAPIRequest:()=>eg1,setKairosActive:()=>$AK,setIsRemoteMode:()=>PF1,setIsInteractive:()=>lg1,setIsInWorktree:()=>fR6,setInlinePlugins:()=>YF1,setInitialMainLoopModel:()=>Bg1,setInitJsonSchema:()=>MF1,setHasUnknownModelCost:()=>e11,setHasExitedPlanMode:()=>yk,setFlagSettingsPath:()=>rg1,setFlagSettingsInline:()=>og1,setEventLogger:()=>K81,setDirectConnectServerUrl:()=>n8K,setCwdState:()=>a11,setCostStateForRestore:()=>_R6,setClientType:()=>ig1,setChromeFlagOverride:()=>zF1,setApiKeyFromFd:()=>I46,setAllowedSettingSources:()=>KF1,setAdditionalDirectoriesForClaudeMd:()=>TR6,resetTurnToolDuration:()=>yg1,resetTurnHookDuration:()=>Lg1,resetTurnClassifierDuration:()=>Sg1,resetTotalDurationStateAndCost_FOR_TESTS_ONLY:()=>r8K,resetStateForTests:()=>QqA,resetSdkInitState:()=>UqA,resetModelStringsForTestingOnly:()=>zAK,resetCostState:()=>TH6,removeSessionCronTasks:()=>WR6,registerHookCallbacks:()=>u46,regenerateSessionId:()=>Zg1,preferThirdPartyAuthentication:()=>JR6,needsPlanModeExitAttachment:()=>HF1,markFirstTeleportMessageLogged:()=>j81,isSessionPersistenceDisabled:()=>Cy,hasUnknownModelCost:()=>xg1,hasShownLspRecommendationThisSession:()=>jF1,hasExitedPlanModeInSession:()=>OF1,handlePlanModeTransition:()=>Cp,getUseCoworkPlugins:()=>DR6,getUsageForModel:()=>ug1,getTurnToolDurationMs:()=>AAK,getTurnToolCount:()=>qAK,getTurnHookDurationMs:()=>t8K,getTurnHookCount:()=>e8K,getTurnClassifierDurationMs:()=>KAK,getTurnClassifierCount:()=>YAK,getTracerProvider:()=>S46,getTotalWebSearchRequests:()=>bg1,getTotalToolDuration:()=>kg1,getTotalOutputTokens:()=>R46,getTotalLinesRemoved:()=>L46,getTotalLinesAdded:()=>E46,getTotalInputTokens:()=>y46,getTotalDuration:()=>ZH6,getTotalCostUSD:()=>bX,getTotalCacheReadInputTokens:()=>zR6,getTotalCacheCreationInputTokens:()=>wR6,getTotalAPIDurationWithoutRetries:()=>vg1,getTotalAPIDuration:()=>kk,getTokenSaverHits:()=>s8K,getTokenSaverBytesSaved:()=>a8K,getTokenCounter:()=>NH6,getTeleportedSessionInfo:()=>H81,getSystemPromptSectionCache:()=>ZF1,getStatsStore:()=>GH6,getSlowOperations:()=>dqA,getSessionTrustAccepted:()=>LH6,getSessionSource:()=>OAK,getSessionProjectDir:()=>fg1,getSessionIngressToken:()=>ag1,getSessionId:()=>d1,getSessionCronTasks:()=>PR6,getSessionCounter:()=>Fg1,getSessionBypassPermissionsMode:()=>x46,getSdkBetas:()=>kj,getScheduledTasksEnabled:()=>EH6,getRegisteredHooks:()=>mo,getQuestionPreviewFormat:()=>w81,getPromptId:()=>vF1,getPromptCache1hAllowlist:()=>VF1,getProjectRoot:()=>Uz,getPrCounter:()=>OR6,getPlanSlugCache:()=>B46,getParentSessionId:()=>Gg1,getOriginalCwd:()=>DA,getOauthTokenFromFd:()=>sg1,getModelUsage:()=>sh,getModelStrings:()=>VH6,getMeterProvider:()=>cg1,getMeter:()=>wAK,getMainThreadAgentType:()=>hp,getMainLoopModelOverride:()=>th,getLoggerProvider:()=>jR6,getLocCounter:()=>A81,getLastInteractionTime:()=>IB,getLastEmittedDate:()=>TF1,getLastAPIRequest:()=>AF1,getKairosActive:()=>_AK,getIsRemoteMode:()=>Lq,getIsNonInteractiveSession:()=>u7,getIsInteractive:()=>Ek,getIsInWorktree:()=>WF1,getInvokedSkillsForAgent:()=>J81,getInvokedSkills:()=>JAK,getInlinePlugins:()=>b46,getInitialMainLoopModel:()=>fH6,getInitJsonSchema:()=>O81,getFlagSettingsPath:()=>Bo,getFlagSettingsInline:()=>kH6,getEventLogger:()=>dg1,getDirectConnectServerUrl:()=>Tg1,getCwdState:()=>ah,getCostCounter:()=>Ug1,getCommitCounter:()=>Qg1,getCodeEditToolDecisionCounter:()=>HR6,getClientType:()=>vH6,getChromeFlagOverride:()=>MR6,getApiKeyFromFd:()=>tg1,getAllowedSettingSources:()=>qF1,getAgentColorMap:()=>$81,getAdditionalDirectoriesForClaudeMd:()=>EV,getActiveTimeCounter:()=>pg1,flushInteractionTime:()=>Ig1,clearSystemPromptSectionState:()=>fF1,clearRegisteredPluginHooks:()=>DF1,clearRegisteredHooks:()=>jAK,clearInvokedSkillsForAgent:()=>g46,clearInvokedSkills:()=>XF1,addToTurnHookDuration:()=>Eg1,addToTurnClassifierDuration:()=>Rg1,addToTotalLinesChanged:()=>t11,addToTotalDurationState:()=>Vg1,addToTotalCostState:()=>Ng1,addToToolDuration:()=>s11,addToTokenSaverBytes:()=>o8K,addToInMemoryErrorLog:()=>HAK,addSlowOperation:()=>pqA,addSessionCronTask:()=>_F1,addInvokedSkill:()=>m46});import{cwd as i8K}from"process";import{realpathSync as xqA}from"fs";import{randomUUID as mqA}from"crypto";function gqA(){let A="";if(typeof process<"u"&&typeof process.cwd==="function"&&typeof xqA==="function")A=xqA(i8K()).normalize("NFC");return{originalCwd:A,projectRoot:A,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,tokenSaverBytesSaved:0,tokenSaverHits:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:A,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:mqA(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,isInWorktree:!1,...{},directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],sessionProjectDir:null,promptCache1hAllowlist:null,promptId:null}}function d1(){return u1.sessionId}function Zg1(A={}){if(A.setCurrentAsParent)u1.parentSessionId=u1.sessionId;return u1.sessionId=mqA(),u1.sessionProjectDir=null,u1.sessionId}function Gg1(){return u1.parentSessionId}function $0(A,q=null){u1.sessionId=A,u1.sessionProjectDir=q}function fg1(){return u1.sessionProjectDir}function DA(){return u1.originalCwd}function Uz(){return u1.projectRoot}function v46(A){u1.originalCwd=A.normalize("NFC")}function ah(){return u1.cwd}function a11(A){u1.cwd=A.normalize("NFC")}function Tg1(){return u1.directConnectServerUrl}function n8K(A){u1.directConnectServerUrl=A}function Vg1(A,q){u1.totalAPIDuration+=A,u1.totalAPIDurationWithoutRetries+=q}function r8K(){u1.totalAPIDuration=0,u1.totalAPIDurationWithoutRetries=0,u1.totalCostUSD=0}function Ng1(A,q,K){u1.modelUsage[K]=q,u1.totalCostUSD+=A}function bX(){return u1.totalCostUSD}function kk(){return u1.totalAPIDuration}function ZH6(){return Date.now()-u1.startTime}function vg1(){return u1.totalAPIDurationWithoutRetries}function kg1(){return u1.totalToolDuration}function s11(A){u1.totalToolDuration+=A,u1.turnToolDurationMs+=A,u1.turnToolCount++}function o8K(A){u1.tokenSaverBytesSaved+=A,u1.tokenSaverHits++}function a8K(){return u1.tokenSaverBytesSaved}function s8K(){return u1.tokenSaverHits}function t8K(){return u1.turnHookDurationMs}function Eg1(A){u1.turnHookDurationMs+=A,u1.turnHookCount++}function Lg1(){u1.turnHookDurationMs=0,u1.turnHookCount=0}function e8K(){return u1.turnHookCount}function AAK(){return u1.turnToolDurationMs}function yg1(){u1.turnToolDurationMs=0,u1.turnToolCount=0}function qAK(){return u1.turnToolCount}function KAK(){return u1.turnClassifierDurationMs}function Rg1(A){u1.turnClassifierDurationMs+=A,u1.turnClassifierCount++}function Sg1(){u1.turnClassifierDurationMs=0,u1.turnClassifierCount=0}function YAK(){return u1.turnClassifierCount}function GH6(){return u1.statsStore}function Cg1(A){u1.statsStore=A}function k46(A){if(A)FqA();else hg1=!0}function Ig1(){if(hg1)FqA()}function FqA(){u1.lastInteractionTime=Date.now(),hg1=!1}function t11(A,q){u1.totalLinesAdded+=A,u1.totalLinesRemoved+=q}function E46(){return u1.totalLinesAdded}function L46(){return u1.totalLinesRemoved}function y46(){return WH6(Object.values(u1.modelUsage),"inputTokens")}function R46(){return WH6(Object.values(u1.modelUsage),"outputTokens")}function zR6(){return WH6(Object.values(u1.modelUsage),"cacheReadInputTokens")}function wR6(){return WH6(Object.values(u1.modelUsage),"cacheCreationInputTokens")}function bg1(){return WH6(Object.values(u1.modelUsage),"webSearchRequests")}function e11(){u1.hasUnknownModelCost=!0}function xg1(){return u1.hasUnknownModelCost}function IB(){return u1.lastInteractionTime}function sh(){return u1.modelUsage}function ug1(A){return u1.modelUsage[A]}function th(){return u1.mainLoopModelOverride}function fH6(){return u1.initialMainLoopModel}function LZ(A){u1.mainLoopModelOverride=A}function Bg1(A){u1.initialMainLoopModel=A}function kj(){return u1.sdkBetas}function mg1(A){u1.sdkBetas=A}function TH6(){u1.totalCostUSD=0,u1.totalAPIDuration=0,u1.totalAPIDurationWithoutRetries=0,u1.totalToolDuration=0,u1.startTime=Date.now(),u1.totalLinesAdded=0,u1.totalLinesRemoved=0,u1.hasUnknownModelCost=!1,u1.modelUsage={},u1.promptId=null}function _R6({totalCostUSD:A,totalAPIDuration:q,totalAPIDurationWithoutRetries:K,totalToolDuration:Y,totalLinesAdded:z,totalLinesRemoved:w,lastDuration:_,modelUsage:$}){if(u1.totalCostUSD=A,u1.totalAPIDuration=q,u1.totalAPIDurationWithoutRetries=K,u1.totalToolDuration=Y,u1.totalLinesAdded=z,u1.totalLinesRemoved=w,$)u1.modelUsage=$;if(_)u1.startTime=Date.now()-_}function QqA(){throw Error("resetStateForTests can only be called in tests")}function VH6(){return u1.modelStrings}function $R6(A){u1.modelStrings=A}function zAK(){u1.modelStrings=null}function gg1(A,q){u1.meter=A,u1.sessionCounter=q("claude_code.session.count",{description:"Count of CLI sessions started"}),u1.locCounter=q("claude_code.lines_of_code.count",{description:"Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed"}),u1.prCounter=q("claude_code.pull_request.count",{description:"Number of pull requests created"}),u1.commitCounter=q("claude_code.commit.count",{description:"Number of git commits created"}),u1.costCounter=q("claude_code.cost.usage",{description:"Cost of the Claude Code session",unit:"USD"}),u1.tokenCounter=q("claude_code.token.usage",{description:"Number of tokens used",unit:"tokens"}),u1.codeEditToolDecisionCounter=q("claude_code.code_edit_tool.decision",{description:"Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools"}),u1.activeTimeCounter=q("claude_code.active_time.total",{description:"Total active time in seconds",unit:"s"})}function wAK(){return u1.meter}function Fg1(){return u1.sessionCounter}function A81(){return u1.locCounter}function OR6(){return u1.prCounter}function Qg1(){return u1.commitCounter}function Ug1(){return u1.costCounter}function NH6(){return u1.tokenCounter}function HR6(){return u1.codeEditToolDecisionCounter}function pg1(){return u1.activeTimeCounter}function jR6(){return u1.loggerProvider}function q81(A){u1.loggerProvider=A}function dg1(){return u1.eventLogger}function K81(A){u1.eventLogger=A}function cg1(){return u1.meterProvider}function Y81(A){u1.meterProvider=A}function S46(){return u1.tracerProvider}function z81(A){u1.tracerProvider=A}function u7(){return!u1.isInteractive}function Ek(){return u1.isInteractive}function lg1(A){u1.isInteractive=A}function vH6(){return u1.clientType}function ig1(A){u1.clientType=A}function _AK(){return u1.kairosActive}function $AK(A){u1.kairosActive=A}function OAK(){return u1.sessionSource}function ng1(A){u1.sessionSource=A}function w81(){return u1.questionPreviewFormat}function _81(A){u1.questionPreviewFormat=A}function $81(){return u1.agentColorMap}function Bo(){return u1.flagSettingsPath}function rg1(A){u1.flagSettingsPath=A}function kH6(){return u1.flagSettingsInline}function og1(A){u1.flagSettingsInline=A}function ag1(){return u1.sessionIngressToken}function C46(A){u1.sessionIngressToken=A}function sg1(){return u1.oauthTokenFromFd}function h46(A){u1.oauthTokenFromFd=A}function tg1(){return u1.apiKeyFromFd}function I46(A){u1.apiKeyFromFd=A}function eg1(A){u1.lastAPIRequest=A}function AF1(){return u1.lastAPIRequest}function HAK(A){if(u1.inMemoryErrorLog.length>=100)u1.inMemoryErrorLog.shift();u1.inMemoryErrorLog.push(A)}function qF1(){return u1.allowedSettingSources}function KF1(A){u1.allowedSettingSources=A}function JR6(){return u7()&&u1.clientType!=="claude-vscode"}function YF1(A){u1.inlinePlugins=A}function b46(){return u1.inlinePlugins}function zF1(A){u1.chromeFlagOverride=A}function MR6(){return u1.chromeFlagOverride}function Lk(A){u1.useCoworkPlugins=A,HM()}function DR6(){return u1.useCoworkPlugins}function wF1(A){u1.sessionBypassPermissionsMode=A}function x46(){return u1.sessionBypassPermissionsMode}function XR6(A){u1.scheduledTasksEnabled=A}function EH6(){return u1.scheduledTasksEnabled}function PR6(){return u1.sessionCronTasks}function _F1(A){u1.sessionCronTasks.push(A)}function WR6(A){if(A.length===0)return 0;let q=new Set(A),K=u1.sessionCronTasks.filter((z)=>!q.has(z.id)),Y=u1.sessionCronTasks.length-K.length;if(Y===0)return 0;return u1.sessionCronTasks=K,Y}function ZR6(A){u1.sessionTrustAccepted=A}function LH6(){return u1.sessionTrustAccepted}function $F1(A){u1.sessionPersistenceDisabled=A}function Cy(){return u1.sessionPersistenceDisabled}function OF1(){return u1.hasExitedPlanMode}function yk(A){u1.hasExitedPlanMode=A}function HF1(){return u1.needsPlanModeExitAttachment}function eh(A){u1.needsPlanModeExitAttachment=A}function Cp(A,q){if(q==="plan"&&A!=="plan")u1.needsPlanModeExitAttachment=!1;if(A==="plan"&&q!=="plan")u1.needsPlanModeExitAttachment=!0}function jF1(){return u1.lspRecommendationShownThisSession}function JF1(A){u1.lspRecommendationShownThisSession=A}function MF1(A){u1.initJsonSchema=A}function O81(){return u1.initJsonSchema}function u46(A){if(!u1.registeredHooks)u1.registeredHooks={};for(let[q,K]of Object.entries(A)){let Y=q;if(!u1.registeredHooks[Y])u1.registeredHooks[Y]=[];u1.registeredHooks[Y].push(...K)}}function mo(){return u1.registeredHooks}function jAK(){u1.registeredHooks=null}function DF1(){if(!u1.registeredHooks)return;let A={};for(let[q,K]of Object.entries(u1.registeredHooks)){let Y=K.filter((z)=>!("pluginRoot"in z));if(Y.length>0)A[q]=Y}u1.registeredHooks=Object.keys(A).length>0?A:null}function UqA(){u1.initJsonSchema=null,u1.registeredHooks=null}function B46(){return u1.planSlugCache}function GR6(A){u1.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:A.sessionId}}function H81(){return u1.teleportedSessionInfo}function j81(){if(u1.teleportedSessionInfo)u1.teleportedSessionInfo.hasLoggedFirstMessage=!0}function m46(A,q,K,Y=null){let z=`${Y??""}:${A}`;u1.invokedSkills.set(z,{skillName:A,skillPath:q,content:K,invokedAt:Date.now(),agentId:Y})}function JAK(){return u1.invokedSkills}function J81(A){let q=A??null,K=new Map;for(let[Y,z]of u1.invokedSkills)if(z.agentId===q)K.set(Y,z);return K}function XF1(){u1.invokedSkills.clear()}function g46(A){for(let[q,K]of u1.invokedSkills)if(K.agentId===A)u1.invokedSkills.delete(q)}function pqA(A,q){return}function dqA(){if(u1.slowOperations.length===0)return BqA;let A=Date.now();if(u1.slowOperations.some((q)=>A-q.timestamp>=Wg1)){if(u1.slowOperations=u1.slowOperations.filter((q)=>A-q.timestamp<Wg1),u1.slowOperations.length===0)return BqA}return u1.slowOperations}function hp(){return u1.mainThreadAgentType}function Ip(A){u1.mainThreadAgentType=A}function Lq(){return u1.isRemoteMode}function PF1(A){u1.isRemoteMode=A}function WF1(){return u1.isInWorktree}function fR6(A){u1.isInWorktree=A}function ZF1(){return u1.systemPromptSectionCache}function GF1(A,q){u1.systemPromptSectionCache.set(A,q)}function fF1(){u1.systemPromptSectionCache.clear()}function TF1(){return u1.lastEmittedDate}function yH6(A){u1.lastEmittedDate=A}function EV(){return u1.additionalDirectoriesForClaudeMd}function TR6(A){u1.additionalDirectoriesForClaudeMd=A}function VF1(){return u1.promptCache1hAllowlist}function NF1(A){u1.promptCache1hAllowlist=A}function vF1(){return u1.promptId}function VR6(A){u1.promptId=A}var u1,hg1=!1,uqA=10,Wg1=1e4,BqA;var Q1=k(()=>{SqA();u1=gqA();BqA=[]});function MAK(A,q){var K=-1,Y=A==null?0:A.length;while(++K<Y)if(q(A[K],K,A)===!1)break;return A}var cqA;var lqA=k(()=>{cqA=MAK});var DAK,RH6;var EF1=k(()=>{yo();DAK=function(){try{var A=kV(Object,"defineProperty");return A({},"",{}),A}catch(q){}}(),RH6=DAK});function XAK(A,q,K){if(q=="__proto__"&&RH6)RH6(A,q,{configurable:!0,enumerable:!0,value:K,writable:!0});else A[q]=K}var go;var NR6=k(()=>{EF1();go=XAK});function ZAK(A,q,K){var Y=A[q];if(!(WAK.call(A,q)&&kB(Y,K))||K===void 0&&!(q in A))go(A,q,K)}var PAK,WAK,Fo;var vR6=k(()=>{NR6();oO6();PAK=Object.prototype,WAK=PAK.hasOwnProperty;Fo=ZAK});function GAK(A,q,K,Y){var z=!K;K||(K={});var w=-1,_=q.length;while(++w<_){var $=q[w],O=Y?Y(K[$],A[$],$,K,A):void 0;if(O===void 0)O=A[$];if(z)go(K,$,O);else Fo(K,$,O)}return K}var hy;var F46=k(()=>{vR6();NR6();hy=GAK});function fAK(A,q){return A&&hy(q,Ry(q),A)}var iqA;var nqA=k(()=>{F46();T46();iqA=fAK});function TAK(A){var q=[];if(A!=null)for(var K in Object(A))q.push(K);return q}var rqA;var oqA=k(()=>{rqA=TAK});function vAK(A){if(!Bw(A))return rqA(A);var q=_H6(A),K=[];for(var Y in A)if(!(Y=="constructor"&&(q||!NAK.call(A,Y))))K.push(Y);return K}var VAK,NAK,aqA;var sqA=k(()=>{Pf();u11();oqA();VAK=Object.prototype,NAK=VAK.hasOwnProperty;aqA=vAK});function kAK(A){return SB(A)?x11(A,!0):aqA(A)}var bB;var SH6=k(()=>{Og1();sqA();$H6();bB=kAK});function EAK(A,q){return A&&hy(q,bB(q),A)}var tqA;var eqA=k(()=>{F46();SH6();tqA=EAK});var D81={};m1(D81,{default:()=>kR6});function yAK(A,q){if(q)return A.slice();var K=A.length,Y=KKA?KKA(K):new A.constructor(K);return A.copy(Y),Y}var YKA,AKA,LAK,qKA,KKA,kR6;var LF1=k(()=>{yy();YKA=typeof D81=="object"&&D81&&!D81.nodeType&&D81,AKA=YKA&&typeof M81=="object"&&M81&&!M81.nodeType&&M81,LAK=AKA&&AKA.exports===YKA,qKA=LAK?vj.Buffer:void 0,KKA=qKA?qKA.allocUnsafe:void 0;kR6=yAK});function RAK(A,q){var K=-1,Y=A.length;q||(q=Array(Y));while(++K<Y)q[K]=A[K];return q}var X81;var yF1=k(()=>{X81=RAK});function SAK(A,q){return hy(A,KH6(A),q)}var zKA;var wKA=k(()=>{F46();E11();zKA=SAK});var CAK,CH6;var P81=k(()=>{Hg1();CAK=B11(Object.getPrototypeOf,Object),CH6=CAK});var hAK,IAK,W81;var RF1=k(()=>{V11();P81();E11();wg1();hAK=Object.getOwnPropertySymbols,IAK=!hAK?k11:function(A){var q=[];while(A)qH6(q,KH6(A)),A=CH6(A);return q},W81=IAK});function bAK(A,q){return hy(A,W81(A),q)}var _KA;var $KA=k(()=>{F46();RF1();_KA=bAK});function xAK(A){return N11(A,bB,W81)}var Z81;var SF1=k(()=>{Yg1();RF1();SH6();Z81=xAK});function mAK(A){var q=A.length,K=new A.constructor(q);if(q&&typeof A[0]=="string"&&BAK.call(A,"index"))K.index=A.index,K.input=A.input;return K}var uAK,BAK,OKA;var HKA=k(()=>{uAK=Object.prototype,BAK=uAK.hasOwnProperty;OKA=mAK});function gAK(A){var q=new A.constructor(A.byteLength);return new eO6(q).set(new eO6(A)),q}var hH6;var G81=k(()=>{qg1();hH6=gAK});function FAK(A,q){var K=q?hH6(A.buffer):A.buffer;return new A.constructor(K,A.byteOffset,A.byteLength)}var jKA;var JKA=k(()=>{G81();jKA=FAK});function UAK(A){var q=new A.constructor(A.source,QAK.exec(A));return q.lastIndex=A.lastIndex,q}var QAK,MKA;var DKA=k(()=>{QAK=/\w*$/;MKA=UAK});function pAK(A){return PKA?Object(PKA.call(A)):{}}var XKA,PKA,WKA;var ZKA=k(()=>{Z46();XKA=IX?IX.prototype:void 0,PKA=XKA?XKA.valueOf:void 0;WKA=pAK});function dAK(A,q){var K=q?hH6(A.buffer):A.buffer;return new A.constructor(K,A.byteOffset,A.length)}var f81;var CF1=k(()=>{G81();f81=dAK});function H7K(A,q,K){var Y=A.constructor;switch(q){case tAK:return hH6(A);case cAK:case lAK:return new Y(+A);case eAK:return jKA(A,K);case A7K:case q7K:case K7K:case Y7K:case z7K:case w7K:case _7K:case $7K:case O7K:return f81(A,K);case iAK:return new Y;case nAK:case aAK:return new Y(A);case rAK:return MKA(A);case oAK:return new Y;case sAK:return WKA(A)}}var cAK="[object Boolean]",lAK="[object Date]",iAK="[object Map]",nAK="[object Number]",rAK="[object RegExp]",oAK="[object Set]",aAK="[object String]",sAK="[object Symbol]",tAK="[object ArrayBuffer]",eAK="[object DataView]",A7K="[object Float32Array]",q7K="[object Float64Array]",K7K="[object Int8Array]",Y7K="[object Int16Array]",z7K="[object Int32Array]",w7K="[object Uint8Array]",_7K="[object Uint8ClampedArray]",$7K="[object Uint16Array]",O7K="[object Uint32Array]",GKA;var fKA=k(()=>{G81();JKA();DKA();ZKA();CF1();GKA=H7K});var TKA,j7K,VKA;var NKA=k(()=>{Pf();TKA=Object.create,j7K=function(){function A(){}return function(q){if(!Bw(q))return{};if(TKA)return TKA(q);A.prototype=q;var K=new A;return A.prototype=void 0,K}}(),VKA=j7K});function J7K(A){return typeof A.constructor=="function"&&!_H6(A)?VKA(CH6(A)):{}}var T81;var hF1=k(()=>{NKA();P81();u11();T81=J7K});function D7K(A){return CD(A)&&Sp(A)==M7K}var M7K="[object Map]",vKA;var kKA=k(()=>{KR6();LB();vKA=D7K});var EKA,X7K,LKA;var yKA=k(()=>{kKA();S11();I11();EKA=RB&&RB.isMap,X7K=EKA?zH6(EKA):vKA,LKA=X7K});function W7K(A){return CD(A)&&Sp(A)==P7K}var P7K="[object Set]",RKA;var SKA=k(()=>{KR6();LB();RKA=W7K});var CKA,Z7K,hKA;var IKA=k(()=>{SKA();S11();I11();CKA=RB&&RB.isSet,Z7K=CKA?zH6(CKA):RKA,hKA=Z7K});function V81(A,q,K,Y,z,w){var _,$=q&G7K,O=q&f7K,H=q&T7K;if(K)_=z?K(A,Y,z,w):K(A);if(_!==void 0)return _;if(!Bw(A))return A;var j=mw(A);if(j){if(_=OKA(A),!$)return X81(A,_)}else{var J=Sp(A),M=J==xKA||J==E7K;if(yB(A))return kR6(A,$);if(J==uKA||J==bKA||M&&!z){if(_=O||M?{}:T81(A),!$)return O?_KA(A,tqA(_,A)):zKA(A,iqA(_,A))}else{if(!K$[J])return z?A:{};_=GKA(A,J,$)}}w||(w=new EB);var D=w.get(A);if(D)return D;if(w.set(A,_),hKA(A))A.forEach(function(W){_.add(V81(W,q,K,W,A,w))});else if(LKA(A))A.forEach(function(W,Z){_.set(Z,V81(W,q,K,Z,A,w))});var X=H?O?Z81:qR6:O?bB:Ry,P=j?void 0:X(A);return cqA(P||A,function(W,Z){if(P)Z=W,W=A[Z];Fo(_,Z,V81(W,q,K,Z,A,w))}),_}var G7K=1,f7K=2,T7K=4,bKA="[object Arguments]",V7K="[object Array]",N7K="[object Boolean]",v7K="[object Date]",k7K="[object Error]",xKA="[object Function]",E7K="[object GeneratorFunction]",L7K="[object Map]",y7K="[object Number]",uKA="[object Object]",R7K="[object RegExp]",S7K="[object Set]",C7K="[object String]",h7K="[object Symbol]",I7K="[object WeakMap]",b7K="[object ArrayBuffer]",x7K="[object DataView]",u7K="[object Float32Array]",B7K="[object Float64Array]",m7K="[object Int8Array]",g7K="[object Int16Array]",F7K="[object Int32Array]",Q7K="[object Uint8Array]",U7K="[object Uint8ClampedArray]",p7K="[object Uint16Array]",d7K="[object Uint32Array]",K$,N81;var IF1=k(()=>{ay6();lqA();vR6();nqA();eqA();LF1();yF1();wKA();$KA();jg1();SF1();KR6();HKA();fKA();hF1();Wf();ty6();yKA();Pf();IKA();T46();SH6();K$={};K$[bKA]=K$[V7K]=K$[b7K]=K$[x7K]=K$[N7K]=K$[v7K]=K$[u7K]=K$[B7K]=K$[m7K]=K$[g7K]=K$[F7K]=K$[L7K]=K$[y7K]=K$[uKA]=K$[R7K]=K$[S7K]=K$[C7K]=K$[h7K]=K$[Q7K]=K$[U7K]=K$[p7K]=K$[d7K]=!0;K$[k7K]=K$[xKA]=K$[I7K]=!1;N81=V81});function i7K(A){return N81(A,c7K|l7K)}var c7K=1,l7K=4,BKA;var mKA=k(()=>{IF1();BKA=i7K});import{writeFileSync as gKA,openSync as n7K,fsyncSync as r7K,closeSync as o7K}from"fs";function s7K(){return a7K}function U6(A,q,K){let z=[];try{const Y=oY(z,$2`JSON.stringify(${A})`,0);return JSON.stringify(A,q,K)}catch(w){var _=w,$=1}finally{aY(z,_,$)}}function IH6(A){let K=[];try{const q=oY(K,$2`cloneDeep(${A})`,0);return BKA(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}}function pz(A,q,K){let w=[];try{const Y=oY(w,$2`fs.writeFileSync(${A}, ${q})`,0);let z=K!==null&&typeof K==="object"&&"flush"in K&&K.flush===!0;if(z){let H=typeof K==="object"&&"encoding"in K?K.encoding:void 0,j=typeof K==="object"&&"mode"in K?K.mode:void 0,J;try{J=n7K(A,"w",j),gKA(J,q,{encoding:H??void 0}),r7K(J)}finally{if(J!==void 0)o7K(J)}}else gKA(A,q,K)}catch(_){var $=_,O=1}finally{aY(w,$,O)}}var G7w,a7K,$2,O8=(A,q)=>{let Y=[];try{const K=oY(Y,$2`JSON.parse(${A})`,0);return typeof q>"u"?JSON.parse(A):JSON.parse(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}};var a1=k(()=>{G1();Q1();mKA();G7w=(()=>{let A=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(A!==void 0){let q=Number(A);if(!Number.isNaN(q)&&q>=0)return q}return 1/0})(),a7K={[Symbol.dispose](){}};$2=s7K});import*as Q3 from"fs";import{homedir as FKA}from"os";import*as xX from"path";import{stat as t7K,readdir as e7K,readFile as QKA,unlink as A4K,rmdir as q4K,rm as K4K,mkdir as Y4K,rename as z4K,open as v81}from"fs/promises";function d$(A,q){if(q.startsWith("//")||q.startsWith("\\\\"))return{resolvedPath:q,isSymlink:!1};if(!A.existsSync(q))return{resolvedPath:q,isSymlink:!1};try{let K=A.lstatSync(q);if(K.isFIFO()||K.isSocket()||K.isCharacterDevice()||K.isBlockDevice())return{resolvedPath:q,isSymlink:!1};let Y=A.realpathSync(q);return{resolvedPath:Y,isSymlink:Y!==q}}catch(K){return{resolvedPath:q,isSymlink:!1}}}function xB(A,q,K){let{resolvedPath:Y}=d$(A,q);if(K.has(Y))return!0;return K.add(Y),!1}function w4K(A,q){let K=q,Y=[];while(K!==xX.dirname(K)){let z;try{z=A.lstatSync(K)}catch{Y.unshift(xX.basename(K)),K=xX.dirname(K);continue}if(z.isSymbolicLink())try{let w=A.realpathSync(K);return Y.length===0?w:xX.join(w,...Y)}catch{let w=A.readlinkSync(K),_=xX.isAbsolute(w)?w:xX.resolve(xX.dirname(K),w);return Y.length===0?_:xX.join(_,...Y)}try{let w=A.realpathSync(K);if(w!==K)return Y.length===0?w:xX.join(w,...Y)}catch{}return}return}function Qo(A){let q=A;if(q==="~")q=FKA().normalize("NFC");else if(q.startsWith("~/"))q=xX.join(FKA().normalize("NFC"),q.slice(2));let K=new Set,Y=P1();if(K.add(q),q.startsWith("//")||q.startsWith("\\\\"))return Array.from(K);try{let _=q,$=new Set,O=40;for(let H=0;H<O;H++){if($.has(_))break;if($.add(_),!Y.existsSync(_)){if(_===q){let D=w4K(Y,q);if(D!==void 0)K.add(D)}break}let j=Y.lstatSync(_);if(j.isFIFO()||j.isSocket()||j.isCharacterDevice()||j.isBlockDevice())break;if(!j.isSymbolicLink())break;let J=Y.readlinkSync(_),M=xX.isAbsolute(J)?J:xX.resolve(xX.dirname(_),J);K.add(M),_=M}}catch{}let{resolvedPath:z,isSymlink:w}=d$(Y,q);if(w&&z!==q)K.add(z);return Array.from(K)}function P1(){return $4K}async function k81(A,q,K){let O=[];try{const Y=oY(O,await v81(A,"r"),1);let z=(await Y.stat()).size;if(z<=q)return null;let w=Math.min(z-q,K);let _=Buffer.allocUnsafe(w);let $=0;while($<w){let{bytesRead:D}=await Y.read(_,$,w-$,q+$);if(D===0)break;$+=D}return{content:_.toString("utf8",0,$),bytesRead:$,bytesTotal:z}}catch(H){var j=H,J=1}finally{var M=aY(O,j,J);M&&await M}}async function bH6(A,q){let O=[];try{const K=oY(O,await v81(A,"r"),1);let Y=(await K.stat()).size;if(Y===0)return{content:"",bytesRead:0,bytesTotal:0};let z=Math.max(0,Y-q);let w=Y-z;let _=Buffer.allocUnsafe(w);let $=0;while($<w){let{bytesRead:D}=await K.read(_,$,w-$,z+$);if(D===0)break;$+=D}return{content:_.toString("utf8",0,$),bytesRead:$,bytesTotal:Y}}catch(H){var j=H,J=1}finally{var M=aY(O,j,J);M&&await M}}async function*UKA(A){let K=await v81(A,"r");try{let z=(await K.stat()).size,w="",_=Buffer.alloc(4096);while(z>0){let $=Math.min(4096,z);z-=$,await K.read(_,0,$,z);let H=(_.toString("utf8",0,$)+w).split(`
`);w=H[0]||"";for(let j=H.length-1;j>=1;j--){let J=H[j];if(J)yield J}}if(w)yield w}finally{await K.close()}}var _4K,$4K;var Y7=k(()=>{a1();_4K={cwd(){return process.cwd()},existsSync(A){let K=[];try{const q=oY(K,$2`fs.existsSync(${A})`,0);return Q3.existsSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},async stat(A){return t7K(A)},async readdir(A){return e7K(A,{withFileTypes:!0})},async unlink(A){return A4K(A)},async rmdir(A){return q4K(A)},async rm(A,q){return K4K(A,q)},async mkdir(A,q){try{await Y4K(A,{recursive:!0,...q})}catch(K){if(K.code!=="EEXIST")throw K}},async readFile(A,q){return QKA(A,{encoding:q.encoding})},async rename(A,q){return z4K(A,q)},statSync(A){let K=[];try{const q=oY(K,$2`fs.statSync(${A})`,0);return Q3.statSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},lstatSync(A){let K=[];try{const q=oY(K,$2`fs.lstatSync(${A})`,0);return Q3.lstatSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},readFileSync(A,q){let Y=[];try{const K=oY(Y,$2`fs.readFileSync(${A})`,0);return Q3.readFileSync(A,{encoding:q.encoding})}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},readFileBytesSync(A){let K=[];try{const q=oY(K,$2`fs.readFileBytesSync(${A})`,0);return Q3.readFileSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},readSync(A,q){let z=[];try{const K=oY(z,$2`fs.readSync(${A}, ${q.length} bytes)`,0);let Y=void 0;try{Y=Q3.openSync(A,"r");let O=Buffer.alloc(q.length),H=Q3.readSync(Y,O,0,q.length,0);return{buffer:O,bytesRead:H}}finally{if(Y)Q3.closeSync(Y)}}catch(w){var _=w,$=1}finally{aY(z,_,$)}},appendFileSync(A,q,K){let z=[];try{const Y=oY(z,$2`fs.appendFileSync(${A}, ${q.length} chars)`,0);if(K?.mode!==void 0)try{let O=Q3.openSync(A,"ax",K.mode);try{Q3.appendFileSync(O,q)}finally{Q3.closeSync(O)}return}catch(O){if(O.code!=="EEXIST")throw O}Q3.appendFileSync(A,q)}catch(w){var _=w,$=1}finally{aY(z,_,$)}},copyFileSync(A,q){let Y=[];try{const K=oY(Y,$2`fs.copyFileSync(${A} → ${q})`,0);Q3.copyFileSync(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},unlinkSync(A){let K=[];try{const q=oY(K,$2`fs.unlinkSync(${A})`,0);Q3.unlinkSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},renameSync(A,q){let Y=[];try{const K=oY(Y,$2`fs.renameSync(${A} → ${q})`,0);Q3.renameSync(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},linkSync(A,q){let Y=[];try{const K=oY(Y,$2`fs.linkSync(${A} → ${q})`,0);Q3.linkSync(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},symlinkSync(A,q,K){let z=[];try{const Y=oY(z,$2`fs.symlinkSync(${A} → ${q})`,0);Q3.symlinkSync(A,q,K)}catch(w){var _=w,$=1}finally{aY(z,_,$)}},readlinkSync(A){let K=[];try{const q=oY(K,$2`fs.readlinkSync(${A})`,0);return Q3.readlinkSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},realpathSync(A){let K=[];try{const q=oY(K,$2`fs.realpathSync(${A})`,0);return Q3.realpathSync(A).normalize("NFC")}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},mkdirSync(A,q){let z=[];try{const K=oY(z,$2`fs.mkdirSync(${A})`,0);let Y={recursive:!0};if(q?.mode!==void 0)Y.mode=q.mode;try{Q3.mkdirSync(A,Y)}catch(O){if(O.code!=="EEXIST")throw O}}catch(w){var _=w,$=1}finally{aY(z,_,$)}},readdirSync(A){let K=[];try{const q=oY(K,$2`fs.readdirSync(${A})`,0);return Q3.readdirSync(A,{withFileTypes:!0})}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},readdirStringSync(A){let K=[];try{const q=oY(K,$2`fs.readdirStringSync(${A})`,0);return Q3.readdirSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},isDirEmptySync(A){let Y=[];try{const q=oY(Y,$2`fs.isDirEmptySync(${A})`,0);let K=this.readdirSync(A);return K.length===0}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},rmdirSync(A){let K=[];try{const q=oY(K,$2`fs.rmdirSync(${A})`,0);Q3.rmdirSync(A)}catch(Y){var z=Y,w=1}finally{aY(K,z,w)}},rmSync(A,q){let Y=[];try{const K=oY(Y,$2`fs.rmSync(${A})`,0);Q3.rmSync(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}},createWriteStream(A){return Q3.createWriteStream(A)},async readFileBytes(A,q){if(q===void 0)return QKA(A);let K=await v81(A,"r");try{let{size:Y}=await K.stat(),z=Math.min(Y,q),w=Buffer.allocUnsafe(z),_=0;while(_<z){let{bytesRead:$}=await K.read(w,_,z-_,_);if($===0)break;_+=$}return _<z?w.subarray(0,_):w}finally{await K.close()}}},$4K=_4K});import{join as pKA}from"path";import{homedir as O4K}from"os";function OA(){return(process.env.CLAUDE_CONFIG_DIR??pKA(O4K(),".claude")).normalize("NFC")}function Zf(){return pKA(OA(),"teams")}function xH6(A){let q=process.env.NODE_OPTIONS;if(!q)return!1;return q.split(/\s+/).includes(A)}function $1(A){if(!A)return!1;if(typeof A==="boolean")return A;let q=A.toLowerCase().trim();return["1","true","yes","on"].includes(q)}function dz(A){if(A===void 0)return!1;if(typeof A==="boolean")return!A;if(!A)return!1;let q=A.toLowerCase().trim();return["0","false","no","off"].includes(q)}function dKA(A){let q={};if(A)for(let K of A){let[Y,...z]=K.split("=");if(!Y||z.length===0)throw Error(`Invalid environment variable format: ${K}, environment variables should be added as: -e KEY1=value1 -e KEY2=value2`);q[Y]=z.join("=")}return q}function Q46(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1"}function E81(){return process.env.CLOUD_ML_REGION||"us-east5"}function bF1(){return $1(process.env.CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR)}function Gf(){return!1}function L81(A){if(A){let q=H4K.find(([K])=>A.startsWith(K));if(q)return process.env[q[1]]||E81()}return E81()}var H4K;var Z8=k(()=>{H4K=[["claude-haiku-4-5","VERTEX_REGION_CLAUDE_HAIKU_4_5"],["claude-3-5-haiku","VERTEX_REGION_CLAUDE_3_5_HAIKU"],["claude-3-5-sonnet","VERTEX_REGION_CLAUDE_3_5_SONNET"],["claude-3-7-sonnet","VERTEX_REGION_CLAUDE_3_7_SONNET"],["claude-opus-4-1","VERTEX_REGION_CLAUDE_4_1_OPUS"],["claude-opus-4","VERTEX_REGION_CLAUDE_4_0_OPUS"],["claude-sonnet-4-6","VERTEX_REGION_CLAUDE_4_6_SONNET"],["claude-sonnet-4-5","VERTEX_REGION_CLAUDE_4_5_SONNET"],["claude-sonnet-4","VERTEX_REGION_CLAUDE_4_0_SONNET"]]});function uH6({writeFn:A,flushIntervalMs:q=1000,maxBufferSize:K=100,maxBufferBytes:Y=1/0,immediateMode:z=!1}){let w=[],_=0,$=null,O=null;function H(){if($)clearTimeout($),$=null}function j(){if(O)A(O.join("")),O=null;if(w.length===0)return;A(w.join("")),w=[],_=0,H()}function J(){if(!$)$=setTimeout(j,q)}function M(){if(O){O.push(...w),w=[],_=0,H();return}let D=w;w=[],_=0,H(),O=D,setImmediate(()=>{let X=O;if(O=null,X)A(X.join(""))})}return{write(D){if(z){A(D);return}if(w.push(D),_+=D.length,J(),w.length>=K||_>=Y)M()},flush:j,dispose(){j()}}}function Kq(A){return xF1.add(A),()=>xF1.delete(A)}async function cKA(){await Promise.all(Array.from(xF1).map((A)=>A()))}var xF1;var sY=k(()=>{xF1=new Set});import{dirname as lKA,join as iKA}from"path";function rKA(){let A=LV()||!1;return nKA=!0,LV.cache.clear?.(),A}function M4K(A){if(!LV())return!1;if(typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let q=J4K();return n7A(A,q)}function sKA(A){aKA=A}function D4K(){if(!y81){let A=null;y81=uH6({writeFn:(q)=>{let K=U46(),Y=lKA(K);if(A!==Y){try{P1().mkdirSync(Y)}catch{}A=Y}P1().appendFileSync(K,q),X4K()},flushIntervalMs:1000,maxBufferSize:100,immediateMode:LV()}),Kq(async()=>y81?.dispose())}return y81}function L(A,{level:q}={level:"debug"}){if(uF1[q]<uF1[j4K()])return;if(!M4K(A))return;if(aKA&&A.includes(`
`))A=U6(A);let Y=`${new Date().toISOString()} [${q.toUpperCase()}] ${A.trim()}
`;if(uB()){Io(Y);return}D4K().write(Y)}function U46(){return oKA()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??iKA(OA(),"debug",`${d1()}.txt`)}function Iy(A,q){return}var uF1,j4K,nKA=!1,LV,J4K,uB,oKA,aKA=!1,y81=null,X4K;var G1=k(()=>{Eq();r7A();Y7();Z8();Q1();sY();a1();uF1={verbose:0,debug:1,info:2,warn:3,error:4},j4K=T8(()=>{let A=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();if(A&&Object.hasOwn(uF1,A))return A;return"debug"}),LV=T8(()=>{return nKA||$1(process.env.DEBUG)||$1(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||uB()||process.argv.some((A)=>A.startsWith("--debug="))||oKA()!==null});J4K=T8(()=>{let A=process.argv.find((K)=>K.startsWith("--debug="));if(!A)return null;let q=A.substring(8);return i7A(q)}),uB=T8(()=>{return process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")}),oKA=T8(()=>{for(let A=0;A<process.argv.length;A++){let q=process.argv[A];if(q.startsWith("--debug-file="))return q.substring(13);if(q==="--debug-file"&&A+1<process.argv.length)return process.argv[A+1]}return null});X4K=T8(()=>{try{let A=U46(),q=lKA(A),K=iKA(q,"latest");try{P1().mkdirSync(q)}catch{}try{P1().unlinkSync(K)}catch{}P1().symlinkSync(A,K)}catch{}})});function tKA(A){if(BH6!==null)return;if(BH6=A,R81.length>0){let q=[...R81];R81.length=0,queueMicrotask(()=>{for(let K of q)if(K.async)BH6.logEventAsync(K.eventName,K.metadata);else BH6.logEvent(K.eventName,K.metadata)})}}function c(A,q){if(BH6===null){R81.push({eventName:A,metadata:q,async:!1});return}BH6.logEvent(A,q)}var R81,BH6=null;var B1=k(()=>{R81=[]});var $3A={};m1($3A,{profileReport:()=>LR6,profileCheckpoint:()=>Uq,logStartupPerf:()=>_3A,isDetailedProfilingEnabled:()=>f4K,getStartupPerfLogPath:()=>w3A});import{join as P4K,dirname as W4K}from"path";function gF1(){if(!BF1)BF1=g6("perf_hooks").performance;return BF1}function Uq(A){if(!Y3A)return;if(gF1().mark(A),ER6)z3A.push(process.memoryUsage())}function mF1(A){return A.toFixed(3)}function eKA(A){return(A/1024/1024).toFixed(2)}function A3A(){if(!ER6)return"Startup profiling not enabled";let q=gF1().getEntriesByType("mark");if(q.length===0)return"No profiling checkpoints recorded";let K=[];K.push("=".repeat(80)),K.push("STARTUP PROFILING REPORT"),K.push("=".repeat(80)),K.push("");let Y=0;for(let[_,$]of q.entries()){let O=mF1($.startTime),H=mF1($.startTime-Y),j=z3A[_],J=j?` | RSS: ${eKA(j.rss)}MB, Heap: ${eKA(j.heapUsed)}MB`:"";K.push(`[+${O.padStart(8)}ms] (+${H.padStart(7)}ms) ${$.name}${J}`),Y=$.startTime}let z=q[q.length-1],w=mF1(z?.startTime??0);return K.push(""),K.push(`Total startup time: ${w}ms`),K.push("=".repeat(80)),K.join(`
`)}function LR6(){if(q3A)return;if(q3A=!0,_3A(),ER6){let A=w3A(),q=W4K(A);P1().mkdirSync(q),pz(A,A3A(),{encoding:"utf8",flush:!0}),L("Startup profiling report:"),L(A3A())}}function f4K(){return ER6}function w3A(){return P4K(OA(),"startup-perf",`${d1()}.txt`)}function _3A(){if(!K3A)return;let q=gF1().getEntriesByType("mark");if(q.length===0)return;let K=new Map;for(let z of q)K.set(z.name,z.startTime);let Y={};for(let[z,[w,_]]of Object.entries(G4K)){let $=K.get(w),O=K.get(_);if($!==void 0&&O!==void 0)Y[`${z}_ms`]=Math.round(O-$)}Y.checkpoint_count=q.length,c("tengu_startup_perf",Y)}var ER6,Z4K=0.005,K3A,Y3A,z3A,BF1=null,G4K,q3A=!1;var AI=k(()=>{G1();B1();Z8();Q1();Y7();a1();ER6=process.env.CLAUDE_CODE_PROFILE_STARTUP==="1",K3A=Math.random()<Z4K,Y3A=ER6||K3A,z3A=[];G4K={import_time:["cli_entry","main_tsx_imports_loaded"],init_time:["init_function_start","init_function_end"],settings_time:["eagerLoadSettings_start","eagerLoadSettings_end"],total_time:["cli_entry","main_after_run"]};if(Y3A)Uq("profiler_initialized")});function v8(A,q,K){function Y($,O){var H;Object.defineProperty($,"_zod",{value:$._zod??{},enumerable:!1}),(H=$._zod).traits??(H.traits=new Set),$._zod.traits.add(A),q($,O);for(let j in _.prototype)if(!(j in $))Object.defineProperty($,j,{value:_.prototype[j].bind($)});$._zod.constr=_,$._zod.def=O}let z=K?.Parent??Object;class w extends z{}Object.defineProperty(w,"name",{value:A});function _($){var O;let H=K?.Parent?new w:this;Y(H,$),(O=H._zod).deferred??(O.deferred=[]);for(let j of H._zod.deferred)j();return H}return Object.defineProperty(_,"init",{value:Y}),Object.defineProperty(_,Symbol.hasInstance,{value:($)=>{if(K?.Parent&&$ instanceof K.Parent)return!0;return $?._zod?.traits?.has(A)}}),Object.defineProperty(_,"name",{value:A}),_}function jM(A){if(A)Object.assign(yR6,A);return yR6}var RR6,FF1,bp,yR6;var mH6=k(()=>{RR6=Object.freeze({status:"aborted"});FF1=Symbol("zod_brand");bp=class bp extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};yR6={}});var n7={};m1(n7,{unwrapMessage:()=>SR6,stringifyPrimitive:()=>s7,required:()=>B4K,randomString:()=>y4K,propertyKeyTypes:()=>bR6,promiseAllObject:()=>L4K,primitiveTypes:()=>lF1,prefixIssues:()=>yV,pick:()=>h4K,partial:()=>u4K,optionalKeys:()=>iF1,omit:()=>I4K,numKeys:()=>R4K,nullish:()=>Uo,normalizeParams:()=>C7,merge:()=>x4K,jsonStringifyReplacer:()=>UF1,joinValues:()=>ZA,issue:()=>oF1,isPlainObject:()=>FH6,isObject:()=>gH6,getSizableOrigin:()=>xR6,getParsedType:()=>S4K,getLengthableOrigin:()=>uR6,getEnumValues:()=>CR6,getElementAtPath:()=>E4K,floatSafeRemainder:()=>pF1,finalizeIssue:()=>Sk,extend:()=>b4K,escapeRegex:()=>xp,esc:()=>p46,defineLazy:()=>Dw,createTransparentProxy:()=>C4K,clone:()=>Rk,cleanRegex:()=>IR6,cleanEnum:()=>m4K,captureStackTrace:()=>S81,cached:()=>hR6,assignProp:()=>dF1,assertNotEqual:()=>V4K,assertNever:()=>v4K,assertIs:()=>N4K,assertEqual:()=>T4K,assert:()=>k4K,allowsEval:()=>cF1,aborted:()=>d46,NUMBER_FORMAT_RANGES:()=>nF1,Class:()=>O3A,BIGINT_FORMAT_RANGES:()=>rF1});function T4K(A){return A}function V4K(A){return A}function N4K(A){}function v4K(A){throw Error()}function k4K(A){}function CR6(A){let q=Object.values(A).filter((Y)=>typeof Y==="number");return Object.entries(A).filter(([Y,z])=>q.indexOf(+Y)===-1).map(([Y,z])=>z)}function ZA(A,q="|"){return A.map((K)=>s7(K)).join(q)}function UF1(A,q){if(typeof q==="bigint")return q.toString();return q}function hR6(A){return{get value(){{let K=A();return Object.defineProperty(this,"value",{value:K}),K}throw Error("cached value already set")}}}function Uo(A){return A===null||A===void 0}function IR6(A){let q=A.startsWith("^")?1:0,K=A.endsWith("$")?A.length-1:A.length;return A.slice(q,K)}function pF1(A,q){let K=(A.toString().split(".")[1]||"").length,Y=(q.toString().split(".")[1]||"").length,z=K>Y?K:Y,w=Number.parseInt(A.toFixed(z).replace(".","")),_=Number.parseInt(q.toFixed(z).replace(".",""));return w%_/10**z}function Dw(A,q,K){Object.defineProperty(A,q,{get(){{let z=K();return A[q]=z,z}throw Error("cached value already set")},set(z){Object.defineProperty(A,q,{value:z})},configurable:!0})}function dF1(A,q,K){Object.defineProperty(A,q,{value:K,writable:!0,enumerable:!0,configurable:!0})}function E4K(A,q){if(!q)return A;return q.reduce((K,Y)=>K?.[Y],A)}function L4K(A){let q=Object.keys(A),K=q.map((Y)=>A[Y]);return Promise.all(K).then((Y)=>{let z={};for(let w=0;w<q.length;w++)z[q[w]]=Y[w];return z})}function y4K(A=10){let K="";for(let Y=0;Y<A;Y++)K+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return K}function p46(A){return JSON.stringify(A)}function gH6(A){return typeof A==="object"&&A!==null&&!Array.isArray(A)}function FH6(A){if(gH6(A)===!1)return!1;let q=A.constructor;if(q===void 0)return!0;let K=q.prototype;if(gH6(K)===!1)return!1;if(Object.prototype.hasOwnProperty.call(K,"isPrototypeOf")===!1)return!1;return!0}function R4K(A){let q=0;for(let K in A)if(Object.prototype.hasOwnProperty.call(A,K))q++;return q}function xp(A){return A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rk(A,q,K){let Y=new A._zod.constr(q??A._zod.def);if(!q||K?.parent)Y._zod.parent=A;return Y}function C7(A){let q=A;if(!q)return{};if(typeof q==="string")return{error:()=>q};if(q?.message!==void 0){if(q?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");q.error=q.message}if(delete q.message,typeof q.error==="string")return{...q,error:()=>q.error};return q}function C4K(A){let q;return new Proxy({},{get(K,Y,z){return q??(q=A()),Reflect.get(q,Y,z)},set(K,Y,z,w){return q??(q=A()),Reflect.set(q,Y,z,w)},has(K,Y){return q??(q=A()),Reflect.has(q,Y)},deleteProperty(K,Y){return q??(q=A()),Reflect.deleteProperty(q,Y)},ownKeys(K){return q??(q=A()),Reflect.ownKeys(q)},getOwnPropertyDescriptor(K,Y){return q??(q=A()),Reflect.getOwnPropertyDescriptor(q,Y)},defineProperty(K,Y,z){return q??(q=A()),Reflect.defineProperty(q,Y,z)}})}function s7(A){if(typeof A==="bigint")return A.toString()+"n";if(typeof A==="string")return`"${A}"`;return`${A}`}function iF1(A){return Object.keys(A).filter((q)=>{return A[q]._zod.optin==="optional"&&A[q]._zod.optout==="optional"})}function h4K(A,q){let K={},Y=A._zod.def;for(let z in q){if(!(z in Y.shape))throw Error(`Unrecognized key: "${z}"`);if(!q[z])continue;K[z]=Y.shape[z]}return Rk(A,{...A._zod.def,shape:K,checks:[]})}function I4K(A,q){let K={...A._zod.def.shape},Y=A._zod.def;for(let z in q){if(!(z in Y.shape))throw Error(`Unrecognized key: "${z}"`);if(!q[z])continue;delete K[z]}return Rk(A,{...A._zod.def,shape:K,checks:[]})}function b4K(A,q){if(!FH6(q))throw Error("Invalid input to extend: expected a plain object");let K={...A._zod.def,get shape(){let Y={...A._zod.def.shape,...q};return dF1(this,"shape",Y),Y},checks:[]};return Rk(A,K)}function x4K(A,q){return Rk(A,{...A._zod.def,get shape(){let K={...A._zod.def.shape,...q._zod.def.shape};return dF1(this,"shape",K),K},catchall:q._zod.def.catchall,checks:[]})}function u4K(A,q,K){let Y=q._zod.def.shape,z={...Y};if(K)for(let w in K){if(!(w in Y))throw Error(`Unrecognized key: "${w}"`);if(!K[w])continue;z[w]=A?new A({type:"optional",innerType:Y[w]}):Y[w]}else for(let w in Y)z[w]=A?new A({type:"optional",innerType:Y[w]}):Y[w];return Rk(q,{...q._zod.def,shape:z,checks:[]})}function B4K(A,q,K){let Y=q._zod.def.shape,z={...Y};if(K)for(let w in K){if(!(w in z))throw Error(`Unrecognized key: "${w}"`);if(!K[w])continue;z[w]=new A({type:"nonoptional",innerType:Y[w]})}else for(let w in Y)z[w]=new A({type:"nonoptional",innerType:Y[w]});return Rk(q,{...q._zod.def,shape:z,checks:[]})}function d46(A,q=0){for(let K=q;K<A.issues.length;K++)if(A.issues[K]?.continue!==!0)return!0;return!1}function yV(A,q){return q.map((K)=>{var Y;return(Y=K).path??(Y.path=[]),K.path.unshift(A),K})}function SR6(A){return typeof A==="string"?A:A?.message}function Sk(A,q,K){let Y={...A,path:A.path??[]};if(!A.message){let z=SR6(A.inst?._zod.def?.error?.(A))??SR6(q?.error?.(A))??SR6(K.customError?.(A))??SR6(K.localeError?.(A))??"Invalid input";Y.message=z}if(delete Y.inst,delete Y.continue,!q?.reportInput)delete Y.input;return Y}function xR6(A){if(A instanceof Set)return"set";if(A instanceof Map)return"map";if(A instanceof File)return"file";return"unknown"}function uR6(A){if(Array.isArray(A))return"array";if(typeof A==="string")return"string";return"unknown"}function oF1(...A){let[q,K,Y]=A;if(typeof q==="string")return{message:q,code:"custom",input:K,inst:Y};return{...q}}function m4K(A){return Object.entries(A).filter(([q,K])=>{return Number.isNaN(Number.parseInt(q,10))}).map((q)=>q[1])}class O3A{constructor(...A){}}var S81,cF1,S4K=(A)=>{let q=typeof A;switch(q){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(A)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(A))return"array";if(A===null)return"null";if(A.then&&typeof A.then==="function"&&A.catch&&typeof A.catch==="function")return"promise";if(typeof Map<"u"&&A instanceof Map)return"map";if(typeof Set<"u"&&A instanceof Set)return"set";if(typeof Date<"u"&&A instanceof Date)return"date";if(typeof File<"u"&&A instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${q}`)}},bR6,lF1,nF1,rF1;var Z3=k(()=>{S81=Error.captureStackTrace?Error.captureStackTrace:(...A)=>{};cF1=hR6(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(A){return!1}});bR6=new Set(["string","number","symbol"]),lF1=new Set(["string","number","bigint","boolean","symbol","undefined"]);nF1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},rF1={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]}});function mR6(A,q=(K)=>K.message){let K={},Y=[];for(let z of A.issues)if(z.path.length>0)K[z.path[0]]=K[z.path[0]]||[],K[z.path[0]].push(q(z));else Y.push(q(z));return{formErrors:Y,fieldErrors:K}}function gR6(A,q){let K=q||function(w){return w.message},Y={_errors:[]},z=(w)=>{for(let _ of w.issues)if(_.code==="invalid_union"&&_.errors.length)_.errors.map(($)=>z({issues:$}));else if(_.code==="invalid_key")z({issues:_.issues});else if(_.code==="invalid_element")z({issues:_.issues});else if(_.path.length===0)Y._errors.push(K(_));else{let $=Y,O=0;while(O<_.path.length){let H=_.path[O];if(O!==_.path.length-1)$[H]=$[H]||{_errors:[]};else $[H]=$[H]||{_errors:[]},$[H]._errors.push(K(_));$=$[H],O++}}};return z(A),Y}function aF1(A,q){let K=q||function(w){return w.message},Y={errors:[]},z=(w,_=[])=>{var $,O;for(let H of w.issues)if(H.code==="invalid_union"&&H.errors.length)H.errors.map((j)=>z({issues:j},H.path));else if(H.code==="invalid_key")z({issues:H.issues},H.path);else if(H.code==="invalid_element")z({issues:H.issues},H.path);else{let j=[..._,...H.path];if(j.length===0){Y.errors.push(K(H));continue}let J=Y,M=0;while(M<j.length){let D=j[M],X=M===j.length-1;if(typeof D==="string")J.properties??(J.properties={}),($=J.properties)[D]??($[D]={errors:[]}),J=J.properties[D];else J.items??(J.items=[]),(O=J.items)[D]??(O[D]={errors:[]}),J=J.items[D];if(X)J.errors.push(K(H));M++}}};return z(A),Y}function j3A(A){let q=[];for(let K of A)if(typeof K==="number")q.push(`[${K}]`);else if(typeof K==="symbol")q.push(`[${JSON.stringify(String(K))}]`);else if(/[^\w$]/.test(K))q.push(`[${JSON.stringify(K)}]`);else{if(q.length)q.push(".");q.push(K)}return q.join("")}function sF1(A){let q=[],K=[...A.issues].sort((Y,z)=>Y.path.length-z.path.length);for(let Y of K)if(q.push(`✖ ${Y.message}`),Y.path?.length)q.push(`  → at ${j3A(Y.path)}`);return q.join(`
`)}var H3A=(A,q)=>{A.name="$ZodError",Object.defineProperty(A,"_zod",{value:A._zod,enumerable:!1}),Object.defineProperty(A,"issues",{value:q,enumerable:!1}),Object.defineProperty(A,"message",{get(){return JSON.stringify(q,UF1,2)},enumerable:!0})},BR6,QH6;var tF1=k(()=>{mH6();Z3();BR6=v8("$ZodError",H3A),QH6=v8("$ZodError",H3A,{Parent:Error})});var C81=(A)=>(q,K,Y,z)=>{let w=Y?Object.assign(Y,{async:!1}):{async:!1},_=q._zod.run({value:K,issues:[]},w);if(_ instanceof Promise)throw new bp;if(_.issues.length){let $=new(z?.Err??A)(_.issues.map((O)=>Sk(O,w,jM())));throw S81($,z?.callee),$}return _.value},FR6,h81=(A)=>async(q,K,Y,z)=>{let w=Y?Object.assign(Y,{async:!0}):{async:!0},_=q._zod.run({value:K,issues:[]},w);if(_ instanceof Promise)_=await _;if(_.issues.length){let $=new(z?.Err??A)(_.issues.map((O)=>Sk(O,w,jM())));throw S81($,z?.callee),$}return _.value},QR6,I81=(A)=>(q,K,Y)=>{let z=Y?{...Y,async:!1}:{async:!1},w=q._zod.run({value:K,issues:[]},z);if(w instanceof Promise)throw new bp;return w.issues.length?{success:!1,error:new(A??BR6)(w.issues.map((_)=>Sk(_,z,jM())))}:{success:!0,data:w.value}},UH6,b81=(A)=>async(q,K,Y)=>{let z=Y?Object.assign(Y,{async:!0}):{async:!0},w=q._zod.run({value:K,issues:[]},z);if(w instanceof Promise)w=await w;return w.issues.length?{success:!1,error:new A(w.issues.map((_)=>Sk(_,z,jM())))}:{success:!0,data:w.value}},UR6;var x81=k(()=>{mH6();tF1();Z3();FR6=C81(QH6),QR6=h81(QH6),UH6=I81(QH6),UR6=b81(QH6)});var l46={};m1(l46,{xid:()=>KQ1,uuid7:()=>p4K,uuid6:()=>U4K,uuid4:()=>Q4K,uuid:()=>c46,uppercase:()=>yQ1,unicodeEmail:()=>l4K,undefined:()=>EQ1,ulid:()=>qQ1,time:()=>ZQ1,string:()=>fQ1,rfc5322Email:()=>c4K,number:()=>NQ1,null:()=>kQ1,nanoid:()=>zQ1,lowercase:()=>LQ1,ksuid:()=>YQ1,ipv6:()=>jQ1,ipv4:()=>HQ1,integer:()=>VQ1,html5Email:()=>d4K,hostname:()=>XQ1,guid:()=>_Q1,extendedDuration:()=>F4K,emoji:()=>OQ1,email:()=>$Q1,e164:()=>PQ1,duration:()=>wQ1,domain:()=>r4K,datetime:()=>GQ1,date:()=>WQ1,cuid2:()=>AQ1,cuid:()=>eF1,cidrv6:()=>MQ1,cidrv4:()=>JQ1,browserEmail:()=>i4K,boolean:()=>vQ1,bigint:()=>TQ1,base64url:()=>u81,base64:()=>DQ1,_emoji:()=>n4K});function OQ1(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}function M3A(A){return typeof A.precision==="number"?A.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":A.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${A.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function ZQ1(A){return new RegExp(`^${M3A(A)}$`)}function GQ1(A){let q=M3A({precision:A.precision}),K=["Z"];if(A.local)K.push("");if(A.offset)K.push("([+-]\\d{2}:\\d{2})");let Y=`${q}(?:${K.join("|")})`;return new RegExp(`^${J3A}T(?:${Y})$`)}var eF1,AQ1,qQ1,KQ1,YQ1,zQ1,wQ1,F4K,_Q1,c46=(A)=>{if(!A)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${A}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},Q4K,U4K,p4K,$Q1,d4K,c4K,l4K,i4K,n4K="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",HQ1,jQ1,JQ1,MQ1,DQ1,u81,XQ1,r4K,PQ1,J3A="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",WQ1,fQ1=(A)=>{let q=A?`[\\s\\S]{${A?.minimum??0},${A?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${q}$`)},TQ1,VQ1,NQ1,vQ1,kQ1,EQ1,LQ1,yQ1;var B81=k(()=>{eF1=/^[cC][^\s-]{8,}$/,AQ1=/^[0-9a-z]+$/,qQ1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,KQ1=/^[0-9a-vA-V]{20}$/,YQ1=/^[A-Za-z0-9]{27}$/,zQ1=/^[a-zA-Z0-9_-]{21}$/,wQ1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,F4K=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_Q1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Q4K=c46(4),U4K=c46(6),p4K=c46(7),$Q1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,d4K=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,c4K=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,l4K=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,i4K=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;HQ1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jQ1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,JQ1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,MQ1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,DQ1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,u81=/^[A-Za-z0-9_-]*$/,XQ1=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,r4K=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,PQ1=/^\+(?:[0-9]){6,14}[0-9]$/,WQ1=new RegExp(`^${J3A}$`);TQ1=/^\d+n?$/,VQ1=/^\d+$/,NQ1=/^-?\d+(?:\.\d+)?/i,vQ1=/true|false/i,kQ1=/null/i,EQ1=/undefined/i,LQ1=/^[^A-Z]*$/,yQ1=/^[^a-z]*$/});function D3A(A,q,K){if(A.issues.length)q.issues.push(...yV(K,A.issues))}var RH,X3A,m81,g81,RQ1,SQ1,CQ1,hQ1,IQ1,bQ1,xQ1,uQ1,BQ1,pH6,mQ1,gQ1,FQ1,QQ1,UQ1,pQ1,dQ1,cQ1,lQ1;var F81=k(()=>{mH6();B81();Z3();RH=v8("$ZodCheck",(A,q)=>{var K;A._zod??(A._zod={}),A._zod.def=q,(K=A._zod).onattach??(K.onattach=[])}),X3A={number:"number",bigint:"bigint",object:"date"},m81=v8("$ZodCheckLessThan",(A,q)=>{RH.init(A,q);let K=X3A[typeof q.value];A._zod.onattach.push((Y)=>{let z=Y._zod.bag,w=(q.inclusive?z.maximum:z.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(q.value<w)if(q.inclusive)z.maximum=q.value;else z.exclusiveMaximum=q.value}),A._zod.check=(Y)=>{if(q.inclusive?Y.value<=q.value:Y.value<q.value)return;Y.issues.push({origin:K,code:"too_big",maximum:q.value,input:Y.value,inclusive:q.inclusive,inst:A,continue:!q.abort})}}),g81=v8("$ZodCheckGreaterThan",(A,q)=>{RH.init(A,q);let K=X3A[typeof q.value];A._zod.onattach.push((Y)=>{let z=Y._zod.bag,w=(q.inclusive?z.minimum:z.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(q.value>w)if(q.inclusive)z.minimum=q.value;else z.exclusiveMinimum=q.value}),A._zod.check=(Y)=>{if(q.inclusive?Y.value>=q.value:Y.value>q.value)return;Y.issues.push({origin:K,code:"too_small",minimum:q.value,input:Y.value,inclusive:q.inclusive,inst:A,continue:!q.abort})}}),RQ1=v8("$ZodCheckMultipleOf",(A,q)=>{RH.init(A,q),A._zod.onattach.push((K)=>{var Y;(Y=K._zod.bag).multipleOf??(Y.multipleOf=q.value)}),A._zod.check=(K)=>{if(typeof K.value!==typeof q.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof K.value==="bigint"?K.value%q.value===BigInt(0):pF1(K.value,q.value)===0)return;K.issues.push({origin:typeof K.value,code:"not_multiple_of",divisor:q.value,input:K.value,inst:A,continue:!q.abort})}}),SQ1=v8("$ZodCheckNumberFormat",(A,q)=>{RH.init(A,q),q.format=q.format||"float64";let K=q.format?.includes("int"),Y=K?"int":"number",[z,w]=nF1[q.format];A._zod.onattach.push((_)=>{let $=_._zod.bag;if($.format=q.format,$.minimum=z,$.maximum=w,K)$.pattern=VQ1}),A._zod.check=(_)=>{let $=_.value;if(K){if(!Number.isInteger($)){_.issues.push({expected:Y,format:q.format,code:"invalid_type",input:$,inst:A});return}if(!Number.isSafeInteger($)){if($>0)_.issues.push({input:$,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:A,origin:Y,continue:!q.abort});else _.issues.push({input:$,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:A,origin:Y,continue:!q.abort});return}}if($<z)_.issues.push({origin:"number",input:$,code:"too_small",minimum:z,inclusive:!0,inst:A,continue:!q.abort});if($>w)_.issues.push({origin:"number",input:$,code:"too_big",maximum:w,inst:A})}}),CQ1=v8("$ZodCheckBigIntFormat",(A,q)=>{RH.init(A,q);let[K,Y]=rF1[q.format];A._zod.onattach.push((z)=>{let w=z._zod.bag;w.format=q.format,w.minimum=K,w.maximum=Y}),A._zod.check=(z)=>{let w=z.value;if(w<K)z.issues.push({origin:"bigint",input:w,code:"too_small",minimum:K,inclusive:!0,inst:A,continue:!q.abort});if(w>Y)z.issues.push({origin:"bigint",input:w,code:"too_big",maximum:Y,inst:A})}}),hQ1=v8("$ZodCheckMaxSize",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.size!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag.maximum??Number.POSITIVE_INFINITY;if(q.maximum<Y)K._zod.bag.maximum=q.maximum}),A._zod.check=(K)=>{let Y=K.value;if(Y.size<=q.maximum)return;K.issues.push({origin:xR6(Y),code:"too_big",maximum:q.maximum,input:Y,inst:A,continue:!q.abort})}}),IQ1=v8("$ZodCheckMinSize",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.size!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(q.minimum>Y)K._zod.bag.minimum=q.minimum}),A._zod.check=(K)=>{let Y=K.value;if(Y.size>=q.minimum)return;K.issues.push({origin:xR6(Y),code:"too_small",minimum:q.minimum,input:Y,inst:A,continue:!q.abort})}}),bQ1=v8("$ZodCheckSizeEquals",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.size!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag;Y.minimum=q.size,Y.maximum=q.size,Y.size=q.size}),A._zod.check=(K)=>{let Y=K.value,z=Y.size;if(z===q.size)return;let w=z>q.size;K.issues.push({origin:xR6(Y),...w?{code:"too_big",maximum:q.size}:{code:"too_small",minimum:q.size},inclusive:!0,exact:!0,input:K.value,inst:A,continue:!q.abort})}}),xQ1=v8("$ZodCheckMaxLength",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.length!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag.maximum??Number.POSITIVE_INFINITY;if(q.maximum<Y)K._zod.bag.maximum=q.maximum}),A._zod.check=(K)=>{let Y=K.value;if(Y.length<=q.maximum)return;let w=uR6(Y);K.issues.push({origin:w,code:"too_big",maximum:q.maximum,inclusive:!0,input:Y,inst:A,continue:!q.abort})}}),uQ1=v8("$ZodCheckMinLength",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.length!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(q.minimum>Y)K._zod.bag.minimum=q.minimum}),A._zod.check=(K)=>{let Y=K.value;if(Y.length>=q.minimum)return;let w=uR6(Y);K.issues.push({origin:w,code:"too_small",minimum:q.minimum,inclusive:!0,input:Y,inst:A,continue:!q.abort})}}),BQ1=v8("$ZodCheckLengthEquals",(A,q)=>{RH.init(A,q),A._zod.when=(K)=>{let Y=K.value;return!Uo(Y)&&Y.length!==void 0},A._zod.onattach.push((K)=>{let Y=K._zod.bag;Y.minimum=q.length,Y.maximum=q.length,Y.length=q.length}),A._zod.check=(K)=>{let Y=K.value,z=Y.length;if(z===q.length)return;let w=uR6(Y),_=z>q.length;K.issues.push({origin:w,..._?{code:"too_big",maximum:q.length}:{code:"too_small",minimum:q.length},inclusive:!0,exact:!0,input:K.value,inst:A,continue:!q.abort})}}),pH6=v8("$ZodCheckStringFormat",(A,q)=>{var K,Y;if(RH.init(A,q),A._zod.onattach.push((z)=>{let w=z._zod.bag;if(w.format=q.format,q.pattern)w.patterns??(w.patterns=new Set),w.patterns.add(q.pattern)}),q.pattern)(K=A._zod).check??(K.check=(z)=>{if(q.pattern.lastIndex=0,q.pattern.test(z.value))return;z.issues.push({origin:"string",code:"invalid_format",format:q.format,input:z.value,...q.pattern?{pattern:q.pattern.toString()}:{},inst:A,continue:!q.abort})});else(Y=A._zod).check??(Y.check=()=>{})}),mQ1=v8("$ZodCheckRegex",(A,q)=>{pH6.init(A,q),A._zod.check=(K)=>{if(q.pattern.lastIndex=0,q.pattern.test(K.value))return;K.issues.push({origin:"string",code:"invalid_format",format:"regex",input:K.value,pattern:q.pattern.toString(),inst:A,continue:!q.abort})}}),gQ1=v8("$ZodCheckLowerCase",(A,q)=>{q.pattern??(q.pattern=LQ1),pH6.init(A,q)}),FQ1=v8("$ZodCheckUpperCase",(A,q)=>{q.pattern??(q.pattern=yQ1),pH6.init(A,q)}),QQ1=v8("$ZodCheckIncludes",(A,q)=>{RH.init(A,q);let K=xp(q.includes),Y=new RegExp(typeof q.position==="number"?`^.{${q.position}}${K}`:K);q.pattern=Y,A._zod.onattach.push((z)=>{let w=z._zod.bag;w.patterns??(w.patterns=new Set),w.patterns.add(Y)}),A._zod.check=(z)=>{if(z.value.includes(q.includes,q.position))return;z.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:q.includes,input:z.value,inst:A,continue:!q.abort})}}),UQ1=v8("$ZodCheckStartsWith",(A,q)=>{RH.init(A,q);let K=new RegExp(`^${xp(q.prefix)}.*`);q.pattern??(q.pattern=K),A._zod.onattach.push((Y)=>{let z=Y._zod.bag;z.patterns??(z.patterns=new Set),z.patterns.add(K)}),A._zod.check=(Y)=>{if(Y.value.startsWith(q.prefix))return;Y.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:q.prefix,input:Y.value,inst:A,continue:!q.abort})}}),pQ1=v8("$ZodCheckEndsWith",(A,q)=>{RH.init(A,q);let K=new RegExp(`.*${xp(q.suffix)}$`);q.pattern??(q.pattern=K),A._zod.onattach.push((Y)=>{let z=Y._zod.bag;z.patterns??(z.patterns=new Set),z.patterns.add(K)}),A._zod.check=(Y)=>{if(Y.value.endsWith(q.suffix))return;Y.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:q.suffix,input:Y.value,inst:A,continue:!q.abort})}});dQ1=v8("$ZodCheckProperty",(A,q)=>{RH.init(A,q),A._zod.check=(K)=>{let Y=q.schema._zod.run({value:K.value[q.property],issues:[]},{});if(Y instanceof Promise)return Y.then((z)=>D3A(z,K,q.property));D3A(Y,K,q.property);return}}),cQ1=v8("$ZodCheckMimeType",(A,q)=>{RH.init(A,q);let K=new Set(q.mime);A._zod.onattach.push((Y)=>{Y._zod.bag.mime=q.mime}),A._zod.check=(Y)=>{if(K.has(Y.value.type))return;Y.issues.push({code:"invalid_value",values:q.mime,input:Y.value.type,inst:A})}}),lQ1=v8("$ZodCheckOverwrite",(A,q)=>{RH.init(A,q),A._zod.check=(K)=>{K.value=q.tx(K.value)}})});class Q81{constructor(A=[]){if(this.content=[],this.indent=0,this)this.args=A}indented(A){this.indent+=1,A(this),this.indent-=1}write(A){if(typeof A==="function"){A(this,{execution:"sync"}),A(this,{execution:"async"});return}let K=A.split(`
`).filter((w)=>w),Y=Math.min(...K.map((w)=>w.length-w.trimStart().length)),z=K.map((w)=>w.slice(Y)).map((w)=>" ".repeat(this.indent*2)+w);for(let w of z)this.content.push(w)}compile(){let A=Function,q=this?.args,Y=[...(this?.content??[""]).map((z)=>`  ${z}`)];return new A(...q,Y.join(`
`))}}var iQ1;var nQ1=k(()=>{iQ1={major:4,minor:0,patch:0}});function XU1(A){if(A==="")return!0;if(A.length%4!==0)return!1;try{return atob(A),!0}catch{return!1}}function y3A(A){if(!u81.test(A))return!1;let q=A.replace(/[-_]/g,(Y)=>Y==="-"?"+":"/"),K=q.padEnd(Math.ceil(q.length/4)*4,"=");return XU1(K)}function R3A(A,q=null){try{let K=A.split(".");if(K.length!==3)return!1;let[Y]=K;if(!Y)return!1;let z=JSON.parse(atob(Y));if("typ"in z&&z?.typ!=="JWT")return!1;if(!z.alg)return!1;if(q&&(!("alg"in z)||z.alg!==q))return!1;return!0}catch{return!1}}function W3A(A,q,K){if(A.issues.length)q.issues.push(...yV(K,A.issues));q.value[K]=A.value}function U81(A,q,K){if(A.issues.length)q.issues.push(...yV(K,A.issues));q.value[K]=A.value}function Z3A(A,q,K,Y){if(A.issues.length)if(Y[K]===void 0)if(K in Y)q.value[K]=void 0;else q.value[K]=A.value;else q.issues.push(...yV(K,A.issues));else if(A.value===void 0){if(K in Y)q.value[K]=void 0}else q.value[K]=A.value}function G3A(A,q,K,Y){for(let z of A)if(z.issues.length===0)return q.value=z.value,q;return q.issues.push({code:"invalid_union",input:q.value,inst:K,errors:A.map((z)=>z.issues.map((w)=>Sk(w,Y,jM())))}),q}function rQ1(A,q){if(A===q)return{valid:!0,data:A};if(A instanceof Date&&q instanceof Date&&+A===+q)return{valid:!0,data:A};if(FH6(A)&&FH6(q)){let K=Object.keys(q),Y=Object.keys(A).filter((w)=>K.indexOf(w)!==-1),z={...A,...q};for(let w of Y){let _=rQ1(A[w],q[w]);if(!_.valid)return{valid:!1,mergeErrorPath:[w,..._.mergeErrorPath]};z[w]=_.data}return{valid:!0,data:z}}if(Array.isArray(A)&&Array.isArray(q)){if(A.length!==q.length)return{valid:!1,mergeErrorPath:[]};let K=[];for(let Y=0;Y<A.length;Y++){let z=A[Y],w=q[Y],_=rQ1(z,w);if(!_.valid)return{valid:!1,mergeErrorPath:[Y,..._.mergeErrorPath]};K.push(_.data)}return{valid:!0,data:K}}return{valid:!1,mergeErrorPath:[]}}function f3A(A,q,K){if(q.issues.length)A.issues.push(...q.issues);if(K.issues.length)A.issues.push(...K.issues);if(d46(A))return A;let Y=rQ1(q.value,K.value);if(!Y.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Y.mergeErrorPath)}`);return A.value=Y.data,A}function p81(A,q,K){if(A.issues.length)q.issues.push(...yV(K,A.issues));q.value[K]=A.value}function T3A(A,q,K,Y,z,w,_){if(A.issues.length)if(bR6.has(typeof Y))K.issues.push(...yV(Y,A.issues));else K.issues.push({origin:"map",code:"invalid_key",input:z,inst:w,issues:A.issues.map(($)=>Sk($,_,jM()))});if(q.issues.length)if(bR6.has(typeof Y))K.issues.push(...yV(Y,q.issues));else K.issues.push({origin:"map",code:"invalid_element",input:z,inst:w,key:Y,issues:q.issues.map(($)=>Sk($,_,jM()))});K.value.set(A.value,q.value)}function V3A(A,q){if(A.issues.length)q.issues.push(...A.issues);q.value.add(A.value)}function N3A(A,q){if(A.value===void 0)A.value=q.defaultValue;return A}function v3A(A,q){if(!A.issues.length&&A.value===void 0)A.issues.push({code:"invalid_type",expected:"nonoptional",input:A.value,inst:q});return A}function k3A(A,q,K){if(d46(A))return A;return q.out._zod.run({value:A.value,issues:A.issues},K)}function E3A(A){return A.value=Object.freeze(A.value),A}function L3A(A,q,K,Y){if(!A){let z={code:"custom",input:K,inst:Y,path:[...Y._zod.def.path??[]],continue:!Y._zod.def.abort};if(Y._zod.def.params)z.params=Y._zod.def.params;q.issues.push(oF1(z))}}var u3,i46,D_,oQ1,aQ1,sQ1,tQ1,eQ1,AU1,qU1,KU1,YU1,zU1,wU1,_U1,$U1,OU1,HU1,jU1,JU1,MU1,DU1,PU1,WU1,ZU1,GU1,fU1,d81,TU1,pR6,c81,VU1,NU1,vU1,kU1,EU1,dH6,LU1,yU1,RU1,dR6,SU1,l81,CU1,hU1,n46,IU1,bU1,xU1,uU1,BU1,mU1,cR6,gU1,FU1,QU1,UU1,pU1,dU1,cU1,lU1,lR6,iU1,nU1,rU1,oU1,aU1;var iR6=k(()=>{F81();mH6();x81();B81();Z3();nQ1();Z3();u3=v8("$ZodType",(A,q)=>{var K;A??(A={}),A._zod.def=q,A._zod.bag=A._zod.bag||{},A._zod.version=iQ1;let Y=[...A._zod.def.checks??[]];if(A._zod.traits.has("$ZodCheck"))Y.unshift(A);for(let z of Y)for(let w of z._zod.onattach)w(A);if(Y.length===0)(K=A._zod).deferred??(K.deferred=[]),A._zod.deferred?.push(()=>{A._zod.run=A._zod.parse});else{let z=(w,_,$)=>{let O=d46(w),H;for(let j of _){if(j._zod.when){if(!j._zod.when(w))continue}else if(O)continue;let J=w.issues.length,M=j._zod.check(w);if(M instanceof Promise&&$?.async===!1)throw new bp;if(H||M instanceof Promise)H=(H??Promise.resolve()).then(async()=>{if(await M,w.issues.length===J)return;if(!O)O=d46(w,J)});else{if(w.issues.length===J)continue;if(!O)O=d46(w,J)}}if(H)return H.then(()=>{return w});return w};A._zod.run=(w,_)=>{let $=A._zod.parse(w,_);if($ instanceof Promise){if(_.async===!1)throw new bp;return $.then((O)=>z(O,Y,_))}return z($,Y,_)}}A["~standard"]={validate:(z)=>{try{let w=UH6(A,z);return w.success?{value:w.data}:{issues:w.error?.issues}}catch(w){return UR6(A,z).then((_)=>_.success?{value:_.data}:{issues:_.error?.issues})}},vendor:"zod",version:1}}),i46=v8("$ZodString",(A,q)=>{u3.init(A,q),A._zod.pattern=[...A?._zod.bag?.patterns??[]].pop()??fQ1(A._zod.bag),A._zod.parse=(K,Y)=>{if(q.coerce)try{K.value=String(K.value)}catch(z){}if(typeof K.value==="string")return K;return K.issues.push({expected:"string",code:"invalid_type",input:K.value,inst:A}),K}}),D_=v8("$ZodStringFormat",(A,q)=>{pH6.init(A,q),i46.init(A,q)}),oQ1=v8("$ZodGUID",(A,q)=>{q.pattern??(q.pattern=_Q1),D_.init(A,q)}),aQ1=v8("$ZodUUID",(A,q)=>{if(q.version){let Y={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[q.version];if(Y===void 0)throw Error(`Invalid UUID version: "${q.version}"`);q.pattern??(q.pattern=c46(Y))}else q.pattern??(q.pattern=c46());D_.init(A,q)}),sQ1=v8("$ZodEmail",(A,q)=>{q.pattern??(q.pattern=$Q1),D_.init(A,q)}),tQ1=v8("$ZodURL",(A,q)=>{D_.init(A,q),A._zod.check=(K)=>{try{let Y=K.value,z=new URL(Y),w=z.href;if(q.hostname){if(q.hostname.lastIndex=0,!q.hostname.test(z.hostname))K.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:XQ1.source,input:K.value,inst:A,continue:!q.abort})}if(q.protocol){if(q.protocol.lastIndex=0,!q.protocol.test(z.protocol.endsWith(":")?z.protocol.slice(0,-1):z.protocol))K.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:q.protocol.source,input:K.value,inst:A,continue:!q.abort})}if(!Y.endsWith("/")&&w.endsWith("/"))K.value=w.slice(0,-1);else K.value=w;return}catch(Y){K.issues.push({code:"invalid_format",format:"url",input:K.value,inst:A,continue:!q.abort})}}}),eQ1=v8("$ZodEmoji",(A,q)=>{q.pattern??(q.pattern=OQ1()),D_.init(A,q)}),AU1=v8("$ZodNanoID",(A,q)=>{q.pattern??(q.pattern=zQ1),D_.init(A,q)}),qU1=v8("$ZodCUID",(A,q)=>{q.pattern??(q.pattern=eF1),D_.init(A,q)}),KU1=v8("$ZodCUID2",(A,q)=>{q.pattern??(q.pattern=AQ1),D_.init(A,q)}),YU1=v8("$ZodULID",(A,q)=>{q.pattern??(q.pattern=qQ1),D_.init(A,q)}),zU1=v8("$ZodXID",(A,q)=>{q.pattern??(q.pattern=KQ1),D_.init(A,q)}),wU1=v8("$ZodKSUID",(A,q)=>{q.pattern??(q.pattern=YQ1),D_.init(A,q)}),_U1=v8("$ZodISODateTime",(A,q)=>{q.pattern??(q.pattern=GQ1(q)),D_.init(A,q)}),$U1=v8("$ZodISODate",(A,q)=>{q.pattern??(q.pattern=WQ1),D_.init(A,q)}),OU1=v8("$ZodISOTime",(A,q)=>{q.pattern??(q.pattern=ZQ1(q)),D_.init(A,q)}),HU1=v8("$ZodISODuration",(A,q)=>{q.pattern??(q.pattern=wQ1),D_.init(A,q)}),jU1=v8("$ZodIPv4",(A,q)=>{q.pattern??(q.pattern=HQ1),D_.init(A,q),A._zod.onattach.push((K)=>{let Y=K._zod.bag;Y.format="ipv4"})}),JU1=v8("$ZodIPv6",(A,q)=>{q.pattern??(q.pattern=jQ1),D_.init(A,q),A._zod.onattach.push((K)=>{let Y=K._zod.bag;Y.format="ipv6"}),A._zod.check=(K)=>{try{new URL(`http://[${K.value}]`)}catch{K.issues.push({code:"invalid_format",format:"ipv6",input:K.value,inst:A,continue:!q.abort})}}}),MU1=v8("$ZodCIDRv4",(A,q)=>{q.pattern??(q.pattern=JQ1),D_.init(A,q)}),DU1=v8("$ZodCIDRv6",(A,q)=>{q.pattern??(q.pattern=MQ1),D_.init(A,q),A._zod.check=(K)=>{let[Y,z]=K.value.split("/");try{if(!z)throw Error();let w=Number(z);if(`${w}`!==z)throw Error();if(w<0||w>128)throw Error();new URL(`http://[${Y}]`)}catch{K.issues.push({code:"invalid_format",format:"cidrv6",input:K.value,inst:A,continue:!q.abort})}}});PU1=v8("$ZodBase64",(A,q)=>{q.pattern??(q.pattern=DQ1),D_.init(A,q),A._zod.onattach.push((K)=>{K._zod.bag.contentEncoding="base64"}),A._zod.check=(K)=>{if(XU1(K.value))return;K.issues.push({code:"invalid_format",format:"base64",input:K.value,inst:A,continue:!q.abort})}});WU1=v8("$ZodBase64URL",(A,q)=>{q.pattern??(q.pattern=u81),D_.init(A,q),A._zod.onattach.push((K)=>{K._zod.bag.contentEncoding="base64url"}),A._zod.check=(K)=>{if(y3A(K.value))return;K.issues.push({code:"invalid_format",format:"base64url",input:K.value,inst:A,continue:!q.abort})}}),ZU1=v8("$ZodE164",(A,q)=>{q.pattern??(q.pattern=PQ1),D_.init(A,q)});GU1=v8("$ZodJWT",(A,q)=>{D_.init(A,q),A._zod.check=(K)=>{if(R3A(K.value,q.alg))return;K.issues.push({code:"invalid_format",format:"jwt",input:K.value,inst:A,continue:!q.abort})}}),fU1=v8("$ZodCustomStringFormat",(A,q)=>{D_.init(A,q),A._zod.check=(K)=>{if(q.fn(K.value))return;K.issues.push({code:"invalid_format",format:q.format,input:K.value,inst:A,continue:!q.abort})}}),d81=v8("$ZodNumber",(A,q)=>{u3.init(A,q),A._zod.pattern=A._zod.bag.pattern??NQ1,A._zod.parse=(K,Y)=>{if(q.coerce)try{K.value=Number(K.value)}catch(_){}let z=K.value;if(typeof z==="number"&&!Number.isNaN(z)&&Number.isFinite(z))return K;let w=typeof z==="number"?Number.isNaN(z)?"NaN":!Number.isFinite(z)?"Infinity":void 0:void 0;return K.issues.push({expected:"number",code:"invalid_type",input:z,inst:A,...w?{received:w}:{}}),K}}),TU1=v8("$ZodNumber",(A,q)=>{SQ1.init(A,q),d81.init(A,q)}),pR6=v8("$ZodBoolean",(A,q)=>{u3.init(A,q),A._zod.pattern=vQ1,A._zod.parse=(K,Y)=>{if(q.coerce)try{K.value=Boolean(K.value)}catch(w){}let z=K.value;if(typeof z==="boolean")return K;return K.issues.push({expected:"boolean",code:"invalid_type",input:z,inst:A}),K}}),c81=v8("$ZodBigInt",(A,q)=>{u3.init(A,q),A._zod.pattern=TQ1,A._zod.parse=(K,Y)=>{if(q.coerce)try{K.value=BigInt(K.value)}catch(z){}if(typeof K.value==="bigint")return K;return K.issues.push({expected:"bigint",code:"invalid_type",input:K.value,inst:A}),K}}),VU1=v8("$ZodBigInt",(A,q)=>{CQ1.init(A,q),c81.init(A,q)}),NU1=v8("$ZodSymbol",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(typeof z==="symbol")return K;return K.issues.push({expected:"symbol",code:"invalid_type",input:z,inst:A}),K}}),vU1=v8("$ZodUndefined",(A,q)=>{u3.init(A,q),A._zod.pattern=EQ1,A._zod.values=new Set([void 0]),A._zod.optin="optional",A._zod.optout="optional",A._zod.parse=(K,Y)=>{let z=K.value;if(typeof z>"u")return K;return K.issues.push({expected:"undefined",code:"invalid_type",input:z,inst:A}),K}}),kU1=v8("$ZodNull",(A,q)=>{u3.init(A,q),A._zod.pattern=kQ1,A._zod.values=new Set([null]),A._zod.parse=(K,Y)=>{let z=K.value;if(z===null)return K;return K.issues.push({expected:"null",code:"invalid_type",input:z,inst:A}),K}}),EU1=v8("$ZodAny",(A,q)=>{u3.init(A,q),A._zod.parse=(K)=>K}),dH6=v8("$ZodUnknown",(A,q)=>{u3.init(A,q),A._zod.parse=(K)=>K}),LU1=v8("$ZodNever",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{return K.issues.push({expected:"never",code:"invalid_type",input:K.value,inst:A}),K}}),yU1=v8("$ZodVoid",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(typeof z>"u")return K;return K.issues.push({expected:"void",code:"invalid_type",input:z,inst:A}),K}}),RU1=v8("$ZodDate",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{if(q.coerce)try{K.value=new Date(K.value)}catch($){}let z=K.value,w=z instanceof Date;if(w&&!Number.isNaN(z.getTime()))return K;return K.issues.push({expected:"date",code:"invalid_type",input:z,...w?{received:"Invalid Date"}:{},inst:A}),K}});dR6=v8("$ZodArray",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(!Array.isArray(z))return K.issues.push({expected:"array",code:"invalid_type",input:z,inst:A}),K;K.value=Array(z.length);let w=[];for(let _=0;_<z.length;_++){let $=z[_],O=q.element._zod.run({value:$,issues:[]},Y);if(O instanceof Promise)w.push(O.then((H)=>W3A(H,K,_)));else W3A(O,K,_)}if(w.length)return Promise.all(w).then(()=>K);return K}});SU1=v8("$ZodObject",(A,q)=>{u3.init(A,q);let K=hR6(()=>{let J=Object.keys(q.shape);for(let D of J)if(!(q.shape[D]instanceof u3))throw Error(`Invalid element at key "${D}": expected a Zod schema`);let M=iF1(q.shape);return{shape:q.shape,keys:J,keySet:new Set(J),numKeys:J.length,optionalKeys:new Set(M)}});Dw(A._zod,"propValues",()=>{let J=q.shape,M={};for(let D in J){let X=J[D]._zod;if(X.values){M[D]??(M[D]=new Set);for(let P of X.values)M[D].add(P)}}return M});let Y=(J)=>{let M=new Q81(["shape","payload","ctx"]),D=K.value,X=(G)=>{let f=p46(G);return`shape[${f}]._zod.run({ value: input[${f}], issues: [] }, ctx)`};M.write("const input = payload.value;");let P=Object.create(null),W=0;for(let G of D.keys)P[G]=`key_${W++}`;M.write("const newResult = {}");for(let G of D.keys)if(D.optionalKeys.has(G)){let f=P[G];M.write(`const ${f} = ${X(G)};`);let V=p46(G);M.write(`
        if (${f}.issues.length) {
          if (input[${V}] === undefined) {
            if (${V} in input) {
              newResult[${V}] = undefined;
            }
          } else {
            payload.issues = payload.issues.concat(
              ${f}.issues.map((iss) => ({
                ...iss,
                path: iss.path ? [${V}, ...iss.path] : [${V}],
              }))
            );
          }
        } else if (${f}.value === undefined) {
          if (${V} in input) newResult[${V}] = undefined;
        } else {
          newResult[${V}] = ${f}.value;
        }
        `)}else{let f=P[G];M.write(`const ${f} = ${X(G)};`),M.write(`
          if (${f}.issues.length) payload.issues = payload.issues.concat(${f}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${p46(G)}, ...iss.path] : [${p46(G)}]
          })));`),M.write(`newResult[${p46(G)}] = ${f}.value`)}M.write("payload.value = newResult;"),M.write("return payload;");let Z=M.compile();return(G,f)=>Z(J,G,f)},z,w=gH6,_=!yR6.jitless,O=_&&cF1.value,H=q.catchall,j;A._zod.parse=(J,M)=>{j??(j=K.value);let D=J.value;if(!w(D))return J.issues.push({expected:"object",code:"invalid_type",input:D,inst:A}),J;let X=[];if(_&&O&&M?.async===!1&&M.jitless!==!0){if(!z)z=Y(q.shape);J=z(J,M)}else{J.value={};let f=j.shape;for(let V of j.keys){let N=f[V],v=N._zod.run({value:D[V],issues:[]},M),y=N._zod.optin==="optional"&&N._zod.optout==="optional";if(v instanceof Promise)X.push(v.then((R)=>y?Z3A(R,J,V,D):U81(R,J,V)));else if(y)Z3A(v,J,V,D);else U81(v,J,V)}}if(!H)return X.length?Promise.all(X).then(()=>J):J;let P=[],W=j.keySet,Z=H._zod,G=Z.def.type;for(let f of Object.keys(D)){if(W.has(f))continue;if(G==="never"){P.push(f);continue}let V=Z.run({value:D[f],issues:[]},M);if(V instanceof Promise)X.push(V.then((N)=>U81(N,J,f)));else U81(V,J,f)}if(P.length)J.issues.push({code:"unrecognized_keys",keys:P,input:D,inst:A});if(!X.length)return J;return Promise.all(X).then(()=>{return J})}});l81=v8("$ZodUnion",(A,q)=>{u3.init(A,q),Dw(A._zod,"optin",()=>q.options.some((K)=>K._zod.optin==="optional")?"optional":void 0),Dw(A._zod,"optout",()=>q.options.some((K)=>K._zod.optout==="optional")?"optional":void 0),Dw(A._zod,"values",()=>{if(q.options.every((K)=>K._zod.values))return new Set(q.options.flatMap((K)=>Array.from(K._zod.values)));return}),Dw(A._zod,"pattern",()=>{if(q.options.every((K)=>K._zod.pattern)){let K=q.options.map((Y)=>Y._zod.pattern);return new RegExp(`^(${K.map((Y)=>IR6(Y.source)).join("|")})$`)}return}),A._zod.parse=(K,Y)=>{let z=!1,w=[];for(let _ of q.options){let $=_._zod.run({value:K.value,issues:[]},Y);if($ instanceof Promise)w.push($),z=!0;else{if($.issues.length===0)return $;w.push($)}}if(!z)return G3A(w,K,A,Y);return Promise.all(w).then((_)=>{return G3A(_,K,A,Y)})}}),CU1=v8("$ZodDiscriminatedUnion",(A,q)=>{l81.init(A,q);let K=A._zod.parse;Dw(A._zod,"propValues",()=>{let z={};for(let w of q.options){let _=w._zod.propValues;if(!_||Object.keys(_).length===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(w)}"`);for(let[$,O]of Object.entries(_)){if(!z[$])z[$]=new Set;for(let H of O)z[$].add(H)}}return z});let Y=hR6(()=>{let z=q.options,w=new Map;for(let _ of z){let $=_._zod.propValues[q.discriminator];if(!$||$.size===0)throw Error(`Invalid discriminated union option at index "${q.options.indexOf(_)}"`);for(let O of $){if(w.has(O))throw Error(`Duplicate discriminator value "${String(O)}"`);w.set(O,_)}}return w});A._zod.parse=(z,w)=>{let _=z.value;if(!gH6(_))return z.issues.push({code:"invalid_type",expected:"object",input:_,inst:A}),z;let $=Y.value.get(_?.[q.discriminator]);if($)return $._zod.run(z,w);if(q.unionFallback)return K(z,w);return z.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:_,path:[q.discriminator],inst:A}),z}}),hU1=v8("$ZodIntersection",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value,w=q.left._zod.run({value:z,issues:[]},Y),_=q.right._zod.run({value:z,issues:[]},Y);if(w instanceof Promise||_ instanceof Promise)return Promise.all([w,_]).then(([O,H])=>{return f3A(K,O,H)});return f3A(K,w,_)}});n46=v8("$ZodTuple",(A,q)=>{u3.init(A,q);let K=q.items,Y=K.length-[...K].reverse().findIndex((z)=>z._zod.optin!=="optional");A._zod.parse=(z,w)=>{let _=z.value;if(!Array.isArray(_))return z.issues.push({input:_,inst:A,expected:"tuple",code:"invalid_type"}),z;z.value=[];let $=[];if(!q.rest){let H=_.length>K.length,j=_.length<Y-1;if(H||j)return z.issues.push({input:_,inst:A,origin:"array",...H?{code:"too_big",maximum:K.length}:{code:"too_small",minimum:K.length}}),z}let O=-1;for(let H of K){if(O++,O>=_.length){if(O>=Y)continue}let j=H._zod.run({value:_[O],issues:[]},w);if(j instanceof Promise)$.push(j.then((J)=>p81(J,z,O)));else p81(j,z,O)}if(q.rest){let H=_.slice(K.length);for(let j of H){O++;let J=q.rest._zod.run({value:j,issues:[]},w);if(J instanceof Promise)$.push(J.then((M)=>p81(M,z,O)));else p81(J,z,O)}}if($.length)return Promise.all($).then(()=>z);return z}});IU1=v8("$ZodRecord",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(!FH6(z))return K.issues.push({expected:"record",code:"invalid_type",input:z,inst:A}),K;let w=[];if(q.keyType._zod.values){let _=q.keyType._zod.values;K.value={};for(let O of _)if(typeof O==="string"||typeof O==="number"||typeof O==="symbol"){let H=q.valueType._zod.run({value:z[O],issues:[]},Y);if(H instanceof Promise)w.push(H.then((j)=>{if(j.issues.length)K.issues.push(...yV(O,j.issues));K.value[O]=j.value}));else{if(H.issues.length)K.issues.push(...yV(O,H.issues));K.value[O]=H.value}}let $;for(let O in z)if(!_.has(O))$=$??[],$.push(O);if($&&$.length>0)K.issues.push({code:"unrecognized_keys",input:z,inst:A,keys:$})}else{K.value={};for(let _ of Reflect.ownKeys(z)){if(_==="__proto__")continue;let $=q.keyType._zod.run({value:_,issues:[]},Y);if($ instanceof Promise)throw Error("Async schemas not supported in object keys currently");if($.issues.length){K.issues.push({origin:"record",code:"invalid_key",issues:$.issues.map((H)=>Sk(H,Y,jM())),input:_,path:[_],inst:A}),K.value[$.value]=$.value;continue}let O=q.valueType._zod.run({value:z[_],issues:[]},Y);if(O instanceof Promise)w.push(O.then((H)=>{if(H.issues.length)K.issues.push(...yV(_,H.issues));K.value[$.value]=H.value}));else{if(O.issues.length)K.issues.push(...yV(_,O.issues));K.value[$.value]=O.value}}}if(w.length)return Promise.all(w).then(()=>K);return K}}),bU1=v8("$ZodMap",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(!(z instanceof Map))return K.issues.push({expected:"map",code:"invalid_type",input:z,inst:A}),K;let w=[];K.value=new Map;for(let[_,$]of z){let O=q.keyType._zod.run({value:_,issues:[]},Y),H=q.valueType._zod.run({value:$,issues:[]},Y);if(O instanceof Promise||H instanceof Promise)w.push(Promise.all([O,H]).then(([j,J])=>{T3A(j,J,K,_,z,A,Y)}));else T3A(O,H,K,_,z,A,Y)}if(w.length)return Promise.all(w).then(()=>K);return K}});xU1=v8("$ZodSet",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(!(z instanceof Set))return K.issues.push({input:z,inst:A,expected:"set",code:"invalid_type"}),K;let w=[];K.value=new Set;for(let _ of z){let $=q.valueType._zod.run({value:_,issues:[]},Y);if($ instanceof Promise)w.push($.then((O)=>V3A(O,K)));else V3A($,K)}if(w.length)return Promise.all(w).then(()=>K);return K}});uU1=v8("$ZodEnum",(A,q)=>{u3.init(A,q);let K=CR6(q.entries);A._zod.values=new Set(K),A._zod.pattern=new RegExp(`^(${K.filter((Y)=>bR6.has(typeof Y)).map((Y)=>typeof Y==="string"?xp(Y):Y.toString()).join("|")})$`),A._zod.parse=(Y,z)=>{let w=Y.value;if(A._zod.values.has(w))return Y;return Y.issues.push({code:"invalid_value",values:K,input:w,inst:A}),Y}}),BU1=v8("$ZodLiteral",(A,q)=>{u3.init(A,q),A._zod.values=new Set(q.values),A._zod.pattern=new RegExp(`^(${q.values.map((K)=>typeof K==="string"?xp(K):K?K.toString():String(K)).join("|")})$`),A._zod.parse=(K,Y)=>{let z=K.value;if(A._zod.values.has(z))return K;return K.issues.push({code:"invalid_value",values:q.values,input:z,inst:A}),K}}),mU1=v8("$ZodFile",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=K.value;if(z instanceof File)return K;return K.issues.push({expected:"file",code:"invalid_type",input:z,inst:A}),K}}),cR6=v8("$ZodTransform",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=q.transform(K.value,K);if(Y.async)return(z instanceof Promise?z:Promise.resolve(z)).then((_)=>{return K.value=_,K});if(z instanceof Promise)throw new bp;return K.value=z,K}}),gU1=v8("$ZodOptional",(A,q)=>{u3.init(A,q),A._zod.optin="optional",A._zod.optout="optional",Dw(A._zod,"values",()=>{return q.innerType._zod.values?new Set([...q.innerType._zod.values,void 0]):void 0}),Dw(A._zod,"pattern",()=>{let K=q.innerType._zod.pattern;return K?new RegExp(`^(${IR6(K.source)})?$`):void 0}),A._zod.parse=(K,Y)=>{if(q.innerType._zod.optin==="optional")return q.innerType._zod.run(K,Y);if(K.value===void 0)return K;return q.innerType._zod.run(K,Y)}}),FU1=v8("$ZodNullable",(A,q)=>{u3.init(A,q),Dw(A._zod,"optin",()=>q.innerType._zod.optin),Dw(A._zod,"optout",()=>q.innerType._zod.optout),Dw(A._zod,"pattern",()=>{let K=q.innerType._zod.pattern;return K?new RegExp(`^(${IR6(K.source)}|null)$`):void 0}),Dw(A._zod,"values",()=>{return q.innerType._zod.values?new Set([...q.innerType._zod.values,null]):void 0}),A._zod.parse=(K,Y)=>{if(K.value===null)return K;return q.innerType._zod.run(K,Y)}}),QU1=v8("$ZodDefault",(A,q)=>{u3.init(A,q),A._zod.optin="optional",Dw(A._zod,"values",()=>q.innerType._zod.values),A._zod.parse=(K,Y)=>{if(K.value===void 0)return K.value=q.defaultValue,K;let z=q.innerType._zod.run(K,Y);if(z instanceof Promise)return z.then((w)=>N3A(w,q));return N3A(z,q)}});UU1=v8("$ZodPrefault",(A,q)=>{u3.init(A,q),A._zod.optin="optional",Dw(A._zod,"values",()=>q.innerType._zod.values),A._zod.parse=(K,Y)=>{if(K.value===void 0)K.value=q.defaultValue;return q.innerType._zod.run(K,Y)}}),pU1=v8("$ZodNonOptional",(A,q)=>{u3.init(A,q),Dw(A._zod,"values",()=>{let K=q.innerType._zod.values;return K?new Set([...K].filter((Y)=>Y!==void 0)):void 0}),A._zod.parse=(K,Y)=>{let z=q.innerType._zod.run(K,Y);if(z instanceof Promise)return z.then((w)=>v3A(w,A));return v3A(z,A)}});dU1=v8("$ZodSuccess",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{let z=q.innerType._zod.run(K,Y);if(z instanceof Promise)return z.then((w)=>{return K.value=w.issues.length===0,K});return K.value=z.issues.length===0,K}}),cU1=v8("$ZodCatch",(A,q)=>{u3.init(A,q),A._zod.optin="optional",Dw(A._zod,"optout",()=>q.innerType._zod.optout),Dw(A._zod,"values",()=>q.innerType._zod.values),A._zod.parse=(K,Y)=>{let z=q.innerType._zod.run(K,Y);if(z instanceof Promise)return z.then((w)=>{if(K.value=w.value,w.issues.length)K.value=q.catchValue({...K,error:{issues:w.issues.map((_)=>Sk(_,Y,jM()))},input:K.value}),K.issues=[];return K});if(K.value=z.value,z.issues.length)K.value=q.catchValue({...K,error:{issues:z.issues.map((w)=>Sk(w,Y,jM()))},input:K.value}),K.issues=[];return K}}),lU1=v8("$ZodNaN",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{if(typeof K.value!=="number"||!Number.isNaN(K.value))return K.issues.push({input:K.value,inst:A,expected:"nan",code:"invalid_type"}),K;return K}}),lR6=v8("$ZodPipe",(A,q)=>{u3.init(A,q),Dw(A._zod,"values",()=>q.in._zod.values),Dw(A._zod,"optin",()=>q.in._zod.optin),Dw(A._zod,"optout",()=>q.out._zod.optout),A._zod.parse=(K,Y)=>{let z=q.in._zod.run(K,Y);if(z instanceof Promise)return z.then((w)=>k3A(w,q,Y));return k3A(z,q,Y)}});iU1=v8("$ZodReadonly",(A,q)=>{u3.init(A,q),Dw(A._zod,"propValues",()=>q.innerType._zod.propValues),Dw(A._zod,"values",()=>q.innerType._zod.values),Dw(A._zod,"optin",()=>q.innerType._zod.optin),Dw(A._zod,"optout",()=>q.innerType._zod.optout),A._zod.parse=(K,Y)=>{let z=q.innerType._zod.run(K,Y);if(z instanceof Promise)return z.then(E3A);return E3A(z)}});nU1=v8("$ZodTemplateLiteral",(A,q)=>{u3.init(A,q);let K=[];for(let Y of q.parts)if(Y instanceof u3){if(!Y._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...Y._zod.traits].shift()}`);let z=Y._zod.pattern instanceof RegExp?Y._zod.pattern.source:Y._zod.pattern;if(!z)throw Error(`Invalid template literal part: ${Y._zod.traits}`);let w=z.startsWith("^")?1:0,_=z.endsWith("$")?z.length-1:z.length;K.push(z.slice(w,_))}else if(Y===null||lF1.has(typeof Y))K.push(xp(`${Y}`));else throw Error(`Invalid template literal part: ${Y}`);A._zod.pattern=new RegExp(`^${K.join("")}$`),A._zod.parse=(Y,z)=>{if(typeof Y.value!=="string")return Y.issues.push({input:Y.value,inst:A,expected:"template_literal",code:"invalid_type"}),Y;if(A._zod.pattern.lastIndex=0,!A._zod.pattern.test(Y.value))return Y.issues.push({input:Y.value,inst:A,code:"invalid_format",format:"template_literal",pattern:A._zod.pattern.source}),Y;return Y}}),rU1=v8("$ZodPromise",(A,q)=>{u3.init(A,q),A._zod.parse=(K,Y)=>{return Promise.resolve(K.value).then((z)=>q.innerType._zod.run({value:z,issues:[]},Y))}}),oU1=v8("$ZodLazy",(A,q)=>{u3.init(A,q),Dw(A._zod,"innerType",()=>q.getter()),Dw(A._zod,"pattern",()=>A._zod.innerType._zod.pattern),Dw(A._zod,"propValues",()=>A._zod.innerType._zod.propValues),Dw(A._zod,"optin",()=>A._zod.innerType._zod.optin),Dw(A._zod,"optout",()=>A._zod.innerType._zod.optout),A._zod.parse=(K,Y)=>{return A._zod.innerType._zod.run(K,Y)}}),aU1=v8("$ZodCustom",(A,q)=>{RH.init(A,q),u3.init(A,q),A._zod.parse=(K,Y)=>{return K},A._zod.check=(K)=>{let Y=K.value,z=q.fn(Y);if(z instanceof Promise)return z.then((w)=>L3A(w,K,Y,A));L3A(z,K,Y,A);return}})});function sU1(){return{localeError:o4K()}}var o4K=()=>{let A={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return(z)=>{switch(z.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${z.expected}، ولكن تم إدخال ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${s7(z.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return` أكبر من اللازم: يفترض أن تكون ${z.origin??"القيمة"} ${w} ${z.maximum.toString()} ${_.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${z.origin??"القيمة"} ${w} ${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`أصغر من اللازم: يفترض لـ ${z.origin} أن يكون ${w} ${z.minimum.toString()} ${_.unit}`;return`أصغر من اللازم: يفترض لـ ${z.origin} أن يكون ${w} ${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${z.prefix}"`;if(w.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${w.suffix}"`;if(w.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${w.includes}"`;if(w.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${w.pattern}`;return`${Y[w.format]??z.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${z.divisor}`;case"unrecognized_keys":return`معرف${z.keys.length>1?"ات":""} غريب${z.keys.length>1?"ة":""}: ${ZA(z.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${z.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${z.origin}`;default:return"مدخل غير مقبول"}}};var C3A=k(()=>{Z3()});function tU1(){return{localeError:a4K()}}var a4K=()=>{let A={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${z.expected}, daxil olan ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Yanlış dəyər: gözlənilən ${s7(z.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Çox böyük: gözlənilən ${z.origin??"dəyər"} ${w}${z.maximum.toString()} ${_.unit??"element"}`;return`Çox böyük: gözlənilən ${z.origin??"dəyər"} ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Çox kiçik: gözlənilən ${z.origin} ${w}${z.minimum.toString()} ${_.unit}`;return`Çox kiçik: gözlənilən ${z.origin} ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Yanlış mətn: "${w.prefix}" ilə başlamalıdır`;if(w.format==="ends_with")return`Yanlış mətn: "${w.suffix}" ilə bitməlidir`;if(w.format==="includes")return`Yanlış mətn: "${w.includes}" daxil olmalıdır`;if(w.format==="regex")return`Yanlış mətn: ${w.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${Y[w.format]??z.format}`}case"not_multiple_of":return`Yanlış ədəd: ${z.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${z.keys.length>1?"lar":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`${z.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${z.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var h3A=k(()=>{Z3()});function I3A(A,q,K,Y){let z=Math.abs(A),w=z%10,_=z%100;if(_>=11&&_<=19)return Y;if(w===1)return q;if(w>=2&&w<=4)return K;return Y}function eU1(){return{localeError:s4K()}}var s4K=()=>{let A={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"лік";case"object":{if(Array.isArray(z))return"масіў";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return(z)=>{switch(z.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${z.expected}, атрымана ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Няправільны ўвод: чакалася ${s7(z.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_){let $=Number(z.maximum),O=I3A($,_.unit.one,_.unit.few,_.unit.many);return`Занадта вялікі: чакалася, што ${z.origin??"значэнне"} павінна ${_.verb} ${w}${z.maximum.toString()} ${O}`}return`Занадта вялікі: чакалася, што ${z.origin??"значэнне"} павінна быць ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_){let $=Number(z.minimum),O=I3A($,_.unit.one,_.unit.few,_.unit.many);return`Занадта малы: чакалася, што ${z.origin} павінна ${_.verb} ${w}${z.minimum.toString()} ${O}`}return`Занадта малы: чакалася, што ${z.origin} павінна быць ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${w.prefix}"`;if(w.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${w.suffix}"`;if(w.format==="includes")return`Няправільны радок: павінен змяшчаць "${w.includes}"`;if(w.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${w.pattern}`;return`Няправільны ${Y[w.format]??z.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${z.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${z.keys.length>1?"ключы":"ключ"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${z.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${z.origin}`;default:return"Няправільны ўвод"}}};var b3A=k(()=>{Z3()});function Ap1(){return{localeError:t4K()}}var t4K=()=>{let A={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(z)=>{switch(z.code){case"invalid_type":return`Tipus invàlid: s'esperava ${z.expected}, s'ha rebut ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Valor invàlid: s'esperava ${s7(z.values[0])}`;return`Opció invàlida: s'esperava una de ${ZA(z.values," o ")}`;case"too_big":{let w=z.inclusive?"com a màxim":"menys de",_=q(z.origin);if(_)return`Massa gran: s'esperava que ${z.origin??"el valor"} contingués ${w} ${z.maximum.toString()} ${_.unit??"elements"}`;return`Massa gran: s'esperava que ${z.origin??"el valor"} fos ${w} ${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?"com a mínim":"més de",_=q(z.origin);if(_)return`Massa petit: s'esperava que ${z.origin} contingués ${w} ${z.minimum.toString()} ${_.unit}`;return`Massa petit: s'esperava que ${z.origin} fos ${w} ${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Format invàlid: ha de començar amb "${w.prefix}"`;if(w.format==="ends_with")return`Format invàlid: ha d'acabar amb "${w.suffix}"`;if(w.format==="includes")return`Format invàlid: ha d'incloure "${w.includes}"`;if(w.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${w.pattern}`;return`Format invàlid per a ${Y[w.format]??z.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${z.divisor}`;case"unrecognized_keys":return`Clau${z.keys.length>1?"s":""} no reconeguda${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${z.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${z.origin}`;default:return"Entrada invàlida"}}};var x3A=k(()=>{Z3()});function qp1(){return{localeError:e4K()}}var e4K=()=>{let A={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(z))return"pole";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return(z)=>{switch(z.code){case"invalid_type":return`Neplatný vstup: očekáváno ${z.expected}, obdrženo ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Neplatný vstup: očekáváno ${s7(z.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Hodnota je příliš velká: ${z.origin??"hodnota"} musí mít ${w}${z.maximum.toString()} ${_.unit??"prvků"}`;return`Hodnota je příliš velká: ${z.origin??"hodnota"} musí být ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Hodnota je příliš malá: ${z.origin??"hodnota"} musí mít ${w}${z.minimum.toString()} ${_.unit??"prvků"}`;return`Hodnota je příliš malá: ${z.origin??"hodnota"} musí být ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Neplatný řetězec: musí začínat na "${w.prefix}"`;if(w.format==="ends_with")return`Neplatný řetězec: musí končit na "${w.suffix}"`;if(w.format==="includes")return`Neplatný řetězec: musí obsahovat "${w.includes}"`;if(w.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${w.pattern}`;return`Neplatný formát ${Y[w.format]??z.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${z.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${ZA(z.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${z.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${z.origin}`;default:return"Neplatný vstup"}}};var u3A=k(()=>{Z3()});function Kp1(){return{localeError:AqK()}}var AqK=()=>{let A={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"Zahl";case"object":{if(Array.isArray(z))return"Array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return(z)=>{switch(z.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${z.expected}, erhalten ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Ungültige Eingabe: erwartet ${s7(z.values[0])}`;return`Ungültige Option: erwartet eine von ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Zu groß: erwartet, dass ${z.origin??"Wert"} ${w}${z.maximum.toString()} ${_.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${z.origin??"Wert"} ${w}${z.maximum.toString()} ist`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Zu klein: erwartet, dass ${z.origin} ${w}${z.minimum.toString()} ${_.unit} hat`;return`Zu klein: erwartet, dass ${z.origin} ${w}${z.minimum.toString()} ist`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Ungültiger String: muss mit "${w.prefix}" beginnen`;if(w.format==="ends_with")return`Ungültiger String: muss mit "${w.suffix}" enden`;if(w.format==="includes")return`Ungültiger String: muss "${w.includes}" enthalten`;if(w.format==="regex")return`Ungültiger String: muss dem Muster ${w.pattern} entsprechen`;return`Ungültig: ${Y[w.format]??z.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${z.divisor} sein`;case"unrecognized_keys":return`${z.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${z.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${z.origin}`;default:return"Ungültige Eingabe"}}};var B3A=k(()=>{Z3()});function nR6(){return{localeError:KqK()}}var qqK=(A)=>{let q=typeof A;switch(q){case"number":return Number.isNaN(A)?"NaN":"number";case"object":{if(Array.isArray(A))return"array";if(A===null)return"null";if(Object.getPrototypeOf(A)!==Object.prototype&&A.constructor)return A.constructor.name}}return q},KqK=()=>{let A={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function q(Y){return A[Y]??null}let K={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(Y)=>{switch(Y.code){case"invalid_type":return`Invalid input: expected ${Y.expected}, received ${qqK(Y.input)}`;case"invalid_value":if(Y.values.length===1)return`Invalid input: expected ${s7(Y.values[0])}`;return`Invalid option: expected one of ${ZA(Y.values,"|")}`;case"too_big":{let z=Y.inclusive?"<=":"<",w=q(Y.origin);if(w)return`Too big: expected ${Y.origin??"value"} to have ${z}${Y.maximum.toString()} ${w.unit??"elements"}`;return`Too big: expected ${Y.origin??"value"} to be ${z}${Y.maximum.toString()}`}case"too_small":{let z=Y.inclusive?">=":">",w=q(Y.origin);if(w)return`Too small: expected ${Y.origin} to have ${z}${Y.minimum.toString()} ${w.unit}`;return`Too small: expected ${Y.origin} to be ${z}${Y.minimum.toString()}`}case"invalid_format":{let z=Y;if(z.format==="starts_with")return`Invalid string: must start with "${z.prefix}"`;if(z.format==="ends_with")return`Invalid string: must end with "${z.suffix}"`;if(z.format==="includes")return`Invalid string: must include "${z.includes}"`;if(z.format==="regex")return`Invalid string: must match pattern ${z.pattern}`;return`Invalid ${K[z.format]??Y.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${Y.divisor}`;case"unrecognized_keys":return`Unrecognized key${Y.keys.length>1?"s":""}: ${ZA(Y.keys,", ")}`;case"invalid_key":return`Invalid key in ${Y.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${Y.origin}`;default:return"Invalid input"}}};var Yp1=k(()=>{Z3()});function zp1(){return{localeError:zqK()}}var YqK=(A)=>{let q=typeof A;switch(q){case"number":return Number.isNaN(A)?"NaN":"nombro";case"object":{if(Array.isArray(A))return"tabelo";if(A===null)return"senvalora";if(Object.getPrototypeOf(A)!==Object.prototype&&A.constructor)return A.constructor.name}}return q},zqK=()=>{let A={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function q(Y){return A[Y]??null}let K={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return(Y)=>{switch(Y.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${Y.expected}, riceviĝis ${YqK(Y.input)}`;case"invalid_value":if(Y.values.length===1)return`Nevalida enigo: atendiĝis ${s7(Y.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${ZA(Y.values,"|")}`;case"too_big":{let z=Y.inclusive?"<=":"<",w=q(Y.origin);if(w)return`Tro granda: atendiĝis ke ${Y.origin??"valoro"} havu ${z}${Y.maximum.toString()} ${w.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${Y.origin??"valoro"} havu ${z}${Y.maximum.toString()}`}case"too_small":{let z=Y.inclusive?">=":">",w=q(Y.origin);if(w)return`Tro malgranda: atendiĝis ke ${Y.origin} havu ${z}${Y.minimum.toString()} ${w.unit}`;return`Tro malgranda: atendiĝis ke ${Y.origin} estu ${z}${Y.minimum.toString()}`}case"invalid_format":{let z=Y;if(z.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${z.prefix}"`;if(z.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${z.suffix}"`;if(z.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${z.includes}"`;if(z.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${z.pattern}`;return`Nevalida ${K[z.format]??Y.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${Y.divisor}`;case"unrecognized_keys":return`Nekonata${Y.keys.length>1?"j":""} ŝlosilo${Y.keys.length>1?"j":""}: ${ZA(Y.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${Y.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${Y.origin}`;default:return"Nevalida enigo"}}};var m3A=k(()=>{Z3()});function wp1(){return{localeError:wqK()}}var wqK=()=>{let A={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"número";case"object":{if(Array.isArray(z))return"arreglo";if(z===null)return"nulo";if(Object.getPrototypeOf(z)!==Object.prototype)return z.constructor.name}}return w},Y={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(z)=>{switch(z.code){case"invalid_type":return`Entrada inválida: se esperaba ${z.expected}, recibido ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Entrada inválida: se esperaba ${s7(z.values[0])}`;return`Opción inválida: se esperaba una de ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Demasiado grande: se esperaba que ${z.origin??"valor"} tuviera ${w}${z.maximum.toString()} ${_.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${z.origin??"valor"} fuera ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Demasiado pequeño: se esperaba que ${z.origin} tuviera ${w}${z.minimum.toString()} ${_.unit}`;return`Demasiado pequeño: se esperaba que ${z.origin} fuera ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Cadena inválida: debe comenzar con "${w.prefix}"`;if(w.format==="ends_with")return`Cadena inválida: debe terminar en "${w.suffix}"`;if(w.format==="includes")return`Cadena inválida: debe incluir "${w.includes}"`;if(w.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${w.pattern}`;return`Inválido ${Y[w.format]??z.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${z.divisor}`;case"unrecognized_keys":return`Llave${z.keys.length>1?"s":""} desconocida${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Llave inválida en ${z.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${z.origin}`;default:return"Entrada inválida"}}};var g3A=k(()=>{Z3()});function _p1(){return{localeError:_qK()}}var _qK=()=>{let A={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"عدد";case"object":{if(Array.isArray(z))return"آرایه";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return(z)=>{switch(z.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${z.expected} می‌بود، ${K(z.input)} دریافت شد`;case"invalid_value":if(z.values.length===1)return`ورودی نامعتبر: می‌بایست ${s7(z.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${ZA(z.values,"|")} می‌بود`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`خیلی بزرگ: ${z.origin??"مقدار"} باید ${w}${z.maximum.toString()} ${_.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${z.origin??"مقدار"} باید ${w}${z.maximum.toString()} باشد`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`خیلی کوچک: ${z.origin} باید ${w}${z.minimum.toString()} ${_.unit} باشد`;return`خیلی کوچک: ${z.origin} باید ${w}${z.minimum.toString()} باشد`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`رشته نامعتبر: باید با "${w.prefix}" شروع شود`;if(w.format==="ends_with")return`رشته نامعتبر: باید با "${w.suffix}" تمام شود`;if(w.format==="includes")return`رشته نامعتبر: باید شامل "${w.includes}" باشد`;if(w.format==="regex")return`رشته نامعتبر: باید با الگوی ${w.pattern} مطابقت داشته باشد`;return`${Y[w.format]??z.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${z.divisor} باشد`;case"unrecognized_keys":return`کلید${z.keys.length>1?"های":""} ناشناس: ${ZA(z.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${z.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${z.origin}`;default:return"ورودی نامعتبر"}}};var F3A=k(()=>{Z3()});function $p1(){return{localeError:$qK()}}var $qK=()=>{let A={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return(z)=>{switch(z.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${z.expected}, oli ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Virheellinen syöte: täytyy olla ${s7(z.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Liian suuri: ${_.subject} täytyy olla ${w}${z.maximum.toString()} ${_.unit}`.trim();return`Liian suuri: arvon täytyy olla ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Liian pieni: ${_.subject} täytyy olla ${w}${z.minimum.toString()} ${_.unit}`.trim();return`Liian pieni: arvon täytyy olla ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${w.prefix}"`;if(w.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${w.suffix}"`;if(w.format==="includes")return`Virheellinen syöte: täytyy sisältää "${w.includes}"`;if(w.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${w.pattern}`;return`Virheellinen ${Y[w.format]??z.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${z.divisor} monikerta`;case"unrecognized_keys":return`${z.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${ZA(z.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var Q3A=k(()=>{Z3()});function Op1(){return{localeError:OqK()}}var OqK=()=>{let A={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"nombre";case"object":{if(Array.isArray(z))return"tableau";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(z)=>{switch(z.code){case"invalid_type":return`Entrée invalide : ${z.expected} attendu, ${K(z.input)} reçu`;case"invalid_value":if(z.values.length===1)return`Entrée invalide : ${s7(z.values[0])} attendu`;return`Option invalide : une valeur parmi ${ZA(z.values,"|")} attendue`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Trop grand : ${z.origin??"valeur"} doit ${_.verb} ${w}${z.maximum.toString()} ${_.unit??"élément(s)"}`;return`Trop grand : ${z.origin??"valeur"} doit être ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Trop petit : ${z.origin} doit ${_.verb} ${w}${z.minimum.toString()} ${_.unit}`;return`Trop petit : ${z.origin} doit être ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Chaîne invalide : doit commencer par "${w.prefix}"`;if(w.format==="ends_with")return`Chaîne invalide : doit se terminer par "${w.suffix}"`;if(w.format==="includes")return`Chaîne invalide : doit inclure "${w.includes}"`;if(w.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${w.pattern}`;return`${Y[w.format]??z.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${z.divisor}`;case"unrecognized_keys":return`Clé${z.keys.length>1?"s":""} non reconnue${z.keys.length>1?"s":""} : ${ZA(z.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${z.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${z.origin}`;default:return"Entrée invalide"}}};var U3A=k(()=>{Z3()});function Hp1(){return{localeError:HqK()}}var HqK=()=>{let A={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(z)=>{switch(z.code){case"invalid_type":return`Entrée invalide : attendu ${z.expected}, reçu ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Entrée invalide : attendu ${s7(z.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"≤":"<",_=q(z.origin);if(_)return`Trop grand : attendu que ${z.origin??"la valeur"} ait ${w}${z.maximum.toString()} ${_.unit}`;return`Trop grand : attendu que ${z.origin??"la valeur"} soit ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?"≥":">",_=q(z.origin);if(_)return`Trop petit : attendu que ${z.origin} ait ${w}${z.minimum.toString()} ${_.unit}`;return`Trop petit : attendu que ${z.origin} soit ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Chaîne invalide : doit commencer par "${w.prefix}"`;if(w.format==="ends_with")return`Chaîne invalide : doit se terminer par "${w.suffix}"`;if(w.format==="includes")return`Chaîne invalide : doit inclure "${w.includes}"`;if(w.format==="regex")return`Chaîne invalide : doit correspondre au motif ${w.pattern}`;return`${Y[w.format]??z.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${z.divisor}`;case"unrecognized_keys":return`Clé${z.keys.length>1?"s":""} non reconnue${z.keys.length>1?"s":""} : ${ZA(z.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${z.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${z.origin}`;default:return"Entrée invalide"}}};var p3A=k(()=>{Z3()});function jp1(){return{localeError:jqK()}}var jqK=()=>{let A={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return(z)=>{switch(z.code){case"invalid_type":return`קלט לא תקין: צריך ${z.expected}, התקבל ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`קלט לא תקין: צריך ${s7(z.values[0])}`;return`קלט לא תקין: צריך אחת מהאפשרויות  ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`גדול מדי: ${z.origin??"value"} צריך להיות ${w}${z.maximum.toString()} ${_.unit??"elements"}`;return`גדול מדי: ${z.origin??"value"} צריך להיות ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`קטן מדי: ${z.origin} צריך להיות ${w}${z.minimum.toString()} ${_.unit}`;return`קטן מדי: ${z.origin} צריך להיות ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`מחרוזת לא תקינה: חייבת להתחיל ב"${w.prefix}"`;if(w.format==="ends_with")return`מחרוזת לא תקינה: חייבת להסתיים ב "${w.suffix}"`;if(w.format==="includes")return`מחרוזת לא תקינה: חייבת לכלול "${w.includes}"`;if(w.format==="regex")return`מחרוזת לא תקינה: חייבת להתאים לתבנית ${w.pattern}`;return`${Y[w.format]??z.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${z.divisor}`;case"unrecognized_keys":return`מפתח${z.keys.length>1?"ות":""} לא מזוה${z.keys.length>1?"ים":"ה"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${z.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${z.origin}`;default:return"קלט לא תקין"}}};var d3A=k(()=>{Z3()});function Jp1(){return{localeError:JqK()}}var JqK=()=>{let A={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"szám";case"object":{if(Array.isArray(z))return"tömb";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return(z)=>{switch(z.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${z.expected}, a kapott érték ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Érvénytelen bemenet: a várt érték ${s7(z.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Túl nagy: ${z.origin??"érték"} mérete túl nagy ${w}${z.maximum.toString()} ${_.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${z.origin??"érték"} túl nagy: ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Túl kicsi: a bemeneti érték ${z.origin} mérete túl kicsi ${w}${z.minimum.toString()} ${_.unit}`;return`Túl kicsi: a bemeneti érték ${z.origin} túl kicsi ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Érvénytelen string: "${w.prefix}" értékkel kell kezdődnie`;if(w.format==="ends_with")return`Érvénytelen string: "${w.suffix}" értékkel kell végződnie`;if(w.format==="includes")return`Érvénytelen string: "${w.includes}" értéket kell tartalmaznia`;if(w.format==="regex")return`Érvénytelen string: ${w.pattern} mintának kell megfelelnie`;return`Érvénytelen ${Y[w.format]??z.format}`}case"not_multiple_of":return`Érvénytelen szám: ${z.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${z.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${z.origin}`;default:return"Érvénytelen bemenet"}}};var c3A=k(()=>{Z3()});function Mp1(){return{localeError:MqK()}}var MqK=()=>{let A={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`Input tidak valid: diharapkan ${z.expected}, diterima ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Input tidak valid: diharapkan ${s7(z.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Terlalu besar: diharapkan ${z.origin??"value"} memiliki ${w}${z.maximum.toString()} ${_.unit??"elemen"}`;return`Terlalu besar: diharapkan ${z.origin??"value"} menjadi ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Terlalu kecil: diharapkan ${z.origin} memiliki ${w}${z.minimum.toString()} ${_.unit}`;return`Terlalu kecil: diharapkan ${z.origin} menjadi ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`String tidak valid: harus dimulai dengan "${w.prefix}"`;if(w.format==="ends_with")return`String tidak valid: harus berakhir dengan "${w.suffix}"`;if(w.format==="includes")return`String tidak valid: harus menyertakan "${w.includes}"`;if(w.format==="regex")return`String tidak valid: harus sesuai pola ${w.pattern}`;return`${Y[w.format]??z.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${z.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${z.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${z.origin}`;default:return"Input tidak valid"}}};var l3A=k(()=>{Z3()});function Dp1(){return{localeError:DqK()}}var DqK=()=>{let A={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"numero";case"object":{if(Array.isArray(z))return"vettore";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`Input non valido: atteso ${z.expected}, ricevuto ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Input non valido: atteso ${s7(z.values[0])}`;return`Opzione non valida: atteso uno tra ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Troppo grande: ${z.origin??"valore"} deve avere ${w}${z.maximum.toString()} ${_.unit??"elementi"}`;return`Troppo grande: ${z.origin??"valore"} deve essere ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Troppo piccolo: ${z.origin} deve avere ${w}${z.minimum.toString()} ${_.unit}`;return`Troppo piccolo: ${z.origin} deve essere ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Stringa non valida: deve iniziare con "${w.prefix}"`;if(w.format==="ends_with")return`Stringa non valida: deve terminare con "${w.suffix}"`;if(w.format==="includes")return`Stringa non valida: deve includere "${w.includes}"`;if(w.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${w.pattern}`;return`Invalid ${Y[w.format]??z.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${z.divisor}`;case"unrecognized_keys":return`Chiav${z.keys.length>1?"i":"e"} non riconosciut${z.keys.length>1?"e":"a"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${z.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${z.origin}`;default:return"Input non valido"}}};var i3A=k(()=>{Z3()});function Xp1(){return{localeError:XqK()}}var XqK=()=>{let A={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"数値";case"object":{if(Array.isArray(z))return"配列";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return(z)=>{switch(z.code){case"invalid_type":return`無効な入力: ${z.expected}が期待されましたが、${K(z.input)}が入力されました`;case"invalid_value":if(z.values.length===1)return`無効な入力: ${s7(z.values[0])}が期待されました`;return`無効な選択: ${ZA(z.values,"、")}のいずれかである必要があります`;case"too_big":{let w=z.inclusive?"以下である":"より小さい",_=q(z.origin);if(_)return`大きすぎる値: ${z.origin??"値"}は${z.maximum.toString()}${_.unit??"要素"}${w}必要があります`;return`大きすぎる値: ${z.origin??"値"}は${z.maximum.toString()}${w}必要があります`}case"too_small":{let w=z.inclusive?"以上である":"より大きい",_=q(z.origin);if(_)return`小さすぎる値: ${z.origin}は${z.minimum.toString()}${_.unit}${w}必要があります`;return`小さすぎる値: ${z.origin}は${z.minimum.toString()}${w}必要があります`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`無効な文字列: "${w.prefix}"で始まる必要があります`;if(w.format==="ends_with")return`無効な文字列: "${w.suffix}"で終わる必要があります`;if(w.format==="includes")return`無効な文字列: "${w.includes}"を含む必要があります`;if(w.format==="regex")return`無効な文字列: パターン${w.pattern}に一致する必要があります`;return`無効な${Y[w.format]??z.format}`}case"not_multiple_of":return`無効な数値: ${z.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${z.keys.length>1?"群":""}: ${ZA(z.keys,"、")}`;case"invalid_key":return`${z.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${z.origin}内の無効な値`;default:return"無効な入力"}}};var n3A=k(()=>{Z3()});function Pp1(){return{localeError:PqK()}}var PqK=()=>{let A={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(z))return"អារេ (Array)";if(z===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return(z)=>{switch(z.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z.expected} ប៉ុន្តែទទួលបាន ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${s7(z.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`ធំពេក៖ ត្រូវការ ${z.origin??"តម្លៃ"} ${w} ${z.maximum.toString()} ${_.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${z.origin??"តម្លៃ"} ${w} ${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`តូចពេក៖ ត្រូវការ ${z.origin} ${w} ${z.minimum.toString()} ${_.unit}`;return`តូចពេក៖ ត្រូវការ ${z.origin} ${w} ${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${w.prefix}"`;if(w.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${w.suffix}"`;if(w.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${w.includes}"`;if(w.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${w.pattern}`;return`មិនត្រឹមត្រូវ៖ ${Y[w.format]??z.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${z.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${ZA(z.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${z.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${z.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var r3A=k(()=>{Z3()});function Wp1(){return{localeError:WqK()}}var WqK=()=>{let A={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return(z)=>{switch(z.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${z.expected}, 받은 타입은 ${K(z.input)}입니다`;case"invalid_value":if(z.values.length===1)return`잘못된 입력: 값은 ${s7(z.values[0])} 이어야 합니다`;return`잘못된 옵션: ${ZA(z.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let w=z.inclusive?"이하":"미만",_=w==="미만"?"이어야 합니다":"여야 합니다",$=q(z.origin),O=$?.unit??"요소";if($)return`${z.origin??"값"}이 너무 큽니다: ${z.maximum.toString()}${O} ${w}${_}`;return`${z.origin??"값"}이 너무 큽니다: ${z.maximum.toString()} ${w}${_}`}case"too_small":{let w=z.inclusive?"이상":"초과",_=w==="이상"?"이어야 합니다":"여야 합니다",$=q(z.origin),O=$?.unit??"요소";if($)return`${z.origin??"값"}이 너무 작습니다: ${z.minimum.toString()}${O} ${w}${_}`;return`${z.origin??"값"}이 너무 작습니다: ${z.minimum.toString()} ${w}${_}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`잘못된 문자열: "${w.prefix}"(으)로 시작해야 합니다`;if(w.format==="ends_with")return`잘못된 문자열: "${w.suffix}"(으)로 끝나야 합니다`;if(w.format==="includes")return`잘못된 문자열: "${w.includes}"을(를) 포함해야 합니다`;if(w.format==="regex")return`잘못된 문자열: 정규식 ${w.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${Y[w.format]??z.format}`}case"not_multiple_of":return`잘못된 숫자: ${z.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${ZA(z.keys,", ")}`;case"invalid_key":return`잘못된 키: ${z.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${z.origin}`;default:return"잘못된 입력"}}};var o3A=k(()=>{Z3()});function Zp1(){return{localeError:ZqK()}}var ZqK=()=>{let A={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"број";case"object":{if(Array.isArray(z))return"низа";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return(z)=>{switch(z.code){case"invalid_type":return`Грешен внес: се очекува ${z.expected}, примено ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Invalid input: expected ${s7(z.values[0])}`;return`Грешана опција: се очекува една ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Премногу голем: се очекува ${z.origin??"вредноста"} да има ${w}${z.maximum.toString()} ${_.unit??"елементи"}`;return`Премногу голем: се очекува ${z.origin??"вредноста"} да биде ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Премногу мал: се очекува ${z.origin} да има ${w}${z.minimum.toString()} ${_.unit}`;return`Премногу мал: се очекува ${z.origin} да биде ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Неважечка низа: мора да започнува со "${w.prefix}"`;if(w.format==="ends_with")return`Неважечка низа: мора да завршува со "${w.suffix}"`;if(w.format==="includes")return`Неважечка низа: мора да вклучува "${w.includes}"`;if(w.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${w.pattern}`;return`Invalid ${Y[w.format]??z.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${z.divisor}`;case"unrecognized_keys":return`${z.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${z.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${z.origin}`;default:return"Грешен внес"}}};var a3A=k(()=>{Z3()});function Gp1(){return{localeError:GqK()}}var GqK=()=>{let A={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"nombor";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`Input tidak sah: dijangka ${z.expected}, diterima ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Input tidak sah: dijangka ${s7(z.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Terlalu besar: dijangka ${z.origin??"nilai"} ${_.verb} ${w}${z.maximum.toString()} ${_.unit??"elemen"}`;return`Terlalu besar: dijangka ${z.origin??"nilai"} adalah ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Terlalu kecil: dijangka ${z.origin} ${_.verb} ${w}${z.minimum.toString()} ${_.unit}`;return`Terlalu kecil: dijangka ${z.origin} adalah ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`String tidak sah: mesti bermula dengan "${w.prefix}"`;if(w.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${w.suffix}"`;if(w.format==="includes")return`String tidak sah: mesti mengandungi "${w.includes}"`;if(w.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${w.pattern}`;return`${Y[w.format]??z.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${z.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ZA(z.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${z.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${z.origin}`;default:return"Input tidak sah"}}};var s3A=k(()=>{Z3()});function fp1(){return{localeError:fqK()}}var fqK=()=>{let A={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"getal";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return(z)=>{switch(z.code){case"invalid_type":return`Ongeldige invoer: verwacht ${z.expected}, ontving ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Ongeldige invoer: verwacht ${s7(z.values[0])}`;return`Ongeldige optie: verwacht één van ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Te lang: verwacht dat ${z.origin??"waarde"} ${w}${z.maximum.toString()} ${_.unit??"elementen"} bevat`;return`Te lang: verwacht dat ${z.origin??"waarde"} ${w}${z.maximum.toString()} is`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Te kort: verwacht dat ${z.origin} ${w}${z.minimum.toString()} ${_.unit} bevat`;return`Te kort: verwacht dat ${z.origin} ${w}${z.minimum.toString()} is`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Ongeldige tekst: moet met "${w.prefix}" beginnen`;if(w.format==="ends_with")return`Ongeldige tekst: moet op "${w.suffix}" eindigen`;if(w.format==="includes")return`Ongeldige tekst: moet "${w.includes}" bevatten`;if(w.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${w.pattern}`;return`Ongeldig: ${Y[w.format]??z.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${z.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${z.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${z.origin}`;default:return"Ongeldige invoer"}}};var t3A=k(()=>{Z3()});function Tp1(){return{localeError:TqK()}}var TqK=()=>{let A={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"tall";case"object":{if(Array.isArray(z))return"liste";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`Ugyldig input: forventet ${z.expected}, fikk ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Ugyldig verdi: forventet ${s7(z.values[0])}`;return`Ugyldig valg: forventet en av ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`For stor(t): forventet ${z.origin??"value"} til å ha ${w}${z.maximum.toString()} ${_.unit??"elementer"}`;return`For stor(t): forventet ${z.origin??"value"} til å ha ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`For lite(n): forventet ${z.origin} til å ha ${w}${z.minimum.toString()} ${_.unit}`;return`For lite(n): forventet ${z.origin} til å ha ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Ugyldig streng: må starte med "${w.prefix}"`;if(w.format==="ends_with")return`Ugyldig streng: må ende med "${w.suffix}"`;if(w.format==="includes")return`Ugyldig streng: må inneholde "${w.includes}"`;if(w.format==="regex")return`Ugyldig streng: må matche mønsteret ${w.pattern}`;return`Ugyldig ${Y[w.format]??z.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${z.divisor}`;case"unrecognized_keys":return`${z.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${z.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${z.origin}`;default:return"Ugyldig input"}}};var e3A=k(()=>{Z3()});function Vp1(){return{localeError:VqK()}}var VqK=()=>{let A={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"numara";case"object":{if(Array.isArray(z))return"saf";if(z===null)return"gayb";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return(z)=>{switch(z.code){case"invalid_type":return`Fâsit giren: umulan ${z.expected}, alınan ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Fâsit giren: umulan ${s7(z.values[0])}`;return`Fâsit tercih: mûteberler ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Fazla büyük: ${z.origin??"value"}, ${w}${z.maximum.toString()} ${_.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${z.origin??"value"}, ${w}${z.maximum.toString()} olmalıydı.`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Fazla küçük: ${z.origin}, ${w}${z.minimum.toString()} ${_.unit} sahip olmalıydı.`;return`Fazla küçük: ${z.origin}, ${w}${z.minimum.toString()} olmalıydı.`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Fâsit metin: "${w.prefix}" ile başlamalı.`;if(w.format==="ends_with")return`Fâsit metin: "${w.suffix}" ile bitmeli.`;if(w.format==="includes")return`Fâsit metin: "${w.includes}" ihtivâ etmeli.`;if(w.format==="regex")return`Fâsit metin: ${w.pattern} nakşına uymalı.`;return`Fâsit ${Y[w.format]??z.format}`}case"not_multiple_of":return`Fâsit sayı: ${z.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`${z.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${z.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var A5A=k(()=>{Z3()});function Np1(){return{localeError:NqK()}}var NqK=()=>{let A={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"عدد";case"object":{if(Array.isArray(z))return"ارې";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return(z)=>{switch(z.code){case"invalid_type":return`ناسم ورودي: باید ${z.expected} وای, مګر ${K(z.input)} ترلاسه شو`;case"invalid_value":if(z.values.length===1)return`ناسم ورودي: باید ${s7(z.values[0])} وای`;return`ناسم انتخاب: باید یو له ${ZA(z.values,"|")} څخه وای`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`ډیر لوی: ${z.origin??"ارزښت"} باید ${w}${z.maximum.toString()} ${_.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${z.origin??"ارزښت"} باید ${w}${z.maximum.toString()} وي`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`ډیر کوچنی: ${z.origin} باید ${w}${z.minimum.toString()} ${_.unit} ولري`;return`ډیر کوچنی: ${z.origin} باید ${w}${z.minimum.toString()} وي`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`ناسم متن: باید د "${w.prefix}" سره پیل شي`;if(w.format==="ends_with")return`ناسم متن: باید د "${w.suffix}" سره پای ته ورسيږي`;if(w.format==="includes")return`ناسم متن: باید "${w.includes}" ولري`;if(w.format==="regex")return`ناسم متن: باید د ${w.pattern} سره مطابقت ولري`;return`${Y[w.format]??z.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${z.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${z.keys.length>1?"کلیډونه":"کلیډ"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${z.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${z.origin} کې`;default:return"ناسمه ورودي"}}};var q5A=k(()=>{Z3()});function vp1(){return{localeError:vqK()}}var vqK=()=>{let A={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"liczba";case"object":{if(Array.isArray(z))return"tablica";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return(z)=>{switch(z.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${z.expected}, otrzymano ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${s7(z.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Za duża wartość: oczekiwano, że ${z.origin??"wartość"} będzie mieć ${w}${z.maximum.toString()} ${_.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${z.origin??"wartość"} będzie wynosić ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Za mała wartość: oczekiwano, że ${z.origin??"wartość"} będzie mieć ${w}${z.minimum.toString()} ${_.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${z.origin??"wartość"} będzie wynosić ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${w.prefix}"`;if(w.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${w.suffix}"`;if(w.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${w.includes}"`;if(w.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${w.pattern}`;return`Nieprawidłow(y/a/e) ${Y[w.format]??z.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${z.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${z.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${z.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var K5A=k(()=>{Z3()});function kp1(){return{localeError:kqK()}}var kqK=()=>{let A={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"número";case"object":{if(Array.isArray(z))return"array";if(z===null)return"nulo";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(z)=>{switch(z.code){case"invalid_type":return`Tipo inválido: esperado ${z.expected}, recebido ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Entrada inválida: esperado ${s7(z.values[0])}`;return`Opção inválida: esperada uma das ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Muito grande: esperado que ${z.origin??"valor"} tivesse ${w}${z.maximum.toString()} ${_.unit??"elementos"}`;return`Muito grande: esperado que ${z.origin??"valor"} fosse ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Muito pequeno: esperado que ${z.origin} tivesse ${w}${z.minimum.toString()} ${_.unit}`;return`Muito pequeno: esperado que ${z.origin} fosse ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Texto inválido: deve começar com "${w.prefix}"`;if(w.format==="ends_with")return`Texto inválido: deve terminar com "${w.suffix}"`;if(w.format==="includes")return`Texto inválido: deve incluir "${w.includes}"`;if(w.format==="regex")return`Texto inválido: deve corresponder ao padrão ${w.pattern}`;return`${Y[w.format]??z.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${z.divisor}`;case"unrecognized_keys":return`Chave${z.keys.length>1?"s":""} desconhecida${z.keys.length>1?"s":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Chave inválida em ${z.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${z.origin}`;default:return"Campo inválido"}}};var Y5A=k(()=>{Z3()});function z5A(A,q,K,Y){let z=Math.abs(A),w=z%10,_=z%100;if(_>=11&&_<=19)return Y;if(w===1)return q;if(w>=2&&w<=4)return K;return Y}function Ep1(){return{localeError:EqK()}}var EqK=()=>{let A={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"число";case"object":{if(Array.isArray(z))return"массив";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return(z)=>{switch(z.code){case"invalid_type":return`Неверный ввод: ожидалось ${z.expected}, получено ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Неверный ввод: ожидалось ${s7(z.values[0])}`;return`Неверный вариант: ожидалось одно из ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_){let $=Number(z.maximum),O=z5A($,_.unit.one,_.unit.few,_.unit.many);return`Слишком большое значение: ожидалось, что ${z.origin??"значение"} будет иметь ${w}${z.maximum.toString()} ${O}`}return`Слишком большое значение: ожидалось, что ${z.origin??"значение"} будет ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_){let $=Number(z.minimum),O=z5A($,_.unit.one,_.unit.few,_.unit.many);return`Слишком маленькое значение: ожидалось, что ${z.origin} будет иметь ${w}${z.minimum.toString()} ${O}`}return`Слишком маленькое значение: ожидалось, что ${z.origin} будет ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Неверная строка: должна начинаться с "${w.prefix}"`;if(w.format==="ends_with")return`Неверная строка: должна заканчиваться на "${w.suffix}"`;if(w.format==="includes")return`Неверная строка: должна содержать "${w.includes}"`;if(w.format==="regex")return`Неверная строка: должна соответствовать шаблону ${w.pattern}`;return`Неверный ${Y[w.format]??z.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${z.divisor}`;case"unrecognized_keys":return`Нераспознанн${z.keys.length>1?"ые":"ый"} ключ${z.keys.length>1?"и":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${z.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${z.origin}`;default:return"Неверные входные данные"}}};var w5A=k(()=>{Z3()});function Lp1(){return{localeError:LqK()}}var LqK=()=>{let A={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"število";case"object":{if(Array.isArray(z))return"tabela";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return(z)=>{switch(z.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${z.expected}, prejeto ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Neveljaven vnos: pričakovano ${s7(z.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Preveliko: pričakovano, da bo ${z.origin??"vrednost"} imelo ${w}${z.maximum.toString()} ${_.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${z.origin??"vrednost"} ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Premajhno: pričakovano, da bo ${z.origin} imelo ${w}${z.minimum.toString()} ${_.unit}`;return`Premajhno: pričakovano, da bo ${z.origin} ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Neveljaven niz: mora se začeti z "${w.prefix}"`;if(w.format==="ends_with")return`Neveljaven niz: mora se končati z "${w.suffix}"`;if(w.format==="includes")return`Neveljaven niz: mora vsebovati "${w.includes}"`;if(w.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${w.pattern}`;return`Neveljaven ${Y[w.format]??z.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${z.divisor}`;case"unrecognized_keys":return`Neprepoznan${z.keys.length>1?"i ključi":" ključ"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${z.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${z.origin}`;default:return"Neveljaven vnos"}}};var _5A=k(()=>{Z3()});function yp1(){return{localeError:yqK()}}var yqK=()=>{let A={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"antal";case"object":{if(Array.isArray(z))return"lista";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return(z)=>{switch(z.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${z.expected}, fick ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Ogiltig inmatning: förväntat ${s7(z.values[0])}`;return`Ogiltigt val: förväntade en av ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`För stor(t): förväntade ${z.origin??"värdet"} att ha ${w}${z.maximum.toString()} ${_.unit??"element"}`;return`För stor(t): förväntat ${z.origin??"värdet"} att ha ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`För lite(t): förväntade ${z.origin??"värdet"} att ha ${w}${z.minimum.toString()} ${_.unit}`;return`För lite(t): förväntade ${z.origin??"värdet"} att ha ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Ogiltig sträng: måste börja med "${w.prefix}"`;if(w.format==="ends_with")return`Ogiltig sträng: måste sluta med "${w.suffix}"`;if(w.format==="includes")return`Ogiltig sträng: måste innehålla "${w.includes}"`;if(w.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${w.pattern}"`;return`Ogiltig(t) ${Y[w.format]??z.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${z.divisor}`;case"unrecognized_keys":return`${z.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${z.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${z.origin??"värdet"}`;default:return"Ogiltig input"}}};var $5A=k(()=>{Z3()});function Rp1(){return{localeError:RqK()}}var RqK=()=>{let A={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(z))return"அணி";if(z===null)return"வெறுமை";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return(z)=>{switch(z.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z.expected}, பெறப்பட்டது ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${s7(z.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${ZA(z.values,"|")} இல் ஒன்று`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${z.origin??"மதிப்பு"} ${w}${z.maximum.toString()} ${_.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${z.origin??"மதிப்பு"} ${w}${z.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${z.origin} ${w}${z.minimum.toString()} ${_.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${z.origin} ${w}${z.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`தவறான சரம்: "${w.prefix}" இல் தொடங்க வேண்டும்`;if(w.format==="ends_with")return`தவறான சரம்: "${w.suffix}" இல் முடிவடைய வேண்டும்`;if(w.format==="includes")return`தவறான சரம்: "${w.includes}" ஐ உள்ளடக்க வேண்டும்`;if(w.format==="regex")return`தவறான சரம்: ${w.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${Y[w.format]??z.format}`}case"not_multiple_of":return`தவறான எண்: ${z.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${z.keys.length>1?"கள்":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`${z.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${z.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var O5A=k(()=>{Z3()});function Sp1(){return{localeError:SqK()}}var SqK=()=>{let A={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(z))return"อาร์เรย์ (Array)";if(z===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return(z)=>{switch(z.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${z.expected} แต่ได้รับ ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${s7(z.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"ไม่เกิน":"น้อยกว่า",_=q(z.origin);if(_)return`เกินกำหนด: ${z.origin??"ค่า"} ควรมี${w} ${z.maximum.toString()} ${_.unit??"รายการ"}`;return`เกินกำหนด: ${z.origin??"ค่า"} ควรมี${w} ${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?"อย่างน้อย":"มากกว่า",_=q(z.origin);if(_)return`น้อยกว่ากำหนด: ${z.origin} ควรมี${w} ${z.minimum.toString()} ${_.unit}`;return`น้อยกว่ากำหนด: ${z.origin} ควรมี${w} ${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${w.prefix}"`;if(w.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${w.suffix}"`;if(w.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${w.includes}" อยู่ในข้อความ`;if(w.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${w.pattern}`;return`รูปแบบไม่ถูกต้อง: ${Y[w.format]??z.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${z.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${ZA(z.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${z.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${z.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var H5A=k(()=>{Z3()});function Cp1(){return{localeError:hqK()}}var CqK=(A)=>{let q=typeof A;switch(q){case"number":return Number.isNaN(A)?"NaN":"number";case"object":{if(Array.isArray(A))return"array";if(A===null)return"null";if(Object.getPrototypeOf(A)!==Object.prototype&&A.constructor)return A.constructor.name}}return q},hqK=()=>{let A={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function q(Y){return A[Y]??null}let K={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return(Y)=>{switch(Y.code){case"invalid_type":return`Geçersiz değer: beklenen ${Y.expected}, alınan ${CqK(Y.input)}`;case"invalid_value":if(Y.values.length===1)return`Geçersiz değer: beklenen ${s7(Y.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${ZA(Y.values,"|")}`;case"too_big":{let z=Y.inclusive?"<=":"<",w=q(Y.origin);if(w)return`Çok büyük: beklenen ${Y.origin??"değer"} ${z}${Y.maximum.toString()} ${w.unit??"öğe"}`;return`Çok büyük: beklenen ${Y.origin??"değer"} ${z}${Y.maximum.toString()}`}case"too_small":{let z=Y.inclusive?">=":">",w=q(Y.origin);if(w)return`Çok küçük: beklenen ${Y.origin} ${z}${Y.minimum.toString()} ${w.unit}`;return`Çok küçük: beklenen ${Y.origin} ${z}${Y.minimum.toString()}`}case"invalid_format":{let z=Y;if(z.format==="starts_with")return`Geçersiz metin: "${z.prefix}" ile başlamalı`;if(z.format==="ends_with")return`Geçersiz metin: "${z.suffix}" ile bitmeli`;if(z.format==="includes")return`Geçersiz metin: "${z.includes}" içermeli`;if(z.format==="regex")return`Geçersiz metin: ${z.pattern} desenine uymalı`;return`Geçersiz ${K[z.format]??Y.format}`}case"not_multiple_of":return`Geçersiz sayı: ${Y.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${Y.keys.length>1?"lar":""}: ${ZA(Y.keys,", ")}`;case"invalid_key":return`${Y.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${Y.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var j5A=k(()=>{Z3()});function hp1(){return{localeError:IqK()}}var IqK=()=>{let A={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"число";case"object":{if(Array.isArray(z))return"масив";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return(z)=>{switch(z.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${z.expected}, отримано ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Неправильні вхідні дані: очікується ${s7(z.values[0])}`;return`Неправильна опція: очікується одне з ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Занадто велике: очікується, що ${z.origin??"значення"} ${_.verb} ${w}${z.maximum.toString()} ${_.unit??"елементів"}`;return`Занадто велике: очікується, що ${z.origin??"значення"} буде ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Занадто мале: очікується, що ${z.origin} ${_.verb} ${w}${z.minimum.toString()} ${_.unit}`;return`Занадто мале: очікується, що ${z.origin} буде ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Неправильний рядок: повинен починатися з "${w.prefix}"`;if(w.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${w.suffix}"`;if(w.format==="includes")return`Неправильний рядок: повинен містити "${w.includes}"`;if(w.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${w.pattern}`;return`Неправильний ${Y[w.format]??z.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${z.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${z.keys.length>1?"і":""}: ${ZA(z.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${z.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${z.origin}`;default:return"Неправильні вхідні дані"}}};var J5A=k(()=>{Z3()});function Ip1(){return{localeError:bqK()}}var bqK=()=>{let A={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"نمبر";case"object":{if(Array.isArray(z))return"آرے";if(z===null)return"نل";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return(z)=>{switch(z.code){case"invalid_type":return`غلط ان پٹ: ${z.expected} متوقع تھا، ${K(z.input)} موصول ہوا`;case"invalid_value":if(z.values.length===1)return`غلط ان پٹ: ${s7(z.values[0])} متوقع تھا`;return`غلط آپشن: ${ZA(z.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`بہت بڑا: ${z.origin??"ویلیو"} کے ${w}${z.maximum.toString()} ${_.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${z.origin??"ویلیو"} کا ${w}${z.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`بہت چھوٹا: ${z.origin} کے ${w}${z.minimum.toString()} ${_.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${z.origin} کا ${w}${z.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`غلط سٹرنگ: "${w.prefix}" سے شروع ہونا چاہیے`;if(w.format==="ends_with")return`غلط سٹرنگ: "${w.suffix}" پر ختم ہونا چاہیے`;if(w.format==="includes")return`غلط سٹرنگ: "${w.includes}" شامل ہونا چاہیے`;if(w.format==="regex")return`غلط سٹرنگ: پیٹرن ${w.pattern} سے میچ ہونا چاہیے`;return`غلط ${Y[w.format]??z.format}`}case"not_multiple_of":return`غلط نمبر: ${z.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${z.keys.length>1?"ز":""}: ${ZA(z.keys,"، ")}`;case"invalid_key":return`${z.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${z.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var M5A=k(()=>{Z3()});function bp1(){return{localeError:xqK()}}var xqK=()=>{let A={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"số";case"object":{if(Array.isArray(z))return"mảng";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return(z)=>{switch(z.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${z.expected}, nhận được ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${s7(z.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`Quá lớn: mong đợi ${z.origin??"giá trị"} ${_.verb} ${w}${z.maximum.toString()} ${_.unit??"phần tử"}`;return`Quá lớn: mong đợi ${z.origin??"giá trị"} ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`Quá nhỏ: mong đợi ${z.origin} ${_.verb} ${w}${z.minimum.toString()} ${_.unit}`;return`Quá nhỏ: mong đợi ${z.origin} ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${w.prefix}"`;if(w.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${w.suffix}"`;if(w.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${w.includes}"`;if(w.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${w.pattern}`;return`${Y[w.format]??z.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${z.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${ZA(z.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${z.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${z.origin}`;default:return"Đầu vào không hợp lệ"}}};var D5A=k(()=>{Z3()});function xp1(){return{localeError:uqK()}}var uqK=()=>{let A={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(z))return"数组";if(z===null)return"空值(null)";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return(z)=>{switch(z.code){case"invalid_type":return`无效输入：期望 ${z.expected}，实际接收 ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`无效输入：期望 ${s7(z.values[0])}`;return`无效选项：期望以下之一 ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`数值过大：期望 ${z.origin??"值"} ${w}${z.maximum.toString()} ${_.unit??"个元素"}`;return`数值过大：期望 ${z.origin??"值"} ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`数值过小：期望 ${z.origin} ${w}${z.minimum.toString()} ${_.unit}`;return`数值过小：期望 ${z.origin} ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`无效字符串：必须以 "${w.prefix}" 开头`;if(w.format==="ends_with")return`无效字符串：必须以 "${w.suffix}" 结尾`;if(w.format==="includes")return`无效字符串：必须包含 "${w.includes}"`;if(w.format==="regex")return`无效字符串：必须满足正则表达式 ${w.pattern}`;return`无效${Y[w.format]??z.format}`}case"not_multiple_of":return`无效数字：必须是 ${z.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${ZA(z.keys,", ")}`;case"invalid_key":return`${z.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${z.origin} 中包含无效值(value)`;default:return"无效输入"}}};var X5A=k(()=>{Z3()});function up1(){return{localeError:BqK()}}var BqK=()=>{let A={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function q(z){return A[z]??null}let K=(z)=>{let w=typeof z;switch(w){case"number":return Number.isNaN(z)?"NaN":"number";case"object":{if(Array.isArray(z))return"array";if(z===null)return"null";if(Object.getPrototypeOf(z)!==Object.prototype&&z.constructor)return z.constructor.name}}return w},Y={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return(z)=>{switch(z.code){case"invalid_type":return`無效的輸入值：預期為 ${z.expected}，但收到 ${K(z.input)}`;case"invalid_value":if(z.values.length===1)return`無效的輸入值：預期為 ${s7(z.values[0])}`;return`無效的選項：預期為以下其中之一 ${ZA(z.values,"|")}`;case"too_big":{let w=z.inclusive?"<=":"<",_=q(z.origin);if(_)return`數值過大：預期 ${z.origin??"值"} 應為 ${w}${z.maximum.toString()} ${_.unit??"個元素"}`;return`數值過大：預期 ${z.origin??"值"} 應為 ${w}${z.maximum.toString()}`}case"too_small":{let w=z.inclusive?">=":">",_=q(z.origin);if(_)return`數值過小：預期 ${z.origin} 應為 ${w}${z.minimum.toString()} ${_.unit}`;return`數值過小：預期 ${z.origin} 應為 ${w}${z.minimum.toString()}`}case"invalid_format":{let w=z;if(w.format==="starts_with")return`無效的字串：必須以 "${w.prefix}" 開頭`;if(w.format==="ends_with")return`無效的字串：必須以 "${w.suffix}" 結尾`;if(w.format==="includes")return`無效的字串：必須包含 "${w.includes}"`;if(w.format==="regex")return`無效的字串：必須符合格式 ${w.pattern}`;return`無效的 ${Y[w.format]??z.format}`}case"not_multiple_of":return`無效的數字：必須為 ${z.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${z.keys.length>1?"們":""}：${ZA(z.keys,"、")}`;case"invalid_key":return`${z.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${z.origin} 中有無效的值`;default:return"無效的輸入值"}}};var P5A=k(()=>{Z3()});var cH6={};m1(cH6,{zhTW:()=>up1,zhCN:()=>xp1,vi:()=>bp1,ur:()=>Ip1,ua:()=>hp1,tr:()=>Cp1,th:()=>Sp1,ta:()=>Rp1,sv:()=>yp1,sl:()=>Lp1,ru:()=>Ep1,pt:()=>kp1,ps:()=>Np1,pl:()=>vp1,ota:()=>Vp1,no:()=>Tp1,nl:()=>fp1,ms:()=>Gp1,mk:()=>Zp1,ko:()=>Wp1,kh:()=>Pp1,ja:()=>Xp1,it:()=>Dp1,id:()=>Mp1,hu:()=>Jp1,he:()=>jp1,frCA:()=>Hp1,fr:()=>Op1,fi:()=>$p1,fa:()=>_p1,es:()=>wp1,eo:()=>zp1,en:()=>nR6,de:()=>Kp1,cs:()=>qp1,ca:()=>Ap1,be:()=>eU1,az:()=>tU1,ar:()=>sU1});var i81=k(()=>{C3A();h3A();b3A();x3A();u3A();B3A();Yp1();m3A();g3A();F3A();Q3A();U3A();p3A();d3A();c3A();l3A();i3A();n3A();r3A();o3A();a3A();s3A();t3A();e3A();A5A();q5A();K5A();Y5A();w5A();_5A();$5A();O5A();H5A();j5A();J5A();M5A();D5A();X5A();P5A()});class rR6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(A,...q){let K=q[0];if(this._map.set(A,K),K&&typeof K==="object"&&"id"in K){if(this._idmap.has(K.id))throw Error(`ID ${K.id} already exists in the registry`);this._idmap.set(K.id,A)}return this}remove(A){return this._map.delete(A),this}get(A){let q=A._zod.parent;if(q){let K={...this.get(q)??{}};return delete K.id,{...K,...this._map.get(A)}}return this._map.get(A)}has(A){return this._map.has(A)}}function n81(){return new rR6}var Bp1,mp1,BB;var gp1=k(()=>{Bp1=Symbol("ZodOutput"),mp1=Symbol("ZodInput");BB=n81()});function Fp1(A,q){return new A({type:"string",...C7(q)})}function Qp1(A,q){return new A({type:"string",coerce:!0,...C7(q)})}function r81(A,q){return new A({type:"string",format:"email",check:"string_format",abort:!1,...C7(q)})}function oR6(A,q){return new A({type:"string",format:"guid",check:"string_format",abort:!1,...C7(q)})}function o81(A,q){return new A({type:"string",format:"uuid",check:"string_format",abort:!1,...C7(q)})}function a81(A,q){return new A({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C7(q)})}function s81(A,q){return new A({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C7(q)})}function t81(A,q){return new A({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C7(q)})}function e81(A,q){return new A({type:"string",format:"url",check:"string_format",abort:!1,...C7(q)})}function AA1(A,q){return new A({type:"string",format:"emoji",check:"string_format",abort:!1,...C7(q)})}function qA1(A,q){return new A({type:"string",format:"nanoid",check:"string_format",abort:!1,...C7(q)})}function KA1(A,q){return new A({type:"string",format:"cuid",check:"string_format",abort:!1,...C7(q)})}function YA1(A,q){return new A({type:"string",format:"cuid2",check:"string_format",abort:!1,...C7(q)})}function zA1(A,q){return new A({type:"string",format:"ulid",check:"string_format",abort:!1,...C7(q)})}function wA1(A,q){return new A({type:"string",format:"xid",check:"string_format",abort:!1,...C7(q)})}function _A1(A,q){return new A({type:"string",format:"ksuid",check:"string_format",abort:!1,...C7(q)})}function $A1(A,q){return new A({type:"string",format:"ipv4",check:"string_format",abort:!1,...C7(q)})}function OA1(A,q){return new A({type:"string",format:"ipv6",check:"string_format",abort:!1,...C7(q)})}function HA1(A,q){return new A({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C7(q)})}function jA1(A,q){return new A({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C7(q)})}function JA1(A,q){return new A({type:"string",format:"base64",check:"string_format",abort:!1,...C7(q)})}function MA1(A,q){return new A({type:"string",format:"base64url",check:"string_format",abort:!1,...C7(q)})}function DA1(A,q){return new A({type:"string",format:"e164",check:"string_format",abort:!1,...C7(q)})}function XA1(A,q){return new A({type:"string",format:"jwt",check:"string_format",abort:!1,...C7(q)})}function pp1(A,q){return new A({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C7(q)})}function dp1(A,q){return new A({type:"string",format:"date",check:"string_format",...C7(q)})}function cp1(A,q){return new A({type:"string",format:"time",check:"string_format",precision:null,...C7(q)})}function lp1(A,q){return new A({type:"string",format:"duration",check:"string_format",...C7(q)})}function ip1(A,q){return new A({type:"number",checks:[],...C7(q)})}function np1(A,q){return new A({type:"number",coerce:!0,checks:[],...C7(q)})}function rp1(A,q){return new A({type:"number",check:"number_format",abort:!1,format:"safeint",...C7(q)})}function op1(A,q){return new A({type:"number",check:"number_format",abort:!1,format:"float32",...C7(q)})}function ap1(A,q){return new A({type:"number",check:"number_format",abort:!1,format:"float64",...C7(q)})}function sp1(A,q){return new A({type:"number",check:"number_format",abort:!1,format:"int32",...C7(q)})}function tp1(A,q){return new A({type:"number",check:"number_format",abort:!1,format:"uint32",...C7(q)})}function ep1(A,q){return new A({type:"boolean",...C7(q)})}function Ad1(A,q){return new A({type:"boolean",coerce:!0,...C7(q)})}function qd1(A,q){return new A({type:"bigint",...C7(q)})}function Kd1(A,q){return new A({type:"bigint",coerce:!0,...C7(q)})}function Yd1(A,q){return new A({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C7(q)})}function zd1(A,q){return new A({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C7(q)})}function wd1(A,q){return new A({type:"symbol",...C7(q)})}function _d1(A,q){return new A({type:"undefined",...C7(q)})}function $d1(A,q){return new A({type:"null",...C7(q)})}function Od1(A){return new A({type:"any"})}function lH6(A){return new A({type:"unknown"})}function Hd1(A,q){return new A({type:"never",...C7(q)})}function jd1(A,q){return new A({type:"void",...C7(q)})}function Jd1(A,q){return new A({type:"date",...C7(q)})}function Md1(A,q){return new A({type:"date",coerce:!0,...C7(q)})}function Dd1(A,q){return new A({type:"nan",...C7(q)})}function up(A,q){return new m81({check:"less_than",...C7(q),value:A,inclusive:!1})}function by(A,q){return new m81({check:"less_than",...C7(q),value:A,inclusive:!0})}function Bp(A,q){return new g81({check:"greater_than",...C7(q),value:A,inclusive:!1})}function RV(A,q){return new g81({check:"greater_than",...C7(q),value:A,inclusive:!0})}function Xd1(A){return Bp(0,A)}function Pd1(A){return up(0,A)}function Wd1(A){return by(0,A)}function Zd1(A){return RV(0,A)}function r46(A,q){return new RQ1({check:"multiple_of",...C7(q),value:A})}function iH6(A,q){return new hQ1({check:"max_size",...C7(q),maximum:A})}function o46(A,q){return new IQ1({check:"min_size",...C7(q),minimum:A})}function aR6(A,q){return new bQ1({check:"size_equals",...C7(q),size:A})}function nH6(A,q){return new xQ1({check:"max_length",...C7(q),maximum:A})}function po(A,q){return new uQ1({check:"min_length",...C7(q),minimum:A})}function rH6(A,q){return new BQ1({check:"length_equals",...C7(q),length:A})}function sR6(A,q){return new mQ1({check:"string_format",format:"regex",...C7(q),pattern:A})}function tR6(A){return new gQ1({check:"string_format",format:"lowercase",...C7(A)})}function eR6(A){return new FQ1({check:"string_format",format:"uppercase",...C7(A)})}function AS6(A,q){return new QQ1({check:"string_format",format:"includes",...C7(q),includes:A})}function qS6(A,q){return new UQ1({check:"string_format",format:"starts_with",...C7(q),prefix:A})}function KS6(A,q){return new pQ1({check:"string_format",format:"ends_with",...C7(q),suffix:A})}function Gd1(A,q,K){return new dQ1({check:"property",property:A,schema:q,...C7(K)})}function YS6(A,q){return new cQ1({check:"mime_type",mime:A,...C7(q)})}function mp(A){return new lQ1({check:"overwrite",tx:A})}function zS6(A){return mp((q)=>q.normalize(A))}function wS6(){return mp((A)=>A.trim())}function _S6(){return mp((A)=>A.toLowerCase())}function $S6(){return mp((A)=>A.toUpperCase())}function OS6(A,q,K){return new A({type:"array",element:q,...C7(K)})}function mqK(A,q,K){return new A({type:"union",options:q,...C7(K)})}function gqK(A,q,K,Y){return new A({type:"union",options:K,discriminator:q,...C7(Y)})}function FqK(A,q,K){return new A({type:"intersection",left:q,right:K})}function fd1(A,q,K,Y){let z=K instanceof u3;return new A({type:"tuple",items:q,rest:z?K:null,...C7(z?Y:K)})}function QqK(A,q,K,Y){return new A({type:"record",keyType:q,valueType:K,...C7(Y)})}function UqK(A,q,K,Y){return new A({type:"map",keyType:q,valueType:K,...C7(Y)})}function pqK(A,q,K){return new A({type:"set",valueType:q,...C7(K)})}function dqK(A,q,K){let Y=Array.isArray(q)?Object.fromEntries(q.map((z)=>[z,z])):q;return new A({type:"enum",entries:Y,...C7(K)})}function cqK(A,q,K){return new A({type:"enum",entries:q,...C7(K)})}function lqK(A,q,K){return new A({type:"literal",values:Array.isArray(q)?q:[q],...C7(K)})}function Td1(A,q){return new A({type:"file",...C7(q)})}function iqK(A,q){return new A({type:"transform",transform:q})}function nqK(A,q){return new A({type:"optional",innerType:q})}function rqK(A,q){return new A({type:"nullable",innerType:q})}function oqK(A,q,K){return new A({type:"default",innerType:q,get defaultValue(){return typeof K==="function"?K():K}})}function aqK(A,q,K){return new A({type:"nonoptional",innerType:q,...C7(K)})}function sqK(A,q){return new A({type:"success",innerType:q})}function tqK(A,q,K){return new A({type:"catch",innerType:q,catchValue:typeof K==="function"?K:()=>K})}function eqK(A,q,K){return new A({type:"pipe",in:q,out:K})}function AKK(A,q){return new A({type:"readonly",innerType:q})}function qKK(A,q,K){return new A({type:"template_literal",parts:q,...C7(K)})}function KKK(A,q){return new A({type:"lazy",getter:q})}function YKK(A,q){return new A({type:"promise",innerType:q})}function Vd1(A,q,K){let Y=C7(K);return Y.abort??(Y.abort=!0),new A({type:"custom",check:"custom",fn:q,...Y})}function Nd1(A,q,K){return new A({type:"custom",check:"custom",fn:q,...C7(K)})}function vd1(A,q){let K=C7(q),Y=K.truthy??["true","1","yes","on","y","enabled"],z=K.falsy??["false","0","no","off","n","disabled"];if(K.case!=="sensitive")Y=Y.map((X)=>typeof X==="string"?X.toLowerCase():X),z=z.map((X)=>typeof X==="string"?X.toLowerCase():X);let w=new Set(Y),_=new Set(z),$=A.Pipe??lR6,O=A.Boolean??pR6,H=A.String??i46,J=new(A.Transform??cR6)({type:"transform",transform:(X,P)=>{let W=X;if(K.case!=="sensitive")W=W.toLowerCase();if(w.has(W))return!0;else if(_.has(W))return!1;else return P.issues.push({code:"invalid_value",expected:"stringbool",values:[...w,..._],input:P.value,inst:J}),{}},error:K.error}),M=new $({type:"pipe",in:new H({type:"string",error:K.error}),out:J,error:K.error});return new $({type:"pipe",in:M,out:new O({type:"boolean",error:K.error}),error:K.error})}function kd1(A,q,K,Y={}){let z=C7(Y),w={...C7(Y),check:"string_format",type:"string",format:q,fn:typeof K==="function"?K:($)=>K.test($),...z};if(K instanceof RegExp)w.pattern=K;return new A(w)}var Up1;var Ed1=k(()=>{F81();iR6();Z3();Up1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});class Ld1{constructor(A){this._def=A,this.def=A}implement(A){if(typeof A!=="function")throw Error("implement() must be called with a function");let q=(...K)=>{let Y=this._def.input?FR6(this._def.input,K,void 0,{callee:q}):K;if(!Array.isArray(Y))throw Error("Invalid arguments schema: not an array or tuple schema.");let z=A(...Y);return this._def.output?FR6(this._def.output,z,void 0,{callee:q}):z};return q}implementAsync(A){if(typeof A!=="function")throw Error("implement() must be called with a function");let q=async(...K)=>{let Y=this._def.input?await QR6(this._def.input,K,void 0,{callee:q}):K;if(!Array.isArray(Y))throw Error("Invalid arguments schema: not an array or tuple schema.");let z=await A(...Y);return this._def.output?QR6(this._def.output,z,void 0,{callee:q}):z};return q}input(...A){let q=this.constructor;if(Array.isArray(A[0]))return new q({type:"function",input:new n46({type:"tuple",items:A[0],rest:A[1]}),output:this._def.output});return new q({type:"function",input:A[0],output:this._def.output})}output(A){return new this.constructor({type:"function",input:this._def.input,output:A})}}function yd1(A){return new Ld1({type:"function",input:Array.isArray(A?.input)?fd1(n46,A?.input):A?.input??OS6(dR6,lH6(dH6)),output:A?.output??lH6(dH6)})}var W5A=k(()=>{Ed1();x81();iR6();iR6()});class PA1{constructor(A){this.counter=0,this.metadataRegistry=A?.metadata??BB,this.target=A?.target??"draft-2020-12",this.unrepresentable=A?.unrepresentable??"throw",this.override=A?.override??(()=>{}),this.io=A?.io??"output",this.seen=new Map}process(A,q={path:[],schemaPath:[]}){var K;let Y=A._zod.def,z={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},w=this.seen.get(A);if(w){if(w.count++,q.schemaPath.includes(A))w.cycle=q.path;return w.schema}let _={schema:{},count:1,cycle:void 0,path:q.path};this.seen.set(A,_);let $=A._zod.toJSONSchema?.();if($)_.schema=$;else{let j={...q,schemaPath:[...q.schemaPath,A],path:q.path},J=A._zod.parent;if(J)_.ref=J,this.process(J,j),this.seen.get(J).isParent=!0;else{let M=_.schema;switch(Y.type){case"string":{let D=M;D.type="string";let{minimum:X,maximum:P,format:W,patterns:Z,contentEncoding:G}=A._zod.bag;if(typeof X==="number")D.minLength=X;if(typeof P==="number")D.maxLength=P;if(W){if(D.format=z[W]??W,D.format==="")delete D.format}if(G)D.contentEncoding=G;if(Z&&Z.size>0){let f=[...Z];if(f.length===1)D.pattern=f[0].source;else if(f.length>1)_.schema.allOf=[...f.map((V)=>({...this.target==="draft-7"?{type:"string"}:{},pattern:V.source}))]}break}case"number":{let D=M,{minimum:X,maximum:P,format:W,multipleOf:Z,exclusiveMaximum:G,exclusiveMinimum:f}=A._zod.bag;if(typeof W==="string"&&W.includes("int"))D.type="integer";else D.type="number";if(typeof f==="number")D.exclusiveMinimum=f;if(typeof X==="number"){if(D.minimum=X,typeof f==="number")if(f>=X)delete D.minimum;else delete D.exclusiveMinimum}if(typeof G==="number")D.exclusiveMaximum=G;if(typeof P==="number"){if(D.maximum=P,typeof G==="number")if(G<=P)delete D.maximum;else delete D.exclusiveMaximum}if(typeof Z==="number")D.multipleOf=Z;break}case"boolean":{let D=M;D.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema");break}case"null":{M.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{M.not={};break}case"void":{if(this.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema");break}case"array":{let D=M,{minimum:X,maximum:P}=A._zod.bag;if(typeof X==="number")D.minItems=X;if(typeof P==="number")D.maxItems=P;D.type="array",D.items=this.process(Y.element,{...j,path:[...j.path,"items"]});break}case"object":{let D=M;D.type="object",D.properties={};let X=Y.shape;for(let Z in X)D.properties[Z]=this.process(X[Z],{...j,path:[...j.path,"properties",Z]});let P=new Set(Object.keys(X)),W=new Set([...P].filter((Z)=>{let G=Y.shape[Z]._zod;if(this.io==="input")return G.optin===void 0;else return G.optout===void 0}));if(W.size>0)D.required=Array.from(W);if(Y.catchall?._zod.def.type==="never")D.additionalProperties=!1;else if(!Y.catchall){if(this.io==="output")D.additionalProperties=!1}else if(Y.catchall)D.additionalProperties=this.process(Y.catchall,{...j,path:[...j.path,"additionalProperties"]});break}case"union":{let D=M;D.anyOf=Y.options.map((X,P)=>this.process(X,{...j,path:[...j.path,"anyOf",P]}));break}case"intersection":{let D=M,X=this.process(Y.left,{...j,path:[...j.path,"allOf",0]}),P=this.process(Y.right,{...j,path:[...j.path,"allOf",1]}),W=(G)=>("allOf"in G)&&Object.keys(G).length===1,Z=[...W(X)?X.allOf:[X],...W(P)?P.allOf:[P]];D.allOf=Z;break}case"tuple":{let D=M;D.type="array";let X=Y.items.map((Z,G)=>this.process(Z,{...j,path:[...j.path,"prefixItems",G]}));if(this.target==="draft-2020-12")D.prefixItems=X;else D.items=X;if(Y.rest){let Z=this.process(Y.rest,{...j,path:[...j.path,"items"]});if(this.target==="draft-2020-12")D.items=Z;else D.additionalItems=Z}if(Y.rest)D.items=this.process(Y.rest,{...j,path:[...j.path,"items"]});let{minimum:P,maximum:W}=A._zod.bag;if(typeof P==="number")D.minItems=P;if(typeof W==="number")D.maxItems=W;break}case"record":{let D=M;D.type="object",D.propertyNames=this.process(Y.keyType,{...j,path:[...j.path,"propertyNames"]}),D.additionalProperties=this.process(Y.valueType,{...j,path:[...j.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema");break}case"enum":{let D=M,X=CR6(Y.entries);if(X.every((P)=>typeof P==="number"))D.type="number";if(X.every((P)=>typeof P==="string"))D.type="string";D.enum=X;break}case"literal":{let D=M,X=[];for(let P of Y.values)if(P===void 0){if(this.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof P==="bigint")if(this.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else X.push(Number(P));else X.push(P);if(X.length===0);else if(X.length===1){let P=X[0];D.type=P===null?"null":typeof P,D.const=P}else{if(X.every((P)=>typeof P==="number"))D.type="number";if(X.every((P)=>typeof P==="string"))D.type="string";if(X.every((P)=>typeof P==="boolean"))D.type="string";if(X.every((P)=>P===null))D.type="null";D.enum=X}break}case"file":{let D=M,X={type:"string",format:"binary",contentEncoding:"binary"},{minimum:P,maximum:W,mime:Z}=A._zod.bag;if(P!==void 0)X.minLength=P;if(W!==void 0)X.maxLength=W;if(Z)if(Z.length===1)X.contentMediaType=Z[0],Object.assign(D,X);else D.anyOf=Z.map((G)=>{return{...X,contentMediaType:G}});else Object.assign(D,X);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let D=this.process(Y.innerType,j);M.anyOf=[D,{type:"null"}];break}case"nonoptional":{this.process(Y.innerType,j),_.ref=Y.innerType;break}case"success":{let D=M;D.type="boolean";break}case"default":{this.process(Y.innerType,j),_.ref=Y.innerType,M.default=JSON.parse(JSON.stringify(Y.defaultValue));break}case"prefault":{if(this.process(Y.innerType,j),_.ref=Y.innerType,this.io==="input")M._prefault=JSON.parse(JSON.stringify(Y.defaultValue));break}case"catch":{this.process(Y.innerType,j),_.ref=Y.innerType;let D;try{D=Y.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}M.default=D;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let D=M,X=A._zod.pattern;if(!X)throw Error("Pattern not found in template literal");D.type="string",D.pattern=X.source;break}case"pipe":{let D=this.io==="input"?Y.in._zod.def.type==="transform"?Y.out:Y.in:Y.out;this.process(D,j),_.ref=D;break}case"readonly":{this.process(Y.innerType,j),_.ref=Y.innerType,M.readOnly=!0;break}case"promise":{this.process(Y.innerType,j),_.ref=Y.innerType;break}case"optional":{this.process(Y.innerType,j),_.ref=Y.innerType;break}case"lazy":{let D=A._zod.innerType;this.process(D,j),_.ref=D;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let O=this.metadataRegistry.get(A);if(O)Object.assign(_.schema,O);if(this.io==="input"&&hD(A))delete _.schema.examples,delete _.schema.default;if(this.io==="input"&&_.schema._prefault)(K=_.schema).default??(K.default=_.schema._prefault);return delete _.schema._prefault,this.seen.get(A).schema}emit(A,q){let K={cycles:q?.cycles??"ref",reused:q?.reused??"inline",external:q?.external??void 0},Y=this.seen.get(A);if(!Y)throw Error("Unprocessed schema. This is a bug in Zod.");let z=(H)=>{let j=this.target==="draft-2020-12"?"$defs":"definitions";if(K.external){let X=K.external.registry.get(H[0])?.id;if(X)return{ref:K.external.uri(X)};let P=H[1].defId??H[1].schema.id??`schema${this.counter++}`;return H[1].defId=P,{defId:P,ref:`${K.external.uri("__shared")}#/${j}/${P}`}}if(H[1]===Y)return{ref:"#"};let M=`${"#"}/${j}/`,D=H[1].schema.id??`__schema${this.counter++}`;return{defId:D,ref:M+D}},w=(H)=>{if(H[1].schema.$ref)return;let j=H[1],{ref:J,defId:M}=z(H);if(j.def={...j.schema},M)j.defId=M;let D=j.schema;for(let X in D)delete D[X];D.$ref=J};for(let H of this.seen.entries()){let j=H[1];if(A===H[0]){w(H);continue}if(K.external){let M=K.external.registry.get(H[0])?.id;if(A!==H[0]&&M){w(H);continue}}if(this.metadataRegistry.get(H[0])?.id){w(H);continue}if(j.cycle){if(K.cycles==="throw")throw Error(`Cycle detected: #/${j.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);else if(K.cycles==="ref")w(H);continue}if(j.count>1){if(K.reused==="ref"){w(H);continue}}}let _=(H,j)=>{let J=this.seen.get(H),M=J.def??J.schema,D={...M};if(J.ref===null)return;let X=J.ref;if(J.ref=null,X){_(X,j);let P=this.seen.get(X).schema;if(P.$ref&&j.target==="draft-7")M.allOf=M.allOf??[],M.allOf.push(P);else Object.assign(M,P),Object.assign(M,D)}if(!J.isParent)this.override({zodSchema:H,jsonSchema:M,path:J.path??[]})};for(let H of[...this.seen.entries()].reverse())_(H[0],{target:this.target});let $={};if(this.target==="draft-2020-12")$.$schema="https://json-schema.org/draft/2020-12/schema";else if(this.target==="draft-7")$.$schema="http://json-schema.org/draft-07/schema#";else console.warn(`Invalid target: ${this.target}`);Object.assign($,Y.def);let O=K.external?.defs??{};for(let H of this.seen.entries()){let j=H[1];if(j.def&&j.defId)O[j.defId]=j.def}if(!K.external&&Object.keys(O).length>0)if(this.target==="draft-2020-12")$.$defs=O;else $.definitions=O;try{return JSON.parse(JSON.stringify($))}catch(H){throw Error("Error converting schema to JSON.")}}}function gp(A,q){if(A instanceof rR6){let Y=new PA1(q),z={};for(let $ of A._idmap.entries()){let[O,H]=$;Y.process(H)}let w={},_={registry:A,uri:q?.uri||(($)=>$),defs:z};for(let $ of A._idmap.entries()){let[O,H]=$;w[O]=Y.emit(H,{...q,external:_})}if(Object.keys(z).length>0){let $=Y.target==="draft-2020-12"?"$defs":"definitions";w.__shared={[$]:z}}return{schemas:w}}let K=new PA1(q);return K.process(A),K.emit(A,q)}function hD(A,q){let K=q??{seen:new Set};if(K.seen.has(A))return!1;K.seen.add(A);let z=A._zod.def;switch(z.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return hD(z.element,K);case"object":{for(let w in z.shape)if(hD(z.shape[w],K))return!0;return!1}case"union":{for(let w of z.options)if(hD(w,K))return!0;return!1}case"intersection":return hD(z.left,K)||hD(z.right,K);case"tuple":{for(let w of z.items)if(hD(w,K))return!0;if(z.rest&&hD(z.rest,K))return!0;return!1}case"record":return hD(z.keyType,K)||hD(z.valueType,K);case"map":return hD(z.keyType,K)||hD(z.valueType,K);case"set":return hD(z.valueType,K);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return hD(z.innerType,K);case"lazy":return hD(z.getter(),K);case"default":return hD(z.innerType,K);case"prefault":return hD(z.innerType,K);case"custom":return!1;case"transform":return!0;case"pipe":return hD(z.in,K)||hD(z.out,K);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${z.type}`)}var Z5A=k(()=>{gp1();Z3()});var G5A={};var f5A=()=>{};var mB={};m1(mB,{version:()=>iQ1,util:()=>n7,treeifyError:()=>aF1,toJSONSchema:()=>gp,toDotPath:()=>j3A,safeParseAsync:()=>UR6,safeParse:()=>UH6,registry:()=>n81,regexes:()=>l46,prettifyError:()=>sF1,parseAsync:()=>QR6,parse:()=>FR6,locales:()=>cH6,isValidJWT:()=>R3A,isValidBase64URL:()=>y3A,isValidBase64:()=>XU1,globalRegistry:()=>BB,globalConfig:()=>yR6,function:()=>yd1,formatError:()=>gR6,flattenError:()=>mR6,config:()=>jM,clone:()=>Rk,_xid:()=>wA1,_void:()=>jd1,_uuidv7:()=>t81,_uuidv6:()=>s81,_uuidv4:()=>a81,_uuid:()=>o81,_url:()=>e81,_uppercase:()=>eR6,_unknown:()=>lH6,_union:()=>mqK,_undefined:()=>_d1,_ulid:()=>zA1,_uint64:()=>zd1,_uint32:()=>tp1,_tuple:()=>fd1,_trim:()=>wS6,_transform:()=>iqK,_toUpperCase:()=>$S6,_toLowerCase:()=>_S6,_templateLiteral:()=>qKK,_symbol:()=>wd1,_success:()=>sqK,_stringbool:()=>vd1,_stringFormat:()=>kd1,_string:()=>Fp1,_startsWith:()=>qS6,_size:()=>aR6,_set:()=>pqK,_safeParseAsync:()=>b81,_safeParse:()=>I81,_regex:()=>sR6,_refine:()=>Nd1,_record:()=>QqK,_readonly:()=>AKK,_property:()=>Gd1,_promise:()=>YKK,_positive:()=>Xd1,_pipe:()=>eqK,_parseAsync:()=>h81,_parse:()=>C81,_overwrite:()=>mp,_optional:()=>nqK,_number:()=>ip1,_nullable:()=>rqK,_null:()=>$d1,_normalize:()=>zS6,_nonpositive:()=>Wd1,_nonoptional:()=>aqK,_nonnegative:()=>Zd1,_never:()=>Hd1,_negative:()=>Pd1,_nativeEnum:()=>cqK,_nanoid:()=>qA1,_nan:()=>Dd1,_multipleOf:()=>r46,_minSize:()=>o46,_minLength:()=>po,_min:()=>RV,_mime:()=>YS6,_maxSize:()=>iH6,_maxLength:()=>nH6,_max:()=>by,_map:()=>UqK,_lte:()=>by,_lt:()=>up,_lowercase:()=>tR6,_literal:()=>lqK,_length:()=>rH6,_lazy:()=>KKK,_ksuid:()=>_A1,_jwt:()=>XA1,_isoTime:()=>cp1,_isoDuration:()=>lp1,_isoDateTime:()=>pp1,_isoDate:()=>dp1,_ipv6:()=>OA1,_ipv4:()=>$A1,_intersection:()=>FqK,_int64:()=>Yd1,_int32:()=>sp1,_int:()=>rp1,_includes:()=>AS6,_guid:()=>oR6,_gte:()=>RV,_gt:()=>Bp,_float64:()=>ap1,_float32:()=>op1,_file:()=>Td1,_enum:()=>dqK,_endsWith:()=>KS6,_emoji:()=>AA1,_email:()=>r81,_e164:()=>DA1,_discriminatedUnion:()=>gqK,_default:()=>oqK,_date:()=>Jd1,_custom:()=>Vd1,_cuid2:()=>YA1,_cuid:()=>KA1,_coercedString:()=>Qp1,_coercedNumber:()=>np1,_coercedDate:()=>Md1,_coercedBoolean:()=>Ad1,_coercedBigint:()=>Kd1,_cidrv6:()=>jA1,_cidrv4:()=>HA1,_catch:()=>tqK,_boolean:()=>ep1,_bigint:()=>qd1,_base64url:()=>MA1,_base64:()=>JA1,_array:()=>OS6,_any:()=>Od1,TimePrecision:()=>Up1,NEVER:()=>RR6,JSONSchemaGenerator:()=>PA1,JSONSchema:()=>G5A,Doc:()=>Q81,$output:()=>Bp1,$input:()=>mp1,$constructor:()=>v8,$brand:()=>FF1,$ZodXID:()=>zU1,$ZodVoid:()=>yU1,$ZodUnknown:()=>dH6,$ZodUnion:()=>l81,$ZodUndefined:()=>vU1,$ZodUUID:()=>aQ1,$ZodURL:()=>tQ1,$ZodULID:()=>YU1,$ZodType:()=>u3,$ZodTuple:()=>n46,$ZodTransform:()=>cR6,$ZodTemplateLiteral:()=>nU1,$ZodSymbol:()=>NU1,$ZodSuccess:()=>dU1,$ZodStringFormat:()=>D_,$ZodString:()=>i46,$ZodSet:()=>xU1,$ZodRegistry:()=>rR6,$ZodRecord:()=>IU1,$ZodRealError:()=>QH6,$ZodReadonly:()=>iU1,$ZodPromise:()=>rU1,$ZodPrefault:()=>UU1,$ZodPipe:()=>lR6,$ZodOptional:()=>gU1,$ZodObject:()=>SU1,$ZodNumberFormat:()=>TU1,$ZodNumber:()=>d81,$ZodNullable:()=>FU1,$ZodNull:()=>kU1,$ZodNonOptional:()=>pU1,$ZodNever:()=>LU1,$ZodNanoID:()=>AU1,$ZodNaN:()=>lU1,$ZodMap:()=>bU1,$ZodLiteral:()=>BU1,$ZodLazy:()=>oU1,$ZodKSUID:()=>wU1,$ZodJWT:()=>GU1,$ZodIntersection:()=>hU1,$ZodISOTime:()=>OU1,$ZodISODuration:()=>HU1,$ZodISODateTime:()=>_U1,$ZodISODate:()=>$U1,$ZodIPv6:()=>JU1,$ZodIPv4:()=>jU1,$ZodGUID:()=>oQ1,$ZodFunction:()=>Ld1,$ZodFile:()=>mU1,$ZodError:()=>BR6,$ZodEnum:()=>uU1,$ZodEmoji:()=>eQ1,$ZodEmail:()=>sQ1,$ZodE164:()=>ZU1,$ZodDiscriminatedUnion:()=>CU1,$ZodDefault:()=>QU1,$ZodDate:()=>RU1,$ZodCustomStringFormat:()=>fU1,$ZodCustom:()=>aU1,$ZodCheckUpperCase:()=>FQ1,$ZodCheckStringFormat:()=>pH6,$ZodCheckStartsWith:()=>UQ1,$ZodCheckSizeEquals:()=>bQ1,$ZodCheckRegex:()=>mQ1,$ZodCheckProperty:()=>dQ1,$ZodCheckOverwrite:()=>lQ1,$ZodCheckNumberFormat:()=>SQ1,$ZodCheckMultipleOf:()=>RQ1,$ZodCheckMinSize:()=>IQ1,$ZodCheckMinLength:()=>uQ1,$ZodCheckMimeType:()=>cQ1,$ZodCheckMaxSize:()=>hQ1,$ZodCheckMaxLength:()=>xQ1,$ZodCheckLowerCase:()=>gQ1,$ZodCheckLessThan:()=>m81,$ZodCheckLengthEquals:()=>BQ1,$ZodCheckIncludes:()=>QQ1,$ZodCheckGreaterThan:()=>g81,$ZodCheckEndsWith:()=>pQ1,$ZodCheckBigIntFormat:()=>CQ1,$ZodCheck:()=>RH,$ZodCatch:()=>cU1,$ZodCUID2:()=>KU1,$ZodCUID:()=>qU1,$ZodCIDRv6:()=>DU1,$ZodCIDRv4:()=>MU1,$ZodBoolean:()=>pR6,$ZodBigIntFormat:()=>VU1,$ZodBigInt:()=>c81,$ZodBase64URL:()=>WU1,$ZodBase64:()=>PU1,$ZodAsyncError:()=>bp,$ZodArray:()=>dR6,$ZodAny:()=>EU1});var ff=k(()=>{Z3();B81();i81();f5A();mH6();x81();tF1();iR6();F81();nQ1();gp1();W5A();Ed1();Z5A()});var Rd1=k(()=>{ff()});var oH6={};m1(oH6,{time:()=>hd1,duration:()=>Id1,datetime:()=>Sd1,date:()=>Cd1,ZodISOTime:()=>GA1,ZodISODuration:()=>fA1,ZodISODateTime:()=>WA1,ZodISODate:()=>ZA1});function Sd1(A){return pp1(WA1,A)}function Cd1(A){return dp1(ZA1,A)}function hd1(A){return cp1(GA1,A)}function Id1(A){return lp1(fA1,A)}var WA1,ZA1,GA1,fA1;var TA1=k(()=>{ff();VA1();WA1=v8("ZodISODateTime",(A,q)=>{_U1.init(A,q),Y$.init(A,q)});ZA1=v8("ZodISODate",(A,q)=>{$U1.init(A,q),Y$.init(A,q)});GA1=v8("ZodISOTime",(A,q)=>{OU1.init(A,q),Y$.init(A,q)});fA1=v8("ZodISODuration",(A,q)=>{HU1.init(A,q),Y$.init(A,q)})});var V5A=(A,q)=>{BR6.init(A,q),A.name="ZodError",Object.defineProperties(A,{format:{value:(K)=>gR6(A,K)},flatten:{value:(K)=>mR6(A,K)},addIssue:{value:(K)=>A.issues.push(K)},addIssues:{value:(K)=>A.issues.push(...K)},isEmpty:{get(){return A.issues.length===0}}})},wKK,aH6;var bd1=k(()=>{ff();ff();wKK=v8("ZodError",V5A),aH6=v8("ZodError",V5A,{Parent:Error})});var xd1,ud1,Bd1,md1;var gd1=k(()=>{ff();bd1();xd1=C81(aH6),ud1=h81(aH6),Bd1=I81(aH6),md1=b81(aH6)});function n1(A){return Fp1(jS6,A)}function $KK(A){return r81(Ud1,A)}function OKK(A){return oR6(NA1,A)}function HKK(A){return o81(Fp,A)}function jKK(A){return a81(Fp,A)}function JKK(A){return s81(Fp,A)}function MKK(A){return t81(Fp,A)}function dd1(A){return e81(pd1,A)}function DKK(A){return AA1(cd1,A)}function XKK(A){return qA1(ld1,A)}function PKK(A){return KA1(id1,A)}function WKK(A){return YA1(nd1,A)}function ZKK(A){return zA1(rd1,A)}function GKK(A){return wA1(od1,A)}function fKK(A){return _A1(ad1,A)}function TKK(A){return $A1(sd1,A)}function VKK(A){return OA1(td1,A)}function NKK(A){return HA1(ed1,A)}function vKK(A){return jA1(Ac1,A)}function kKK(A){return JA1(qc1,A)}function EKK(A){return MA1(Kc1,A)}function LKK(A){return DA1(Yc1,A)}function yKK(A){return XA1(zc1,A)}function RKK(A,q,K={}){return kd1(N5A,A,q,K)}function tY(A){return ip1(JS6,A)}function Fd1(A){return rp1(sH6,A)}function SKK(A){return op1(sH6,A)}function CKK(A){return ap1(sH6,A)}function hKK(A){return sp1(sH6,A)}function IKK(A){return tp1(sH6,A)}function O2(A){return ep1(MS6,A)}function bKK(A){return qd1(DS6,A)}function xKK(A){return Yd1(wc1,A)}function uKK(A){return zd1(wc1,A)}function BKK(A){return wd1(v5A,A)}function mKK(A){return _d1(k5A,A)}function XS6(A){return $d1(E5A,A)}function _c1(){return Od1(L5A)}function c$(){return lH6(y5A)}function EA1(A){return Hd1(R5A,A)}function gKK(A){return jd1(S5A,A)}function FKK(A){return Jd1(LA1,A)}function r7(A,q){return OS6(C5A,A,q)}function QKK(A){let q=A._zod.def.shape;return Gq(Object.keys(q))}function Y4(A,q){let K={type:"object",get shape(){return n7.assignProp(this,"shape",{...A}),this.shape},...n7.normalizeParams(q)};return new yA1(K)}function UKK(A,q){return new yA1({type:"object",get shape(){return n7.assignProp(this,"shape",{...A}),this.shape},catchall:EA1(),...n7.normalizeParams(q)})}function JM(A,q){return new yA1({type:"object",get shape(){return n7.assignProp(this,"shape",{...A}),this.shape},catchall:c$(),...n7.normalizeParams(q)})}function H2(A,q){return new $c1({type:"union",options:A,...n7.normalizeParams(q)})}function RA1(A,q,K){return new h5A({type:"union",options:q,discriminator:A,...n7.normalizeParams(K)})}function PS6(A,q){return new I5A({type:"intersection",left:A,right:q})}function pKK(A,q,K){let Y=q instanceof u3,z=Y?K:q;return new b5A({type:"tuple",items:A,rest:Y?q:null,...n7.normalizeParams(z)})}function z$(A,q,K){return new Oc1({type:"record",keyType:A,valueType:q,...n7.normalizeParams(K)})}function dKK(A,q,K){return new Oc1({type:"record",keyType:H2([A,EA1()]),valueType:q,...n7.normalizeParams(K)})}function cKK(A,q,K){return new x5A({type:"map",keyType:A,valueType:q,...n7.normalizeParams(K)})}function lKK(A,q){return new u5A({type:"set",valueType:A,...n7.normalizeParams(q)})}function Tf(A,q){let K=Array.isArray(A)?Object.fromEntries(A.map((Y)=>[Y,Y])):A;return new HS6({type:"enum",entries:K,...n7.normalizeParams(q)})}function iKK(A,q){return new HS6({type:"enum",entries:A,...n7.normalizeParams(q)})}function Gq(A,q){return new B5A({type:"literal",values:Array.isArray(A)?A:[A],...n7.normalizeParams(q)})}function nKK(A){return Td1(m5A,A)}function jc1(A){return new Hc1({type:"transform",transform:A})}function l$(A){return new Jc1({type:"optional",innerType:A})}function vA1(A){return new g5A({type:"nullable",innerType:A})}function rKK(A){return l$(vA1(A))}function Q5A(A,q){return new F5A({type:"default",innerType:A,get defaultValue(){return typeof q==="function"?q():q}})}function p5A(A,q){return new U5A({type:"prefault",innerType:A,get defaultValue(){return typeof q==="function"?q():q}})}function d5A(A,q){return new Mc1({type:"nonoptional",innerType:A,...n7.normalizeParams(q)})}function oKK(A){return new c5A({type:"success",innerType:A})}function i5A(A,q){return new l5A({type:"catch",innerType:A,catchValue:typeof q==="function"?q:()=>q})}function aKK(A){return Dd1(n5A,A)}function kA1(A,q){return new Dc1({type:"pipe",in:A,out:q})}function o5A(A){return new r5A({type:"readonly",innerType:A})}function sKK(A,q){return new a5A({type:"template_literal",parts:A,...n7.normalizeParams(q)})}function t5A(A){return new s5A({type:"lazy",getter:A})}function tKK(A){return new e5A({type:"promise",innerType:A})}function A9A(A,q){let K=new RH({check:"custom",...n7.normalizeParams(q)});return K._zod.check=A,K}function Xc1(A,q){return Vd1(SA1,A??(()=>!0),q)}function q9A(A,q={}){return Nd1(SA1,A,q)}function K9A(A,q){let K=A9A((Y)=>{return Y.addIssue=(z)=>{if(typeof z==="string")Y.issues.push(n7.issue(z,Y.value,K._zod.def));else{let w=z;if(w.fatal)w.continue=!1;w.code??(w.code="custom"),w.input??(w.input=Y.value),w.inst??(w.inst=K),w.continue??(w.continue=!K._zod.def.abort),Y.issues.push(n7.issue(w))}},A(Y.value,Y)},q);return K}function eKK(A,q={error:`Input not instance of ${A.name}`}){let K=new SA1({type:"custom",check:"custom",fn:(Y)=>Y instanceof A,abort:!0,...n7.normalizeParams(q)});return K._zod.bag.Class=A,K}function q3K(A){let q=t5A(()=>{return H2([n1(A),tY(),O2(),XS6(),r7(q),z$(n1(),q)])});return q}function CA1(A,q){return kA1(jc1(A),q)}var P9,Qd1,jS6,Y$,Ud1,NA1,Fp,pd1,cd1,ld1,id1,nd1,rd1,od1,ad1,sd1,td1,ed1,Ac1,qc1,Kc1,Yc1,zc1,N5A,JS6,sH6,MS6,DS6,wc1,v5A,k5A,E5A,L5A,y5A,R5A,S5A,LA1,C5A,yA1,$c1,h5A,I5A,b5A,Oc1,x5A,u5A,HS6,B5A,m5A,Hc1,Jc1,g5A,F5A,U5A,Mc1,c5A,l5A,n5A,Dc1,r5A,a5A,s5A,e5A,SA1,A3K=(...A)=>vd1({Pipe:Dc1,Boolean:MS6,String:jS6,Transform:Hc1},...A);var VA1=k(()=>{ff();ff();Rd1();TA1();gd1();P9=v8("ZodType",(A,q)=>{return u3.init(A,q),A.def=q,Object.defineProperty(A,"_def",{value:q}),A.check=(...K)=>{return A.clone({...q,checks:[...q.checks??[],...K.map((Y)=>typeof Y==="function"?{_zod:{check:Y,def:{check:"custom"},onattach:[]}}:Y)]})},A.clone=(K,Y)=>Rk(A,K,Y),A.brand=()=>A,A.register=(K,Y)=>{return K.add(A,Y),A},A.parse=(K,Y)=>xd1(A,K,Y,{callee:A.parse}),A.safeParse=(K,Y)=>Bd1(A,K,Y),A.parseAsync=async(K,Y)=>ud1(A,K,Y,{callee:A.parseAsync}),A.safeParseAsync=async(K,Y)=>md1(A,K,Y),A.spa=A.safeParseAsync,A.refine=(K,Y)=>A.check(q9A(K,Y)),A.superRefine=(K)=>A.check(K9A(K)),A.overwrite=(K)=>A.check(mp(K)),A.optional=()=>l$(A),A.nullable=()=>vA1(A),A.nullish=()=>l$(vA1(A)),A.nonoptional=(K)=>d5A(A,K),A.array=()=>r7(A),A.or=(K)=>H2([A,K]),A.and=(K)=>PS6(A,K),A.transform=(K)=>kA1(A,jc1(K)),A.default=(K)=>Q5A(A,K),A.prefault=(K)=>p5A(A,K),A.catch=(K)=>i5A(A,K),A.pipe=(K)=>kA1(A,K),A.readonly=()=>o5A(A),A.describe=(K)=>{let Y=A.clone();return BB.add(Y,{description:K}),Y},Object.defineProperty(A,"description",{get(){return BB.get(A)?.description},configurable:!0}),A.meta=(...K)=>{if(K.length===0)return BB.get(A);let Y=A.clone();return BB.add(Y,K[0]),Y},A.isOptional=()=>A.safeParse(void 0).success,A.isNullable=()=>A.safeParse(null).success,A}),Qd1=v8("_ZodString",(A,q)=>{i46.init(A,q),P9.init(A,q);let K=A._zod.bag;A.format=K.format??null,A.minLength=K.minimum??null,A.maxLength=K.maximum??null,A.regex=(...Y)=>A.check(sR6(...Y)),A.includes=(...Y)=>A.check(AS6(...Y)),A.startsWith=(...Y)=>A.check(qS6(...Y)),A.endsWith=(...Y)=>A.check(KS6(...Y)),A.min=(...Y)=>A.check(po(...Y)),A.max=(...Y)=>A.check(nH6(...Y)),A.length=(...Y)=>A.check(rH6(...Y)),A.nonempty=(...Y)=>A.check(po(1,...Y)),A.lowercase=(Y)=>A.check(tR6(Y)),A.uppercase=(Y)=>A.check(eR6(Y)),A.trim=()=>A.check(wS6()),A.normalize=(...Y)=>A.check(zS6(...Y)),A.toLowerCase=()=>A.check(_S6()),A.toUpperCase=()=>A.check($S6())}),jS6=v8("ZodString",(A,q)=>{i46.init(A,q),Qd1.init(A,q),A.email=(K)=>A.check(r81(Ud1,K)),A.url=(K)=>A.check(e81(pd1,K)),A.jwt=(K)=>A.check(XA1(zc1,K)),A.emoji=(K)=>A.check(AA1(cd1,K)),A.guid=(K)=>A.check(oR6(NA1,K)),A.uuid=(K)=>A.check(o81(Fp,K)),A.uuidv4=(K)=>A.check(a81(Fp,K)),A.uuidv6=(K)=>A.check(s81(Fp,K)),A.uuidv7=(K)=>A.check(t81(Fp,K)),A.nanoid=(K)=>A.check(qA1(ld1,K)),A.guid=(K)=>A.check(oR6(NA1,K)),A.cuid=(K)=>A.check(KA1(id1,K)),A.cuid2=(K)=>A.check(YA1(nd1,K)),A.ulid=(K)=>A.check(zA1(rd1,K)),A.base64=(K)=>A.check(JA1(qc1,K)),A.base64url=(K)=>A.check(MA1(Kc1,K)),A.xid=(K)=>A.check(wA1(od1,K)),A.ksuid=(K)=>A.check(_A1(ad1,K)),A.ipv4=(K)=>A.check($A1(sd1,K)),A.ipv6=(K)=>A.check(OA1(td1,K)),A.cidrv4=(K)=>A.check(HA1(ed1,K)),A.cidrv6=(K)=>A.check(jA1(Ac1,K)),A.e164=(K)=>A.check(DA1(Yc1,K)),A.datetime=(K)=>A.check(Sd1(K)),A.date=(K)=>A.check(Cd1(K)),A.time=(K)=>A.check(hd1(K)),A.duration=(K)=>A.check(Id1(K))});Y$=v8("ZodStringFormat",(A,q)=>{D_.init(A,q),Qd1.init(A,q)}),Ud1=v8("ZodEmail",(A,q)=>{sQ1.init(A,q),Y$.init(A,q)});NA1=v8("ZodGUID",(A,q)=>{oQ1.init(A,q),Y$.init(A,q)});Fp=v8("ZodUUID",(A,q)=>{aQ1.init(A,q),Y$.init(A,q)});pd1=v8("ZodURL",(A,q)=>{tQ1.init(A,q),Y$.init(A,q)});cd1=v8("ZodEmoji",(A,q)=>{eQ1.init(A,q),Y$.init(A,q)});ld1=v8("ZodNanoID",(A,q)=>{AU1.init(A,q),Y$.init(A,q)});id1=v8("ZodCUID",(A,q)=>{qU1.init(A,q),Y$.init(A,q)});nd1=v8("ZodCUID2",(A,q)=>{KU1.init(A,q),Y$.init(A,q)});rd1=v8("ZodULID",(A,q)=>{YU1.init(A,q),Y$.init(A,q)});od1=v8("ZodXID",(A,q)=>{zU1.init(A,q),Y$.init(A,q)});ad1=v8("ZodKSUID",(A,q)=>{wU1.init(A,q),Y$.init(A,q)});sd1=v8("ZodIPv4",(A,q)=>{jU1.init(A,q),Y$.init(A,q)});td1=v8("ZodIPv6",(A,q)=>{JU1.init(A,q),Y$.init(A,q)});ed1=v8("ZodCIDRv4",(A,q)=>{MU1.init(A,q),Y$.init(A,q)});Ac1=v8("ZodCIDRv6",(A,q)=>{DU1.init(A,q),Y$.init(A,q)});qc1=v8("ZodBase64",(A,q)=>{PU1.init(A,q),Y$.init(A,q)});Kc1=v8("ZodBase64URL",(A,q)=>{WU1.init(A,q),Y$.init(A,q)});Yc1=v8("ZodE164",(A,q)=>{ZU1.init(A,q),Y$.init(A,q)});zc1=v8("ZodJWT",(A,q)=>{GU1.init(A,q),Y$.init(A,q)});N5A=v8("ZodCustomStringFormat",(A,q)=>{fU1.init(A,q),Y$.init(A,q)});JS6=v8("ZodNumber",(A,q)=>{d81.init(A,q),P9.init(A,q),A.gt=(Y,z)=>A.check(Bp(Y,z)),A.gte=(Y,z)=>A.check(RV(Y,z)),A.min=(Y,z)=>A.check(RV(Y,z)),A.lt=(Y,z)=>A.check(up(Y,z)),A.lte=(Y,z)=>A.check(by(Y,z)),A.max=(Y,z)=>A.check(by(Y,z)),A.int=(Y)=>A.check(Fd1(Y)),A.safe=(Y)=>A.check(Fd1(Y)),A.positive=(Y)=>A.check(Bp(0,Y)),A.nonnegative=(Y)=>A.check(RV(0,Y)),A.negative=(Y)=>A.check(up(0,Y)),A.nonpositive=(Y)=>A.check(by(0,Y)),A.multipleOf=(Y,z)=>A.check(r46(Y,z)),A.step=(Y,z)=>A.check(r46(Y,z)),A.finite=()=>A;let K=A._zod.bag;A.minValue=Math.max(K.minimum??Number.NEGATIVE_INFINITY,K.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,A.maxValue=Math.min(K.maximum??Number.POSITIVE_INFINITY,K.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,A.isInt=(K.format??"").includes("int")||Number.isSafeInteger(K.multipleOf??0.5),A.isFinite=!0,A.format=K.format??null});sH6=v8("ZodNumberFormat",(A,q)=>{TU1.init(A,q),JS6.init(A,q)});MS6=v8("ZodBoolean",(A,q)=>{pR6.init(A,q),P9.init(A,q)});DS6=v8("ZodBigInt",(A,q)=>{c81.init(A,q),P9.init(A,q),A.gte=(Y,z)=>A.check(RV(Y,z)),A.min=(Y,z)=>A.check(RV(Y,z)),A.gt=(Y,z)=>A.check(Bp(Y,z)),A.gte=(Y,z)=>A.check(RV(Y,z)),A.min=(Y,z)=>A.check(RV(Y,z)),A.lt=(Y,z)=>A.check(up(Y,z)),A.lte=(Y,z)=>A.check(by(Y,z)),A.max=(Y,z)=>A.check(by(Y,z)),A.positive=(Y)=>A.check(Bp(BigInt(0),Y)),A.negative=(Y)=>A.check(up(BigInt(0),Y)),A.nonpositive=(Y)=>A.check(by(BigInt(0),Y)),A.nonnegative=(Y)=>A.check(RV(BigInt(0),Y)),A.multipleOf=(Y,z)=>A.check(r46(Y,z));let K=A._zod.bag;A.minValue=K.minimum??null,A.maxValue=K.maximum??null,A.format=K.format??null});wc1=v8("ZodBigIntFormat",(A,q)=>{VU1.init(A,q),DS6.init(A,q)});v5A=v8("ZodSymbol",(A,q)=>{NU1.init(A,q),P9.init(A,q)});k5A=v8("ZodUndefined",(A,q)=>{vU1.init(A,q),P9.init(A,q)});E5A=v8("ZodNull",(A,q)=>{kU1.init(A,q),P9.init(A,q)});L5A=v8("ZodAny",(A,q)=>{EU1.init(A,q),P9.init(A,q)});y5A=v8("ZodUnknown",(A,q)=>{dH6.init(A,q),P9.init(A,q)});R5A=v8("ZodNever",(A,q)=>{LU1.init(A,q),P9.init(A,q)});S5A=v8("ZodVoid",(A,q)=>{yU1.init(A,q),P9.init(A,q)});LA1=v8("ZodDate",(A,q)=>{RU1.init(A,q),P9.init(A,q),A.min=(Y,z)=>A.check(RV(Y,z)),A.max=(Y,z)=>A.check(by(Y,z));let K=A._zod.bag;A.minDate=K.minimum?new Date(K.minimum):null,A.maxDate=K.maximum?new Date(K.maximum):null});C5A=v8("ZodArray",(A,q)=>{dR6.init(A,q),P9.init(A,q),A.element=q.element,A.min=(K,Y)=>A.check(po(K,Y)),A.nonempty=(K)=>A.check(po(1,K)),A.max=(K,Y)=>A.check(nH6(K,Y)),A.length=(K,Y)=>A.check(rH6(K,Y)),A.unwrap=()=>A.element});yA1=v8("ZodObject",(A,q)=>{SU1.init(A,q),P9.init(A,q),n7.defineLazy(A,"shape",()=>q.shape),A.keyof=()=>Tf(Object.keys(A._zod.def.shape)),A.catchall=(K)=>A.clone({...A._zod.def,catchall:K}),A.passthrough=()=>A.clone({...A._zod.def,catchall:c$()}),A.loose=()=>A.clone({...A._zod.def,catchall:c$()}),A.strict=()=>A.clone({...A._zod.def,catchall:EA1()}),A.strip=()=>A.clone({...A._zod.def,catchall:void 0}),A.extend=(K)=>{return n7.extend(A,K)},A.merge=(K)=>n7.merge(A,K),A.pick=(K)=>n7.pick(A,K),A.omit=(K)=>n7.omit(A,K),A.partial=(...K)=>n7.partial(Jc1,A,K[0]),A.required=(...K)=>n7.required(Mc1,A,K[0])});$c1=v8("ZodUnion",(A,q)=>{l81.init(A,q),P9.init(A,q),A.options=q.options});h5A=v8("ZodDiscriminatedUnion",(A,q)=>{$c1.init(A,q),CU1.init(A,q)});I5A=v8("ZodIntersection",(A,q)=>{hU1.init(A,q),P9.init(A,q)});b5A=v8("ZodTuple",(A,q)=>{n46.init(A,q),P9.init(A,q),A.rest=(K)=>A.clone({...A._zod.def,rest:K})});Oc1=v8("ZodRecord",(A,q)=>{IU1.init(A,q),P9.init(A,q),A.keyType=q.keyType,A.valueType=q.valueType});x5A=v8("ZodMap",(A,q)=>{bU1.init(A,q),P9.init(A,q),A.keyType=q.keyType,A.valueType=q.valueType});u5A=v8("ZodSet",(A,q)=>{xU1.init(A,q),P9.init(A,q),A.min=(...K)=>A.check(o46(...K)),A.nonempty=(K)=>A.check(o46(1,K)),A.max=(...K)=>A.check(iH6(...K)),A.size=(...K)=>A.check(aR6(...K))});HS6=v8("ZodEnum",(A,q)=>{uU1.init(A,q),P9.init(A,q),A.enum=q.entries,A.options=Object.values(q.entries);let K=new Set(Object.keys(q.entries));A.extract=(Y,z)=>{let w={};for(let _ of Y)if(K.has(_))w[_]=q.entries[_];else throw Error(`Key ${_} not found in enum`);return new HS6({...q,checks:[],...n7.normalizeParams(z),entries:w})},A.exclude=(Y,z)=>{let w={...q.entries};for(let _ of Y)if(K.has(_))delete w[_];else throw Error(`Key ${_} not found in enum`);return new HS6({...q,checks:[],...n7.normalizeParams(z),entries:w})}});B5A=v8("ZodLiteral",(A,q)=>{BU1.init(A,q),P9.init(A,q),A.values=new Set(q.values),Object.defineProperty(A,"value",{get(){if(q.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return q.values[0]}})});m5A=v8("ZodFile",(A,q)=>{mU1.init(A,q),P9.init(A,q),A.min=(K,Y)=>A.check(o46(K,Y)),A.max=(K,Y)=>A.check(iH6(K,Y)),A.mime=(K,Y)=>A.check(YS6(Array.isArray(K)?K:[K],Y))});Hc1=v8("ZodTransform",(A,q)=>{cR6.init(A,q),P9.init(A,q),A._zod.parse=(K,Y)=>{K.addIssue=(w)=>{if(typeof w==="string")K.issues.push(n7.issue(w,K.value,q));else{let _=w;if(_.fatal)_.continue=!1;_.code??(_.code="custom"),_.input??(_.input=K.value),_.inst??(_.inst=A),_.continue??(_.continue=!0),K.issues.push(n7.issue(_))}};let z=q.transform(K.value,K);if(z instanceof Promise)return z.then((w)=>{return K.value=w,K});return K.value=z,K}});Jc1=v8("ZodOptional",(A,q)=>{gU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});g5A=v8("ZodNullable",(A,q)=>{FU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});F5A=v8("ZodDefault",(A,q)=>{QU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType,A.removeDefault=A.unwrap});U5A=v8("ZodPrefault",(A,q)=>{UU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});Mc1=v8("ZodNonOptional",(A,q)=>{pU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});c5A=v8("ZodSuccess",(A,q)=>{dU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});l5A=v8("ZodCatch",(A,q)=>{cU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType,A.removeCatch=A.unwrap});n5A=v8("ZodNaN",(A,q)=>{lU1.init(A,q),P9.init(A,q)});Dc1=v8("ZodPipe",(A,q)=>{lR6.init(A,q),P9.init(A,q),A.in=q.in,A.out=q.out});r5A=v8("ZodReadonly",(A,q)=>{iU1.init(A,q),P9.init(A,q)});a5A=v8("ZodTemplateLiteral",(A,q)=>{nU1.init(A,q),P9.init(A,q)});s5A=v8("ZodLazy",(A,q)=>{oU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.getter()});e5A=v8("ZodPromise",(A,q)=>{rU1.init(A,q),P9.init(A,q),A.unwrap=()=>A._zod.def.innerType});SA1=v8("ZodCustom",(A,q)=>{aU1.init(A,q),P9.init(A,q)})});function K3K(A){jM({customError:A})}function Y3K(){return jM().customError}var Pc1;var Y9A=k(()=>{ff();Pc1={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"}});var WS6={};m1(WS6,{string:()=>z3K,number:()=>w3K,date:()=>O3K,boolean:()=>_3K,bigint:()=>$3K});function z3K(A){return Qp1(jS6,A)}function w3K(A){return np1(JS6,A)}function _3K(A){return Ad1(MS6,A)}function $3K(A){return Kd1(DS6,A)}function O3K(A){return Md1(LA1,A)}var z9A=k(()=>{ff();VA1()});var I={};m1(I,{xid:()=>GKK,void:()=>gKK,uuidv7:()=>MKK,uuidv6:()=>JKK,uuidv4:()=>jKK,uuid:()=>HKK,url:()=>dd1,uppercase:()=>eR6,unknown:()=>c$,union:()=>H2,undefined:()=>mKK,ulid:()=>ZKK,uint64:()=>uKK,uint32:()=>IKK,tuple:()=>pKK,trim:()=>wS6,treeifyError:()=>aF1,transform:()=>jc1,toUpperCase:()=>$S6,toLowerCase:()=>_S6,toJSONSchema:()=>gp,templateLiteral:()=>sKK,symbol:()=>BKK,superRefine:()=>K9A,success:()=>oKK,stringbool:()=>A3K,stringFormat:()=>RKK,string:()=>n1,strictObject:()=>UKK,startsWith:()=>qS6,size:()=>aR6,setErrorMap:()=>K3K,set:()=>lKK,safeParseAsync:()=>md1,safeParse:()=>Bd1,registry:()=>n81,regexes:()=>l46,regex:()=>sR6,refine:()=>q9A,record:()=>z$,readonly:()=>o5A,property:()=>Gd1,promise:()=>tKK,prettifyError:()=>sF1,preprocess:()=>CA1,prefault:()=>p5A,positive:()=>Xd1,pipe:()=>kA1,partialRecord:()=>dKK,parseAsync:()=>ud1,parse:()=>xd1,overwrite:()=>mp,optional:()=>l$,object:()=>Y4,number:()=>tY,nullish:()=>rKK,nullable:()=>vA1,null:()=>XS6,normalize:()=>zS6,nonpositive:()=>Wd1,nonoptional:()=>d5A,nonnegative:()=>Zd1,never:()=>EA1,negative:()=>Pd1,nativeEnum:()=>iKK,nanoid:()=>XKK,nan:()=>aKK,multipleOf:()=>r46,minSize:()=>o46,minLength:()=>po,mime:()=>YS6,maxSize:()=>iH6,maxLength:()=>nH6,map:()=>cKK,lte:()=>by,lt:()=>up,lowercase:()=>tR6,looseObject:()=>JM,locales:()=>cH6,literal:()=>Gq,length:()=>rH6,lazy:()=>t5A,ksuid:()=>fKK,keyof:()=>QKK,jwt:()=>yKK,json:()=>q3K,iso:()=>oH6,ipv6:()=>VKK,ipv4:()=>TKK,intersection:()=>PS6,int64:()=>xKK,int32:()=>hKK,int:()=>Fd1,instanceof:()=>eKK,includes:()=>AS6,guid:()=>OKK,gte:()=>RV,gt:()=>Bp,globalRegistry:()=>BB,getErrorMap:()=>Y3K,function:()=>yd1,formatError:()=>gR6,float64:()=>CKK,float32:()=>SKK,flattenError:()=>mR6,file:()=>nKK,enum:()=>Tf,endsWith:()=>KS6,emoji:()=>DKK,email:()=>$KK,e164:()=>LKK,discriminatedUnion:()=>RA1,date:()=>FKK,custom:()=>Xc1,cuid2:()=>WKK,cuid:()=>PKK,core:()=>mB,config:()=>jM,coerce:()=>WS6,clone:()=>Rk,cidrv6:()=>vKK,cidrv4:()=>NKK,check:()=>A9A,catch:()=>i5A,boolean:()=>O2,bigint:()=>bKK,base64url:()=>EKK,base64:()=>kKK,array:()=>r7,any:()=>_c1,_default:()=>Q5A,_ZodString:()=>Qd1,ZodXID:()=>od1,ZodVoid:()=>S5A,ZodUnknown:()=>y5A,ZodUnion:()=>$c1,ZodUndefined:()=>k5A,ZodUUID:()=>Fp,ZodURL:()=>pd1,ZodULID:()=>rd1,ZodType:()=>P9,ZodTuple:()=>b5A,ZodTransform:()=>Hc1,ZodTemplateLiteral:()=>a5A,ZodSymbol:()=>v5A,ZodSuccess:()=>c5A,ZodStringFormat:()=>Y$,ZodString:()=>jS6,ZodSet:()=>u5A,ZodRecord:()=>Oc1,ZodRealError:()=>aH6,ZodReadonly:()=>r5A,ZodPromise:()=>e5A,ZodPrefault:()=>U5A,ZodPipe:()=>Dc1,ZodOptional:()=>Jc1,ZodObject:()=>yA1,ZodNumberFormat:()=>sH6,ZodNumber:()=>JS6,ZodNullable:()=>g5A,ZodNull:()=>E5A,ZodNonOptional:()=>Mc1,ZodNever:()=>R5A,ZodNanoID:()=>ld1,ZodNaN:()=>n5A,ZodMap:()=>x5A,ZodLiteral:()=>B5A,ZodLazy:()=>s5A,ZodKSUID:()=>ad1,ZodJWT:()=>zc1,ZodIssueCode:()=>Pc1,ZodIntersection:()=>I5A,ZodISOTime:()=>GA1,ZodISODuration:()=>fA1,ZodISODateTime:()=>WA1,ZodISODate:()=>ZA1,ZodIPv6:()=>td1,ZodIPv4:()=>sd1,ZodGUID:()=>NA1,ZodFile:()=>m5A,ZodError:()=>wKK,ZodEnum:()=>HS6,ZodEmoji:()=>cd1,ZodEmail:()=>Ud1,ZodE164:()=>Yc1,ZodDiscriminatedUnion:()=>h5A,ZodDefault:()=>F5A,ZodDate:()=>LA1,ZodCustomStringFormat:()=>N5A,ZodCustom:()=>SA1,ZodCatch:()=>l5A,ZodCUID2:()=>nd1,ZodCUID:()=>id1,ZodCIDRv6:()=>Ac1,ZodCIDRv4:()=>ed1,ZodBoolean:()=>MS6,ZodBigIntFormat:()=>wc1,ZodBigInt:()=>DS6,ZodBase64URL:()=>Kc1,ZodBase64:()=>qc1,ZodArray:()=>C5A,ZodAny:()=>L5A,TimePrecision:()=>Up1,NEVER:()=>RR6,$output:()=>Bp1,$input:()=>mp1,$brand:()=>FF1});var Wc1=k(()=>{ff();ff();Yp1();ff();i81();TA1();TA1();z9A();VA1();Rd1();bd1();gd1();Y9A();jM(nR6())});var w9A;var Zc1=k(()=>{Wc1();Wc1();w9A=I});var Q4;var B7=k(()=>{Zc1();Zc1();Q4=w9A});var co="2025-11-25",IA1,lo="io.modelcontextprotocol/related-task",bA1="2.0",O0,$9A,O9A,DKw,H3K,j3K,Gc1,Ck,ZS6,H9A=(A)=>ZS6.safeParse(A).success,H0,xy,uy,j0,xA1,j9A,GS6=(A)=>j9A.safeParse(A).success,J9A,M9A=(A)=>J9A.safeParse(A).success,fc1,a46=(A)=>fc1.safeParse(A).success,YK,Tc1,D9A=(A)=>Tc1.safeParse(A).success,qI,XKw,Qp,J3K,uA1,M3K,fS6,tH6,X9A,D3K,X3K,P3K,W3K,Z3K,G3K,Vc1,f3K,Nc1,BA1,P9A=(A)=>BA1.safeParse(A).success,mA1,T3K,V3K,gA1,N3K,TS6,VS6,v3K,NS6,Up,k3K,vS6,FA1,QA1,UA1,PKw,pA1,dA1,cA1,W9A,Z9A,G9A,vc1,f9A,kS6,eH6,T9A,E3K,L3K,ES6,y3K,kc1,Ec1,R3K,S3K,LS6,yS6,C3K,h3K,I3K,b3K,x3K,u3K,B3K,m3K,g3K,RS6,F3K,Q3K,Lc1,yc1,Rc1,U3K,p3K,d3K,Sc1,c3K,Cc1,SS6,l3K,i3K,V9A,CS6,hS6,gB,WKw,n3K,s46,IS6,N9A,bS6,r3K,hc1,o3K,a3K,s3K,t3K,e3K,A5K,q5K,hA1,K5K,Y5K,Ic1,t46,xS6,z5K,w5K,_5K,$5K,O5K,H5K,j5K,J5K,M5K,D5K,X5K,P5K,W5K,Z5K,G5K,pp,f5K,uS6,io,T5K,V5K,N5K,v5K,bc1,k5K,xc1,uc1,E5K,ZKw,GKw,fKw,TKw,VKw,NKw,fq,v9A;var uX=k(()=>{B7();IA1=[co,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],O0=Xc1((A)=>A!==null&&(typeof A==="object"||typeof A==="function")),$9A=H2([n1(),tY().int()]),O9A=n1(),DKw=JM({ttl:H2([tY(),XS6()]).optional(),pollInterval:tY().optional()}),H3K=Y4({ttl:tY().optional()}),j3K=Y4({taskId:n1()}),Gc1=JM({progressToken:$9A.optional(),[lo]:j3K.optional()}),Ck=Y4({_meta:Gc1.optional()}),ZS6=Ck.extend({task:H3K.optional()}),H0=Y4({method:n1(),params:Ck.loose().optional()}),xy=Y4({_meta:Gc1.optional()}),uy=Y4({method:n1(),params:xy.loose().optional()}),j0=JM({_meta:Gc1.optional()}),xA1=H2([n1(),tY().int()]),j9A=Y4({jsonrpc:Gq(bA1),id:xA1,...H0.shape}).strict(),J9A=Y4({jsonrpc:Gq(bA1),...uy.shape}).strict(),fc1=Y4({jsonrpc:Gq(bA1),id:xA1,result:j0}).strict();(function(A){A[A.ConnectionClosed=-32000]="ConnectionClosed",A[A.RequestTimeout=-32001]="RequestTimeout",A[A.ParseError=-32700]="ParseError",A[A.InvalidRequest=-32600]="InvalidRequest",A[A.MethodNotFound=-32601]="MethodNotFound",A[A.InvalidParams=-32602]="InvalidParams",A[A.InternalError=-32603]="InternalError",A[A.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(YK||(YK={}));Tc1=Y4({jsonrpc:Gq(bA1),id:xA1.optional(),error:Y4({code:tY().int(),message:n1(),data:c$().optional()})}).strict(),qI=H2([j9A,J9A,fc1,Tc1]),XKw=H2([fc1,Tc1]),Qp=j0.strict(),J3K=xy.extend({requestId:xA1.optional(),reason:n1().optional()}),uA1=uy.extend({method:Gq("notifications/cancelled"),params:J3K}),M3K=Y4({src:n1(),mimeType:n1().optional(),sizes:r7(n1()).optional(),theme:Tf(["light","dark"]).optional()}),fS6=Y4({icons:r7(M3K).optional()}),tH6=Y4({name:n1(),title:n1().optional()}),X9A=tH6.extend({...tH6.shape,...fS6.shape,version:n1(),websiteUrl:n1().optional(),description:n1().optional()}),D3K=PS6(Y4({applyDefaults:O2().optional()}),z$(n1(),c$())),X3K=CA1((A)=>{if(A&&typeof A==="object"&&!Array.isArray(A)){if(Object.keys(A).length===0)return{form:{}}}return A},PS6(Y4({form:D3K.optional(),url:O0.optional()}),z$(n1(),c$()).optional())),P3K=JM({list:O0.optional(),cancel:O0.optional(),requests:JM({sampling:JM({createMessage:O0.optional()}).optional(),elicitation:JM({create:O0.optional()}).optional()}).optional()}),W3K=JM({list:O0.optional(),cancel:O0.optional(),requests:JM({tools:JM({call:O0.optional()}).optional()}).optional()}),Z3K=Y4({experimental:z$(n1(),O0).optional(),sampling:Y4({context:O0.optional(),tools:O0.optional()}).optional(),elicitation:X3K.optional(),roots:Y4({listChanged:O2().optional()}).optional(),tasks:P3K.optional()}),G3K=Ck.extend({protocolVersion:n1(),capabilities:Z3K,clientInfo:X9A}),Vc1=H0.extend({method:Gq("initialize"),params:G3K}),f3K=Y4({experimental:z$(n1(),O0).optional(),logging:O0.optional(),completions:O0.optional(),prompts:Y4({listChanged:O2().optional()}).optional(),resources:Y4({subscribe:O2().optional(),listChanged:O2().optional()}).optional(),tools:Y4({listChanged:O2().optional()}).optional(),tasks:W3K.optional()}),Nc1=j0.extend({protocolVersion:n1(),capabilities:f3K,serverInfo:X9A,instructions:n1().optional()}),BA1=uy.extend({method:Gq("notifications/initialized"),params:xy.optional()}),mA1=H0.extend({method:Gq("ping"),params:Ck.optional()}),T3K=Y4({progress:tY(),total:l$(tY()),message:l$(n1())}),V3K=Y4({...xy.shape,...T3K.shape,progressToken:$9A}),gA1=uy.extend({method:Gq("notifications/progress"),params:V3K}),N3K=Ck.extend({cursor:O9A.optional()}),TS6=H0.extend({params:N3K.optional()}),VS6=j0.extend({nextCursor:O9A.optional()}),v3K=Tf(["working","input_required","completed","failed","cancelled"]),NS6=Y4({taskId:n1(),status:v3K,ttl:H2([tY(),XS6()]),createdAt:n1(),lastUpdatedAt:n1(),pollInterval:l$(tY()),statusMessage:l$(n1())}),Up=j0.extend({task:NS6}),k3K=xy.merge(NS6),vS6=uy.extend({method:Gq("notifications/tasks/status"),params:k3K}),FA1=H0.extend({method:Gq("tasks/get"),params:Ck.extend({taskId:n1()})}),QA1=j0.merge(NS6),UA1=H0.extend({method:Gq("tasks/result"),params:Ck.extend({taskId:n1()})}),PKw=j0.loose(),pA1=TS6.extend({method:Gq("tasks/list")}),dA1=VS6.extend({tasks:r7(NS6)}),cA1=H0.extend({method:Gq("tasks/cancel"),params:Ck.extend({taskId:n1()})}),W9A=j0.merge(NS6),Z9A=Y4({uri:n1(),mimeType:l$(n1()),_meta:z$(n1(),c$()).optional()}),G9A=Z9A.extend({text:n1()}),vc1=n1().refine((A)=>{try{return atob(A),!0}catch{return!1}},{message:"Invalid Base64 string"}),f9A=Z9A.extend({blob:vc1}),kS6=Tf(["user","assistant"]),eH6=Y4({audience:r7(kS6).optional(),priority:tY().min(0).max(1).optional(),lastModified:oH6.datetime({offset:!0}).optional()}),T9A=Y4({...tH6.shape,...fS6.shape,uri:n1(),description:l$(n1()),mimeType:l$(n1()),annotations:eH6.optional(),_meta:l$(JM({}))}),E3K=Y4({...tH6.shape,...fS6.shape,uriTemplate:n1(),description:l$(n1()),mimeType:l$(n1()),annotations:eH6.optional(),_meta:l$(JM({}))}),L3K=TS6.extend({method:Gq("resources/list")}),ES6=VS6.extend({resources:r7(T9A)}),y3K=TS6.extend({method:Gq("resources/templates/list")}),kc1=VS6.extend({resourceTemplates:r7(E3K)}),Ec1=Ck.extend({uri:n1()}),R3K=Ec1,S3K=H0.extend({method:Gq("resources/read"),params:R3K}),LS6=j0.extend({contents:r7(H2([G9A,f9A]))}),yS6=uy.extend({method:Gq("notifications/resources/list_changed"),params:xy.optional()}),C3K=Ec1,h3K=H0.extend({method:Gq("resources/subscribe"),params:C3K}),I3K=Ec1,b3K=H0.extend({method:Gq("resources/unsubscribe"),params:I3K}),x3K=xy.extend({uri:n1()}),u3K=uy.extend({method:Gq("notifications/resources/updated"),params:x3K}),B3K=Y4({name:n1(),description:l$(n1()),required:l$(O2())}),m3K=Y4({...tH6.shape,...fS6.shape,description:l$(n1()),arguments:l$(r7(B3K)),_meta:l$(JM({}))}),g3K=TS6.extend({method:Gq("prompts/list")}),RS6=VS6.extend({prompts:r7(m3K)}),F3K=Ck.extend({name:n1(),arguments:z$(n1(),n1()).optional()}),Q3K=H0.extend({method:Gq("prompts/get"),params:F3K}),Lc1=Y4({type:Gq("text"),text:n1(),annotations:eH6.optional(),_meta:z$(n1(),c$()).optional()}),yc1=Y4({type:Gq("image"),data:vc1,mimeType:n1(),annotations:eH6.optional(),_meta:z$(n1(),c$()).optional()}),Rc1=Y4({type:Gq("audio"),data:vc1,mimeType:n1(),annotations:eH6.optional(),_meta:z$(n1(),c$()).optional()}),U3K=Y4({type:Gq("tool_use"),name:n1(),id:n1(),input:z$(n1(),c$()),_meta:z$(n1(),c$()).optional()}),p3K=Y4({type:Gq("resource"),resource:H2([G9A,f9A]),annotations:eH6.optional(),_meta:z$(n1(),c$()).optional()}),d3K=T9A.extend({type:Gq("resource_link")}),Sc1=H2([Lc1,yc1,Rc1,d3K,p3K]),c3K=Y4({role:kS6,content:Sc1}),Cc1=j0.extend({description:n1().optional(),messages:r7(c3K)}),SS6=uy.extend({method:Gq("notifications/prompts/list_changed"),params:xy.optional()}),l3K=Y4({title:n1().optional(),readOnlyHint:O2().optional(),destructiveHint:O2().optional(),idempotentHint:O2().optional(),openWorldHint:O2().optional()}),i3K=Y4({taskSupport:Tf(["required","optional","forbidden"]).optional()}),V9A=Y4({...tH6.shape,...fS6.shape,description:n1().optional(),inputSchema:Y4({type:Gq("object"),properties:z$(n1(),O0).optional(),required:r7(n1()).optional()}).catchall(c$()),outputSchema:Y4({type:Gq("object"),properties:z$(n1(),O0).optional(),required:r7(n1()).optional()}).catchall(c$()).optional(),annotations:l3K.optional(),execution:i3K.optional(),_meta:z$(n1(),c$()).optional()}),CS6=TS6.extend({method:Gq("tools/list")}),hS6=VS6.extend({tools:r7(V9A)}),gB=j0.extend({content:r7(Sc1).default([]),structuredContent:z$(n1(),c$()).optional(),isError:O2().optional()}),WKw=gB.or(j0.extend({toolResult:c$()})),n3K=ZS6.extend({name:n1(),arguments:z$(n1(),c$()).optional()}),s46=H0.extend({method:Gq("tools/call"),params:n3K}),IS6=uy.extend({method:Gq("notifications/tools/list_changed"),params:xy.optional()}),N9A=Y4({autoRefresh:O2().default(!0),debounceMs:tY().int().nonnegative().default(300)}),bS6=Tf(["debug","info","notice","warning","error","critical","alert","emergency"]),r3K=Ck.extend({level:bS6}),hc1=H0.extend({method:Gq("logging/setLevel"),params:r3K}),o3K=xy.extend({level:bS6,logger:n1().optional(),data:c$()}),a3K=uy.extend({method:Gq("notifications/message"),params:o3K}),s3K=Y4({name:n1().optional()}),t3K=Y4({hints:r7(s3K).optional(),costPriority:tY().min(0).max(1).optional(),speedPriority:tY().min(0).max(1).optional(),intelligencePriority:tY().min(0).max(1).optional()}),e3K=Y4({mode:Tf(["auto","required","none"]).optional()}),A5K=Y4({type:Gq("tool_result"),toolUseId:n1().describe("The unique identifier for the corresponding tool call."),content:r7(Sc1).default([]),structuredContent:Y4({}).loose().optional(),isError:O2().optional(),_meta:z$(n1(),c$()).optional()}),q5K=RA1("type",[Lc1,yc1,Rc1]),hA1=RA1("type",[Lc1,yc1,Rc1,U3K,A5K]),K5K=Y4({role:kS6,content:H2([hA1,r7(hA1)]),_meta:z$(n1(),c$()).optional()}),Y5K=ZS6.extend({messages:r7(K5K),modelPreferences:t3K.optional(),systemPrompt:n1().optional(),includeContext:Tf(["none","thisServer","allServers"]).optional(),temperature:tY().optional(),maxTokens:tY().int(),stopSequences:r7(n1()).optional(),metadata:O0.optional(),tools:r7(V9A).optional(),toolChoice:e3K.optional()}),Ic1=H0.extend({method:Gq("sampling/createMessage"),params:Y5K}),t46=j0.extend({model:n1(),stopReason:l$(Tf(["endTurn","stopSequence","maxTokens"]).or(n1())),role:kS6,content:q5K}),xS6=j0.extend({model:n1(),stopReason:l$(Tf(["endTurn","stopSequence","maxTokens","toolUse"]).or(n1())),role:kS6,content:H2([hA1,r7(hA1)])}),z5K=Y4({type:Gq("boolean"),title:n1().optional(),description:n1().optional(),default:O2().optional()}),w5K=Y4({type:Gq("string"),title:n1().optional(),description:n1().optional(),minLength:tY().optional(),maxLength:tY().optional(),format:Tf(["email","uri","date","date-time"]).optional(),default:n1().optional()}),_5K=Y4({type:Tf(["number","integer"]),title:n1().optional(),description:n1().optional(),minimum:tY().optional(),maximum:tY().optional(),default:tY().optional()}),$5K=Y4({type:Gq("string"),title:n1().optional(),description:n1().optional(),enum:r7(n1()),default:n1().optional()}),O5K=Y4({type:Gq("string"),title:n1().optional(),description:n1().optional(),oneOf:r7(Y4({const:n1(),title:n1()})),default:n1().optional()}),H5K=Y4({type:Gq("string"),title:n1().optional(),description:n1().optional(),enum:r7(n1()),enumNames:r7(n1()).optional(),default:n1().optional()}),j5K=H2([$5K,O5K]),J5K=Y4({type:Gq("array"),title:n1().optional(),description:n1().optional(),minItems:tY().optional(),maxItems:tY().optional(),items:Y4({type:Gq("string"),enum:r7(n1())}),default:r7(n1()).optional()}),M5K=Y4({type:Gq("array"),title:n1().optional(),description:n1().optional(),minItems:tY().optional(),maxItems:tY().optional(),items:Y4({anyOf:r7(Y4({const:n1(),title:n1()}))}),default:r7(n1()).optional()}),D5K=H2([J5K,M5K]),X5K=H2([H5K,j5K,D5K]),P5K=H2([X5K,z5K,w5K,_5K]),W5K=ZS6.extend({mode:Gq("form").optional(),message:n1(),requestedSchema:Y4({type:Gq("object"),properties:z$(n1(),P5K),required:r7(n1()).optional()})}),Z5K=ZS6.extend({mode:Gq("url"),message:n1(),elicitationId:n1(),url:n1().url()}),G5K=H2([W5K,Z5K]),pp=H0.extend({method:Gq("elicitation/create"),params:G5K}),f5K=xy.extend({elicitationId:n1()}),uS6=uy.extend({method:Gq("notifications/elicitation/complete"),params:f5K}),io=j0.extend({action:Tf(["accept","decline","cancel"]),content:CA1((A)=>A===null?void 0:A,z$(n1(),H2([n1(),tY(),O2(),r7(n1())])).optional())}),T5K=Y4({type:Gq("ref/resource"),uri:n1()}),V5K=Y4({type:Gq("ref/prompt"),name:n1()}),N5K=Ck.extend({ref:H2([V5K,T5K]),argument:Y4({name:n1(),value:n1()}),context:Y4({arguments:z$(n1(),n1()).optional()}).optional()}),v5K=H0.extend({method:Gq("completion/complete"),params:N5K}),bc1=j0.extend({completion:JM({values:r7(n1()).max(100),total:l$(tY().int()),hasMore:l$(O2())})}),k5K=Y4({uri:n1().startsWith("file://"),name:n1().optional(),_meta:z$(n1(),c$()).optional()}),xc1=H0.extend({method:Gq("roots/list"),params:Ck.optional()}),uc1=j0.extend({roots:r7(k5K)}),E5K=uy.extend({method:Gq("notifications/roots/list_changed"),params:xy.optional()}),ZKw=H2([mA1,Vc1,v5K,hc1,Q3K,g3K,L3K,y3K,S3K,h3K,b3K,s46,CS6,FA1,UA1,pA1,cA1]),GKw=H2([uA1,gA1,BA1,E5K,vS6]),fKw=H2([Qp,t46,xS6,io,uc1,QA1,dA1,Up]),TKw=H2([mA1,Ic1,pp,xc1,FA1,UA1,pA1,cA1]),VKw=H2([uA1,gA1,a3K,u3K,yS6,IS6,SS6,vS6,uS6]),NKw=H2([Qp,Nc1,bc1,Cc1,RS6,ES6,kc1,LS6,gB,hS6,QA1,dA1,Up]);fq=class fq extends Error{constructor(A,q,K){super(`MCP error ${A}: ${q}`);this.code=A,this.data=K,this.name="McpError"}static fromError(A,q,K){if(A===YK.UrlElicitationRequired&&K){let Y=K;if(Y.elicitations)return new v9A(Y.elicitations,q)}return new fq(A,q,K)}};v9A=class v9A extends fq{constructor(A,q=`URL elicitation${A.length>1?"s":""} required`){super(YK.UrlElicitationRequired,q,{elicitations:A})}get elicitations(){return this.data?.elicitations??[]}}});class BS6{append(A){this._buffer=this._buffer?Buffer.concat([this._buffer,A]):A}readMessage(){if(!this._buffer)return null;let A=this._buffer.indexOf(`
`);if(A===-1)return null;let q=this._buffer.toString("utf8",0,A).replace(/\r$/,"");return this._buffer=this._buffer.subarray(A+1),L5K(q)}clear(){this._buffer=void 0}}function L5K(A){return qI.parse(JSON.parse(A))}function lA1(A){return JSON.stringify(A)+`
`}var Bc1=k(()=>{uX()});import k9A from"node:process";class mS6{constructor(A=k9A.stdin,q=k9A.stdout){this._stdin=A,this._stdout=q,this._readBuffer=new BS6,this._started=!1,this._ondata=(K)=>{this._readBuffer.append(K),this.processReadBuffer()},this._onerror=(K)=>{this.onerror?.(K)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let A=this._readBuffer.readMessage();if(A===null)break;this.onmessage?.(A)}catch(A){this.onerror?.(A)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send(A){return new Promise((q)=>{let K=lA1(A);if(this._stdout.write(K))q();else this._stdout.once("drain",q)})}}var mc1=k(()=>{Bc1()});var dp=C((SKw,y9A)=>{var E9A=["nodebuffer","arraybuffer","fragments"],L9A=typeof Blob<"u";if(L9A)E9A.push("blob");y9A.exports={BINARY_TYPES:E9A,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:L9A,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var gS6=C((CKw,iA1)=>{var{EMPTY_BUFFER:y5K}=dp(),gc1=Buffer[Symbol.species];function R5K(A,q){if(A.length===0)return y5K;if(A.length===1)return A[0];let K=Buffer.allocUnsafe(q),Y=0;for(let z=0;z<A.length;z++){let w=A[z];K.set(w,Y),Y+=w.length}if(Y<q)return new gc1(K.buffer,K.byteOffset,Y);return K}function R9A(A,q,K,Y,z){for(let w=0;w<z;w++)K[Y+w]=A[w]^q[w&3]}function S9A(A,q){for(let K=0;K<A.length;K++)A[K]^=q[K&3]}function S5K(A){if(A.length===A.buffer.byteLength)return A.buffer;return A.buffer.slice(A.byteOffset,A.byteOffset+A.length)}function Fc1(A){if(Fc1.readOnly=!0,Buffer.isBuffer(A))return A;let q;if(A instanceof ArrayBuffer)q=new gc1(A);else if(ArrayBuffer.isView(A))q=new gc1(A.buffer,A.byteOffset,A.byteLength);else q=Buffer.from(A),Fc1.readOnly=!1;return q}iA1.exports={concat:R5K,mask:R9A,toArrayBuffer:S5K,toBuffer:Fc1,unmask:S9A};if(!process.env.WS_NO_BUFFER_UTIL)try{let A=(()=>{throw new Error("Cannot require module "+"bufferutil");})();iA1.exports.mask=function(q,K,Y,z,w){if(w<48)R9A(q,K,Y,z,w);else A.mask(q,K,Y,z,w)},iA1.exports.unmask=function(q,K){if(q.length<32)S9A(q,K);else A.unmask(q,K)}}catch(A){}});var b9A=C((hKw,I9A)=>{var C9A=Symbol("kDone"),Qc1=Symbol("kRun");class h9A{constructor(A){this[C9A]=()=>{this.pending--,this[Qc1]()},this.concurrency=A||1/0,this.jobs=[],this.pending=0}add(A){this.jobs.push(A),this[Qc1]()}[Qc1](){if(this.pending===this.concurrency)return;if(this.jobs.length){let A=this.jobs.shift();this.pending++,A(this[C9A])}}}I9A.exports=h9A});var QS6=C((IKw,g9A)=>{var FS6=g6("zlib"),x9A=gS6(),C5K=b9A(),{kStatusCode:u9A}=dp(),h5K=Buffer[Symbol.species],I5K=Buffer.from([0,0,255,255]),rA1=Symbol("permessage-deflate"),cp=Symbol("total-length"),Aj6=Symbol("callback"),no=Symbol("buffers"),qj6=Symbol("error"),nA1;class B9A{constructor(A,q,K){if(this._maxPayload=K|0,this._options=A||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!q,this._deflate=null,this._inflate=null,this.params=null,!nA1){let Y=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;nA1=new C5K(Y)}}static get extensionName(){return"permessage-deflate"}offer(){let A={};if(this._options.serverNoContextTakeover)A.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)A.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)A.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)A.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)A.client_max_window_bits=!0;return A}accept(A){return A=this.normalizeParams(A),this.params=this._isServer?this.acceptAsServer(A):this.acceptAsClient(A),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let A=this._deflate[Aj6];if(this._deflate.close(),this._deflate=null,A)A(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(A){let q=this._options,K=A.find((Y)=>{if(q.serverNoContextTakeover===!1&&Y.server_no_context_takeover||Y.server_max_window_bits&&(q.serverMaxWindowBits===!1||typeof q.serverMaxWindowBits==="number"&&q.serverMaxWindowBits>Y.server_max_window_bits)||typeof q.clientMaxWindowBits==="number"&&!Y.client_max_window_bits)return!1;return!0});if(!K)throw Error("None of the extension offers can be accepted");if(q.serverNoContextTakeover)K.server_no_context_takeover=!0;if(q.clientNoContextTakeover)K.client_no_context_takeover=!0;if(typeof q.serverMaxWindowBits==="number")K.server_max_window_bits=q.serverMaxWindowBits;if(typeof q.clientMaxWindowBits==="number")K.client_max_window_bits=q.clientMaxWindowBits;else if(K.client_max_window_bits===!0||q.clientMaxWindowBits===!1)delete K.client_max_window_bits;return K}acceptAsClient(A){let q=A[0];if(this._options.clientNoContextTakeover===!1&&q.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!q.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")q.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&q.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return q}normalizeParams(A){return A.forEach((q)=>{Object.keys(q).forEach((K)=>{let Y=q[K];if(Y.length>1)throw Error(`Parameter "${K}" must have only a single value`);if(Y=Y[0],K==="client_max_window_bits"){if(Y!==!0){let z=+Y;if(!Number.isInteger(z)||z<8||z>15)throw TypeError(`Invalid value for parameter "${K}": ${Y}`);Y=z}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${K}": ${Y}`)}else if(K==="server_max_window_bits"){let z=+Y;if(!Number.isInteger(z)||z<8||z>15)throw TypeError(`Invalid value for parameter "${K}": ${Y}`);Y=z}else if(K==="client_no_context_takeover"||K==="server_no_context_takeover"){if(Y!==!0)throw TypeError(`Invalid value for parameter "${K}": ${Y}`)}else throw Error(`Unknown parameter "${K}"`);q[K]=Y})}),A}decompress(A,q,K){nA1.add((Y)=>{this._decompress(A,q,(z,w)=>{Y(),K(z,w)})})}compress(A,q,K){nA1.add((Y)=>{this._compress(A,q,(z,w)=>{Y(),K(z,w)})})}_decompress(A,q,K){let Y=this._isServer?"client":"server";if(!this._inflate){let z=`${Y}_max_window_bits`,w=typeof this.params[z]!=="number"?FS6.Z_DEFAULT_WINDOWBITS:this.params[z];this._inflate=FS6.createInflateRaw({...this._options.zlibInflateOptions,windowBits:w}),this._inflate[rA1]=this,this._inflate[cp]=0,this._inflate[no]=[],this._inflate.on("error",x5K),this._inflate.on("data",m9A)}if(this._inflate[Aj6]=K,this._inflate.write(A),q)this._inflate.write(I5K);this._inflate.flush(()=>{let z=this._inflate[qj6];if(z){this._inflate.close(),this._inflate=null,K(z);return}let w=x9A.concat(this._inflate[no],this._inflate[cp]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[cp]=0,this._inflate[no]=[],q&&this.params[`${Y}_no_context_takeover`])this._inflate.reset();K(null,w)})}_compress(A,q,K){let Y=this._isServer?"server":"client";if(!this._deflate){let z=`${Y}_max_window_bits`,w=typeof this.params[z]!=="number"?FS6.Z_DEFAULT_WINDOWBITS:this.params[z];this._deflate=FS6.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:w}),this._deflate[cp]=0,this._deflate[no]=[],this._deflate.on("data",b5K)}this._deflate[Aj6]=K,this._deflate.write(A),this._deflate.flush(FS6.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let z=x9A.concat(this._deflate[no],this._deflate[cp]);if(q)z=new h5K(z.buffer,z.byteOffset,z.length-4);if(this._deflate[Aj6]=null,this._deflate[cp]=0,this._deflate[no]=[],q&&this.params[`${Y}_no_context_takeover`])this._deflate.reset();K(null,z)})}}g9A.exports=B9A;function b5K(A){this[no].push(A),this[cp]+=A.length}function m9A(A){if(this[cp]+=A.length,this[rA1]._maxPayload<1||this[cp]<=this[rA1]._maxPayload){this[no].push(A);return}this[qj6]=RangeError("Max payload size exceeded"),this[qj6].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[qj6][u9A]=1009,this.removeListener("data",m9A),this.reset()}function x5K(A){if(this[rA1]._inflate=null,this[qj6]){this[Aj6](this[qj6]);return}A[u9A]=1007,this[Aj6](A)}});var Kj6=C((bKw,oA1)=>{var{isUtf8:F9A}=g6("buffer"),{hasBlob:u5K}=dp(),B5K=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function m5K(A){return A>=1000&&A<=1014&&A!==1004&&A!==1005&&A!==1006||A>=3000&&A<=4999}function Uc1(A){let q=A.length,K=0;while(K<q)if((A[K]&128)===0)K++;else if((A[K]&224)===192){if(K+1===q||(A[K+1]&192)!==128||(A[K]&254)===192)return!1;K+=2}else if((A[K]&240)===224){if(K+2>=q||(A[K+1]&192)!==128||(A[K+2]&192)!==128||A[K]===224&&(A[K+1]&224)===128||A[K]===237&&(A[K+1]&224)===160)return!1;K+=3}else if((A[K]&248)===240){if(K+3>=q||(A[K+1]&192)!==128||(A[K+2]&192)!==128||(A[K+3]&192)!==128||A[K]===240&&(A[K+1]&240)===128||A[K]===244&&A[K+1]>143||A[K]>244)return!1;K+=4}else return!1;return!0}function g5K(A){return u5K&&typeof A==="object"&&typeof A.arrayBuffer==="function"&&typeof A.type==="string"&&typeof A.stream==="function"&&(A[Symbol.toStringTag]==="Blob"||A[Symbol.toStringTag]==="File")}oA1.exports={isBlob:g5K,isValidStatusCode:m5K,isValidUTF8:Uc1,tokenChars:B5K};if(F9A)oA1.exports.isValidUTF8=function(A){return A.length<24?Uc1(A):F9A(A)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let A=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();oA1.exports.isValidUTF8=function(q){return q.length<32?Uc1(q):A(q)}}catch(A){}});var dc1=C((xKw,c9A)=>{var{Writable:F5K}=g6("stream"),Q9A=QS6(),{BINARY_TYPES:Q5K,EMPTY_BUFFER:U9A,kStatusCode:U5K,kWebSocket:p5K}=dp(),{concat:pc1,toArrayBuffer:d5K,unmask:c5K}=gS6(),{isValidStatusCode:l5K,isValidUTF8:p9A}=Kj6(),aA1=Buffer[Symbol.species];class d9A extends F5K{constructor(A={}){super();this._allowSynchronousEvents=A.allowSynchronousEvents!==void 0?A.allowSynchronousEvents:!0,this._binaryType=A.binaryType||Q5K[0],this._extensions=A.extensions||{},this._isServer=!!A.isServer,this._maxPayload=A.maxPayload|0,this._skipUTF8Validation=!!A.skipUTF8Validation,this[p5K]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write(A,q,K){if(this._opcode===8&&this._state==0)return K();this._bufferedBytes+=A.length,this._buffers.push(A),this.startLoop(K)}consume(A){if(this._bufferedBytes-=A,A===this._buffers[0].length)return this._buffers.shift();if(A<this._buffers[0].length){let K=this._buffers[0];return this._buffers[0]=new aA1(K.buffer,K.byteOffset+A,K.length-A),new aA1(K.buffer,K.byteOffset,A)}let q=Buffer.allocUnsafe(A);do{let K=this._buffers[0],Y=q.length-A;if(A>=K.length)q.set(this._buffers.shift(),Y);else q.set(new Uint8Array(K.buffer,K.byteOffset,A),Y),this._buffers[0]=new aA1(K.buffer,K.byteOffset+A,K.length-A);A-=K.length}while(A>0);return q}startLoop(A){this._loop=!0;do switch(this._state){case 0:this.getInfo(A);break;case 1:this.getPayloadLength16(A);break;case 2:this.getPayloadLength64(A);break;case 3:this.getMask();break;case 4:this.getData(A);break;case 5:case 6:this._loop=!1;return}while(this._loop);if(!this._errored)A()}getInfo(A){if(this._bufferedBytes<2){this._loop=!1;return}let q=this.consume(2);if((q[0]&48)!==0){let Y=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");A(Y);return}let K=(q[0]&64)===64;if(K&&!this._extensions[Q9A.extensionName]){let Y=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");A(Y);return}if(this._fin=(q[0]&128)===128,this._opcode=q[0]&15,this._payloadLength=q[1]&127,this._opcode===0){if(K){let Y=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");A(Y);return}if(!this._fragmented){let Y=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");A(Y);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let Y=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");A(Y);return}this._compressed=K}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let Y=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");A(Y);return}if(K){let Y=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");A(Y);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let Y=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");A(Y);return}}else{let Y=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");A(Y);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(q[1]&128)===128,this._isServer){if(!this._masked){let Y=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");A(Y);return}}else if(this._masked){let Y=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");A(Y);return}if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else this.haveLength(A)}getPayloadLength16(A){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(A)}getPayloadLength64(A){if(this._bufferedBytes<8){this._loop=!1;return}let q=this.consume(8),K=q.readUInt32BE(0);if(K>Math.pow(2,21)-1){let Y=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");A(Y);return}this._payloadLength=K*Math.pow(2,32)+q.readUInt32BE(4),this.haveLength(A)}haveLength(A){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){let q=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");A(q);return}}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData(A){let q=U9A;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(q=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0)c5K(q,this._mask)}if(this._opcode>7){this.controlMessage(q,A);return}if(this._compressed){this._state=5,this.decompress(q,A);return}if(q.length)this._messageLength=this._totalPayloadLength,this._fragments.push(q);this.dataMessage(A)}decompress(A,q){this._extensions[Q9A.extensionName].decompress(A,this._fin,(Y,z)=>{if(Y)return q(Y);if(z.length){if(this._messageLength+=z.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let w=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");q(w);return}this._fragments.push(z)}if(this.dataMessage(q),this._state===0)this.startLoop(q)})}dataMessage(A){if(!this._fin){this._state=0;return}let q=this._messageLength,K=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let Y;if(this._binaryType==="nodebuffer")Y=pc1(K,q);else if(this._binaryType==="arraybuffer")Y=d5K(pc1(K,q));else if(this._binaryType==="blob")Y=new Blob(K);else Y=K;if(this._allowSynchronousEvents)this.emit("message",Y,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",Y,!0),this._state=0,this.startLoop(A)})}else{let Y=pc1(K,q);if(!this._skipUTF8Validation&&!p9A(Y)){let z=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");A(z);return}if(this._state===5||this._allowSynchronousEvents)this.emit("message",Y,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",Y,!1),this._state=0,this.startLoop(A)})}}controlMessage(A,q){if(this._opcode===8){if(A.length===0)this._loop=!1,this.emit("conclude",1005,U9A),this.end();else{let K=A.readUInt16BE(0);if(!l5K(K)){let z=this.createError(RangeError,`invalid status code ${K}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");q(z);return}let Y=new aA1(A.buffer,A.byteOffset+2,A.length-2);if(!this._skipUTF8Validation&&!p9A(Y)){let z=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");q(z);return}this._loop=!1,this.emit("conclude",K,Y),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",A),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",A),this._state=0,this.startLoop(q)})}createError(A,q,K,Y,z){this._loop=!1,this._errored=!0;let w=new A(K?`Invalid WebSocket frame: ${q}`:q);return Error.captureStackTrace(w,this.createError),w.code=z,w[U5K]=Y,w}}c9A.exports=d9A});var lc1=C((BKw,n9A)=>{var{Duplex:uKw}=g6("stream"),{randomFillSync:i5K}=g6("crypto"),l9A=QS6(),{EMPTY_BUFFER:n5K,kWebSocket:r5K,NOOP:o5K}=dp(),{isBlob:Yj6,isValidStatusCode:a5K}=Kj6(),{mask:i9A,toBuffer:e46}=gS6(),By=Symbol("kByteLength"),s5K=Buffer.alloc(4),Aq6,zj6=8192,KI=0,t5K=1,e5K=2;class ro{constructor(A,q,K){if(this._extensions=q||{},K)this._generateMask=K,this._maskBuffer=Buffer.alloc(4);this._socket=A,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=KI,this.onerror=o5K,this[r5K]=void 0}static frame(A,q){let K,Y=!1,z=2,w=!1;if(q.mask){if(K=q.maskBuffer||s5K,q.generateMask)q.generateMask(K);else{if(zj6===8192){if(Aq6===void 0)Aq6=Buffer.alloc(8192);i5K(Aq6,0,8192),zj6=0}K[0]=Aq6[zj6++],K[1]=Aq6[zj6++],K[2]=Aq6[zj6++],K[3]=Aq6[zj6++]}w=(K[0]|K[1]|K[2]|K[3])===0,z=6}let _;if(typeof A==="string")if((!q.mask||w)&&q[By]!==void 0)_=q[By];else A=Buffer.from(A),_=A.length;else _=A.length,Y=q.mask&&q.readOnly&&!w;let $=_;if(_>=65536)z+=8,$=127;else if(_>125)z+=2,$=126;let O=Buffer.allocUnsafe(Y?_+z:z);if(O[0]=q.fin?q.opcode|128:q.opcode,q.rsv1)O[0]|=64;if(O[1]=$,$===126)O.writeUInt16BE(_,2);else if($===127)O[2]=O[3]=0,O.writeUIntBE(_,4,6);if(!q.mask)return[O,A];if(O[1]|=128,O[z-4]=K[0],O[z-3]=K[1],O[z-2]=K[2],O[z-1]=K[3],w)return[O,A];if(Y)return i9A(A,K,O,z,_),[O];return i9A(A,K,A,0,_),[O,A]}close(A,q,K,Y){let z;if(A===void 0)z=n5K;else if(typeof A!=="number"||!a5K(A))throw TypeError("First argument must be a valid error code number");else if(q===void 0||!q.length)z=Buffer.allocUnsafe(2),z.writeUInt16BE(A,0);else{let _=Buffer.byteLength(q);if(_>123)throw RangeError("The message must not be greater than 123 bytes");if(z=Buffer.allocUnsafe(2+_),z.writeUInt16BE(A,0),typeof q==="string")z.write(q,2);else z.set(q,2)}let w={[By]:z.length,fin:!0,generateMask:this._generateMask,mask:K,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==KI)this.enqueue([this.dispatch,z,!1,w,Y]);else this.sendFrame(ro.frame(z,w),Y)}ping(A,q,K){let Y,z;if(typeof A==="string")Y=Buffer.byteLength(A),z=!1;else if(Yj6(A))Y=A.size,z=!1;else A=e46(A),Y=A.length,z=e46.readOnly;if(Y>125)throw RangeError("The data size must not be greater than 125 bytes");let w={[By]:Y,fin:!0,generateMask:this._generateMask,mask:q,maskBuffer:this._maskBuffer,opcode:9,readOnly:z,rsv1:!1};if(Yj6(A))if(this._state!==KI)this.enqueue([this.getBlobData,A,!1,w,K]);else this.getBlobData(A,!1,w,K);else if(this._state!==KI)this.enqueue([this.dispatch,A,!1,w,K]);else this.sendFrame(ro.frame(A,w),K)}pong(A,q,K){let Y,z;if(typeof A==="string")Y=Buffer.byteLength(A),z=!1;else if(Yj6(A))Y=A.size,z=!1;else A=e46(A),Y=A.length,z=e46.readOnly;if(Y>125)throw RangeError("The data size must not be greater than 125 bytes");let w={[By]:Y,fin:!0,generateMask:this._generateMask,mask:q,maskBuffer:this._maskBuffer,opcode:10,readOnly:z,rsv1:!1};if(Yj6(A))if(this._state!==KI)this.enqueue([this.getBlobData,A,!1,w,K]);else this.getBlobData(A,!1,w,K);else if(this._state!==KI)this.enqueue([this.dispatch,A,!1,w,K]);else this.sendFrame(ro.frame(A,w),K)}send(A,q,K){let Y=this._extensions[l9A.extensionName],z=q.binary?2:1,w=q.compress,_,$;if(typeof A==="string")_=Buffer.byteLength(A),$=!1;else if(Yj6(A))_=A.size,$=!1;else A=e46(A),_=A.length,$=e46.readOnly;if(this._firstFragment){if(this._firstFragment=!1,w&&Y&&Y.params[Y._isServer?"server_no_context_takeover":"client_no_context_takeover"])w=_>=Y._threshold;this._compress=w}else w=!1,z=0;if(q.fin)this._firstFragment=!0;let O={[By]:_,fin:q.fin,generateMask:this._generateMask,mask:q.mask,maskBuffer:this._maskBuffer,opcode:z,readOnly:$,rsv1:w};if(Yj6(A))if(this._state!==KI)this.enqueue([this.getBlobData,A,this._compress,O,K]);else this.getBlobData(A,this._compress,O,K);else if(this._state!==KI)this.enqueue([this.dispatch,A,this._compress,O,K]);else this.dispatch(A,this._compress,O,K)}getBlobData(A,q,K,Y){this._bufferedBytes+=K[By],this._state=e5K,A.arrayBuffer().then((z)=>{if(this._socket.destroyed){let _=Error("The socket was closed while the blob was being read");process.nextTick(cc1,this,_,Y);return}this._bufferedBytes-=K[By];let w=e46(z);if(!q)this._state=KI,this.sendFrame(ro.frame(w,K),Y),this.dequeue();else this.dispatch(w,q,K,Y)}).catch((z)=>{process.nextTick(A9K,this,z,Y)})}dispatch(A,q,K,Y){if(!q){this.sendFrame(ro.frame(A,K),Y);return}let z=this._extensions[l9A.extensionName];this._bufferedBytes+=K[By],this._state=t5K,z.compress(A,K.fin,(w,_)=>{if(this._socket.destroyed){let $=Error("The socket was closed while data was being compressed");cc1(this,$,Y);return}this._bufferedBytes-=K[By],this._state=KI,K.readOnly=!1,this.sendFrame(ro.frame(_,K),Y),this.dequeue()})}dequeue(){while(this._state===KI&&this._queue.length){let A=this._queue.shift();this._bufferedBytes-=A[3][By],Reflect.apply(A[0],this,A.slice(1))}}enqueue(A){this._bufferedBytes+=A[3][By],this._queue.push(A)}sendFrame(A,q){if(A.length===2)this._socket.cork(),this._socket.write(A[0]),this._socket.write(A[1],q),this._socket.uncork();else this._socket.write(A[0],q)}}n9A.exports=ro;function cc1(A,q,K){if(typeof K==="function")K(q);for(let Y=0;Y<A._queue.length;Y++){let z=A._queue[Y],w=z[z.length-1];if(typeof w==="function")w(q)}}function A9K(A,q,K){cc1(A,q,K),A.onerror(q)}});var KYA=C((mKw,qYA)=>{var{kForOnEventAttribute:US6,kListener:ic1}=dp(),r9A=Symbol("kCode"),o9A=Symbol("kData"),a9A=Symbol("kError"),s9A=Symbol("kMessage"),t9A=Symbol("kReason"),wj6=Symbol("kTarget"),e9A=Symbol("kType"),AYA=Symbol("kWasClean");class oo{constructor(A){this[wj6]=null,this[e9A]=A}get target(){return this[wj6]}get type(){return this[e9A]}}Object.defineProperty(oo.prototype,"target",{enumerable:!0});Object.defineProperty(oo.prototype,"type",{enumerable:!0});class _j6 extends oo{constructor(A,q={}){super(A);this[r9A]=q.code===void 0?0:q.code,this[t9A]=q.reason===void 0?"":q.reason,this[AYA]=q.wasClean===void 0?!1:q.wasClean}get code(){return this[r9A]}get reason(){return this[t9A]}get wasClean(){return this[AYA]}}Object.defineProperty(_j6.prototype,"code",{enumerable:!0});Object.defineProperty(_j6.prototype,"reason",{enumerable:!0});Object.defineProperty(_j6.prototype,"wasClean",{enumerable:!0});class pS6 extends oo{constructor(A,q={}){super(A);this[a9A]=q.error===void 0?null:q.error,this[s9A]=q.message===void 0?"":q.message}get error(){return this[a9A]}get message(){return this[s9A]}}Object.defineProperty(pS6.prototype,"error",{enumerable:!0});Object.defineProperty(pS6.prototype,"message",{enumerable:!0});class tA1 extends oo{constructor(A,q={}){super(A);this[o9A]=q.data===void 0?null:q.data}get data(){return this[o9A]}}Object.defineProperty(tA1.prototype,"data",{enumerable:!0});var q9K={addEventListener(A,q,K={}){for(let z of this.listeners(A))if(!K[US6]&&z[ic1]===q&&!z[US6])return;let Y;if(A==="message")Y=function(w,_){let $=new tA1("message",{data:_?w:w.toString()});$[wj6]=this,sA1(q,this,$)};else if(A==="close")Y=function(w,_){let $=new _j6("close",{code:w,reason:_.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});$[wj6]=this,sA1(q,this,$)};else if(A==="error")Y=function(w){let _=new pS6("error",{error:w,message:w.message});_[wj6]=this,sA1(q,this,_)};else if(A==="open")Y=function(){let w=new oo("open");w[wj6]=this,sA1(q,this,w)};else return;if(Y[US6]=!!K[US6],Y[ic1]=q,K.once)this.once(A,Y);else this.on(A,Y)},removeEventListener(A,q){for(let K of this.listeners(A))if(K[ic1]===q&&!K[US6]){this.removeListener(A,K);break}}};qYA.exports={CloseEvent:_j6,ErrorEvent:pS6,Event:oo,EventTarget:q9K,MessageEvent:tA1};function sA1(A,q,K){if(typeof A==="object"&&A.handleEvent)A.handleEvent.call(A,K);else A.call(q,K)}});var nc1=C((gKw,YYA)=>{var{tokenChars:dS6}=Kj6();function FB(A,q,K){if(A[q]===void 0)A[q]=[K];else A[q].push(K)}function K9K(A){let q=Object.create(null),K=Object.create(null),Y=!1,z=!1,w=!1,_,$,O=-1,H=-1,j=-1,J=0;for(;J<A.length;J++)if(H=A.charCodeAt(J),_===void 0)if(j===-1&&dS6[H]===1){if(O===-1)O=J}else if(J!==0&&(H===32||H===9)){if(j===-1&&O!==-1)j=J}else if(H===59||H===44){if(O===-1)throw SyntaxError(`Unexpected character at index ${J}`);if(j===-1)j=J;let D=A.slice(O,j);if(H===44)FB(q,D,K),K=Object.create(null);else _=D;O=j=-1}else throw SyntaxError(`Unexpected character at index ${J}`);else if($===void 0)if(j===-1&&dS6[H]===1){if(O===-1)O=J}else if(H===32||H===9){if(j===-1&&O!==-1)j=J}else if(H===59||H===44){if(O===-1)throw SyntaxError(`Unexpected character at index ${J}`);if(j===-1)j=J;if(FB(K,A.slice(O,j),!0),H===44)FB(q,_,K),K=Object.create(null),_=void 0;O=j=-1}else if(H===61&&O!==-1&&j===-1)$=A.slice(O,J),O=j=-1;else throw SyntaxError(`Unexpected character at index ${J}`);else if(z){if(dS6[H]!==1)throw SyntaxError(`Unexpected character at index ${J}`);if(O===-1)O=J;else if(!Y)Y=!0;z=!1}else if(w)if(dS6[H]===1){if(O===-1)O=J}else if(H===34&&O!==-1)w=!1,j=J;else if(H===92)z=!0;else throw SyntaxError(`Unexpected character at index ${J}`);else if(H===34&&A.charCodeAt(J-1)===61)w=!0;else if(j===-1&&dS6[H]===1){if(O===-1)O=J}else if(O!==-1&&(H===32||H===9)){if(j===-1)j=J}else if(H===59||H===44){if(O===-1)throw SyntaxError(`Unexpected character at index ${J}`);if(j===-1)j=J;let D=A.slice(O,j);if(Y)D=D.replace(/\\/g,""),Y=!1;if(FB(K,$,D),H===44)FB(q,_,K),K=Object.create(null),_=void 0;$=void 0,O=j=-1}else throw SyntaxError(`Unexpected character at index ${J}`);if(O===-1||w||H===32||H===9)throw SyntaxError("Unexpected end of input");if(j===-1)j=J;let M=A.slice(O,j);if(_===void 0)FB(q,M,K);else{if($===void 0)FB(K,M,!0);else if(Y)FB(K,$,M.replace(/\\/g,""));else FB(K,$,M);FB(q,_,K)}return q}function Y9K(A){return Object.keys(A).map((q)=>{let K=A[q];if(!Array.isArray(K))K=[K];return K.map((Y)=>{return[q].concat(Object.keys(Y).map((z)=>{let w=Y[z];if(!Array.isArray(w))w=[w];return w.map((_)=>_===!0?z:`${z}=${_}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}YYA.exports={format:Y9K,parse:K9K}});var K71=C((UKw,PYA)=>{var z9K=g6("events"),w9K=g6("https"),_9K=g6("http"),_YA=g6("net"),$9K=g6("tls"),{randomBytes:O9K,createHash:H9K}=g6("crypto"),{Duplex:FKw,Readable:QKw}=g6("stream"),{URL:rc1}=g6("url"),ao=QS6(),j9K=dc1(),J9K=lc1(),{isBlob:M9K}=Kj6(),{BINARY_TYPES:zYA,EMPTY_BUFFER:eA1,GUID:D9K,kForOnEventAttribute:oc1,kListener:X9K,kStatusCode:P9K,kWebSocket:BX,NOOP:$YA}=dp(),{EventTarget:{addEventListener:W9K,removeEventListener:Z9K}}=KYA(),{format:G9K,parse:f9K}=nc1(),{toBuffer:T9K}=gS6(),OYA=Symbol("kAborted"),ac1=[8,13],lp=["CONNECTING","OPEN","CLOSING","CLOSED"],V9K=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class q5 extends z9K{constructor(A,q,K){super();if(this._binaryType=zYA[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=eA1,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=q5.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,A!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,q===void 0)q=[];else if(!Array.isArray(q))if(typeof q==="object"&&q!==null)K=q,q=[];else q=[q];HYA(this,A,q,K)}else this._autoPong=K.autoPong,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(A){if(!zYA.includes(A))return;if(this._binaryType=A,this._receiver)this._receiver._binaryType=A}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(A,q,K){let Y=new j9K({allowSynchronousEvents:K.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:K.maxPayload,skipUTF8Validation:K.skipUTF8Validation}),z=new J9K(A,this._extensions,K.generateMask);if(this._receiver=Y,this._sender=z,this._socket=A,Y[BX]=this,z[BX]=this,A[BX]=this,Y.on("conclude",k9K),Y.on("drain",E9K),Y.on("error",L9K),Y.on("message",y9K),Y.on("ping",R9K),Y.on("pong",S9K),z.onerror=C9K,A.setTimeout)A.setTimeout(0);if(A.setNoDelay)A.setNoDelay();if(q.length>0)A.unshift(q);A.on("close",MYA),A.on("data",q71),A.on("end",DYA),A.on("error",XYA),this._readyState=q5.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=q5.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[ao.extensionName])this._extensions[ao.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=q5.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(A,q){if(this.readyState===q5.CLOSED)return;if(this.readyState===q5.CONNECTING){hk(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===q5.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=q5.CLOSING,this._sender.close(A,q,!this._isServer,(K)=>{if(K)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),JYA(this)}pause(){if(this.readyState===q5.CONNECTING||this.readyState===q5.CLOSED)return;this._paused=!0,this._socket.pause()}ping(A,q,K){if(this.readyState===q5.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof A==="function")K=A,A=q=void 0;else if(typeof q==="function")K=q,q=void 0;if(typeof A==="number")A=A.toString();if(this.readyState!==q5.OPEN){sc1(this,A,K);return}if(q===void 0)q=!this._isServer;this._sender.ping(A||eA1,q,K)}pong(A,q,K){if(this.readyState===q5.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof A==="function")K=A,A=q=void 0;else if(typeof q==="function")K=q,q=void 0;if(typeof A==="number")A=A.toString();if(this.readyState!==q5.OPEN){sc1(this,A,K);return}if(q===void 0)q=!this._isServer;this._sender.pong(A||eA1,q,K)}resume(){if(this.readyState===q5.CONNECTING||this.readyState===q5.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send(A,q,K){if(this.readyState===q5.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof q==="function")K=q,q={};if(typeof A==="number")A=A.toString();if(this.readyState!==q5.OPEN){sc1(this,A,K);return}let Y={binary:typeof A!=="string",mask:!this._isServer,compress:!0,fin:!0,...q};if(!this._extensions[ao.extensionName])Y.compress=!1;this._sender.send(A||eA1,Y,K)}terminate(){if(this.readyState===q5.CLOSED)return;if(this.readyState===q5.CONNECTING){hk(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=q5.CLOSING,this._socket.destroy()}}Object.defineProperty(q5,"CONNECTING",{enumerable:!0,value:lp.indexOf("CONNECTING")});Object.defineProperty(q5.prototype,"CONNECTING",{enumerable:!0,value:lp.indexOf("CONNECTING")});Object.defineProperty(q5,"OPEN",{enumerable:!0,value:lp.indexOf("OPEN")});Object.defineProperty(q5.prototype,"OPEN",{enumerable:!0,value:lp.indexOf("OPEN")});Object.defineProperty(q5,"CLOSING",{enumerable:!0,value:lp.indexOf("CLOSING")});Object.defineProperty(q5.prototype,"CLOSING",{enumerable:!0,value:lp.indexOf("CLOSING")});Object.defineProperty(q5,"CLOSED",{enumerable:!0,value:lp.indexOf("CLOSED")});Object.defineProperty(q5.prototype,"CLOSED",{enumerable:!0,value:lp.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((A)=>{Object.defineProperty(q5.prototype,A,{enumerable:!0})});["open","error","close","message"].forEach((A)=>{Object.defineProperty(q5.prototype,`on${A}`,{enumerable:!0,get(){for(let q of this.listeners(A))if(q[oc1])return q[X9K];return null},set(q){for(let K of this.listeners(A))if(K[oc1]){this.removeListener(A,K);break}if(typeof q!=="function")return;this.addEventListener(A,q,{[oc1]:!0})}})});q5.prototype.addEventListener=W9K;q5.prototype.removeEventListener=Z9K;PYA.exports=q5;function HYA(A,q,K,Y){let z={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:ac1[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...Y,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(A._autoPong=z.autoPong,!ac1.includes(z.protocolVersion))throw RangeError(`Unsupported protocol version: ${z.protocolVersion} (supported versions: ${ac1.join(", ")})`);let w;if(q instanceof rc1)w=q;else try{w=new rc1(q)}catch(P){throw SyntaxError(`Invalid URL: ${q}`)}if(w.protocol==="http:")w.protocol="ws:";else if(w.protocol==="https:")w.protocol="wss:";A._url=w.href;let _=w.protocol==="wss:",$=w.protocol==="ws+unix:",O;if(w.protocol!=="ws:"&&!_&&!$)O=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if($&&!w.pathname)O="The URL's pathname is empty";else if(w.hash)O="The URL contains a fragment identifier";if(O){let P=SyntaxError(O);if(A._redirects===0)throw P;else{A71(A,P);return}}let H=_?443:80,j=O9K(16).toString("base64"),J=_?w9K.request:_9K.request,M=new Set,D;if(z.createConnection=z.createConnection||(_?v9K:N9K),z.defaultPort=z.defaultPort||H,z.port=w.port||H,z.host=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,z.headers={...z.headers,"Sec-WebSocket-Version":z.protocolVersion,"Sec-WebSocket-Key":j,Connection:"Upgrade",Upgrade:"websocket"},z.path=w.pathname+w.search,z.timeout=z.handshakeTimeout,z.perMessageDeflate)D=new ao(z.perMessageDeflate!==!0?z.perMessageDeflate:{},!1,z.maxPayload),z.headers["Sec-WebSocket-Extensions"]=G9K({[ao.extensionName]:D.offer()});if(K.length){for(let P of K){if(typeof P!=="string"||!V9K.test(P)||M.has(P))throw SyntaxError("An invalid or duplicated subprotocol was specified");M.add(P)}z.headers["Sec-WebSocket-Protocol"]=K.join(",")}if(z.origin)if(z.protocolVersion<13)z.headers["Sec-WebSocket-Origin"]=z.origin;else z.headers.Origin=z.origin;if(w.username||w.password)z.auth=`${w.username}:${w.password}`;if($){let P=z.path.split(":");z.socketPath=P[0],z.path=P[1]}let X;if(z.followRedirects){if(A._redirects===0){A._originalIpc=$,A._originalSecure=_,A._originalHostOrSocketPath=$?z.socketPath:w.host;let P=Y&&Y.headers;if(Y={...Y,headers:{}},P)for(let[W,Z]of Object.entries(P))Y.headers[W.toLowerCase()]=Z}else if(A.listenerCount("redirect")===0){let P=$?A._originalIpc?z.socketPath===A._originalHostOrSocketPath:!1:A._originalIpc?!1:w.host===A._originalHostOrSocketPath;if(!P||A._originalSecure&&!_){if(delete z.headers.authorization,delete z.headers.cookie,!P)delete z.headers.host;z.auth=void 0}}if(z.auth&&!Y.headers.authorization)Y.headers.authorization="Basic "+Buffer.from(z.auth).toString("base64");if(X=A._req=J(z),A._redirects)A.emit("redirect",A.url,X)}else X=A._req=J(z);if(z.timeout)X.on("timeout",()=>{hk(A,X,"Opening handshake has timed out")});if(X.on("error",(P)=>{if(X===null||X[OYA])return;X=A._req=null,A71(A,P)}),X.on("response",(P)=>{let W=P.headers.location,Z=P.statusCode;if(W&&z.followRedirects&&Z>=300&&Z<400){if(++A._redirects>z.maxRedirects){hk(A,X,"Maximum redirects exceeded");return}X.abort();let G;try{G=new rc1(W,q)}catch(f){let V=SyntaxError(`Invalid URL: ${W}`);A71(A,V);return}HYA(A,G,K,Y)}else if(!A.emit("unexpected-response",X,P))hk(A,X,`Unexpected server response: ${P.statusCode}`)}),X.on("upgrade",(P,W,Z)=>{if(A.emit("upgrade",P),A.readyState!==q5.CONNECTING)return;X=A._req=null;let G=P.headers.upgrade;if(G===void 0||G.toLowerCase()!=="websocket"){hk(A,W,"Invalid Upgrade header");return}let f=H9K("sha1").update(j+D9K).digest("base64");if(P.headers["sec-websocket-accept"]!==f){hk(A,W,"Invalid Sec-WebSocket-Accept header");return}let V=P.headers["sec-websocket-protocol"],N;if(V!==void 0){if(!M.size)N="Server sent a subprotocol but none was requested";else if(!M.has(V))N="Server sent an invalid subprotocol"}else if(M.size)N="Server sent no subprotocol";if(N){hk(A,W,N);return}if(V)A._protocol=V;let v=P.headers["sec-websocket-extensions"];if(v!==void 0){if(!D){hk(A,W,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let y;try{y=f9K(v)}catch(h){hk(A,W,"Invalid Sec-WebSocket-Extensions header");return}let R=Object.keys(y);if(R.length!==1||R[0]!==ao.extensionName){hk(A,W,"Server indicated an extension that was not requested");return}try{D.accept(y[ao.extensionName])}catch(h){hk(A,W,"Invalid Sec-WebSocket-Extensions header");return}A._extensions[ao.extensionName]=D}A.setSocket(W,Z,{allowSynchronousEvents:z.allowSynchronousEvents,generateMask:z.generateMask,maxPayload:z.maxPayload,skipUTF8Validation:z.skipUTF8Validation})}),z.finishRequest)z.finishRequest(X,A);else X.end()}function A71(A,q){A._readyState=q5.CLOSING,A._errorEmitted=!0,A.emit("error",q),A.emitClose()}function N9K(A){return A.path=A.socketPath,_YA.connect(A)}function v9K(A){if(A.path=void 0,!A.servername&&A.servername!=="")A.servername=_YA.isIP(A.host)?"":A.host;return $9K.connect(A)}function hk(A,q,K){A._readyState=q5.CLOSING;let Y=Error(K);if(Error.captureStackTrace(Y,hk),q.setHeader){if(q[OYA]=!0,q.abort(),q.socket&&!q.socket.destroyed)q.socket.destroy();process.nextTick(A71,A,Y)}else q.destroy(Y),q.once("error",A.emit.bind(A,"error")),q.once("close",A.emitClose.bind(A))}function sc1(A,q,K){if(q){let Y=M9K(q)?q.size:T9K(q).length;if(A._socket)A._sender._bufferedBytes+=Y;else A._bufferedAmount+=Y}if(K){let Y=Error(`WebSocket is not open: readyState ${A.readyState} (${lp[A.readyState]})`);process.nextTick(K,Y)}}function k9K(A,q){let K=this[BX];if(K._closeFrameReceived=!0,K._closeMessage=q,K._closeCode=A,K._socket[BX]===void 0)return;if(K._socket.removeListener("data",q71),process.nextTick(jYA,K._socket),A===1005)K.close();else K.close(A,q)}function E9K(){let A=this[BX];if(!A.isPaused)A._socket.resume()}function L9K(A){let q=this[BX];if(q._socket[BX]!==void 0)q._socket.removeListener("data",q71),process.nextTick(jYA,q._socket),q.close(A[P9K]);if(!q._errorEmitted)q._errorEmitted=!0,q.emit("error",A)}function wYA(){this[BX].emitClose()}function y9K(A,q){this[BX].emit("message",A,q)}function R9K(A){let q=this[BX];if(q._autoPong)q.pong(A,!this._isServer,$YA);q.emit("ping",A)}function S9K(A){this[BX].emit("pong",A)}function jYA(A){A.resume()}function C9K(A){let q=this[BX];if(q.readyState===q5.CLOSED)return;if(q.readyState===q5.OPEN)q._readyState=q5.CLOSING,JYA(q);if(this._socket.end(),!q._errorEmitted)q._errorEmitted=!0,q.emit("error",A)}function JYA(A){A._closeTimer=setTimeout(A._socket.destroy.bind(A._socket),30000)}function MYA(){let A=this[BX];this.removeListener("close",MYA),this.removeListener("data",q71),this.removeListener("end",DYA),A._readyState=q5.CLOSING;let q;if(!this._readableState.endEmitted&&!A._closeFrameReceived&&!A._receiver._writableState.errorEmitted&&(q=A._socket.read())!==null)A._receiver.write(q);if(A._receiver.end(),this[BX]=void 0,clearTimeout(A._closeTimer),A._receiver._writableState.finished||A._receiver._writableState.errorEmitted)A.emitClose();else A._receiver.on("error",wYA),A._receiver.on("finish",wYA)}function q71(A){if(!this[BX]._receiver.write(A))this.pause()}function DYA(){let A=this[BX];A._readyState=q5.CLOSING,A._receiver.end(),this.end()}function XYA(){let A=this[BX];if(this.removeListener("error",XYA),this.on("error",$YA),A)A._readyState=q5.CLOSING,this.destroy()}});var fYA=C((dKw,GYA)=>{var pKw=K71(),{Duplex:h9K}=g6("stream");function WYA(A){A.emit("close")}function I9K(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function ZYA(A){if(this.removeListener("error",ZYA),this.destroy(),this.listenerCount("error")===0)this.emit("error",A)}function b9K(A,q){let K=!0,Y=new h9K({...q,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return A.on("message",function(w,_){let $=!_&&Y._readableState.objectMode?w.toString():w;if(!Y.push($))A.pause()}),A.once("error",function(w){if(Y.destroyed)return;K=!1,Y.destroy(w)}),A.once("close",function(){if(Y.destroyed)return;Y.push(null)}),Y._destroy=function(z,w){if(A.readyState===A.CLOSED){w(z),process.nextTick(WYA,Y);return}let _=!1;if(A.once("error",function(O){_=!0,w(O)}),A.once("close",function(){if(!_)w(z);process.nextTick(WYA,Y)}),K)A.terminate()},Y._final=function(z){if(A.readyState===A.CONNECTING){A.once("open",function(){Y._final(z)});return}if(A._socket===null)return;if(A._socket._writableState.finished){if(z(),Y._readableState.endEmitted)Y.destroy()}else A._socket.once("finish",function(){z()}),A.close()},Y._read=function(){if(A.isPaused)A.resume()},Y._write=function(z,w,_){if(A.readyState===A.CONNECTING){A.once("open",function(){Y._write(z,w,_)});return}A.send(z,_)},Y.on("end",I9K),Y.on("error",ZYA),Y}GYA.exports=b9K});var VYA=C((cKw,TYA)=>{var{tokenChars:x9K}=Kj6();function u9K(A){let q=new Set,K=-1,Y=-1,z=0;for(z;z<A.length;z++){let _=A.charCodeAt(z);if(Y===-1&&x9K[_]===1){if(K===-1)K=z}else if(z!==0&&(_===32||_===9)){if(Y===-1&&K!==-1)Y=z}else if(_===44){if(K===-1)throw SyntaxError(`Unexpected character at index ${z}`);if(Y===-1)Y=z;let $=A.slice(K,Y);if(q.has($))throw SyntaxError(`The "${$}" subprotocol is duplicated`);q.add($),K=Y=-1}else throw SyntaxError(`Unexpected character at index ${z}`)}if(K===-1||Y!==-1)throw SyntaxError("Unexpected end of input");let w=A.slice(K,z);if(q.has(w))throw SyntaxError(`The "${w}" subprotocol is duplicated`);return q.add(w),q}TYA.exports={parse:u9K}});var LYA=C((iKw,EYA)=>{var B9K=g6("events"),Y71=g6("http"),{Duplex:lKw}=g6("stream"),{createHash:m9K}=g6("crypto"),NYA=nc1(),qq6=QS6(),g9K=VYA(),F9K=K71(),{GUID:Q9K,kWebSocket:U9K}=dp(),p9K=/^[+/0-9A-Za-z]{22}==$/;class kYA extends B9K{constructor(A,q){super();if(A={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:F9K,...A},A.port==null&&!A.server&&!A.noServer||A.port!=null&&(A.server||A.noServer)||A.server&&A.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(A.port!=null)this._server=Y71.createServer((K,Y)=>{let z=Y71.STATUS_CODES[426];Y.writeHead(426,{"Content-Length":z.length,"Content-Type":"text/plain"}),Y.end(z)}),this._server.listen(A.port,A.host,A.backlog,q);else if(A.server)this._server=A.server;if(this._server){let K=this.emit.bind(this,"connection");this._removeListeners=d9K(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(Y,z,w)=>{this.handleUpgrade(Y,z,w,K)}})}if(A.perMessageDeflate===!0)A.perMessageDeflate={};if(A.clientTracking)this.clients=new Set,this._shouldEmitClose=!1;this.options=A,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close(A){if(this._state===2){if(A)this.once("close",()=>{A(Error("The server is not running"))});process.nextTick(cS6,this);return}if(A)this.once("close",A);if(this._state===1)return;if(this._state=1,this.options.noServer||this.options.server){if(this._server)this._removeListeners(),this._removeListeners=this._server=null;if(this.clients)if(!this.clients.size)process.nextTick(cS6,this);else this._shouldEmitClose=!0;else process.nextTick(cS6,this)}else{let q=this._server;this._removeListeners(),this._removeListeners=this._server=null,q.close(()=>{cS6(this)})}}shouldHandle(A){if(this.options.path){let q=A.url.indexOf("?");if((q!==-1?A.url.slice(0,q):A.url)!==this.options.path)return!1}return!0}handleUpgrade(A,q,K,Y){q.on("error",vYA);let z=A.headers["sec-websocket-key"],w=A.headers.upgrade,_=+A.headers["sec-websocket-version"];if(A.method!=="GET"){Kq6(this,A,q,405,"Invalid HTTP method");return}if(w===void 0||w.toLowerCase()!=="websocket"){Kq6(this,A,q,400,"Invalid Upgrade header");return}if(z===void 0||!p9K.test(z)){Kq6(this,A,q,400,"Missing or invalid Sec-WebSocket-Key header");return}if(_!==13&&_!==8){Kq6(this,A,q,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(A)){lS6(q,400);return}let $=A.headers["sec-websocket-protocol"],O=new Set;if($!==void 0)try{O=g9K.parse($)}catch(J){Kq6(this,A,q,400,"Invalid Sec-WebSocket-Protocol header");return}let H=A.headers["sec-websocket-extensions"],j={};if(this.options.perMessageDeflate&&H!==void 0){let J=new qq6(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let M=NYA.parse(H);if(M[qq6.extensionName])J.accept(M[qq6.extensionName]),j[qq6.extensionName]=J}catch(M){Kq6(this,A,q,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let J={origin:A.headers[`${_===8?"sec-websocket-origin":"origin"}`],secure:!!(A.socket.authorized||A.socket.encrypted),req:A};if(this.options.verifyClient.length===2){this.options.verifyClient(J,(M,D,X,P)=>{if(!M)return lS6(q,D||401,X,P);this.completeUpgrade(j,z,O,A,q,K,Y)});return}if(!this.options.verifyClient(J))return lS6(q,401)}this.completeUpgrade(j,z,O,A,q,K,Y)}completeUpgrade(A,q,K,Y,z,w,_){if(!z.readable||!z.writable)return z.destroy();if(z[U9K])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return lS6(z,503);let O=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${m9K("sha1").update(q+Q9K).digest("base64")}`],H=new this.options.WebSocket(null,void 0,this.options);if(K.size){let j=this.options.handleProtocols?this.options.handleProtocols(K,Y):K.values().next().value;if(j)O.push(`Sec-WebSocket-Protocol: ${j}`),H._protocol=j}if(A[qq6.extensionName]){let j=A[qq6.extensionName].params,J=NYA.format({[qq6.extensionName]:[j]});O.push(`Sec-WebSocket-Extensions: ${J}`),H._extensions=A}if(this.emit("headers",O,Y),z.write(O.concat(`\r
`).join(`\r
`)),z.removeListener("error",vYA),H.setSocket(z,w,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(H),H.on("close",()=>{if(this.clients.delete(H),this._shouldEmitClose&&!this.clients.size)process.nextTick(cS6,this)});_(H,Y)}}EYA.exports=kYA;function d9K(A,q){for(let K of Object.keys(q))A.on(K,q[K]);return function(){for(let Y of Object.keys(q))A.removeListener(Y,q[Y])}}function cS6(A){A._state=2,A.emit("close")}function vYA(){this.destroy()}function lS6(A,q,K,Y){K=K||Y71.STATUS_CODES[q],Y={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(K),...Y},A.once("finish",A.destroy),A.end(`HTTP/1.1 ${q} ${Y71.STATUS_CODES[q]}\r
`+Object.keys(Y).map((z)=>`${z}: ${Y[z]}`).join(`\r
`)+`\r
\r
`+K)}function Kq6(A,q,K,Y,z,w){if(A.listenerCount("wsClientError")){let _=Error(z);Error.captureStackTrace(_,Kq6),A.emit("wsClientError",_,K,q)}else lS6(K,Y,z,w)}});var z71={};m1(z71,{default:()=>J0,createWebSocketStream:()=>yYA.default,WebSocketServer:()=>CYA.default,WebSocket:()=>tc1.default,Sender:()=>SYA.default,Receiver:()=>RYA.default});var yYA,RYA,SYA,tc1,CYA,J0;var $j6=k(()=>{yYA=e(fYA(),1),RYA=e(dc1(),1),SYA=e(lc1(),1),tc1=e(K71(),1),CYA=e(LYA(),1),J0=tc1.default});import{promises as hYA}from"fs";import{createConnection as c9K}from"net";import{platform as l9K}from"os";import{dirname as i9K}from"path";function n9K(A){return"result"in A||"error"in A}function r9K(A){return"method"in A&&typeof A.method==="string"}class IYA{socket=null;connected=!1;connecting=!1;responseCallback=null;notificationHandler=null;responseBuffer=Buffer.alloc(0);reconnectAttempts=0;maxReconnectAttempts=10;reconnectDelay=1000;reconnectTimer=null;context;disableAutoReconnect=!1;constructor(A){this.context=A}async connect(){let{serverName:A,logger:q}=this.context;if(this.connecting){q.info(`[${A}] Already connecting, skipping duplicate attempt`);return}this.closeSocket(),this.connecting=!0;let K=this.context.getSocketPath?.()??this.context.socketPath;q.info(`[${A}] Attempting to connect to: ${K}`);try{await this.validateSocketSecurity(K)}catch(z){this.connecting=!1,q.info(`[${A}] Security validation failed:`,z);return}this.socket=c9K(K);let Y=setTimeout(()=>{if(!this.connected)q.info(`[${A}] Connection attempt timed out after 5000ms`),this.closeSocket(),this.scheduleReconnect()},5000);this.socket.on("connect",()=>{clearTimeout(Y),this.connected=!0,this.connecting=!1,this.reconnectAttempts=0,q.info(`[${A}] Successfully connected to bridge server`)}),this.socket.on("data",(z)=>{this.responseBuffer=Buffer.concat([this.responseBuffer,z]);while(this.responseBuffer.length>=4){let w=this.responseBuffer.readUInt32LE(0);if(this.responseBuffer.length<4+w)break;let _=this.responseBuffer.slice(4,4+w);this.responseBuffer=this.responseBuffer.slice(4+w);try{let $=JSON.parse(_.toString("utf-8"));if(r9K($)){if(q.info(`[${A}] Received notification: ${$.method}`),this.notificationHandler)this.notificationHandler($)}else if(n9K($))q.info(`[${A}] Received tool response: ${$}`),this.handleResponse($);else q.info(`[${A}] Received unknown message: ${$}`)}catch($){q.info(`[${A}] Failed to parse message:`,$)}}}),this.socket.on("error",(z)=>{if(clearTimeout(Y),q.info(`[${A}] Socket error (code: ${z.code}):`,z),this.connected=!1,this.connecting=!1,z.code&&["ECONNREFUSED","ECONNRESET","EPIPE","ENOENT","EOPNOTSUPP","ECONNABORTED"].includes(z.code))this.scheduleReconnect()}),this.socket.on("close",()=>{clearTimeout(Y),this.connected=!1,this.connecting=!1,this.scheduleReconnect()})}scheduleReconnect(){let{serverName:A,logger:q}=this.context;if(this.disableAutoReconnect)return;if(this.reconnectTimer){q.info(`[${A}] Reconnect already scheduled, skipping`);return}this.reconnectAttempts++;let K=100;if(this.reconnectAttempts>K){q.info(`[${A}] Giving up after ${K} attempts. Will retry on next tool call.`),this.reconnectAttempts=0;return}let Y=Math.min(this.reconnectDelay*Math.pow(1.5,this.reconnectAttempts-1),30000);if(this.reconnectAttempts<=this.maxReconnectAttempts)q.info(`[${A}] Reconnecting in ${Math.round(Y)}ms (attempt ${this.reconnectAttempts})`);else if(this.reconnectAttempts%10===0)q.info(`[${A}] Still polling for native host (attempt ${this.reconnectAttempts})`);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},Y)}handleResponse(A){if(this.responseCallback){let q=this.responseCallback;this.responseCallback=null,q(A)}}setNotificationHandler(A){this.notificationHandler=A}async ensureConnected(){let{serverName:A}=this.context;if(this.connected&&this.socket)return!0;if(!this.socket&&!this.connecting)await this.connect();return new Promise((q,K)=>{let Y=null,z=setTimeout(()=>{if(Y)clearTimeout(Y);K(new Vf(`[${A}] Connection attempt timed out after 5000ms`))},5000),w=()=>{if(this.connected)clearTimeout(z),q(!0);else Y=setTimeout(w,500)};w()})}async sendRequest(A,q=30000){let{serverName:K}=this.context;if(!this.socket)throw new Vf(`[${K}] Cannot send request: not connected`);let Y=this.socket;return new Promise((z,w)=>{let _=setTimeout(()=>{this.responseCallback=null,w(new Vf(`[${K}] Tool request timed out after ${q}ms`))},q);this.responseCallback=(J)=>{clearTimeout(_),z(J)};let $=JSON.stringify(A),O=Buffer.from($,"utf-8"),H=Buffer.allocUnsafe(4);H.writeUInt32LE(O.length,0);let j=Buffer.concat([H,O]);Y.write(j)})}async callTool(A,q,K){let Y={method:"execute_tool",params:{client_id:this.context.clientTypeId,tool:A,args:q}};return this.sendRequestWithRetry(Y)}async sendRequestWithRetry(A){let{serverName:q,logger:K}=this.context;try{return await this.sendRequest(A)}catch(Y){if(!(Y instanceof Vf))throw Y;return K.info(`[${q}] Connection error, forcing reconnect and retrying: ${Y.message}`),this.closeSocket(),await this.ensureConnected(),await this.sendRequest(A)}}async setPermissionMode(A,q){}isConnected(){return this.connected}closeSocket(){if(this.socket)this.socket.removeAllListeners(),this.socket.end(),this.socket.destroy(),this.socket=null;this.connected=!1,this.connecting=!1}cleanup(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;this.closeSocket(),this.reconnectAttempts=0,this.responseBuffer=Buffer.alloc(0),this.responseCallback=null}disconnect(){this.cleanup()}async validateSocketSecurity(A){let{serverName:q,logger:K}=this.context;if(l9K()==="win32")return;try{let Y=i9K(A);if((Y.split("/").pop()||"").startsWith("claude-mcp-browser-bridge-"))try{let H=await hYA.stat(Y);if(H.isDirectory()){let j=H.mode&511;if(j!==448)throw Error(`[${q}] Insecure socket directory permissions: ${j.toString(8)} (expected 0700). Directory may have been tampered with.`);let J=process.getuid?.();if(J!==void 0&&H.uid!==J)throw Error(`Socket directory not owned by current user (uid: ${J}, dir uid: ${H.uid}). Potential security risk.`)}}catch(H){if(H.code!=="ENOENT")throw H}let _=await hYA.stat(A);if(!_.isSocket())throw Error(`[${q}] Path exists but it's not a socket: ${A}`);let $=_.mode&511;if($!==384)throw Error(`[${q}] Insecure socket permissions: ${$.toString(8)} (expected 0600). Socket may have been tampered with.`);let O=process.getuid?.();if(O!==void 0&&_.uid!==O)throw Error(`Socket not owned by current user (uid: ${O}, socket uid: ${_.uid}). Potential security risk.`);K.info(`[${q}] Socket security validation passed`)}catch(Y){if(Y.code==="ENOENT"){K.info(`[${q}] Socket not found, will be created by server`);return}throw Y}}}function w71(A){return new IYA(A)}var Vf;var iS6=k(()=>{Vf=class Vf extends Error{constructor(A){super(A);this.name="SocketConnectionError"}}});function _71(){return process.platform==="darwin"?"macOS":process.platform==="win32"?"Windows":"Linux"}class $71{ws=null;connected=!1;authenticated=!1;connecting=!1;reconnectTimer=null;reconnectAttempts=0;pendingCalls=new Map;notificationHandler=null;context;permissionMode="ask";allowedDomains;tabsContextCollectionTimeoutMs=2000;toolCallTimeoutMs=120000;connectionStartTime=null;connectionEstablishedTime=null;selectedDeviceId;discoveryComplete=!1;discoveryPromise=null;pendingDiscovery=null;previousSelectedDeviceId;peerConnectedWaiters=[];pendingPairingRequestId;pairingInProgress=!1;persistedDeviceId;pendingSwitchResolve=null;constructor(A){if(this.context=A,A.initialPermissionMode)this.permissionMode=A.initialPermissionMode}async ensureConnected(){let{logger:A,serverName:q}=this.context;if(A.info(`[${q}] ensureConnected called, connected=${this.connected}, authenticated=${this.authenticated}, wsState=${this.ws?.readyState}`),this.connected&&this.authenticated&&this.ws?.readyState===J0.OPEN)return A.info(`[${q}] Already connected and authenticated`),!0;if(!this.connecting)A.info(`[${q}] Not connecting, starting connection...`),await this.connect();else A.info(`[${q}] Already connecting, waiting...`);return new Promise((K)=>{let Y=setTimeout(()=>{A.info(`[${q}] Connection timeout, connected=${this.connected}, authenticated=${this.authenticated}`),K(!1)},1e4),z=()=>{if(this.connected&&this.authenticated)A.info(`[${q}] Connection successful`),clearTimeout(Y),K(!0);else if(!this.connecting)A.info(`[${q}] No longer connecting, giving up`),clearTimeout(Y),K(!1);else setTimeout(z,200)};z()})}async callTool(A,q,K){let{logger:Y,serverName:z,trackEvent:w}=this.context;if(!this.ws||this.ws.readyState!==J0.OPEN)throw new Vf(`[${z}] Bridge not connected`);if(!this.selectedDeviceId&&!this.discoveryComplete)this.discoveryPromise??=this.discoverAndSelectExtension().finally(()=>{this.discoveryPromise=null}),await this.discoveryPromise;let _=crypto.randomUUID(),$=A==="tabs_context_mcp",O=Date.now(),H=$?this.tabsContextCollectionTimeoutMs:this.toolCallTimeoutMs;w?.("chrome_bridge_tool_call_started",{tool_name:A,tool_use_id:_});let j=K?.permissionMode??this.permissionMode,J=K?.allowedDomains??this.allowedDomains;return new Promise((M,D)=>{let X=setTimeout(()=>{let W=this.pendingCalls.get(_);if(W){this.pendingCalls.delete(_);let Z=Date.now()-W.startTime;if($&&W.results.length>0)w?.("chrome_bridge_tool_call_completed",{tool_name:A,tool_use_id:_,duration_ms:Z}),M(this.mergeTabsResults(W.results));else Y.warn(`[${z}] Tool call timeout: ${A} (${_.slice(0,8)}) after ${Z}ms, pending calls: ${this.pendingCalls.size}`),w?.("chrome_bridge_tool_call_timeout",{tool_name:A,tool_use_id:_,duration_ms:Z,timeout_ms:H}),D(new Vf(`[${z}] Tool call timed out: ${A}`))}},H);this.pendingCalls.set(_,{resolve:M,reject:D,timer:X,results:[],isTabsContext:$,onPermissionRequest:K?.onPermissionRequest,startTime:O,toolName:A});let P={type:"tool_call",tool_use_id:_,client_type:this.context.clientTypeId,tool:A,args:q};if(this.selectedDeviceId)P.target_device_id=this.selectedDeviceId;if(j)P.permission_mode=j;if(J?.length)P.allowed_domains=J;if(K?.onPermissionRequest)P.handle_permission_prompts=!0;Y.debug(`[${z}] Sending tool_call: ${A} (${_.slice(0,8)})`),this.ws.send(JSON.stringify(P))})}isConnected(){return this.connected&&this.authenticated&&this.ws?.readyState===J0.OPEN}disconnect(){this.cleanup()}setNotificationHandler(A){this.notificationHandler=A}async setPermissionMode(A,q){this.permissionMode=A,this.allowedDomains=q}async discoverAndSelectExtension(){let{logger:A,serverName:q}=this.context;this.persistedDeviceId??=this.context.getPersistedDeviceId?.();let K=await this.queryBridgeExtensions();if(K.length===0){if(A.info(`[${q}] No extensions connected, waiting up to ${bYA}ms for peer_connected`),await this.waitForPeerConnected(bYA))K=await this.queryBridgeExtensions()}if(this.discoveryComplete=!0,K.length===0){A.info(`[${q}] No extensions found after waiting`);return}if(K.length===1){let Y=K[0];if(!this.isLocalExtension(Y))this.context.onRemoteExtensionWarning?.(Y);this.selectExtension(Y.deviceId);return}if(this.persistedDeviceId){let Y=K.find((z)=>z.deviceId===this.persistedDeviceId);if(Y){A.info(`[${q}] Auto-connecting to persisted extension: ${Y.name||Y.deviceId.slice(0,8)}`),this.selectExtension(Y.deviceId);return}}this.broadcastPairingRequest(),this.pairingInProgress=!0}async queryBridgeExtensions(){let A=await new Promise((K)=>{let Y=setTimeout(()=>{this.pendingDiscovery=null,K([])},o9K);this.pendingDiscovery={resolve:K,timeout:Y},this.ws?.send(JSON.stringify({type:"list_extensions"}))}),q=new Map;for(let K of A){let Y=q.get(K.deviceId);if(!Y||K.connectedAt>Y.connectedAt)q.set(K.deviceId,K)}return[...q.values()]}selectExtension(A){let{logger:q,serverName:K}=this.context;this.selectedDeviceId=A,this.previousSelectedDeviceId=void 0,q.info(`[${K}] Selected Chrome extension: ${A.slice(0,8)}...`)}isLocalExtension(A){if(!A.osPlatform)return!1;return A.osPlatform===_71()}waitForPeerConnected(A){return new Promise((q)=>{let K=setTimeout(()=>{this.peerConnectedWaiters=this.peerConnectedWaiters.filter((z)=>z!==Y),q(!1)},A),Y=(z)=>{clearTimeout(K),q(z)};this.peerConnectedWaiters.push(Y)})}broadcastPairingRequest(){let A=crypto.randomUUID();this.pendingPairingRequestId=A,this.ws?.send(JSON.stringify({type:"pairing_request",request_id:A,client_type:this.context.clientTypeId}))}async switchBrowser(){let A=await this.queryBridgeExtensions(),q=this.selectedDeviceId??this.previousSelectedDeviceId;if(A.length===0||A.length===1&&(!q||A[0].deviceId===q))return"no_other_browsers";this.previousSelectedDeviceId=this.selectedDeviceId,this.selectedDeviceId=void 0,this.discoveryComplete=!1,this.pairingInProgress=!1;let K=crypto.randomUUID();if(this.pendingPairingRequestId=K,this.ws?.readyState!==J0.OPEN)return null;if(this.ws.send(JSON.stringify({type:"pairing_request",request_id:K,client_type:this.context.clientTypeId})),this.pendingSwitchResolve)this.pendingSwitchResolve(null);return new Promise((Y)=>{let z=setTimeout(()=>{if(this.pendingPairingRequestId===K)this.pendingPairingRequestId=void 0;this.pendingSwitchResolve=null,Y(null)},120000);this.pendingSwitchResolve=(w)=>{clearTimeout(z),this.pendingSwitchResolve=null,Y(w)}})}async connect(){let{logger:A,serverName:q,bridgeConfig:K,trackEvent:Y}=this.context;if(!K){A.error(`[${q}] No bridge config provided`);return}if(this.connecting)return;this.connecting=!0,this.authenticated=!1,this.connectionStartTime=Date.now(),this.closeSocket();let z,w;if(K.devUserId)z=K.devUserId,A.debug(`[${q}] Using dev user ID for bridge connection`);else{A.debug(`[${q}] Fetching user ID for bridge connection`);let $=await K.getUserId();if(!$){let O=Date.now()-this.connectionStartTime;A.error(`[${q}] No user ID available after ${O}ms`),Y?.("chrome_bridge_connection_failed",{duration_ms:O,error_type:"no_user_id",reconnect_attempt:this.reconnectAttempts}),this.connecting=!1,this.context.onAuthenticationError?.();return}if(z=$,A.debug(`[${q}] Fetching OAuth token for bridge connection`),w=await K.getOAuthToken(),!w){let O=Date.now()-this.connectionStartTime;A.error(`[${q}] No OAuth token available after ${O}ms`),Y?.("chrome_bridge_connection_failed",{duration_ms:O,error_type:"no_oauth_token",reconnect_attempt:this.reconnectAttempts}),this.connecting=!1,this.context.onAuthenticationError?.();return}}let _=`${K.url}/chrome/${z}`;A.info(`[${q}] Connecting to bridge: ${_}`),Y?.("chrome_bridge_connection_started",{bridge_url:_});try{this.ws=new J0(_)}catch($){let O=Date.now()-this.connectionStartTime;A.error(`[${q}] Failed to create WebSocket after ${O}ms:`,$),Y?.("chrome_bridge_connection_failed",{duration_ms:O,error_type:"websocket_error",reconnect_attempt:this.reconnectAttempts}),this.connecting=!1,this.scheduleReconnect();return}this.ws.on("open",()=>{A.info(`[${q}] WebSocket connected, sending connect message`);let $={type:"connect",client_type:this.context.clientTypeId};if(K.devUserId)$.dev_user_id=K.devUserId;else $.oauth_token=w;this.ws?.send(JSON.stringify($))}),this.ws.on("message",($)=>{try{let O=JSON.parse($.toString());A.debug(`[${q}] Bridge received: ${JSON.stringify(O)}`),this.handleMessage(O)}catch(O){A.error(`[${q}] Failed to parse bridge message:`,O)}}),this.ws.on("close",($)=>{let O=this.connectionEstablishedTime?Date.now()-this.connectionEstablishedTime:0;A.info(`[${q}] Bridge connection closed (code: ${$}, duration: ${O}ms)`),Y?.("chrome_bridge_disconnected",{close_code:$,duration_since_connect_ms:O,reconnect_attempt:this.reconnectAttempts+1}),this.connected=!1,this.authenticated=!1,this.connecting=!1,this.connectionEstablishedTime=null,this.scheduleReconnect()}),this.ws.on("error",($)=>{let O=this.connectionStartTime?Date.now()-this.connectionStartTime:0;A.error(`[${q}] Bridge WebSocket error after ${O}ms: ${$.message}`),Y?.("chrome_bridge_connection_failed",{duration_ms:O,error_type:"websocket_error",reconnect_attempt:this.reconnectAttempts}),this.connected=!1,this.authenticated=!1,this.connecting=!1})}handleMessage(A){let{logger:q,serverName:K,trackEvent:Y}=this.context;switch(A.type){case"paired":{let z=this.connectionStartTime?Date.now()-this.connectionStartTime:0;q.info(`[${K}] Paired with Chrome extension (duration: ${z}ms)`),this.connected=!0,this.authenticated=!0,this.connecting=!1,this.reconnectAttempts=0,this.connectionEstablishedTime=Date.now(),Y?.("chrome_bridge_connection_succeeded",{duration_ms:z,status:"paired"});break}case"waiting":{let z=this.connectionStartTime?Date.now()-this.connectionStartTime:0;q.info(`[${K}] Waiting for Chrome extension to connect (duration: ${z}ms)`),this.connected=!0,this.authenticated=!0,this.connecting=!1,this.reconnectAttempts=0,this.connectionEstablishedTime=Date.now(),Y?.("chrome_bridge_connection_succeeded",{duration_ms:z,status:"waiting"});break}case"peer_connected":if(q.info(`[${K}] Chrome extension connected to bridge`),Y?.("chrome_bridge_peer_connected",null),!this.selectedDeviceId)this.discoveryComplete=!1;if(this.previousSelectedDeviceId&&A.deviceId===this.previousSelectedDeviceId&&!this.pendingSwitchResolve)q.info(`[${K}] Previously selected extension reconnected, auto-reselecting`),this.selectExtension(this.previousSelectedDeviceId),this.previousSelectedDeviceId=void 0;if(this.peerConnectedWaiters.length>0){let z=this.peerConnectedWaiters;this.peerConnectedWaiters=[];for(let w of z)w(!0)}break;case"peer_disconnected":if(q.info(`[${K}] Chrome extension disconnected from bridge`),Y?.("chrome_bridge_peer_disconnected",null),A.deviceId&&A.deviceId===this.selectedDeviceId)q.info(`[${K}] Selected extension disconnected, clearing selection`),this.previousSelectedDeviceId=this.selectedDeviceId,this.selectedDeviceId=void 0,this.discoveryComplete=!1;break;case"extensions_list":if(this.pendingDiscovery)clearTimeout(this.pendingDiscovery.timeout),this.pendingDiscovery.resolve(A.extensions??[]),this.pendingDiscovery=null;break;case"pairing_response":{let{request_id:z,device_id:w,name:_}=A;if(this.pendingPairingRequestId===z&&w&&_){if(this.pendingPairingRequestId=void 0,this.pairingInProgress=!1,this.selectExtension(w),this.context.onExtensionPaired?.(w,_),q.info(`[${K}] Paired with "${_}" (${w.slice(0,8)})`),this.pendingSwitchResolve)this.pendingSwitchResolve({deviceId:w,name:_}),this.pendingSwitchResolve=null}break}case"ping":this.ws?.send(JSON.stringify({type:"pong"}));break;case"pong":break;case"tool_result":this.handleToolResult(A);break;case"permission_request":this.handlePermissionRequest(A);break;case"notification":if(this.notificationHandler)this.notificationHandler({method:A.method,params:A.params});break;case"error":if(q.warn(`[${K}] Bridge error: ${A.error}`),this.selectedDeviceId)this.selectedDeviceId=void 0,this.discoveryComplete=!1;break;default:q.warn(`[${K}] Unrecognized bridge message type: ${A.type}`)}}async handlePermissionRequest(A){let{logger:q,serverName:K}=this.context,Y=A.tool_use_id,z=A.request_id;if(!Y||!z){q.warn(`[${K}] permission_request missing tool_use_id or request_id`);return}let w=this.pendingCalls.get(Y);if(!w?.onPermissionRequest){q.debug(`[${K}] Ignoring permission_request for unknown tool_use_id ${Y.slice(0,8)} (not our call)`);return}let _={toolUseId:Y,requestId:z,toolType:A.tool_type??"unknown",url:A.url??"",actionData:A.action_data};try{let $=await w.onPermissionRequest(_);this.sendPermissionResponse(z,$)}catch($){q.error(`[${K}] Error handling permission request:`,$),this.sendPermissionResponse(z,!1)}}sendPermissionResponse(A,q){if(this.ws?.readyState===J0.OPEN){let K={type:"permission_response",request_id:A,allowed:q};if(this.selectedDeviceId)K.target_device_id=this.selectedDeviceId;this.ws.send(JSON.stringify(K))}}handleToolResult(A){let{logger:q,serverName:K,trackEvent:Y}=this.context,z=A.tool_use_id;if(!z){q.warn(`[${K}] Received tool_result without tool_use_id`);return}let w=this.pendingCalls.get(z);if(!w){q.debug(`[${K}] Received tool_result for unknown call: ${z.slice(0,8)}`);return}let _=Date.now()-w.startTime,$=this.normalizeBridgeResponse(A),O=Boolean(A.is_error)||"error"in $;if(w.isTabsContext&&!this.selectedDeviceId)w.results.push($);else{if(clearTimeout(w.timer),this.pendingCalls.delete(z),O){let H=$.error?.content,j="Unknown error";if(Array.isArray(H)){let J=H.find((M)=>typeof M==="object"&&M!==null&&("text"in M));if(J?.text)j=J.text.slice(0,200)}q.warn(`[${K}] Tool call error: ${w.toolName} (${z.slice(0,8)}) after ${_}ms`),Y?.("chrome_bridge_tool_call_error",{tool_name:w.toolName,tool_use_id:z,duration_ms:_,error_message:j})}else q.debug(`[${K}] Tool call completed: ${w.toolName} (${z.slice(0,8)}) in ${_}ms`),Y?.("chrome_bridge_tool_call_completed",{tool_name:w.toolName,tool_use_id:z,duration_ms:_});w.resolve($)}}normalizeBridgeResponse(A){if(A.result||A.error)return A;if(A.content){if(A.is_error)return{error:{content:A.content}};return{result:{content:A.content}}}return A}mergeTabsResults(A){let q=[];for(let K of A){let w=K.result?.content;if(!w||!Array.isArray(w))continue;for(let _ of w)if(_.type==="text"&&_.text)try{let $=JSON.parse(_.text);if(Array.isArray($))q.push(...$);else if($?.availableTabs&&Array.isArray($.availableTabs))q.push(...$.availableTabs)}catch{}}if(q.length>0){let K=q.map((Y)=>{let z=Y;return`  • tabId ${z.tabId}: "${z.title}" (${z.url})`}).join(`
`);return{result:{content:[{type:"text",text:JSON.stringify({availableTabs:q})},{type:"text",text:`

Tab Context:
- Available tabs:
${K}`}]}}}return A[0]}scheduleReconnect(){let{logger:A,serverName:q,trackEvent:K}=this.context;if(this.reconnectTimer)return;if(this.reconnectAttempts++,this.reconnectAttempts>100){A.warn(`[${q}] Giving up bridge reconnection after 100 attempts`),K?.("chrome_bridge_reconnect_exhausted",{total_attempts:100}),this.reconnectAttempts=0;return}let Y=Math.min(2000*Math.pow(1.5,this.reconnectAttempts-1),30000);if(this.reconnectAttempts<=10||this.reconnectAttempts%10===0)A.info(`[${q}] Bridge reconnecting in ${Math.round(Y)}ms (attempt ${this.reconnectAttempts})`);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},Y)}closeSocket(){if(this.ws)this.ws.removeAllListeners(),this.ws.close(),this.ws=null;if(this.connected=!1,this.authenticated=!1,this.selectedDeviceId=void 0,this.discoveryComplete=!1,this.pendingPairingRequestId=void 0,this.pairingInProgress=!1,this.pendingSwitchResolve)this.pendingSwitchResolve(null),this.pendingSwitchResolve=null;if(this.pendingDiscovery)clearTimeout(this.pendingDiscovery.timeout),this.pendingDiscovery.resolve([]),this.pendingDiscovery=null;if(this.peerConnectedWaiters.length>0){let A=this.peerConnectedWaiters;this.peerConnectedWaiters=[];for(let q of A)q(!1)}}cleanup(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;for(let[A,q]of this.pendingCalls)clearTimeout(q.timer),q.reject(new Vf("Bridge client disconnected")),this.pendingCalls.delete(A);this.closeSocket(),this.reconnectAttempts=0}}function O71(A){return new $71(A)}var o9K=5000,bYA=1e4;var ec1=k(()=>{$j6();iS6()});var ip;var Al1=k(()=>{ip=[{name:"javascript_tool",description:"Execute JavaScript code in the context of the current page. The code runs in the page's context and can interact with the DOM, window object, and page variables. Returns the result of the last expression or any thrown errors. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{action:{type:"string",description:"Must be set to 'javascript_exec'"},text:{type:"string",description:"The JavaScript code to execute. The code will be evaluated in the page context. The result of the last expression will be returned automatically. Do NOT use 'return' statements - just write the expression you want to evaluate (e.g., 'window.myData.value' not 'return window.myData.value'). You can access and modify the DOM, call page functions, and interact with page variables."},tabId:{type:"number",description:"Tab ID to execute the code in. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["action","text","tabId"]}},{name:"read_page",description:"Get an accessibility tree representation of elements on the page. By default returns all elements including non-visible ones. Output is limited to 50000 characters by default. If the output exceeds this limit, you will receive an error asking you to specify a smaller depth or focus on a specific element using ref_id. Optionally filter for only interactive elements. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{filter:{type:"string",enum:["interactive","all"],description:'Filter elements: "interactive" for buttons/links/inputs only, "all" for all elements including non-visible ones (default: all elements)'},tabId:{type:"number",description:"Tab ID to read from. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."},depth:{type:"number",description:"Maximum depth of the tree to traverse (default: 15). Use a smaller depth if output is too large."},ref_id:{type:"string",description:"Reference ID of a parent element to read. Will return the specified element and all its children. Use this to focus on a specific part of the page when output is too large."},max_chars:{type:"number",description:"Maximum characters for output (default: 50000). Set to a higher value if your client can handle large outputs."}},required:["tabId"]}},{name:"find",description:`Find elements on the page using natural language. Can search for elements by their purpose (e.g., "search bar", "login button") or by text content (e.g., "organic mango product"). Returns up to 20 matching elements with references that can be used with other tools. If more than 20 matches exist, you'll be notified to use a more specific query. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.`,inputSchema:{type:"object",properties:{query:{type:"string",description:'Natural language description of what to find (e.g., "search bar", "add to cart button", "product title containing organic")'},tabId:{type:"number",description:"Tab ID to search in. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["query","tabId"]}},{name:"form_input",description:"Set values in form elements using element reference ID from the read_page tool. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{ref:{type:"string",description:'Element reference ID from the read_page tool (e.g., "ref_1", "ref_2")'},value:{type:["string","boolean","number"],description:"The value to set. For checkboxes use boolean, for selects use option value or text, for other inputs use appropriate string/number"},tabId:{type:"number",description:"Tab ID to set form value in. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["ref","value","tabId"]}},{name:"computer",description:`Use a mouse and keyboard to interact with a web browser, and take screenshots. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.
* Whenever you intend to click on an element like an icon, you should consult a screenshot to determine the coordinates of the element before moving the cursor.
* If you tried clicking on a program or link but it failed to load, even after waiting, try adjusting your click location so that the tip of the cursor visually falls on the element that you want to click.
* Make sure to click any buttons, links, icons, etc with the cursor tip in the center of the element. Don't click boxes on their edges unless asked.`,inputSchema:{type:"object",properties:{action:{type:"string",enum:["left_click","right_click","type","screenshot","wait","scroll","key","left_click_drag","double_click","triple_click","zoom","scroll_to","hover"],description:"The action to perform:\n* `left_click`: Click the left mouse button at the specified coordinates.\n* `right_click`: Click the right mouse button at the specified coordinates to open context menus.\n* `double_click`: Double-click the left mouse button at the specified coordinates.\n* `triple_click`: Triple-click the left mouse button at the specified coordinates.\n* `type`: Type a string of text.\n* `screenshot`: Take a screenshot of the screen.\n* `wait`: Wait for a specified number of seconds.\n* `scroll`: Scroll up, down, left, or right at the specified coordinates.\n* `key`: Press a specific keyboard key.\n* `left_click_drag`: Drag from start_coordinate to coordinate.\n* `zoom`: Take a screenshot of a specific region for closer inspection.\n* `scroll_to`: Scroll an element into view using its element reference ID from read_page or find tools.\n* `hover`: Move the mouse cursor to the specified coordinates or element without clicking. Useful for revealing tooltips, dropdown menus, or triggering hover states."},coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y): The x (pixels from the left edge) and y (pixels from the top edge) coordinates. Required for `left_click`, `right_click`, `double_click`, `triple_click`, and `scroll`. For `left_click_drag`, this is the end position."},text:{type:"string",description:'The text to type (for `type` action) or the key(s) to press (for `key` action). For `key` action: Provide space-separated keys (e.g., "Backspace Backspace Delete"). Supports keyboard shortcuts using the platform\'s modifier key (use "cmd" on Mac, "ctrl" on Windows/Linux, e.g., "cmd+a" or "ctrl+a" for select all).'},duration:{type:"number",minimum:0,maximum:30,description:"The number of seconds to wait. Required for `wait`. Maximum 30 seconds."},scroll_direction:{type:"string",enum:["up","down","left","right"],description:"The direction to scroll. Required for `scroll`."},scroll_amount:{type:"number",minimum:1,maximum:10,description:"The number of scroll wheel ticks. Optional for `scroll`, defaults to 3."},start_coordinate:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"(x, y): The starting coordinates for `left_click_drag`."},region:{type:"array",items:{type:"number"},minItems:4,maxItems:4,description:"(x0, y0, x1, y1): The rectangular region to capture for `zoom`. Coordinates define a rectangle from top-left (x0, y0) to bottom-right (x1, y1) in pixels from the viewport origin. Required for `zoom` action. Useful for inspecting small UI elements like icons, buttons, or text."},repeat:{type:"number",minimum:1,maximum:100,description:"Number of times to repeat the key sequence. Only applicable for `key` action. Must be a positive integer between 1 and 100. Default is 1. Useful for navigation tasks like pressing arrow keys multiple times."},ref:{type:"string",description:'Element reference ID from read_page or find tools (e.g., "ref_1", "ref_2"). Required for `scroll_to` action. Can be used as alternative to `coordinate` for click actions.'},modifiers:{type:"string",description:'Modifier keys for click actions. Supports: "ctrl", "shift", "alt", "cmd" (or "meta"), "win" (or "windows"). Can be combined with "+" (e.g., "ctrl+shift", "cmd+alt"). Optional.'},tabId:{type:"number",description:"Tab ID to execute the action on. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["action","tabId"]}},{name:"navigate",description:"Navigate to a URL, or go forward/back in browser history. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{url:{type:"string",description:'The URL to navigate to. Can be provided with or without protocol (defaults to https://). Use "forward" to go forward in history or "back" to go back in history.'},tabId:{type:"number",description:"Tab ID to navigate. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["url","tabId"]}},{name:"resize_window",description:"Resize the current browser window to specified dimensions. Useful for testing responsive designs or setting up specific screen sizes. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{width:{type:"number",description:"Target window width in pixels"},height:{type:"number",description:"Target window height in pixels"},tabId:{type:"number",description:"Tab ID to get the window for. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["width","height","tabId"]}},{name:"gif_creator",description:"Manage GIF recording and export for browser automation sessions. Control when to start/stop recording browser actions (clicks, scrolls, navigation), then export as an animated GIF with visual overlays (click indicators, action labels, progress bar, watermark). All operations are scoped to the tab's group. When starting recording, take a screenshot immediately after to capture the initial state as the first frame. When stopping recording, take a screenshot immediately before to capture the final state as the last frame. For export, either provide 'coordinate' to drag/drop upload to a page element, or set 'download: true' to download the GIF.",inputSchema:{type:"object",properties:{action:{type:"string",enum:["start_recording","stop_recording","export","clear"],description:"Action to perform: 'start_recording' (begin capturing), 'stop_recording' (stop capturing but keep frames), 'export' (generate and export GIF), 'clear' (discard frames)"},tabId:{type:"number",description:"Tab ID to identify which tab group this operation applies to"},download:{type:"boolean",description:"Always set this to true for the 'export' action only. This causes the gif to be downloaded in the browser."},filename:{type:"string",description:"Optional filename for exported GIF (default: 'recording-[timestamp].gif'). For 'export' action only."},options:{type:"object",description:"Optional GIF enhancement options for 'export' action. Properties: showClickIndicators (bool), showDragPaths (bool), showActionLabels (bool), showProgressBar (bool), showWatermark (bool), quality (number 1-30). All default to true except quality (default: 10).",properties:{showClickIndicators:{type:"boolean",description:"Show orange circles at click locations (default: true)"},showDragPaths:{type:"boolean",description:"Show red arrows for drag actions (default: true)"},showActionLabels:{type:"boolean",description:"Show black labels describing actions (default: true)"},showProgressBar:{type:"boolean",description:"Show orange progress bar at bottom (default: true)"},showWatermark:{type:"boolean",description:"Show Claude logo watermark (default: true)"},quality:{type:"number",description:"GIF compression quality, 1-30 (lower = better quality, slower encoding). Default: 10"}}}},required:["action","tabId"]}},{name:"upload_image",description:"Upload a previously captured screenshot or user-uploaded image to a file input or drag & drop target. Supports two approaches: (1) ref - for targeting specific elements, especially hidden file inputs, (2) coordinate - for drag & drop to visible locations like Google Docs. Provide either ref or coordinate, not both.",inputSchema:{type:"object",properties:{imageId:{type:"string",description:"ID of a previously captured screenshot (from the computer tool's screenshot action) or a user-uploaded image"},ref:{type:"string",description:'Element reference ID from read_page or find tools (e.g., "ref_1", "ref_2"). Use this for file inputs (especially hidden ones) or specific elements. Provide either ref or coordinate, not both.'},coordinate:{type:"array",items:{type:"number"},description:"Viewport coordinates [x, y] for drag & drop to a visible location. Use this for drag & drop targets like Google Docs. Provide either ref or coordinate, not both."},tabId:{type:"number",description:"Tab ID where the target element is located. This is where the image will be uploaded to."},filename:{type:"string",description:'Optional filename for the uploaded file (default: "image.png")'}},required:["imageId","tabId"]}},{name:"get_page_text",description:"Extract raw text content from the page, prioritizing article content. Ideal for reading articles, blog posts, or other text-heavy pages. Returns plain text without HTML formatting. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{tabId:{type:"number",description:"Tab ID to extract text from. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["tabId"]}},{name:"tabs_context_mcp",title:"Tabs Context",description:"Get context information about the current MCP tab group. Returns all tab IDs inside the group if it exists. CRITICAL: You must get the context at least once before using other browser automation tools so you know what tabs exist. Each new conversation should create its own new tab (using tabs_create_mcp) rather than reusing existing tabs, unless the user explicitly asks to use an existing tab.",inputSchema:{type:"object",properties:{createIfEmpty:{type:"boolean",description:"Creates a new MCP tab group if none exists, creates a new Window with a new tab group containing an empty tab (which can be used for this conversation). If a MCP tab group already exists, this parameter has no effect."}},required:[]}},{name:"tabs_create_mcp",title:"Tabs Create",description:"Creates a new empty tab in the MCP tab group. CRITICAL: You must get the context using tabs_context_mcp at least once before using other browser automation tools so you know what tabs exist.",inputSchema:{type:"object",properties:{},required:[]}},{name:"update_plan",description:"Present a plan to the user for approval before taking actions. The user will see the domains you intend to visit and your approach. Once approved, you can proceed with actions on the approved domains without additional permission prompts.",inputSchema:{type:"object",properties:{domains:{type:"array",items:{type:"string"},description:"List of domains you will visit (e.g., ['github.com', 'stackoverflow.com']). These domains will be approved for the session when the user accepts the plan."},approach:{type:"array",items:{type:"string"},description:"High-level description of what you will do. Focus on outcomes and key actions, not implementation details. Be concise - aim for 3-7 items."}},required:["domains","approach"]}},{name:"read_console_messages",description:"Read browser console messages (console.log, console.error, console.warn, etc.) from a specific tab. Useful for debugging JavaScript errors, viewing application logs, or understanding what's happening in the browser console. Returns console messages from the current domain only. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs. IMPORTANT: Always provide a pattern to filter messages - without a pattern, you may get too many irrelevant messages.",inputSchema:{type:"object",properties:{tabId:{type:"number",description:"Tab ID to read console messages from. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."},onlyErrors:{type:"boolean",description:"If true, only return error and exception messages. Default is false (return all message types)."},clear:{type:"boolean",description:"If true, clear the console messages after reading to avoid duplicates on subsequent calls. Default is false."},pattern:{type:"string",description:"Regex pattern to filter console messages. Only messages matching this pattern will be returned (e.g., 'error|warning' to find errors and warnings, 'MyApp' to filter app-specific logs). You should always provide a pattern to avoid getting too many irrelevant messages."},limit:{type:"number",description:"Maximum number of messages to return. Defaults to 100. Increase only if you need more results."}},required:["tabId"]}},{name:"read_network_requests",description:"Read HTTP network requests (XHR, Fetch, documents, images, etc.) from a specific tab. Useful for debugging API calls, monitoring network activity, or understanding what requests a page is making. Returns all network requests made by the current page, including cross-origin requests. Requests are automatically cleared when the page navigates to a different domain. If you don't have a valid tab ID, use tabs_context_mcp first to get available tabs.",inputSchema:{type:"object",properties:{tabId:{type:"number",description:"Tab ID to read network requests from. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."},urlPattern:{type:"string",description:"Optional URL pattern to filter requests. Only requests whose URL contains this string will be returned (e.g., '/api/' to filter API calls, 'example.com' to filter by domain)."},clear:{type:"boolean",description:"If true, clear the network requests after reading to avoid duplicates on subsequent calls. Default is false."},limit:{type:"number",description:"Maximum number of requests to return. Defaults to 100. Increase only if you need more results."}},required:["tabId"]}},{name:"shortcuts_list",description:"List all available shortcuts and workflows (shortcuts and workflows are interchangeable). Returns shortcuts with their commands, descriptions, and whether they are workflows. Use shortcuts_execute to run a shortcut or workflow.",inputSchema:{type:"object",properties:{tabId:{type:"number",description:"Tab ID to list shortcuts from. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."}},required:["tabId"]}},{name:"shortcuts_execute",description:"Execute a shortcut or workflow by running it in a new sidepanel window using the current tab (shortcuts and workflows are interchangeable). Use shortcuts_list first to see available shortcuts. This starts the execution and returns immediately - it does not wait for completion.",inputSchema:{type:"object",properties:{tabId:{type:"number",description:"Tab ID to execute the shortcut on. Must be a tab in the current group. Use tabs_context_mcp first if you don't have a valid tab ID."},shortcutId:{type:"string",description:"The ID of the shortcut to execute"},command:{type:"string",description:"The command name of the shortcut to execute (e.g., 'debug', 'summarize'). Do not include the leading slash."}},required:["tabId"]}},{name:"switch_browser",description:"Switch which Chrome browser is used for browser automation. Call this when the user wants to connect to a different Chrome browser. Broadcasts a connection request to all Chrome browsers with the extension installed — the user clicks 'Connect' in the desired browser.",inputSchema:{type:"object",properties:{},required:[]}}]});var a9,ql1,m7,QB=(A)=>{switch(typeof A){case"undefined":return m7.undefined;case"string":return m7.string;case"number":return Number.isNaN(A)?m7.nan:m7.number;case"boolean":return m7.boolean;case"function":return m7.function;case"bigint":return m7.bigint;case"symbol":return m7.symbol;case"object":if(Array.isArray(A))return m7.array;if(A===null)return m7.null;if(A.then&&typeof A.then==="function"&&A.catch&&typeof A.catch==="function")return m7.promise;if(typeof Map<"u"&&A instanceof Map)return m7.map;if(typeof Set<"u"&&A instanceof Set)return m7.set;if(typeof Date<"u"&&A instanceof Date)return m7.date;return m7.object;default:return m7.unknown}};var nS6=k(()=>{(function(A){A.assertEqual=(z)=>{};function q(z){}A.assertIs=q;function K(z){throw Error()}A.assertNever=K,A.arrayToEnum=(z)=>{let w={};for(let _ of z)w[_]=_;return w},A.getValidEnumValues=(z)=>{let w=A.objectKeys(z).filter(($)=>typeof z[z[$]]!=="number"),_={};for(let $ of w)_[$]=z[$];return A.objectValues(_)},A.objectValues=(z)=>{return A.objectKeys(z).map(function(w){return z[w]})},A.objectKeys=typeof Object.keys==="function"?(z)=>Object.keys(z):(z)=>{let w=[];for(let _ in z)if(Object.prototype.hasOwnProperty.call(z,_))w.push(_);return w},A.find=(z,w)=>{for(let _ of z)if(w(_))return _;return},A.isInteger=typeof Number.isInteger==="function"?(z)=>Number.isInteger(z):(z)=>typeof z==="number"&&Number.isFinite(z)&&Math.floor(z)===z;function Y(z,w=" | "){return z.map((_)=>typeof _==="string"?`'${_}'`:_).join(w)}A.joinValues=Y,A.jsonStringifyReplacer=(z,w)=>{if(typeof w==="bigint")return w.toString();return w}})(a9||(a9={}));(function(A){A.mergeShapes=(q,K)=>{return{...q,...K}}})(ql1||(ql1={}));m7=a9.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var eA,a9K=(A)=>{return JSON.stringify(A,null,2).replace(/"([^"]+)":/g,"$1:")},SV;var H71=k(()=>{nS6();eA=a9.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);SV=class SV extends Error{get errors(){return this.issues}constructor(A){super();this.issues=[],this.addIssue=(K)=>{this.issues=[...this.issues,K]},this.addIssues=(K=[])=>{this.issues=[...this.issues,...K]};let q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,q);else this.__proto__=q;this.name="ZodError",this.issues=A}format(A){let q=A||function(z){return z.message},K={_errors:[]},Y=(z)=>{for(let w of z.issues)if(w.code==="invalid_union")w.unionErrors.map(Y);else if(w.code==="invalid_return_type")Y(w.returnTypeError);else if(w.code==="invalid_arguments")Y(w.argumentsError);else if(w.path.length===0)K._errors.push(q(w));else{let _=K,$=0;while($<w.path.length){let O=w.path[$];if($!==w.path.length-1)_[O]=_[O]||{_errors:[]};else _[O]=_[O]||{_errors:[]},_[O]._errors.push(q(w));_=_[O],$++}}};return Y(this),K}static assert(A){if(!(A instanceof SV))throw Error(`Not a ZodError: ${A}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,a9.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(A=(q)=>q.message){let q={},K=[];for(let Y of this.issues)if(Y.path.length>0){let z=Y.path[0];q[z]=q[z]||[],q[z].push(A(Y))}else K.push(A(Y));return{formErrors:K,fieldErrors:q}}get formErrors(){return this.flatten()}};SV.create=(A)=>{return new SV(A)}});var s9K=(A,q)=>{let K;switch(A.code){case eA.invalid_type:if(A.received===m7.undefined)K="Required";else K=`Expected ${A.expected}, received ${A.received}`;break;case eA.invalid_literal:K=`Invalid literal value, expected ${JSON.stringify(A.expected,a9.jsonStringifyReplacer)}`;break;case eA.unrecognized_keys:K=`Unrecognized key(s) in object: ${a9.joinValues(A.keys,", ")}`;break;case eA.invalid_union:K="Invalid input";break;case eA.invalid_union_discriminator:K=`Invalid discriminator value. Expected ${a9.joinValues(A.options)}`;break;case eA.invalid_enum_value:K=`Invalid enum value. Expected ${a9.joinValues(A.options)}, received '${A.received}'`;break;case eA.invalid_arguments:K="Invalid function arguments";break;case eA.invalid_return_type:K="Invalid function return type";break;case eA.invalid_date:K="Invalid date";break;case eA.invalid_string:if(typeof A.validation==="object")if("includes"in A.validation){if(K=`Invalid input: must include "${A.validation.includes}"`,typeof A.validation.position==="number")K=`${K} at one or more positions greater than or equal to ${A.validation.position}`}else if("startsWith"in A.validation)K=`Invalid input: must start with "${A.validation.startsWith}"`;else if("endsWith"in A.validation)K=`Invalid input: must end with "${A.validation.endsWith}"`;else a9.assertNever(A.validation);else if(A.validation!=="regex")K=`Invalid ${A.validation}`;else K="Invalid";break;case eA.too_small:if(A.type==="array")K=`Array must contain ${A.exact?"exactly":A.inclusive?"at least":"more than"} ${A.minimum} element(s)`;else if(A.type==="string")K=`String must contain ${A.exact?"exactly":A.inclusive?"at least":"over"} ${A.minimum} character(s)`;else if(A.type==="number")K=`Number must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${A.minimum}`;else if(A.type==="bigint")K=`Number must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${A.minimum}`;else if(A.type==="date")K=`Date must be ${A.exact?"exactly equal to ":A.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(A.minimum))}`;else K="Invalid input";break;case eA.too_big:if(A.type==="array")K=`Array must contain ${A.exact?"exactly":A.inclusive?"at most":"less than"} ${A.maximum} element(s)`;else if(A.type==="string")K=`String must contain ${A.exact?"exactly":A.inclusive?"at most":"under"} ${A.maximum} character(s)`;else if(A.type==="number")K=`Number must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`;else if(A.type==="bigint")K=`BigInt must be ${A.exact?"exactly":A.inclusive?"less than or equal to":"less than"} ${A.maximum}`;else if(A.type==="date")K=`Date must be ${A.exact?"exactly":A.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(A.maximum))}`;else K="Invalid input";break;case eA.custom:K="Invalid input";break;case eA.invalid_intersection_types:K="Intersection results could not be merged";break;case eA.not_multiple_of:K=`Number must be a multiple of ${A.multipleOf}`;break;case eA.not_finite:K="Number must be finite";break;default:K=q.defaultError,a9.assertNever(A)}return{message:K}},np;var Kl1=k(()=>{H71();nS6();np=s9K});function t9K(A){xYA=A}function Oj6(){return xYA}var xYA;var j71=k(()=>{Kl1();xYA=np});function j4(A,q){let K=Oj6(),Y=rS6({issueData:q,data:A.data,path:A.path,errorMaps:[A.common.contextualErrorMap,A.schemaErrorMap,K,K===np?void 0:np].filter((z)=>!!z)});A.common.issues.push(Y)}class M0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(A,q){let K=[];for(let Y of q){if(Y.status==="aborted")return xK;if(Y.status==="dirty")A.dirty();K.push(Y.value)}return{status:A.value,value:K}}static async mergeObjectAsync(A,q){let K=[];for(let Y of q){let z=await Y.key,w=await Y.value;K.push({key:z,value:w})}return M0.mergeObjectSync(A,K)}static mergeObjectSync(A,q){let K={};for(let Y of q){let{key:z,value:w}=Y;if(z.status==="aborted")return xK;if(w.status==="aborted")return xK;if(z.status==="dirty")A.dirty();if(w.status==="dirty")A.dirty();if(z.value!=="__proto__"&&(typeof w.value<"u"||Y.alwaysSet))K[z.value]=w.value}return{status:A.value,value:K}}}var rS6=(A)=>{let{data:q,path:K,errorMaps:Y,issueData:z}=A,w=[...K,...z.path||[]],_={...z,path:w};if(z.message!==void 0)return{...z,path:w,message:z.message};let $="",O=Y.filter((H)=>!!H).slice().reverse();for(let H of O)$=H(_,{data:q,defaultError:$}).message;return{...z,path:w,message:$}},e9K,xK,Yq6=(A)=>({status:"dirty",value:A}),yZ=(A)=>({status:"valid",value:A}),J71=(A)=>A.status==="aborted",M71=(A)=>A.status==="dirty",so=(A)=>A.status==="valid",Hj6=(A)=>typeof Promise<"u"&&A instanceof Promise;var Yl1=k(()=>{j71();Kl1();e9K=[];xK=Object.freeze({status:"aborted"})});var uYA=()=>{};var yq;var BYA=k(()=>{(function(A){A.errToObj=(q)=>typeof q==="string"?{message:q}:q||{},A.toString=(q)=>typeof q==="string"?q:q?.message})(yq||(yq={}))});class _I{constructor(A,q,K,Y){this._cachedPath=[],this.parent=A,this.data=q,this._path=K,this._key=Y}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function k5(A){if(!A)return{};let{errorMap:q,invalid_type_error:K,required_error:Y,description:z}=A;if(q&&(K||Y))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:z};return{errorMap:(_,$)=>{let{message:O}=A;if(_.code==="invalid_enum_value")return{message:O??$.defaultError};if(typeof $.data>"u")return{message:O??Y??$.defaultError};if(_.code!=="invalid_type")return{message:$.defaultError};return{message:O??K??$.defaultError}},description:z}}class W9{get description(){return this._def.description}_getType(A){return QB(A.data)}_getOrReturnCtx(A,q){return q||{common:A.parent.common,data:A.data,parsedType:QB(A.data),schemaErrorMap:this._def.errorMap,path:A.path,parent:A.parent}}_processInputParams(A){return{status:new M0,ctx:{common:A.parent.common,data:A.data,parsedType:QB(A.data),schemaErrorMap:this._def.errorMap,path:A.path,parent:A.parent}}}_parseSync(A){let q=this._parse(A);if(Hj6(q))throw Error("Synchronous parse encountered promise.");return q}_parseAsync(A){let q=this._parse(A);return Promise.resolve(q)}parse(A,q){let K=this.safeParse(A,q);if(K.success)return K.data;throw K.error}safeParse(A,q){let K={common:{issues:[],async:q?.async??!1,contextualErrorMap:q?.errorMap},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:A,parsedType:QB(A)},Y=this._parseSync({data:A,path:K.path,parent:K});return mYA(K,Y)}"~validate"(A){let q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:A,parsedType:QB(A)};if(!this["~standard"].async)try{let K=this._parseSync({data:A,path:[],parent:q});return so(K)?{value:K.value}:{issues:q.common.issues}}catch(K){if(K?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;q.common={issues:[],async:!0}}return this._parseAsync({data:A,path:[],parent:q}).then((K)=>so(K)?{value:K.value}:{issues:q.common.issues})}async parseAsync(A,q){let K=await this.safeParseAsync(A,q);if(K.success)return K.data;throw K.error}async safeParseAsync(A,q){let K={common:{issues:[],contextualErrorMap:q?.errorMap,async:!0},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:A,parsedType:QB(A)},Y=this._parse({data:A,path:K.path,parent:K}),z=await(Hj6(Y)?Y:Promise.resolve(Y));return mYA(K,z)}refine(A,q){let K=(Y)=>{if(typeof q==="string"||typeof q>"u")return{message:q};else if(typeof q==="function")return q(Y);else return q};return this._refinement((Y,z)=>{let w=A(Y),_=()=>z.addIssue({code:eA.custom,...K(Y)});if(typeof Promise<"u"&&w instanceof Promise)return w.then(($)=>{if(!$)return _(),!1;else return!0});if(!w)return _(),!1;else return!0})}refinement(A,q){return this._refinement((K,Y)=>{if(!A(K))return Y.addIssue(typeof q==="function"?q(K,Y):q),!1;else return!0})}_refinement(A){return new $I({schema:this,typeName:eK.ZodEffects,effect:{type:"refinement",refinement:A}})}superRefine(A){return this._refinement(A)}constructor(A){this.spa=this.safeParseAsync,this._def=A,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(q)=>this["~validate"](q)}}optional(){return wI.create(this,this._def)}nullable(){return op.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zI.create(this)}promise(){return $q6.create(this,this._def)}or(A){return Pj6.create([this,A],this._def)}and(A){return Wj6.create(this,A,this._def)}transform(A){return new $I({...k5(this._def),schema:this,typeName:eK.ZodEffects,effect:{type:"transform",transform:A}})}default(A){let q=typeof A==="function"?A:()=>A;return new Tj6({...k5(this._def),innerType:this,defaultValue:q,typeName:eK.ZodDefault})}brand(){return new X71({typeName:eK.ZodBranded,type:this,...k5(this._def)})}catch(A){let q=typeof A==="function"?A:()=>A;return new Vj6({...k5(this._def),innerType:this,catchValue:q,typeName:eK.ZodCatch})}describe(A){return new this.constructor({...this._def,description:A})}pipe(A){return AC6.create(this,A)}readonly(){return Nj6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function QYA(A){let q="[0-5]\\d";if(A.precision)q=`${q}\\.\\d{${A.precision}}`;else if(A.precision==null)q=`${q}(\\.\\d+)?`;let K=A.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${q})${K}`}function WYK(A){return new RegExp(`^${QYA(A)}$`)}function UYA(A){let q=`${FYA}T${QYA(A)}`,K=[];if(K.push(A.local?"Z?":"Z"),A.offset)K.push("([+-]\\d{2}:?\\d{2})");return q=`${q}(${K.join("|")})`,new RegExp(`^${q}$`)}function ZYK(A,q){if((q==="v4"||!q)&&HYK.test(A))return!0;if((q==="v6"||!q)&&JYK.test(A))return!0;return!1}function GYK(A,q){if(!wYK.test(A))return!1;try{let[K]=A.split(".");if(!K)return!1;let Y=K.replace(/-/g,"+").replace(/_/g,"/").padEnd(K.length+(4-K.length%4)%4,"="),z=JSON.parse(atob(Y));if(typeof z!=="object"||z===null)return!1;if("typ"in z&&z?.typ!=="JWT")return!1;if(!z.alg)return!1;if(q&&z.alg!==q)return!1;return!0}catch{return!1}}function fYK(A,q){if((q==="v4"||!q)&&jYK.test(A))return!0;if((q==="v6"||!q)&&MYK.test(A))return!0;return!1}function TYK(A,q){let K=(A.toString().split(".")[1]||"").length,Y=(q.toString().split(".")[1]||"").length,z=K>Y?K:Y,w=Number.parseInt(A.toFixed(z).replace(".","")),_=Number.parseInt(q.toFixed(z).replace(".",""));return w%_/10**z}function jj6(A){if(A instanceof SH){let q={};for(let K in A.shape){let Y=A.shape[K];q[K]=wI.create(jj6(Y))}return new SH({...A._def,shape:()=>q})}else if(A instanceof zI)return new zI({...A._def,type:jj6(A.element)});else if(A instanceof wI)return wI.create(jj6(A.unwrap()));else if(A instanceof op)return op.create(jj6(A.unwrap()));else if(A instanceof pB)return pB.create(A.items.map((q)=>jj6(q)));else return A}function wl1(A,q){let K=QB(A),Y=QB(q);if(A===q)return{valid:!0,data:A};else if(K===m7.object&&Y===m7.object){let z=a9.objectKeys(q),w=a9.objectKeys(A).filter(($)=>z.indexOf($)!==-1),_={...A,...q};for(let $ of w){let O=wl1(A[$],q[$]);if(!O.valid)return{valid:!1};_[$]=O.data}return{valid:!0,data:_}}else if(K===m7.array&&Y===m7.array){if(A.length!==q.length)return{valid:!1};let z=[];for(let w=0;w<A.length;w++){let _=A[w],$=q[w],O=wl1(_,$);if(!O.valid)return{valid:!1};z.push(O.data)}return{valid:!0,data:z}}else if(K===m7.date&&Y===m7.date&&+A===+q)return{valid:!0,data:A};else return{valid:!1}}function pYA(A,q){return new qa({values:A,typeName:eK.ZodEnum,...k5(q)})}function gYA(A,q){let K=typeof A==="function"?A(q):typeof A==="string"?{message:A}:A;return typeof K==="string"?{message:K}:K}function dYA(A,q={},K){if(A)return wq6.create().superRefine((Y,z)=>{let w=A(Y);if(w instanceof Promise)return w.then((_)=>{if(!_){let $=gYA(q,Y),O=$.fatal??K??!0;z.addIssue({code:"custom",...$,fatal:O})}});if(!w){let _=gYA(q,Y),$=_.fatal??K??!0;z.addIssue({code:"custom",..._,fatal:$})}return});return wq6.create()}var mYA=(A,q)=>{if(so(q))return{success:!0,data:q.value};else{if(!A.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let K=new SV(A.common.issues);return this._error=K,this._error}}}},AYK,qYK,KYK,YYK,zYK,wYK,_YK,$YK,OYK="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",zl1,HYK,jYK,JYK,MYK,DYK,XYK,FYA="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",PYK,YI,eo,Aa,Mj6,zq6,oS6,Dj6,Xj6,wq6,to,UB,aS6,zI,SH,Pj6,rp=(A)=>{if(A instanceof Zj6)return rp(A.schema);else if(A instanceof $I)return rp(A.innerType());else if(A instanceof Gj6)return[A.value];else if(A instanceof qa)return A.options;else if(A instanceof fj6)return a9.objectValues(A.enum);else if(A instanceof Tj6)return rp(A._def.innerType);else if(A instanceof Dj6)return[void 0];else if(A instanceof Xj6)return[null];else if(A instanceof wI)return[void 0,...rp(A.unwrap())];else if(A instanceof op)return[null,...rp(A.unwrap())];else if(A instanceof X71)return rp(A.unwrap());else if(A instanceof Nj6)return rp(A.unwrap());else if(A instanceof Vj6)return rp(A._def.innerType);else return[]},D71,Wj6,pB,sS6,tS6,_q6,Jj6,Zj6,Gj6,qa,fj6,$q6,$I,wI,op,Tj6,Vj6,eS6,VYK,X71,AC6,Nj6,NYK,eK,vYK=(A,q={message:`Input not instance of ${A.name}`})=>dYA((K)=>K instanceof A,q),cA,my,kYK,EYK,mX,LYK,yYK,RYK,SYK,CYK,hYK,IYK,bYK,Ej,Ik,bk,Oq6,xYK,uYK,BYK,OI,mYK,gYK,FYK,QYK,UYK,HI,pYK,dYK,cYK,lYK,iYK,nYK,rYK,oYK=()=>cA().optional(),aYK=()=>my().optional(),sYK=()=>mX().optional(),tYK,eYK;var cYA=k(()=>{H71();j71();BYA();Yl1();nS6();AYK=/^c[^\s-]{8,}$/i,qYK=/^[0-9a-z]+$/,KYK=/^[0-9A-HJKMNP-TV-Z]{26}$/i,YYK=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zYK=/^[a-z0-9_-]{21}$/i,wYK=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_YK=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$YK=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,HYK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jYK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,JYK=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,MYK=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,DYK=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,XYK=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PYK=new RegExp(`^${FYA}$`);YI=class YI extends W9{_parse(A){if(this._def.coerce)A.data=String(A.data);if(this._getType(A)!==m7.string){let z=this._getOrReturnCtx(A);return j4(z,{code:eA.invalid_type,expected:m7.string,received:z.parsedType}),xK}let K=new M0,Y=void 0;for(let z of this._def.checks)if(z.kind==="min"){if(A.data.length<z.value)Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.too_small,minimum:z.value,type:"string",inclusive:!0,exact:!1,message:z.message}),K.dirty()}else if(z.kind==="max"){if(A.data.length>z.value)Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.too_big,maximum:z.value,type:"string",inclusive:!0,exact:!1,message:z.message}),K.dirty()}else if(z.kind==="length"){let w=A.data.length>z.value,_=A.data.length<z.value;if(w||_){if(Y=this._getOrReturnCtx(A,Y),w)j4(Y,{code:eA.too_big,maximum:z.value,type:"string",inclusive:!0,exact:!0,message:z.message});else if(_)j4(Y,{code:eA.too_small,minimum:z.value,type:"string",inclusive:!0,exact:!0,message:z.message});K.dirty()}}else if(z.kind==="email"){if(!$YK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"email",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="emoji"){if(!zl1)zl1=new RegExp(OYK,"u");if(!zl1.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"emoji",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="uuid"){if(!YYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"uuid",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="nanoid"){if(!zYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"nanoid",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="cuid"){if(!AYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"cuid",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="cuid2"){if(!qYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"cuid2",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="ulid"){if(!KYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"ulid",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="url")try{new URL(A.data)}catch{Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"url",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="regex"){if(z.regex.lastIndex=0,!z.regex.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"regex",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="trim")A.data=A.data.trim();else if(z.kind==="includes"){if(!A.data.includes(z.value,z.position))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:{includes:z.value,position:z.position},message:z.message}),K.dirty()}else if(z.kind==="toLowerCase")A.data=A.data.toLowerCase();else if(z.kind==="toUpperCase")A.data=A.data.toUpperCase();else if(z.kind==="startsWith"){if(!A.data.startsWith(z.value))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:{startsWith:z.value},message:z.message}),K.dirty()}else if(z.kind==="endsWith"){if(!A.data.endsWith(z.value))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:{endsWith:z.value},message:z.message}),K.dirty()}else if(z.kind==="datetime"){if(!UYA(z).test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:"datetime",message:z.message}),K.dirty()}else if(z.kind==="date"){if(!PYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:"date",message:z.message}),K.dirty()}else if(z.kind==="time"){if(!WYK(z).test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.invalid_string,validation:"time",message:z.message}),K.dirty()}else if(z.kind==="duration"){if(!_YK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"duration",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="ip"){if(!ZYK(A.data,z.version))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"ip",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="jwt"){if(!GYK(A.data,z.alg))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"jwt",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="cidr"){if(!fYK(A.data,z.version))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"cidr",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="base64"){if(!DYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"base64",code:eA.invalid_string,message:z.message}),K.dirty()}else if(z.kind==="base64url"){if(!XYK.test(A.data))Y=this._getOrReturnCtx(A,Y),j4(Y,{validation:"base64url",code:eA.invalid_string,message:z.message}),K.dirty()}else a9.assertNever(z);return{status:K.value,value:A.data}}_regex(A,q,K){return this.refinement((Y)=>A.test(Y),{validation:q,code:eA.invalid_string,...yq.errToObj(K)})}_addCheck(A){return new YI({...this._def,checks:[...this._def.checks,A]})}email(A){return this._addCheck({kind:"email",...yq.errToObj(A)})}url(A){return this._addCheck({kind:"url",...yq.errToObj(A)})}emoji(A){return this._addCheck({kind:"emoji",...yq.errToObj(A)})}uuid(A){return this._addCheck({kind:"uuid",...yq.errToObj(A)})}nanoid(A){return this._addCheck({kind:"nanoid",...yq.errToObj(A)})}cuid(A){return this._addCheck({kind:"cuid",...yq.errToObj(A)})}cuid2(A){return this._addCheck({kind:"cuid2",...yq.errToObj(A)})}ulid(A){return this._addCheck({kind:"ulid",...yq.errToObj(A)})}base64(A){return this._addCheck({kind:"base64",...yq.errToObj(A)})}base64url(A){return this._addCheck({kind:"base64url",...yq.errToObj(A)})}jwt(A){return this._addCheck({kind:"jwt",...yq.errToObj(A)})}ip(A){return this._addCheck({kind:"ip",...yq.errToObj(A)})}cidr(A){return this._addCheck({kind:"cidr",...yq.errToObj(A)})}datetime(A){if(typeof A==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:A});return this._addCheck({kind:"datetime",precision:typeof A?.precision>"u"?null:A?.precision,offset:A?.offset??!1,local:A?.local??!1,...yq.errToObj(A?.message)})}date(A){return this._addCheck({kind:"date",message:A})}time(A){if(typeof A==="string")return this._addCheck({kind:"time",precision:null,message:A});return this._addCheck({kind:"time",precision:typeof A?.precision>"u"?null:A?.precision,...yq.errToObj(A?.message)})}duration(A){return this._addCheck({kind:"duration",...yq.errToObj(A)})}regex(A,q){return this._addCheck({kind:"regex",regex:A,...yq.errToObj(q)})}includes(A,q){return this._addCheck({kind:"includes",value:A,position:q?.position,...yq.errToObj(q?.message)})}startsWith(A,q){return this._addCheck({kind:"startsWith",value:A,...yq.errToObj(q)})}endsWith(A,q){return this._addCheck({kind:"endsWith",value:A,...yq.errToObj(q)})}min(A,q){return this._addCheck({kind:"min",value:A,...yq.errToObj(q)})}max(A,q){return this._addCheck({kind:"max",value:A,...yq.errToObj(q)})}length(A,q){return this._addCheck({kind:"length",value:A,...yq.errToObj(q)})}nonempty(A){return this.min(1,yq.errToObj(A))}trim(){return new YI({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new YI({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new YI({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((A)=>A.kind==="datetime")}get isDate(){return!!this._def.checks.find((A)=>A.kind==="date")}get isTime(){return!!this._def.checks.find((A)=>A.kind==="time")}get isDuration(){return!!this._def.checks.find((A)=>A.kind==="duration")}get isEmail(){return!!this._def.checks.find((A)=>A.kind==="email")}get isURL(){return!!this._def.checks.find((A)=>A.kind==="url")}get isEmoji(){return!!this._def.checks.find((A)=>A.kind==="emoji")}get isUUID(){return!!this._def.checks.find((A)=>A.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((A)=>A.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((A)=>A.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((A)=>A.kind==="cuid2")}get isULID(){return!!this._def.checks.find((A)=>A.kind==="ulid")}get isIP(){return!!this._def.checks.find((A)=>A.kind==="ip")}get isCIDR(){return!!this._def.checks.find((A)=>A.kind==="cidr")}get isBase64(){return!!this._def.checks.find((A)=>A.kind==="base64")}get isBase64url(){return!!this._def.checks.find((A)=>A.kind==="base64url")}get minLength(){let A=null;for(let q of this._def.checks)if(q.kind==="min"){if(A===null||q.value>A)A=q.value}return A}get maxLength(){let A=null;for(let q of this._def.checks)if(q.kind==="max"){if(A===null||q.value<A)A=q.value}return A}};YI.create=(A)=>{return new YI({checks:[],typeName:eK.ZodString,coerce:A?.coerce??!1,...k5(A)})};eo=class eo extends W9{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(A){if(this._def.coerce)A.data=Number(A.data);if(this._getType(A)!==m7.number){let z=this._getOrReturnCtx(A);return j4(z,{code:eA.invalid_type,expected:m7.number,received:z.parsedType}),xK}let K=void 0,Y=new M0;for(let z of this._def.checks)if(z.kind==="int"){if(!a9.isInteger(A.data))K=this._getOrReturnCtx(A,K),j4(K,{code:eA.invalid_type,expected:"integer",received:"float",message:z.message}),Y.dirty()}else if(z.kind==="min"){if(z.inclusive?A.data<z.value:A.data<=z.value)K=this._getOrReturnCtx(A,K),j4(K,{code:eA.too_small,minimum:z.value,type:"number",inclusive:z.inclusive,exact:!1,message:z.message}),Y.dirty()}else if(z.kind==="max"){if(z.inclusive?A.data>z.value:A.data>=z.value)K=this._getOrReturnCtx(A,K),j4(K,{code:eA.too_big,maximum:z.value,type:"number",inclusive:z.inclusive,exact:!1,message:z.message}),Y.dirty()}else if(z.kind==="multipleOf"){if(TYK(A.data,z.value)!==0)K=this._getOrReturnCtx(A,K),j4(K,{code:eA.not_multiple_of,multipleOf:z.value,message:z.message}),Y.dirty()}else if(z.kind==="finite"){if(!Number.isFinite(A.data))K=this._getOrReturnCtx(A,K),j4(K,{code:eA.not_finite,message:z.message}),Y.dirty()}else a9.assertNever(z);return{status:Y.value,value:A.data}}gte(A,q){return this.setLimit("min",A,!0,yq.toString(q))}gt(A,q){return this.setLimit("min",A,!1,yq.toString(q))}lte(A,q){return this.setLimit("max",A,!0,yq.toString(q))}lt(A,q){return this.setLimit("max",A,!1,yq.toString(q))}setLimit(A,q,K,Y){return new eo({...this._def,checks:[...this._def.checks,{kind:A,value:q,inclusive:K,message:yq.toString(Y)}]})}_addCheck(A){return new eo({...this._def,checks:[...this._def.checks,A]})}int(A){return this._addCheck({kind:"int",message:yq.toString(A)})}positive(A){return this._addCheck({kind:"min",value:0,inclusive:!1,message:yq.toString(A)})}negative(A){return this._addCheck({kind:"max",value:0,inclusive:!1,message:yq.toString(A)})}nonpositive(A){return this._addCheck({kind:"max",value:0,inclusive:!0,message:yq.toString(A)})}nonnegative(A){return this._addCheck({kind:"min",value:0,inclusive:!0,message:yq.toString(A)})}multipleOf(A,q){return this._addCheck({kind:"multipleOf",value:A,message:yq.toString(q)})}finite(A){return this._addCheck({kind:"finite",message:yq.toString(A)})}safe(A){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:yq.toString(A)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:yq.toString(A)})}get minValue(){let A=null;for(let q of this._def.checks)if(q.kind==="min"){if(A===null||q.value>A)A=q.value}return A}get maxValue(){let A=null;for(let q of this._def.checks)if(q.kind==="max"){if(A===null||q.value<A)A=q.value}return A}get isInt(){return!!this._def.checks.find((A)=>A.kind==="int"||A.kind==="multipleOf"&&a9.isInteger(A.value))}get isFinite(){let A=null,q=null;for(let K of this._def.checks)if(K.kind==="finite"||K.kind==="int"||K.kind==="multipleOf")return!0;else if(K.kind==="min"){if(q===null||K.value>q)q=K.value}else if(K.kind==="max"){if(A===null||K.value<A)A=K.value}return Number.isFinite(q)&&Number.isFinite(A)}};eo.create=(A)=>{return new eo({checks:[],typeName:eK.ZodNumber,coerce:A?.coerce||!1,...k5(A)})};Aa=class Aa extends W9{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(A){if(this._def.coerce)try{A.data=BigInt(A.data)}catch{return this._getInvalidInput(A)}if(this._getType(A)!==m7.bigint)return this._getInvalidInput(A);let K=void 0,Y=new M0;for(let z of this._def.checks)if(z.kind==="min"){if(z.inclusive?A.data<z.value:A.data<=z.value)K=this._getOrReturnCtx(A,K),j4(K,{code:eA.too_small,type:"bigint",minimum:z.value,inclusive:z.inclusive,message:z.message}),Y.dirty()}else if(z.kind==="max"){if(z.inclusive?A.data>z.value:A.data>=z.value)K=this._getOrReturnCtx(A,K),j4(K,{code:eA.too_big,type:"bigint",maximum:z.value,inclusive:z.inclusive,message:z.message}),Y.dirty()}else if(z.kind==="multipleOf"){if(A.data%z.value!==BigInt(0))K=this._getOrReturnCtx(A,K),j4(K,{code:eA.not_multiple_of,multipleOf:z.value,message:z.message}),Y.dirty()}else a9.assertNever(z);return{status:Y.value,value:A.data}}_getInvalidInput(A){let q=this._getOrReturnCtx(A);return j4(q,{code:eA.invalid_type,expected:m7.bigint,received:q.parsedType}),xK}gte(A,q){return this.setLimit("min",A,!0,yq.toString(q))}gt(A,q){return this.setLimit("min",A,!1,yq.toString(q))}lte(A,q){return this.setLimit("max",A,!0,yq.toString(q))}lt(A,q){return this.setLimit("max",A,!1,yq.toString(q))}setLimit(A,q,K,Y){return new Aa({...this._def,checks:[...this._def.checks,{kind:A,value:q,inclusive:K,message:yq.toString(Y)}]})}_addCheck(A){return new Aa({...this._def,checks:[...this._def.checks,A]})}positive(A){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:yq.toString(A)})}negative(A){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:yq.toString(A)})}nonpositive(A){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:yq.toString(A)})}nonnegative(A){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:yq.toString(A)})}multipleOf(A,q){return this._addCheck({kind:"multipleOf",value:A,message:yq.toString(q)})}get minValue(){let A=null;for(let q of this._def.checks)if(q.kind==="min"){if(A===null||q.value>A)A=q.value}return A}get maxValue(){let A=null;for(let q of this._def.checks)if(q.kind==="max"){if(A===null||q.value<A)A=q.value}return A}};Aa.create=(A)=>{return new Aa({checks:[],typeName:eK.ZodBigInt,coerce:A?.coerce??!1,...k5(A)})};Mj6=class Mj6 extends W9{_parse(A){if(this._def.coerce)A.data=Boolean(A.data);if(this._getType(A)!==m7.boolean){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.boolean,received:K.parsedType}),xK}return yZ(A.data)}};Mj6.create=(A)=>{return new Mj6({typeName:eK.ZodBoolean,coerce:A?.coerce||!1,...k5(A)})};zq6=class zq6 extends W9{_parse(A){if(this._def.coerce)A.data=new Date(A.data);if(this._getType(A)!==m7.date){let z=this._getOrReturnCtx(A);return j4(z,{code:eA.invalid_type,expected:m7.date,received:z.parsedType}),xK}if(Number.isNaN(A.data.getTime())){let z=this._getOrReturnCtx(A);return j4(z,{code:eA.invalid_date}),xK}let K=new M0,Y=void 0;for(let z of this._def.checks)if(z.kind==="min"){if(A.data.getTime()<z.value)Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.too_small,message:z.message,inclusive:!0,exact:!1,minimum:z.value,type:"date"}),K.dirty()}else if(z.kind==="max"){if(A.data.getTime()>z.value)Y=this._getOrReturnCtx(A,Y),j4(Y,{code:eA.too_big,message:z.message,inclusive:!0,exact:!1,maximum:z.value,type:"date"}),K.dirty()}else a9.assertNever(z);return{status:K.value,value:new Date(A.data.getTime())}}_addCheck(A){return new zq6({...this._def,checks:[...this._def.checks,A]})}min(A,q){return this._addCheck({kind:"min",value:A.getTime(),message:yq.toString(q)})}max(A,q){return this._addCheck({kind:"max",value:A.getTime(),message:yq.toString(q)})}get minDate(){let A=null;for(let q of this._def.checks)if(q.kind==="min"){if(A===null||q.value>A)A=q.value}return A!=null?new Date(A):null}get maxDate(){let A=null;for(let q of this._def.checks)if(q.kind==="max"){if(A===null||q.value<A)A=q.value}return A!=null?new Date(A):null}};zq6.create=(A)=>{return new zq6({checks:[],coerce:A?.coerce||!1,typeName:eK.ZodDate,...k5(A)})};oS6=class oS6 extends W9{_parse(A){if(this._getType(A)!==m7.symbol){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.symbol,received:K.parsedType}),xK}return yZ(A.data)}};oS6.create=(A)=>{return new oS6({typeName:eK.ZodSymbol,...k5(A)})};Dj6=class Dj6 extends W9{_parse(A){if(this._getType(A)!==m7.undefined){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.undefined,received:K.parsedType}),xK}return yZ(A.data)}};Dj6.create=(A)=>{return new Dj6({typeName:eK.ZodUndefined,...k5(A)})};Xj6=class Xj6 extends W9{_parse(A){if(this._getType(A)!==m7.null){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.null,received:K.parsedType}),xK}return yZ(A.data)}};Xj6.create=(A)=>{return new Xj6({typeName:eK.ZodNull,...k5(A)})};wq6=class wq6 extends W9{constructor(){super(...arguments);this._any=!0}_parse(A){return yZ(A.data)}};wq6.create=(A)=>{return new wq6({typeName:eK.ZodAny,...k5(A)})};to=class to extends W9{constructor(){super(...arguments);this._unknown=!0}_parse(A){return yZ(A.data)}};to.create=(A)=>{return new to({typeName:eK.ZodUnknown,...k5(A)})};UB=class UB extends W9{_parse(A){let q=this._getOrReturnCtx(A);return j4(q,{code:eA.invalid_type,expected:m7.never,received:q.parsedType}),xK}};UB.create=(A)=>{return new UB({typeName:eK.ZodNever,...k5(A)})};aS6=class aS6 extends W9{_parse(A){if(this._getType(A)!==m7.undefined){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.void,received:K.parsedType}),xK}return yZ(A.data)}};aS6.create=(A)=>{return new aS6({typeName:eK.ZodVoid,...k5(A)})};zI=class zI extends W9{_parse(A){let{ctx:q,status:K}=this._processInputParams(A),Y=this._def;if(q.parsedType!==m7.array)return j4(q,{code:eA.invalid_type,expected:m7.array,received:q.parsedType}),xK;if(Y.exactLength!==null){let w=q.data.length>Y.exactLength.value,_=q.data.length<Y.exactLength.value;if(w||_)j4(q,{code:w?eA.too_big:eA.too_small,minimum:_?Y.exactLength.value:void 0,maximum:w?Y.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:Y.exactLength.message}),K.dirty()}if(Y.minLength!==null){if(q.data.length<Y.minLength.value)j4(q,{code:eA.too_small,minimum:Y.minLength.value,type:"array",inclusive:!0,exact:!1,message:Y.minLength.message}),K.dirty()}if(Y.maxLength!==null){if(q.data.length>Y.maxLength.value)j4(q,{code:eA.too_big,maximum:Y.maxLength.value,type:"array",inclusive:!0,exact:!1,message:Y.maxLength.message}),K.dirty()}if(q.common.async)return Promise.all([...q.data].map((w,_)=>{return Y.type._parseAsync(new _I(q,w,q.path,_))})).then((w)=>{return M0.mergeArray(K,w)});let z=[...q.data].map((w,_)=>{return Y.type._parseSync(new _I(q,w,q.path,_))});return M0.mergeArray(K,z)}get element(){return this._def.type}min(A,q){return new zI({...this._def,minLength:{value:A,message:yq.toString(q)}})}max(A,q){return new zI({...this._def,maxLength:{value:A,message:yq.toString(q)}})}length(A,q){return new zI({...this._def,exactLength:{value:A,message:yq.toString(q)}})}nonempty(A){return this.min(1,A)}};zI.create=(A,q)=>{return new zI({type:A,minLength:null,maxLength:null,exactLength:null,typeName:eK.ZodArray,...k5(q)})};SH=class SH extends W9{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let A=this._def.shape(),q=a9.objectKeys(A);return this._cached={shape:A,keys:q},this._cached}_parse(A){if(this._getType(A)!==m7.object){let O=this._getOrReturnCtx(A);return j4(O,{code:eA.invalid_type,expected:m7.object,received:O.parsedType}),xK}let{status:K,ctx:Y}=this._processInputParams(A),{shape:z,keys:w}=this._getCached(),_=[];if(!(this._def.catchall instanceof UB&&this._def.unknownKeys==="strip")){for(let O in Y.data)if(!w.includes(O))_.push(O)}let $=[];for(let O of w){let H=z[O],j=Y.data[O];$.push({key:{status:"valid",value:O},value:H._parse(new _I(Y,j,Y.path,O)),alwaysSet:O in Y.data})}if(this._def.catchall instanceof UB){let O=this._def.unknownKeys;if(O==="passthrough")for(let H of _)$.push({key:{status:"valid",value:H},value:{status:"valid",value:Y.data[H]}});else if(O==="strict"){if(_.length>0)j4(Y,{code:eA.unrecognized_keys,keys:_}),K.dirty()}else if(O==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let O=this._def.catchall;for(let H of _){let j=Y.data[H];$.push({key:{status:"valid",value:H},value:O._parse(new _I(Y,j,Y.path,H)),alwaysSet:H in Y.data})}}if(Y.common.async)return Promise.resolve().then(async()=>{let O=[];for(let H of $){let j=await H.key,J=await H.value;O.push({key:j,value:J,alwaysSet:H.alwaysSet})}return O}).then((O)=>{return M0.mergeObjectSync(K,O)});else return M0.mergeObjectSync(K,$)}get shape(){return this._def.shape()}strict(A){return yq.errToObj,new SH({...this._def,unknownKeys:"strict",...A!==void 0?{errorMap:(q,K)=>{let Y=this._def.errorMap?.(q,K).message??K.defaultError;if(q.code==="unrecognized_keys")return{message:yq.errToObj(A).message??Y};return{message:Y}}}:{}})}strip(){return new SH({...this._def,unknownKeys:"strip"})}passthrough(){return new SH({...this._def,unknownKeys:"passthrough"})}extend(A){return new SH({...this._def,shape:()=>({...this._def.shape(),...A})})}merge(A){return new SH({unknownKeys:A._def.unknownKeys,catchall:A._def.catchall,shape:()=>({...this._def.shape(),...A._def.shape()}),typeName:eK.ZodObject})}setKey(A,q){return this.augment({[A]:q})}catchall(A){return new SH({...this._def,catchall:A})}pick(A){let q={};for(let K of a9.objectKeys(A))if(A[K]&&this.shape[K])q[K]=this.shape[K];return new SH({...this._def,shape:()=>q})}omit(A){let q={};for(let K of a9.objectKeys(this.shape))if(!A[K])q[K]=this.shape[K];return new SH({...this._def,shape:()=>q})}deepPartial(){return jj6(this)}partial(A){let q={};for(let K of a9.objectKeys(this.shape)){let Y=this.shape[K];if(A&&!A[K])q[K]=Y;else q[K]=Y.optional()}return new SH({...this._def,shape:()=>q})}required(A){let q={};for(let K of a9.objectKeys(this.shape))if(A&&!A[K])q[K]=this.shape[K];else{let z=this.shape[K];while(z instanceof wI)z=z._def.innerType;q[K]=z}return new SH({...this._def,shape:()=>q})}keyof(){return pYA(a9.objectKeys(this.shape))}};SH.create=(A,q)=>{return new SH({shape:()=>A,unknownKeys:"strip",catchall:UB.create(),typeName:eK.ZodObject,...k5(q)})};SH.strictCreate=(A,q)=>{return new SH({shape:()=>A,unknownKeys:"strict",catchall:UB.create(),typeName:eK.ZodObject,...k5(q)})};SH.lazycreate=(A,q)=>{return new SH({shape:A,unknownKeys:"strip",catchall:UB.create(),typeName:eK.ZodObject,...k5(q)})};Pj6=class Pj6 extends W9{_parse(A){let{ctx:q}=this._processInputParams(A),K=this._def.options;function Y(z){for(let _ of z)if(_.result.status==="valid")return _.result;for(let _ of z)if(_.result.status==="dirty")return q.common.issues.push(..._.ctx.common.issues),_.result;let w=z.map((_)=>new SV(_.ctx.common.issues));return j4(q,{code:eA.invalid_union,unionErrors:w}),xK}if(q.common.async)return Promise.all(K.map(async(z)=>{let w={...q,common:{...q.common,issues:[]},parent:null};return{result:await z._parseAsync({data:q.data,path:q.path,parent:w}),ctx:w}})).then(Y);else{let z=void 0,w=[];for(let $ of K){let O={...q,common:{...q.common,issues:[]},parent:null},H=$._parseSync({data:q.data,path:q.path,parent:O});if(H.status==="valid")return H;else if(H.status==="dirty"&&!z)z={result:H,ctx:O};if(O.common.issues.length)w.push(O.common.issues)}if(z)return q.common.issues.push(...z.ctx.common.issues),z.result;let _=w.map(($)=>new SV($));return j4(q,{code:eA.invalid_union,unionErrors:_}),xK}}get options(){return this._def.options}};Pj6.create=(A,q)=>{return new Pj6({options:A,typeName:eK.ZodUnion,...k5(q)})};D71=class D71 extends W9{_parse(A){let{ctx:q}=this._processInputParams(A);if(q.parsedType!==m7.object)return j4(q,{code:eA.invalid_type,expected:m7.object,received:q.parsedType}),xK;let K=this.discriminator,Y=q.data[K],z=this.optionsMap.get(Y);if(!z)return j4(q,{code:eA.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[K]}),xK;if(q.common.async)return z._parseAsync({data:q.data,path:q.path,parent:q});else return z._parseSync({data:q.data,path:q.path,parent:q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(A,q,K){let Y=new Map;for(let z of q){let w=rp(z.shape[A]);if(!w.length)throw Error(`A discriminator value for key \`${A}\` could not be extracted from all schema options`);for(let _ of w){if(Y.has(_))throw Error(`Discriminator property ${String(A)} has duplicate value ${String(_)}`);Y.set(_,z)}}return new D71({typeName:eK.ZodDiscriminatedUnion,discriminator:A,options:q,optionsMap:Y,...k5(K)})}};Wj6=class Wj6 extends W9{_parse(A){let{status:q,ctx:K}=this._processInputParams(A),Y=(z,w)=>{if(J71(z)||J71(w))return xK;let _=wl1(z.value,w.value);if(!_.valid)return j4(K,{code:eA.invalid_intersection_types}),xK;if(M71(z)||M71(w))q.dirty();return{status:q.value,value:_.data}};if(K.common.async)return Promise.all([this._def.left._parseAsync({data:K.data,path:K.path,parent:K}),this._def.right._parseAsync({data:K.data,path:K.path,parent:K})]).then(([z,w])=>Y(z,w));else return Y(this._def.left._parseSync({data:K.data,path:K.path,parent:K}),this._def.right._parseSync({data:K.data,path:K.path,parent:K}))}};Wj6.create=(A,q,K)=>{return new Wj6({left:A,right:q,typeName:eK.ZodIntersection,...k5(K)})};pB=class pB extends W9{_parse(A){let{status:q,ctx:K}=this._processInputParams(A);if(K.parsedType!==m7.array)return j4(K,{code:eA.invalid_type,expected:m7.array,received:K.parsedType}),xK;if(K.data.length<this._def.items.length)return j4(K,{code:eA.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xK;if(!this._def.rest&&K.data.length>this._def.items.length)j4(K,{code:eA.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty();let z=[...K.data].map((w,_)=>{let $=this._def.items[_]||this._def.rest;if(!$)return null;return $._parse(new _I(K,w,K.path,_))}).filter((w)=>!!w);if(K.common.async)return Promise.all(z).then((w)=>{return M0.mergeArray(q,w)});else return M0.mergeArray(q,z)}get items(){return this._def.items}rest(A){return new pB({...this._def,rest:A})}};pB.create=(A,q)=>{if(!Array.isArray(A))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new pB({items:A,typeName:eK.ZodTuple,rest:null,...k5(q)})};sS6=class sS6 extends W9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(A){let{status:q,ctx:K}=this._processInputParams(A);if(K.parsedType!==m7.object)return j4(K,{code:eA.invalid_type,expected:m7.object,received:K.parsedType}),xK;let Y=[],z=this._def.keyType,w=this._def.valueType;for(let _ in K.data)Y.push({key:z._parse(new _I(K,_,K.path,_)),value:w._parse(new _I(K,K.data[_],K.path,_)),alwaysSet:_ in K.data});if(K.common.async)return M0.mergeObjectAsync(q,Y);else return M0.mergeObjectSync(q,Y)}get element(){return this._def.valueType}static create(A,q,K){if(q instanceof W9)return new sS6({keyType:A,valueType:q,typeName:eK.ZodRecord,...k5(K)});return new sS6({keyType:YI.create(),valueType:A,typeName:eK.ZodRecord,...k5(q)})}};tS6=class tS6 extends W9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(A){let{status:q,ctx:K}=this._processInputParams(A);if(K.parsedType!==m7.map)return j4(K,{code:eA.invalid_type,expected:m7.map,received:K.parsedType}),xK;let Y=this._def.keyType,z=this._def.valueType,w=[...K.data.entries()].map(([_,$],O)=>{return{key:Y._parse(new _I(K,_,K.path,[O,"key"])),value:z._parse(new _I(K,$,K.path,[O,"value"]))}});if(K.common.async){let _=new Map;return Promise.resolve().then(async()=>{for(let $ of w){let O=await $.key,H=await $.value;if(O.status==="aborted"||H.status==="aborted")return xK;if(O.status==="dirty"||H.status==="dirty")q.dirty();_.set(O.value,H.value)}return{status:q.value,value:_}})}else{let _=new Map;for(let $ of w){let{key:O,value:H}=$;if(O.status==="aborted"||H.status==="aborted")return xK;if(O.status==="dirty"||H.status==="dirty")q.dirty();_.set(O.value,H.value)}return{status:q.value,value:_}}}};tS6.create=(A,q,K)=>{return new tS6({valueType:q,keyType:A,typeName:eK.ZodMap,...k5(K)})};_q6=class _q6 extends W9{_parse(A){let{status:q,ctx:K}=this._processInputParams(A);if(K.parsedType!==m7.set)return j4(K,{code:eA.invalid_type,expected:m7.set,received:K.parsedType}),xK;let Y=this._def;if(Y.minSize!==null){if(K.data.size<Y.minSize.value)j4(K,{code:eA.too_small,minimum:Y.minSize.value,type:"set",inclusive:!0,exact:!1,message:Y.minSize.message}),q.dirty()}if(Y.maxSize!==null){if(K.data.size>Y.maxSize.value)j4(K,{code:eA.too_big,maximum:Y.maxSize.value,type:"set",inclusive:!0,exact:!1,message:Y.maxSize.message}),q.dirty()}let z=this._def.valueType;function w($){let O=new Set;for(let H of $){if(H.status==="aborted")return xK;if(H.status==="dirty")q.dirty();O.add(H.value)}return{status:q.value,value:O}}let _=[...K.data.values()].map(($,O)=>z._parse(new _I(K,$,K.path,O)));if(K.common.async)return Promise.all(_).then(($)=>w($));else return w(_)}min(A,q){return new _q6({...this._def,minSize:{value:A,message:yq.toString(q)}})}max(A,q){return new _q6({...this._def,maxSize:{value:A,message:yq.toString(q)}})}size(A,q){return this.min(A,q).max(A,q)}nonempty(A){return this.min(1,A)}};_q6.create=(A,q)=>{return new _q6({valueType:A,minSize:null,maxSize:null,typeName:eK.ZodSet,...k5(q)})};Jj6=class Jj6 extends W9{constructor(){super(...arguments);this.validate=this.implement}_parse(A){let{ctx:q}=this._processInputParams(A);if(q.parsedType!==m7.function)return j4(q,{code:eA.invalid_type,expected:m7.function,received:q.parsedType}),xK;function K(_,$){return rS6({data:_,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,Oj6(),np].filter((O)=>!!O),issueData:{code:eA.invalid_arguments,argumentsError:$}})}function Y(_,$){return rS6({data:_,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,Oj6(),np].filter((O)=>!!O),issueData:{code:eA.invalid_return_type,returnTypeError:$}})}let z={errorMap:q.common.contextualErrorMap},w=q.data;if(this._def.returns instanceof $q6){let _=this;return yZ(async function(...$){let O=new SV([]),H=await _._def.args.parseAsync($,z).catch((M)=>{throw O.addIssue(K($,M)),O}),j=await Reflect.apply(w,this,H);return await _._def.returns._def.type.parseAsync(j,z).catch((M)=>{throw O.addIssue(Y(j,M)),O})})}else{let _=this;return yZ(function(...$){let O=_._def.args.safeParse($,z);if(!O.success)throw new SV([K($,O.error)]);let H=Reflect.apply(w,this,O.data),j=_._def.returns.safeParse(H,z);if(!j.success)throw new SV([Y(H,j.error)]);return j.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...A){return new Jj6({...this._def,args:pB.create(A).rest(to.create())})}returns(A){return new Jj6({...this._def,returns:A})}implement(A){return this.parse(A)}strictImplement(A){return this.parse(A)}static create(A,q,K){return new Jj6({args:A?A:pB.create([]).rest(to.create()),returns:q||to.create(),typeName:eK.ZodFunction,...k5(K)})}};Zj6=class Zj6 extends W9{get schema(){return this._def.getter()}_parse(A){let{ctx:q}=this._processInputParams(A);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}};Zj6.create=(A,q)=>{return new Zj6({getter:A,typeName:eK.ZodLazy,...k5(q)})};Gj6=class Gj6 extends W9{_parse(A){if(A.data!==this._def.value){let q=this._getOrReturnCtx(A);return j4(q,{received:q.data,code:eA.invalid_literal,expected:this._def.value}),xK}return{status:"valid",value:A.data}}get value(){return this._def.value}};Gj6.create=(A,q)=>{return new Gj6({value:A,typeName:eK.ZodLiteral,...k5(q)})};qa=class qa extends W9{_parse(A){if(typeof A.data!=="string"){let q=this._getOrReturnCtx(A),K=this._def.values;return j4(q,{expected:a9.joinValues(K),received:q.parsedType,code:eA.invalid_type}),xK}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(A.data)){let q=this._getOrReturnCtx(A),K=this._def.values;return j4(q,{received:q.data,code:eA.invalid_enum_value,options:K}),xK}return yZ(A.data)}get options(){return this._def.values}get enum(){let A={};for(let q of this._def.values)A[q]=q;return A}get Values(){let A={};for(let q of this._def.values)A[q]=q;return A}get Enum(){let A={};for(let q of this._def.values)A[q]=q;return A}extract(A,q=this._def){return qa.create(A,{...this._def,...q})}exclude(A,q=this._def){return qa.create(this.options.filter((K)=>!A.includes(K)),{...this._def,...q})}};qa.create=pYA;fj6=class fj6 extends W9{_parse(A){let q=a9.getValidEnumValues(this._def.values),K=this._getOrReturnCtx(A);if(K.parsedType!==m7.string&&K.parsedType!==m7.number){let Y=a9.objectValues(q);return j4(K,{expected:a9.joinValues(Y),received:K.parsedType,code:eA.invalid_type}),xK}if(!this._cache)this._cache=new Set(a9.getValidEnumValues(this._def.values));if(!this._cache.has(A.data)){let Y=a9.objectValues(q);return j4(K,{received:K.data,code:eA.invalid_enum_value,options:Y}),xK}return yZ(A.data)}get enum(){return this._def.values}};fj6.create=(A,q)=>{return new fj6({values:A,typeName:eK.ZodNativeEnum,...k5(q)})};$q6=class $q6 extends W9{unwrap(){return this._def.type}_parse(A){let{ctx:q}=this._processInputParams(A);if(q.parsedType!==m7.promise&&q.common.async===!1)return j4(q,{code:eA.invalid_type,expected:m7.promise,received:q.parsedType}),xK;let K=q.parsedType===m7.promise?q.data:Promise.resolve(q.data);return yZ(K.then((Y)=>{return this._def.type.parseAsync(Y,{path:q.path,errorMap:q.common.contextualErrorMap})}))}};$q6.create=(A,q)=>{return new $q6({type:A,typeName:eK.ZodPromise,...k5(q)})};$I=class $I extends W9{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===eK.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(A){let{status:q,ctx:K}=this._processInputParams(A),Y=this._def.effect||null,z={addIssue:(w)=>{if(j4(K,w),w.fatal)q.abort();else q.dirty()},get path(){return K.path}};if(z.addIssue=z.addIssue.bind(z),Y.type==="preprocess"){let w=Y.transform(K.data,z);if(K.common.async)return Promise.resolve(w).then(async(_)=>{if(q.value==="aborted")return xK;let $=await this._def.schema._parseAsync({data:_,path:K.path,parent:K});if($.status==="aborted")return xK;if($.status==="dirty")return Yq6($.value);if(q.value==="dirty")return Yq6($.value);return $});else{if(q.value==="aborted")return xK;let _=this._def.schema._parseSync({data:w,path:K.path,parent:K});if(_.status==="aborted")return xK;if(_.status==="dirty")return Yq6(_.value);if(q.value==="dirty")return Yq6(_.value);return _}}if(Y.type==="refinement"){let w=(_)=>{let $=Y.refinement(_,z);if(K.common.async)return Promise.resolve($);if($ instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return _};if(K.common.async===!1){let _=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});if(_.status==="aborted")return xK;if(_.status==="dirty")q.dirty();return w(_.value),{status:q.value,value:_.value}}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then((_)=>{if(_.status==="aborted")return xK;if(_.status==="dirty")q.dirty();return w(_.value).then(()=>{return{status:q.value,value:_.value}})})}if(Y.type==="transform")if(K.common.async===!1){let w=this._def.schema._parseSync({data:K.data,path:K.path,parent:K});if(!so(w))return xK;let _=Y.transform(w.value,z);if(_ instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:_}}else return this._def.schema._parseAsync({data:K.data,path:K.path,parent:K}).then((w)=>{if(!so(w))return xK;return Promise.resolve(Y.transform(w.value,z)).then((_)=>({status:q.value,value:_}))});a9.assertNever(Y)}};$I.create=(A,q,K)=>{return new $I({schema:A,typeName:eK.ZodEffects,effect:q,...k5(K)})};$I.createWithPreprocess=(A,q,K)=>{return new $I({schema:q,effect:{type:"preprocess",transform:A},typeName:eK.ZodEffects,...k5(K)})};wI=class wI extends W9{_parse(A){if(this._getType(A)===m7.undefined)return yZ(void 0);return this._def.innerType._parse(A)}unwrap(){return this._def.innerType}};wI.create=(A,q)=>{return new wI({innerType:A,typeName:eK.ZodOptional,...k5(q)})};op=class op extends W9{_parse(A){if(this._getType(A)===m7.null)return yZ(null);return this._def.innerType._parse(A)}unwrap(){return this._def.innerType}};op.create=(A,q)=>{return new op({innerType:A,typeName:eK.ZodNullable,...k5(q)})};Tj6=class Tj6 extends W9{_parse(A){let{ctx:q}=this._processInputParams(A),K=q.data;if(q.parsedType===m7.undefined)K=this._def.defaultValue();return this._def.innerType._parse({data:K,path:q.path,parent:q})}removeDefault(){return this._def.innerType}};Tj6.create=(A,q)=>{return new Tj6({innerType:A,typeName:eK.ZodDefault,defaultValue:typeof q.default==="function"?q.default:()=>q.default,...k5(q)})};Vj6=class Vj6 extends W9{_parse(A){let{ctx:q}=this._processInputParams(A),K={...q,common:{...q.common,issues:[]}},Y=this._def.innerType._parse({data:K.data,path:K.path,parent:{...K}});if(Hj6(Y))return Y.then((z)=>{return{status:"valid",value:z.status==="valid"?z.value:this._def.catchValue({get error(){return new SV(K.common.issues)},input:K.data})}});else return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new SV(K.common.issues)},input:K.data})}}removeCatch(){return this._def.innerType}};Vj6.create=(A,q)=>{return new Vj6({innerType:A,typeName:eK.ZodCatch,catchValue:typeof q.catch==="function"?q.catch:()=>q.catch,...k5(q)})};eS6=class eS6 extends W9{_parse(A){if(this._getType(A)!==m7.nan){let K=this._getOrReturnCtx(A);return j4(K,{code:eA.invalid_type,expected:m7.nan,received:K.parsedType}),xK}return{status:"valid",value:A.data}}};eS6.create=(A)=>{return new eS6({typeName:eK.ZodNaN,...k5(A)})};VYK=Symbol("zod_brand");X71=class X71 extends W9{_parse(A){let{ctx:q}=this._processInputParams(A),K=q.data;return this._def.type._parse({data:K,path:q.path,parent:q})}unwrap(){return this._def.type}};AC6=class AC6 extends W9{_parse(A){let{status:q,ctx:K}=this._processInputParams(A);if(K.common.async)return(async()=>{let z=await this._def.in._parseAsync({data:K.data,path:K.path,parent:K});if(z.status==="aborted")return xK;if(z.status==="dirty")return q.dirty(),Yq6(z.value);else return this._def.out._parseAsync({data:z.value,path:K.path,parent:K})})();else{let Y=this._def.in._parseSync({data:K.data,path:K.path,parent:K});if(Y.status==="aborted")return xK;if(Y.status==="dirty")return q.dirty(),{status:"dirty",value:Y.value};else return this._def.out._parseSync({data:Y.value,path:K.path,parent:K})}}static create(A,q){return new AC6({in:A,out:q,typeName:eK.ZodPipeline})}};Nj6=class Nj6 extends W9{_parse(A){let q=this._def.innerType._parse(A),K=(Y)=>{if(so(Y))Y.value=Object.freeze(Y.value);return Y};return Hj6(q)?q.then((Y)=>K(Y)):K(q)}unwrap(){return this._def.innerType}};Nj6.create=(A,q)=>{return new Nj6({innerType:A,typeName:eK.ZodReadonly,...k5(q)})};NYK={object:SH.lazycreate};(function(A){A.ZodString="ZodString",A.ZodNumber="ZodNumber",A.ZodNaN="ZodNaN",A.ZodBigInt="ZodBigInt",A.ZodBoolean="ZodBoolean",A.ZodDate="ZodDate",A.ZodSymbol="ZodSymbol",A.ZodUndefined="ZodUndefined",A.ZodNull="ZodNull",A.ZodAny="ZodAny",A.ZodUnknown="ZodUnknown",A.ZodNever="ZodNever",A.ZodVoid="ZodVoid",A.ZodArray="ZodArray",A.ZodObject="ZodObject",A.ZodUnion="ZodUnion",A.ZodDiscriminatedUnion="ZodDiscriminatedUnion",A.ZodIntersection="ZodIntersection",A.ZodTuple="ZodTuple",A.ZodRecord="ZodRecord",A.ZodMap="ZodMap",A.ZodSet="ZodSet",A.ZodFunction="ZodFunction",A.ZodLazy="ZodLazy",A.ZodLiteral="ZodLiteral",A.ZodEnum="ZodEnum",A.ZodEffects="ZodEffects",A.ZodNativeEnum="ZodNativeEnum",A.ZodOptional="ZodOptional",A.ZodNullable="ZodNullable",A.ZodDefault="ZodDefault",A.ZodCatch="ZodCatch",A.ZodPromise="ZodPromise",A.ZodBranded="ZodBranded",A.ZodPipeline="ZodPipeline",A.ZodReadonly="ZodReadonly"})(eK||(eK={}));cA=YI.create,my=eo.create,kYK=eS6.create,EYK=Aa.create,mX=Mj6.create,LYK=zq6.create,yYK=oS6.create,RYK=Dj6.create,SYK=Xj6.create,CYK=wq6.create,hYK=to.create,IYK=UB.create,bYK=aS6.create,Ej=zI.create,Ik=SH.create,bk=SH.strictCreate,Oq6=Pj6.create,xYK=D71.create,uYK=Wj6.create,BYK=pB.create,OI=sS6.create,mYK=tS6.create,gYK=_q6.create,FYK=Jj6.create,QYK=Zj6.create,UYK=Gj6.create,HI=qa.create,pYK=fj6.create,dYK=$q6.create,cYK=$I.create,lYK=wI.create,iYK=op.create,nYK=$I.createWithPreprocess,rYK=AC6.create,tYK={string:(A)=>YI.create({...A,coerce:!0}),number:(A)=>eo.create({...A,coerce:!0}),boolean:(A)=>Mj6.create({...A,coerce:!0}),bigint:(A)=>Aa.create({...A,coerce:!0}),date:(A)=>zq6.create({...A,coerce:!0})},eYK=xK});var $q={};m1($q,{void:()=>bYK,util:()=>a9,unknown:()=>hYK,union:()=>Oq6,undefined:()=>RYK,tuple:()=>BYK,transformer:()=>cYK,symbol:()=>yYK,string:()=>cA,strictObject:()=>bk,setErrorMap:()=>t9K,set:()=>gYK,record:()=>OI,quotelessJson:()=>a9K,promise:()=>dYK,preprocess:()=>nYK,pipeline:()=>rYK,ostring:()=>oYK,optional:()=>lYK,onumber:()=>aYK,oboolean:()=>sYK,objectUtil:()=>ql1,object:()=>Ik,number:()=>my,nullable:()=>iYK,null:()=>SYK,never:()=>IYK,nativeEnum:()=>pYK,nan:()=>kYK,map:()=>mYK,makeIssue:()=>rS6,literal:()=>UYK,lazy:()=>QYK,late:()=>NYK,isValid:()=>so,isDirty:()=>M71,isAsync:()=>Hj6,isAborted:()=>J71,intersection:()=>uYK,instanceof:()=>vYK,getParsedType:()=>QB,getErrorMap:()=>Oj6,function:()=>FYK,enum:()=>HI,effect:()=>cYK,discriminatedUnion:()=>xYK,defaultErrorMap:()=>np,datetimeRegex:()=>UYA,date:()=>LYK,custom:()=>dYA,coerce:()=>tYK,boolean:()=>mX,bigint:()=>EYK,array:()=>Ej,any:()=>CYK,addIssueToContext:()=>j4,ZodVoid:()=>aS6,ZodUnknown:()=>to,ZodUnion:()=>Pj6,ZodUndefined:()=>Dj6,ZodType:()=>W9,ZodTuple:()=>pB,ZodTransformer:()=>$I,ZodSymbol:()=>oS6,ZodString:()=>YI,ZodSet:()=>_q6,ZodSchema:()=>W9,ZodRecord:()=>sS6,ZodReadonly:()=>Nj6,ZodPromise:()=>$q6,ZodPipeline:()=>AC6,ZodParsedType:()=>m7,ZodOptional:()=>wI,ZodObject:()=>SH,ZodNumber:()=>eo,ZodNullable:()=>op,ZodNull:()=>Xj6,ZodNever:()=>UB,ZodNativeEnum:()=>fj6,ZodNaN:()=>eS6,ZodMap:()=>tS6,ZodLiteral:()=>Gj6,ZodLazy:()=>Zj6,ZodIssueCode:()=>eA,ZodIntersection:()=>Wj6,ZodFunction:()=>Jj6,ZodFirstPartyTypeKind:()=>eK,ZodError:()=>SV,ZodEnum:()=>qa,ZodEffects:()=>$I,ZodDiscriminatedUnion:()=>D71,ZodDefault:()=>Tj6,ZodDate:()=>zq6,ZodCatch:()=>Vj6,ZodBranded:()=>X71,ZodBoolean:()=>Mj6,ZodBigInt:()=>Aa,ZodArray:()=>zI,ZodAny:()=>wq6,Schema:()=>W9,ParseStatus:()=>M0,OK:()=>yZ,NEVER:()=>eYK,INVALID:()=>xK,EMPTY_PATH:()=>e9K,DIRTY:()=>Yq6,BRAND:()=>VYK});var _l1=k(()=>{j71();Yl1();uYA();nS6();cYA();H71()});var lYA=k(()=>{ff()});var iYA=()=>{};var nYA=()=>{};var rYA=()=>{};var oYA=()=>{};var aYA=k(()=>{ff();i81();rYA();oYA();lYA();iYA();nYA()});var sYA=k(()=>{aYA()});var tYA=k(()=>{sYA()});function Ka(A){return!!A._zod}function Nf(A,q){if(Ka(A))return UH6(A,q);return A.safeParse(q)}function vj6(A){if(!A)return;let q;if(Ka(A))q=A._zod?.def?.shape;else q=A.shape;if(!q)return;if(typeof q==="function")try{return q()}catch{return}return q}function eYA(A){if(Ka(A)){let w=A._zod?.def;if(w){if(w.value!==void 0)return w.value;if(Array.isArray(w.values)&&w.values.length>0)return w.values[0]}}let K=A._def;if(K){if(K.value!==void 0)return K.value;if(Array.isArray(K.values)&&K.values.length>0)return K.values[0]}let Y=A.value;if(Y!==void 0)return Y;return}var qC6=k(()=>{tYA()});function Ya(A){return A==="completed"||A==="failed"||A==="cancelled"}var YzK;var P71=k(()=>{YzK=Symbol("Let zodToJsonSchema decide on which parser to use")});var $l1=k(()=>{P71()});var gy=()=>{};var Ol1=k(()=>{MM()});var Hl1=()=>{};var W71=k(()=>{MM()});var jl1=k(()=>{MM()});var Jl1=()=>{};var Ml1=k(()=>{MM()});var Dl1=k(()=>{MM();gy()});var Xl1=k(()=>{MM()});var G5w;var Z71=k(()=>{G5w=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var G71=k(()=>{MM();Z71();W71();gy()});var Pl1=k(()=>{MM();G71();gy()});var Wl1=k(()=>{gy()});var f71=k(()=>{MM()});var Zl1=k(()=>{MM();f71()});var Gl1=()=>{};var fl1=k(()=>{MM()});var Tl1=k(()=>{MM();gy()});var Vl1=k(()=>{MM()});var Nl1=k(()=>{MM()});var vl1=k(()=>{MM()});var kl1=k(()=>{MM()});var El1=k(()=>{gy()});var Ll1=k(()=>{gy()});var yl1=k(()=>{MM()});var Rl1=k(()=>{gy();Ol1();Hl1();W71();jl1();Jl1();Ml1();Dl1();Xl1();Pl1();Wl1();Zl1();Gl1();fl1();Tl1();Vl1();Nl1();G71();vl1();Z71();kl1();El1();f71();Ll1();yl1()});var MM=k(()=>{P71();Rl1();gy()});var AzA=()=>{};var Sl1=k(()=>{MM();$l1();gy()});var qzA=k(()=>{Sl1();P71();$l1();MM();AzA();gy();Ol1();Hl1();W71();jl1();Jl1();Ml1();Dl1();Xl1();Pl1();Wl1();Zl1();Gl1();fl1();Tl1();Vl1();Nl1();yl1();G71();vl1();Z71();kl1();El1();f71();Ll1();Rl1();Sl1()});function Cl1(A){let K=vj6(A)?.method;if(!K)throw Error("Schema is missing a method literal");let Y=eYA(K);if(typeof Y!=="string")throw Error("Schema method literal must be a string");return Y}function hl1(A,q){let K=Nf(A,q);if(!K.success)throw K.error;return K.data}var KzA=k(()=>{qC6();qzA()});class YC6{constructor(A){if(this._options=A,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(uA1,(q)=>{this._oncancel(q)}),this.setNotificationHandler(gA1,(q)=>{this._onprogress(q)}),this.setRequestHandler(mA1,(q)=>({})),this._taskStore=A?.taskStore,this._taskMessageQueue=A?.taskMessageQueue,this._taskStore)this.setRequestHandler(FA1,async(q,K)=>{let Y=await this._taskStore.getTask(q.params.taskId,K.sessionId);if(!Y)throw new fq(YK.InvalidParams,"Failed to retrieve task: Task not found");return{...Y}}),this.setRequestHandler(UA1,async(q,K)=>{let Y=async()=>{let z=q.params.taskId;if(this._taskMessageQueue){let _;while(_=await this._taskMessageQueue.dequeue(z,K.sessionId)){if(_.type==="response"||_.type==="error"){let $=_.message,O=$.id,H=this._requestResolvers.get(O);if(H)if(this._requestResolvers.delete(O),_.type==="response")H($);else{let j=$,J=new fq(j.error.code,j.error.message,j.error.data);H(J)}else{let j=_.type==="response"?"Response":"Error";this._onerror(Error(`${j} handler missing for request ${O}`))}continue}await this._transport?.send(_.message,{relatedRequestId:K.requestId})}}let w=await this._taskStore.getTask(z,K.sessionId);if(!w)throw new fq(YK.InvalidParams,`Task not found: ${z}`);if(!Ya(w.status))return await this._waitForTaskUpdate(z,K.signal),await Y();if(Ya(w.status)){let _=await this._taskStore.getTaskResult(z,K.sessionId);return this._clearTaskQueue(z),{..._,_meta:{..._._meta,[lo]:{taskId:z}}}}return await Y()};return await Y()}),this.setRequestHandler(pA1,async(q,K)=>{try{let{tasks:Y,nextCursor:z}=await this._taskStore.listTasks(q.params?.cursor,K.sessionId);return{tasks:Y,nextCursor:z,_meta:{}}}catch(Y){throw new fq(YK.InvalidParams,`Failed to list tasks: ${Y instanceof Error?Y.message:String(Y)}`)}}),this.setRequestHandler(cA1,async(q,K)=>{try{let Y=await this._taskStore.getTask(q.params.taskId,K.sessionId);if(!Y)throw new fq(YK.InvalidParams,`Task not found: ${q.params.taskId}`);if(Ya(Y.status))throw new fq(YK.InvalidParams,`Cannot cancel task in terminal status: ${Y.status}`);await this._taskStore.updateTaskStatus(q.params.taskId,"cancelled","Client cancelled task execution.",K.sessionId),this._clearTaskQueue(q.params.taskId);let z=await this._taskStore.getTask(q.params.taskId,K.sessionId);if(!z)throw new fq(YK.InvalidParams,`Task not found after cancellation: ${q.params.taskId}`);return{_meta:{},...z}}catch(Y){if(Y instanceof fq)throw Y;throw new fq(YK.InvalidRequest,`Failed to cancel task: ${Y instanceof Error?Y.message:String(Y)}`)}})}async _oncancel(A){if(!A.params.requestId)return;this._requestHandlerAbortControllers.get(A.params.requestId)?.abort(A.params.reason)}_setupTimeout(A,q,K,Y,z=!1){this._timeoutInfo.set(A,{timeoutId:setTimeout(Y,q),startTime:Date.now(),timeout:q,maxTotalTimeout:K,resetTimeoutOnProgress:z,onTimeout:Y})}_resetTimeout(A){let q=this._timeoutInfo.get(A);if(!q)return!1;let K=Date.now()-q.startTime;if(q.maxTotalTimeout&&K>=q.maxTotalTimeout)throw this._timeoutInfo.delete(A),fq.fromError(YK.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:q.maxTotalTimeout,totalElapsed:K});return clearTimeout(q.timeoutId),q.timeoutId=setTimeout(q.onTimeout,q.timeout),!0}_cleanupTimeout(A){let q=this._timeoutInfo.get(A);if(q)clearTimeout(q.timeoutId),this._timeoutInfo.delete(A)}async connect(A){if(this._transport)throw Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=A;let q=this.transport?.onclose;this._transport.onclose=()=>{q?.(),this._onclose()};let K=this.transport?.onerror;this._transport.onerror=(z)=>{K?.(z),this._onerror(z)};let Y=this._transport?.onmessage;this._transport.onmessage=(z,w)=>{if(Y?.(z,w),a46(z)||D9A(z))this._onresponse(z);else if(GS6(z))this._onrequest(z,w);else if(M9A(z))this._onnotification(z);else this._onerror(Error(`Unknown message type: ${JSON.stringify(z)}`))},await this._transport.start()}_onclose(){let A=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let K of this._requestHandlerAbortControllers.values())K.abort();this._requestHandlerAbortControllers.clear();let q=fq.fromError(YK.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let K of A.values())K(q)}_onerror(A){this.onerror?.(A)}_onnotification(A){let q=this._notificationHandlers.get(A.method)??this.fallbackNotificationHandler;if(q===void 0)return;Promise.resolve().then(()=>q(A)).catch((K)=>this._onerror(Error(`Uncaught error in notification handler: ${K}`)))}_onrequest(A,q){let K=this._requestHandlers.get(A.method)??this.fallbackRequestHandler,Y=this._transport,z=A.params?._meta?.[lo]?.taskId;if(K===void 0){let H={jsonrpc:"2.0",id:A.id,error:{code:YK.MethodNotFound,message:"Method not found"}};if(z&&this._taskMessageQueue)this._enqueueTaskMessage(z,{type:"error",message:H,timestamp:Date.now()},Y?.sessionId).catch((j)=>this._onerror(Error(`Failed to enqueue error response: ${j}`)));else Y?.send(H).catch((j)=>this._onerror(Error(`Failed to send an error response: ${j}`)));return}let w=new AbortController;this._requestHandlerAbortControllers.set(A.id,w);let _=H9A(A.params)?A.params.task:void 0,$=this._taskStore?this.requestTaskStore(A,Y?.sessionId):void 0,O={signal:w.signal,sessionId:Y?.sessionId,_meta:A.params?._meta,sendNotification:async(H)=>{if(w.signal.aborted)return;let j={relatedRequestId:A.id};if(z)j.relatedTask={taskId:z};await this.notification(H,j)},sendRequest:async(H,j,J)=>{if(w.signal.aborted)throw new fq(YK.ConnectionClosed,"Request was cancelled");let M={...J,relatedRequestId:A.id};if(z&&!M.relatedTask)M.relatedTask={taskId:z};let D=M.relatedTask?.taskId??z;if(D&&$)await $.updateTaskStatus(D,"input_required");return await this.request(H,j,M)},authInfo:q?.authInfo,requestId:A.id,requestInfo:q?.requestInfo,taskId:z,taskStore:$,taskRequestedTtl:_?.ttl,closeSSEStream:q?.closeSSEStream,closeStandaloneSSEStream:q?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(_)this.assertTaskHandlerCapability(A.method)}).then(()=>K(A,O)).then(async(H)=>{if(w.signal.aborted)return;let j={result:H,jsonrpc:"2.0",id:A.id};if(z&&this._taskMessageQueue)await this._enqueueTaskMessage(z,{type:"response",message:j,timestamp:Date.now()},Y?.sessionId);else await Y?.send(j)},async(H)=>{if(w.signal.aborted)return;let j={jsonrpc:"2.0",id:A.id,error:{code:Number.isSafeInteger(H.code)?H.code:YK.InternalError,message:H.message??"Internal error",...H.data!==void 0&&{data:H.data}}};if(z&&this._taskMessageQueue)await this._enqueueTaskMessage(z,{type:"error",message:j,timestamp:Date.now()},Y?.sessionId);else await Y?.send(j)}).catch((H)=>this._onerror(Error(`Failed to send response: ${H}`))).finally(()=>{this._requestHandlerAbortControllers.delete(A.id)})}_onprogress(A){let{progressToken:q,...K}=A.params,Y=Number(q),z=this._progressHandlers.get(Y);if(!z){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(A)}`));return}let w=this._responseHandlers.get(Y),_=this._timeoutInfo.get(Y);if(_&&w&&_.resetTimeoutOnProgress)try{this._resetTimeout(Y)}catch($){this._responseHandlers.delete(Y),this._progressHandlers.delete(Y),this._cleanupTimeout(Y),w($);return}z(K)}_onresponse(A){let q=Number(A.id),K=this._requestResolvers.get(q);if(K){if(this._requestResolvers.delete(q),a46(A))K(A);else{let w=new fq(A.error.code,A.error.message,A.error.data);K(w)}return}let Y=this._responseHandlers.get(q);if(Y===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(A)}`));return}this._responseHandlers.delete(q),this._cleanupTimeout(q);let z=!1;if(a46(A)&&A.result&&typeof A.result==="object"){let w=A.result;if(w.task&&typeof w.task==="object"){let _=w.task;if(typeof _.taskId==="string")z=!0,this._taskProgressTokens.set(_.taskId,q)}}if(!z)this._progressHandlers.delete(q);if(a46(A))Y(A);else{let w=fq.fromError(A.error.code,A.error.message,A.error.data);Y(w)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(A,q,K){let{task:Y}=K??{};if(!Y){try{yield{type:"result",result:await this.request(A,q,K)}}catch(w){yield{type:"error",error:w instanceof fq?w:new fq(YK.InternalError,String(w))}}return}let z;try{let w=await this.request(A,Up,K);if(w.task)z=w.task.taskId,yield{type:"taskCreated",task:w.task};else throw new fq(YK.InternalError,"Task creation did not return a task");while(!0){let _=await this.getTask({taskId:z},K);if(yield{type:"taskStatus",task:_},Ya(_.status)){if(_.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:z},q,K)};else if(_.status==="failed")yield{type:"error",error:new fq(YK.InternalError,`Task ${z} failed`)};else if(_.status==="cancelled")yield{type:"error",error:new fq(YK.InternalError,`Task ${z} was cancelled`)};return}if(_.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:z},q,K)};return}let $=_.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((O)=>setTimeout(O,$)),K?.signal?.throwIfAborted()}}catch(w){yield{type:"error",error:w instanceof fq?w:new fq(YK.InternalError,String(w))}}}request(A,q,K){let{relatedRequestId:Y,resumptionToken:z,onresumptiontoken:w,task:_,relatedTask:$}=K??{};return new Promise((O,H)=>{let j=(Z)=>{H(Z)};if(!this._transport){j(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod(A.method),_)this.assertTaskCapability(A.method)}catch(Z){j(Z);return}K?.signal?.throwIfAborted();let J=this._requestMessageId++,M={...A,jsonrpc:"2.0",id:J};if(K?.onprogress)this._progressHandlers.set(J,K.onprogress),M.params={...A.params,_meta:{...A.params?._meta||{},progressToken:J}};if(_)M.params={...M.params,task:_};if($)M.params={...M.params,_meta:{...M.params?._meta||{},[lo]:$}};let D=(Z)=>{this._responseHandlers.delete(J),this._progressHandlers.delete(J),this._cleanupTimeout(J),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:J,reason:String(Z)}},{relatedRequestId:Y,resumptionToken:z,onresumptiontoken:w}).catch((f)=>this._onerror(Error(`Failed to send cancellation: ${f}`)));let G=Z instanceof fq?Z:new fq(YK.RequestTimeout,String(Z));H(G)};this._responseHandlers.set(J,(Z)=>{if(K?.signal?.aborted)return;if(Z instanceof Error)return H(Z);try{let G=Nf(q,Z.result);if(!G.success)H(G.error);else O(G.data)}catch(G){H(G)}}),K?.signal?.addEventListener("abort",()=>{D(K?.signal?.reason)});let X=K?.timeout??HzK,P=()=>D(fq.fromError(YK.RequestTimeout,"Request timed out",{timeout:X}));this._setupTimeout(J,X,K?.maxTotalTimeout,P,K?.resetTimeoutOnProgress??!1);let W=$?.taskId;if(W){let Z=(G)=>{let f=this._responseHandlers.get(J);if(f)f(G);else this._onerror(Error(`Response handler missing for side-channeled request ${J}`))};this._requestResolvers.set(J,Z),this._enqueueTaskMessage(W,{type:"request",message:M,timestamp:Date.now()}).catch((G)=>{this._cleanupTimeout(J),H(G)})}else this._transport.send(M,{relatedRequestId:Y,resumptionToken:z,onresumptiontoken:w}).catch((Z)=>{this._cleanupTimeout(J),H(Z)})})}async getTask(A,q){return this.request({method:"tasks/get",params:A},QA1,q)}async getTaskResult(A,q,K){return this.request({method:"tasks/result",params:A},q,K)}async listTasks(A,q){return this.request({method:"tasks/list",params:A},dA1,q)}async cancelTask(A,q){return this.request({method:"tasks/cancel",params:A},W9A,q)}async notification(A,q){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability(A.method);let K=q?.relatedTask?.taskId;if(K){let _={...A,jsonrpc:"2.0",params:{...A.params,_meta:{...A.params?._meta||{},[lo]:q.relatedTask}}};await this._enqueueTaskMessage(K,{type:"notification",message:_,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(A.method)&&!A.params&&!q?.relatedRequestId&&!q?.relatedTask){if(this._pendingDebouncedNotifications.has(A.method))return;this._pendingDebouncedNotifications.add(A.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(A.method),!this._transport)return;let _={...A,jsonrpc:"2.0"};if(q?.relatedTask)_={..._,params:{..._.params,_meta:{..._.params?._meta||{},[lo]:q.relatedTask}}};this._transport?.send(_,q).catch(($)=>this._onerror($))});return}let w={...A,jsonrpc:"2.0"};if(q?.relatedTask)w={...w,params:{...w.params,_meta:{...w.params?._meta||{},[lo]:q.relatedTask}}};await this._transport.send(w,q)}setRequestHandler(A,q){let K=Cl1(A);this.assertRequestHandlerCapability(K),this._requestHandlers.set(K,(Y,z)=>{let w=hl1(A,Y);return Promise.resolve(q(w,z))})}removeRequestHandler(A){this._requestHandlers.delete(A)}assertCanSetRequestHandler(A){if(this._requestHandlers.has(A))throw Error(`A request handler for ${A} already exists, which would be overridden`)}setNotificationHandler(A,q){let K=Cl1(A);this._notificationHandlers.set(K,(Y)=>{let z=hl1(A,Y);return Promise.resolve(q(z))})}removeNotificationHandler(A){this._notificationHandlers.delete(A)}_cleanupTaskProgressHandler(A){let q=this._taskProgressTokens.get(A);if(q!==void 0)this._progressHandlers.delete(q),this._taskProgressTokens.delete(A)}async _enqueueTaskMessage(A,q,K){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let Y=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(A,q,K,Y)}async _clearTaskQueue(A,q){if(this._taskMessageQueue){let K=await this._taskMessageQueue.dequeueAll(A,q);for(let Y of K)if(Y.type==="request"&&GS6(Y.message)){let z=Y.message.id,w=this._requestResolvers.get(z);if(w)w(new fq(YK.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(z);else this._onerror(Error(`Resolver missing for request ${z} during task ${A} cleanup`))}}}async _waitForTaskUpdate(A,q){let K=this._options?.defaultTaskPollInterval??1000;try{let Y=await this._taskStore?.getTask(A);if(Y?.pollInterval)K=Y.pollInterval}catch{}return new Promise((Y,z)=>{if(q.aborted){z(new fq(YK.InvalidRequest,"Request cancelled"));return}let w=setTimeout(Y,K);q.addEventListener("abort",()=>{clearTimeout(w),z(new fq(YK.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(A,q){let K=this._taskStore;if(!K)throw Error("No task store configured");return{createTask:async(Y)=>{if(!A)throw Error("No request provided");return await K.createTask(Y,A.id,{method:A.method,params:A.params},q)},getTask:async(Y)=>{let z=await K.getTask(Y,q);if(!z)throw new fq(YK.InvalidParams,"Failed to retrieve task: Task not found");return z},storeTaskResult:async(Y,z,w)=>{await K.storeTaskResult(Y,z,w,q);let _=await K.getTask(Y,q);if(_){let $=vS6.parse({method:"notifications/tasks/status",params:_});if(await this.notification($),Ya(_.status))this._cleanupTaskProgressHandler(Y)}},getTaskResult:(Y)=>{return K.getTaskResult(Y,q)},updateTaskStatus:async(Y,z,w)=>{let _=await K.getTask(Y,q);if(!_)throw new fq(YK.InvalidParams,`Task "${Y}" not found - it may have been cleaned up`);if(Ya(_.status))throw new fq(YK.InvalidParams,`Cannot update task "${Y}" from terminal status "${_.status}" to "${z}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await K.updateTaskStatus(Y,z,w,q);let $=await K.getTask(Y,q);if($){let O=vS6.parse({method:"notifications/tasks/status",params:$});if(await this.notification(O),Ya($.status))this._cleanupTaskProgressHandler(Y)}},listTasks:(Y)=>{return K.listTasks(Y,q)}}}}function YzA(A){return A!==null&&typeof A==="object"&&!Array.isArray(A)}function T71(A,q){let K={...A};for(let Y in q){let z=Y,w=q[z];if(w===void 0)continue;let _=K[z];if(YzA(_)&&YzA(w))K[z]={..._,...w};else K[z]=w}return K}var HzK=60000;var Il1=k(()=>{qC6();uX();KzA()});var wC6=C((_zA)=>{Object.defineProperty(_zA,"__esModule",{value:!0});_zA.regexpCode=_zA.getEsmExportName=_zA.getProperty=_zA.safeStringify=_zA.stringify=_zA.strConcat=_zA.addCodeArg=_zA.str=_zA._=_zA.nil=_zA._Code=_zA.Name=_zA.IDENTIFIER=_zA._CodeOrName=void 0;class V71{}_zA._CodeOrName=V71;_zA.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class kj6 extends V71{constructor(A){super();if(!_zA.IDENTIFIER.test(A))throw Error("CodeGen: name must be a valid identifier");this.str=A}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}_zA.Name=kj6;class jI extends V71{constructor(A){super();this._items=typeof A==="string"?[A]:A}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let A=this._items[0];return A===""||A==='""'}get str(){var A;return(A=this._str)!==null&&A!==void 0?A:this._str=this._items.reduce((q,K)=>`${q}${K}`,"")}get names(){var A;return(A=this._names)!==null&&A!==void 0?A:this._names=this._items.reduce((q,K)=>{if(K instanceof kj6)q[K.str]=(q[K.str]||0)+1;return q},{})}}_zA._Code=jI;_zA.nil=new jI("");function zzA(A,...q){let K=[A[0]],Y=0;while(Y<q.length)xl1(K,q[Y]),K.push(A[++Y]);return new jI(K)}_zA._=zzA;var bl1=new jI("+");function wzA(A,...q){let K=[zC6(A[0])],Y=0;while(Y<q.length)K.push(bl1),xl1(K,q[Y]),K.push(bl1,zC6(A[++Y]));return jzK(K),new jI(K)}_zA.str=wzA;function xl1(A,q){if(q instanceof jI)A.push(...q._items);else if(q instanceof kj6)A.push(q);else A.push(DzK(q))}_zA.addCodeArg=xl1;function jzK(A){let q=1;while(q<A.length-1){if(A[q]===bl1){let K=JzK(A[q-1],A[q+1]);if(K!==void 0){A.splice(q-1,3,K);continue}A[q++]="+"}q++}}function JzK(A,q){if(q==='""')return A;if(A==='""')return q;if(typeof A=="string"){if(q instanceof kj6||A[A.length-1]!=='"')return;if(typeof q!="string")return`${A.slice(0,-1)}${q}"`;if(q[0]==='"')return A.slice(0,-1)+q.slice(1);return}if(typeof q=="string"&&q[0]==='"'&&!(A instanceof kj6))return`"${A}${q.slice(1)}`;return}function MzK(A,q){return q.emptyStr()?A:A.emptyStr()?q:wzA`${A}${q}`}_zA.strConcat=MzK;function DzK(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:zC6(Array.isArray(A)?A.join(","):A)}function XzK(A){return new jI(zC6(A))}_zA.stringify=XzK;function zC6(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}_zA.safeStringify=zC6;function PzK(A){return typeof A=="string"&&_zA.IDENTIFIER.test(A)?new jI(`.${A}`):zzA`[${A}]`}_zA.getProperty=PzK;function WzK(A){if(typeof A=="string"&&_zA.IDENTIFIER.test(A))return new jI(`${A}`);throw Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}_zA.getEsmExportName=WzK;function ZzK(A){return new jI(A.toString())}_zA.regexpCode=ZzK});var gl1=C((jzA)=>{Object.defineProperty(jzA,"__esModule",{value:!0});jzA.ValueScope=jzA.ValueScopeName=jzA.Scope=jzA.varKinds=jzA.UsedValueState=void 0;var CV=wC6();class OzA extends Error{constructor(A){super(`CodeGen: "code" for ${A} not defined`);this.value=A.value}}var v71;(function(A){A[A.Started=0]="Started",A[A.Completed=1]="Completed"})(v71||(jzA.UsedValueState=v71={}));jzA.varKinds={const:new CV.Name("const"),let:new CV.Name("let"),var:new CV.Name("var")};class Bl1{constructor({prefixes:A,parent:q}={}){this._names={},this._prefixes=A,this._parent=q}toName(A){return A instanceof CV.Name?A:this.name(A)}name(A){return new CV.Name(this._newName(A))}_newName(A){let q=this._names[A]||this._nameGroup(A);return`${A}${q.index++}`}_nameGroup(A){var q,K;if(((K=(q=this._parent)===null||q===void 0?void 0:q._prefixes)===null||K===void 0?void 0:K.has(A))||this._prefixes&&!this._prefixes.has(A))throw Error(`CodeGen: prefix "${A}" is not allowed in this scope`);return this._names[A]={prefix:A,index:0}}}jzA.Scope=Bl1;class ml1 extends CV.Name{constructor(A,q){super(q);this.prefix=A}setValue(A,{property:q,itemIndex:K}){this.value=A,this.scopePath=CV._`.${new CV.Name(q)}[${K}]`}}jzA.ValueScopeName=ml1;var CzK=CV._`\n`;class HzA extends Bl1{constructor(A){super(A);this._values={},this._scope=A.scope,this.opts={...A,_n:A.lines?CzK:CV.nil}}get(){return this._scope}name(A){return new ml1(A,this._newName(A))}value(A,q){var K;if(q.ref===void 0)throw Error("CodeGen: ref must be passed in value");let Y=this.toName(A),{prefix:z}=Y,w=(K=q.key)!==null&&K!==void 0?K:q.ref,_=this._values[z];if(_){let H=_.get(w);if(H)return H}else _=this._values[z]=new Map;_.set(w,Y);let $=this._scope[z]||(this._scope[z]=[]),O=$.length;return $[O]=q.ref,Y.setValue(q,{property:z,itemIndex:O}),Y}getValue(A,q){let K=this._values[A];if(!K)return;return K.get(q)}scopeRefs(A,q=this._values){return this._reduceValues(q,(K)=>{if(K.scopePath===void 0)throw Error(`CodeGen: name "${K}" has no value`);return CV._`${A}${K.scopePath}`})}scopeCode(A=this._values,q,K){return this._reduceValues(A,(Y)=>{if(Y.value===void 0)throw Error(`CodeGen: name "${Y}" has no value`);return Y.value.code},q,K)}_reduceValues(A,q,K={},Y){let z=CV.nil;for(let w in A){let _=A[w];if(!_)continue;let $=K[w]=K[w]||new Map;_.forEach((O)=>{if($.has(O))return;$.set(O,v71.Started);let H=q(O);if(H){let j=this.opts.es5?jzA.varKinds.var:jzA.varKinds.const;z=CV._`${z}${j} ${O} = ${H};${this.opts._n}`}else if(H=Y===null||Y===void 0?void 0:Y(O))z=CV._`${z}${H}${this.opts._n}`;else throw new OzA(O);$.set(O,v71.Completed)})}return z}}jzA.ValueScope=HzA});var q9=C((hV)=>{Object.defineProperty(hV,"__esModule",{value:!0});hV.or=hV.and=hV.not=hV.CodeGen=hV.operators=hV.varKinds=hV.ValueScopeName=hV.ValueScope=hV.Scope=hV.Name=hV.regexpCode=hV.stringify=hV.getProperty=hV.nil=hV.strConcat=hV.str=hV._=void 0;var xY=wC6(),JI=gl1(),za=wC6();Object.defineProperty(hV,"_",{enumerable:!0,get:function(){return za._}});Object.defineProperty(hV,"str",{enumerable:!0,get:function(){return za.str}});Object.defineProperty(hV,"strConcat",{enumerable:!0,get:function(){return za.strConcat}});Object.defineProperty(hV,"nil",{enumerable:!0,get:function(){return za.nil}});Object.defineProperty(hV,"getProperty",{enumerable:!0,get:function(){return za.getProperty}});Object.defineProperty(hV,"stringify",{enumerable:!0,get:function(){return za.stringify}});Object.defineProperty(hV,"regexpCode",{enumerable:!0,get:function(){return za.regexpCode}});Object.defineProperty(hV,"Name",{enumerable:!0,get:function(){return za.Name}});var S71=gl1();Object.defineProperty(hV,"Scope",{enumerable:!0,get:function(){return S71.Scope}});Object.defineProperty(hV,"ValueScope",{enumerable:!0,get:function(){return S71.ValueScope}});Object.defineProperty(hV,"ValueScopeName",{enumerable:!0,get:function(){return S71.ValueScopeName}});Object.defineProperty(hV,"varKinds",{enumerable:!0,get:function(){return S71.varKinds}});hV.operators={GT:new xY._Code(">"),GTE:new xY._Code(">="),LT:new xY._Code("<"),LTE:new xY._Code("<="),EQ:new xY._Code("==="),NEQ:new xY._Code("!=="),NOT:new xY._Code("!"),OR:new xY._Code("||"),AND:new xY._Code("&&"),ADD:new xY._Code("+")};class wa{optimizeNodes(){return this}optimizeNames(A,q){return this}}class MzA extends wa{constructor(A,q,K){super();this.varKind=A,this.name=q,this.rhs=K}render({es5:A,_n:q}){let K=A?JI.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${K} ${this.name}${Y};`+q}optimizeNames(A,q){if(!A[this.name.str])return;if(this.rhs)this.rhs=Lj6(this.rhs,A,q);return this}get names(){return this.rhs instanceof xY._CodeOrName?this.rhs.names:{}}}class Ul1 extends wa{constructor(A,q,K){super();this.lhs=A,this.rhs=q,this.sideEffects=K}render({_n:A}){return`${this.lhs} = ${this.rhs};`+A}optimizeNames(A,q){if(this.lhs instanceof xY.Name&&!A[this.lhs.str]&&!this.sideEffects)return;return this.rhs=Lj6(this.rhs,A,q),this}get names(){let A=this.lhs instanceof xY.Name?{}:{...this.lhs.names};return R71(A,this.rhs)}}class DzA extends Ul1{constructor(A,q,K,Y){super(A,K,Y);this.op=q}render({_n:A}){return`${this.lhs} ${this.op}= ${this.rhs};`+A}}class XzA extends wa{constructor(A){super();this.label=A,this.names={}}render({_n:A}){return`${this.label}:`+A}}class PzA extends wa{constructor(A){super();this.label=A,this.names={}}render({_n:A}){return`break${this.label?` ${this.label}`:""};`+A}}class WzA extends wa{constructor(A){super();this.error=A}render({_n:A}){return`throw ${this.error};`+A}get names(){return this.error.names}}class ZzA extends wa{constructor(A){super();this.code=A}render({_n:A}){return`${this.code};`+A}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(A,q){return this.code=Lj6(this.code,A,q),this}get names(){return this.code instanceof xY._CodeOrName?this.code.names:{}}}class C71 extends wa{constructor(A=[]){super();this.nodes=A}render(A){return this.nodes.reduce((q,K)=>q+K.render(A),"")}optimizeNodes(){let{nodes:A}=this,q=A.length;while(q--){let K=A[q].optimizeNodes();if(Array.isArray(K))A.splice(q,1,...K);else if(K)A[q]=K;else A.splice(q,1)}return A.length>0?this:void 0}optimizeNames(A,q){let{nodes:K}=this,Y=K.length;while(Y--){let z=K[Y];if(z.optimizeNames(A,q))continue;xzK(A,z.names),K.splice(Y,1)}return K.length>0?this:void 0}get names(){return this.nodes.reduce((A,q)=>Hq6(A,q.names),{})}}class _a extends C71{render(A){return"{"+A._n+super.render(A)+"}"+A._n}}class GzA extends C71{}class _C6 extends _a{}_C6.kind="else";class sp extends _a{constructor(A,q){super(q);this.condition=A}render(A){let q=`if(${this.condition})`+super.render(A);if(this.else)q+="else "+this.else.render(A);return q}optimizeNodes(){super.optimizeNodes();let A=this.condition;if(A===!0)return this.nodes;let q=this.else;if(q){let K=q.optimizeNodes();q=this.else=Array.isArray(K)?new _C6(K):K}if(q){if(A===!1)return q instanceof sp?q:q.nodes;if(this.nodes.length)return this;return new sp(vzA(A),q instanceof sp?[q]:q.nodes)}if(A===!1||!this.nodes.length)return;return this}optimizeNames(A,q){var K;if(this.else=(K=this.else)===null||K===void 0?void 0:K.optimizeNames(A,q),!(super.optimizeNames(A,q)||this.else))return;return this.condition=Lj6(this.condition,A,q),this}get names(){let A=super.names;if(R71(A,this.condition),this.else)Hq6(A,this.else.names);return A}}sp.kind="if";class Ej6 extends _a{}Ej6.kind="for";class fzA extends Ej6{constructor(A){super();this.iteration=A}render(A){return`for(${this.iteration})`+super.render(A)}optimizeNames(A,q){if(!super.optimizeNames(A,q))return;return this.iteration=Lj6(this.iteration,A,q),this}get names(){return Hq6(super.names,this.iteration.names)}}class TzA extends Ej6{constructor(A,q,K,Y){super();this.varKind=A,this.name=q,this.from=K,this.to=Y}render(A){let q=A.es5?JI.varKinds.var:this.varKind,{name:K,from:Y,to:z}=this;return`for(${q} ${K}=${Y}; ${K}<${z}; ${K}++)`+super.render(A)}get names(){let A=R71(super.names,this.from);return R71(A,this.to)}}class Fl1 extends Ej6{constructor(A,q,K,Y){super();this.loop=A,this.varKind=q,this.name=K,this.iterable=Y}render(A){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(A)}optimizeNames(A,q){if(!super.optimizeNames(A,q))return;return this.iterable=Lj6(this.iterable,A,q),this}get names(){return Hq6(super.names,this.iterable.names)}}class k71 extends _a{constructor(A,q,K){super();this.name=A,this.args=q,this.async=K}render(A){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(A)}}k71.kind="func";class E71 extends C71{render(A){return"return "+super.render(A)}}E71.kind="return";class VzA extends _a{render(A){let q="try"+super.render(A);if(this.catch)q+=this.catch.render(A);if(this.finally)q+=this.finally.render(A);return q}optimizeNodes(){var A,q;return super.optimizeNodes(),(A=this.catch)===null||A===void 0||A.optimizeNodes(),(q=this.finally)===null||q===void 0||q.optimizeNodes(),this}optimizeNames(A,q){var K,Y;return super.optimizeNames(A,q),(K=this.catch)===null||K===void 0||K.optimizeNames(A,q),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(A,q),this}get names(){let A=super.names;if(this.catch)Hq6(A,this.catch.names);if(this.finally)Hq6(A,this.finally.names);return A}}class L71 extends _a{constructor(A){super();this.error=A}render(A){return`catch(${this.error})`+super.render(A)}}L71.kind="catch";class y71 extends _a{render(A){return"finally"+super.render(A)}}y71.kind="finally";class NzA{constructor(A,q={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...q,_n:q.lines?`
`:""},this._extScope=A,this._scope=new JI.Scope({parent:A}),this._nodes=[new GzA]}toString(){return this._root.render(this.opts)}name(A){return this._scope.name(A)}scopeName(A){return this._extScope.name(A)}scopeValue(A,q){let K=this._extScope.value(A,q);return(this._values[K.prefix]||(this._values[K.prefix]=new Set)).add(K),K}getScopeValue(A,q){return this._extScope.getValue(A,q)}scopeRefs(A){return this._extScope.scopeRefs(A,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(A,q,K,Y){let z=this._scope.toName(q);if(K!==void 0&&Y)this._constants[z.str]=K;return this._leafNode(new MzA(A,z,K)),z}const(A,q,K){return this._def(JI.varKinds.const,A,q,K)}let(A,q,K){return this._def(JI.varKinds.let,A,q,K)}var(A,q,K){return this._def(JI.varKinds.var,A,q,K)}assign(A,q,K){return this._leafNode(new Ul1(A,q,K))}add(A,q){return this._leafNode(new DzA(A,hV.operators.ADD,q))}code(A){if(typeof A=="function")A();else if(A!==xY.nil)this._leafNode(new ZzA(A));return this}object(...A){let q=["{"];for(let[K,Y]of A){if(q.length>1)q.push(",");if(q.push(K),K!==Y||this.opts.es5)q.push(":"),(0,xY.addCodeArg)(q,Y)}return q.push("}"),new xY._Code(q)}if(A,q,K){if(this._blockNode(new sp(A)),q&&K)this.code(q).else().code(K).endIf();else if(q)this.code(q).endIf();else if(K)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(A){return this._elseNode(new sp(A))}else(){return this._elseNode(new _C6)}endIf(){return this._endBlockNode(sp,_C6)}_for(A,q){if(this._blockNode(A),q)this.code(q).endFor();return this}for(A,q){return this._for(new fzA(A),q)}forRange(A,q,K,Y,z=this.opts.es5?JI.varKinds.var:JI.varKinds.let){let w=this._scope.toName(A);return this._for(new TzA(z,w,q,K),()=>Y(w))}forOf(A,q,K,Y=JI.varKinds.const){let z=this._scope.toName(A);if(this.opts.es5){let w=q instanceof xY.Name?q:this.var("_arr",q);return this.forRange("_i",0,xY._`${w}.length`,(_)=>{this.var(z,xY._`${w}[${_}]`),K(z)})}return this._for(new Fl1("of",Y,z,q),()=>K(z))}forIn(A,q,K,Y=this.opts.es5?JI.varKinds.var:JI.varKinds.const){if(this.opts.ownProperties)return this.forOf(A,xY._`Object.keys(${q})`,K);let z=this._scope.toName(A);return this._for(new Fl1("in",Y,z,q),()=>K(z))}endFor(){return this._endBlockNode(Ej6)}label(A){return this._leafNode(new XzA(A))}break(A){return this._leafNode(new PzA(A))}return(A){let q=new E71;if(this._blockNode(q),this.code(A),q.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(E71)}try(A,q,K){if(!q&&!K)throw Error('CodeGen: "try" without "catch" and "finally"');let Y=new VzA;if(this._blockNode(Y),this.code(A),q){let z=this.name("e");this._currNode=Y.catch=new L71(z),q(z)}if(K)this._currNode=Y.finally=new y71,this.code(K);return this._endBlockNode(L71,y71)}throw(A){return this._leafNode(new WzA(A))}block(A,q){if(this._blockStarts.push(this._nodes.length),A)this.code(A).endBlock(q);return this}endBlock(A){let q=this._blockStarts.pop();if(q===void 0)throw Error("CodeGen: not in self-balancing block");let K=this._nodes.length-q;if(K<0||A!==void 0&&K!==A)throw Error(`CodeGen: wrong number of nodes: ${K} vs ${A} expected`);return this._nodes.length=q,this}func(A,q=xY.nil,K,Y){if(this._blockNode(new k71(A,q,K)),Y)this.code(Y).endFunc();return this}endFunc(){return this._endBlockNode(k71)}optimize(A=1){while(A-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(A){return this._currNode.nodes.push(A),this}_blockNode(A){this._currNode.nodes.push(A),this._nodes.push(A)}_endBlockNode(A,q){let K=this._currNode;if(K instanceof A||q&&K instanceof q)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${q?`${A.kind}/${q.kind}`:A.kind}"`)}_elseNode(A){let q=this._currNode;if(!(q instanceof sp))throw Error('CodeGen: "else" without "if"');return this._currNode=q.else=A,this}get _root(){return this._nodes[0]}get _currNode(){let A=this._nodes;return A[A.length-1]}set _currNode(A){let q=this._nodes;q[q.length-1]=A}}hV.CodeGen=NzA;function Hq6(A,q){for(let K in q)A[K]=(A[K]||0)+(q[K]||0);return A}function R71(A,q){return q instanceof xY._CodeOrName?Hq6(A,q.names):A}function Lj6(A,q,K){if(A instanceof xY.Name)return Y(A);if(!z(A))return A;return new xY._Code(A._items.reduce((w,_)=>{if(_ instanceof xY.Name)_=Y(_);if(_ instanceof xY._Code)w.push(..._._items);else w.push(_);return w},[]));function Y(w){let _=K[w.str];if(_===void 0||q[w.str]!==1)return w;return delete q[w.str],_}function z(w){return w instanceof xY._Code&&w._items.some((_)=>_ instanceof xY.Name&&q[_.str]===1&&K[_.str]!==void 0)}}function xzK(A,q){for(let K in q)A[K]=(A[K]||0)-(q[K]||0)}function vzA(A){return typeof A=="boolean"||typeof A=="number"||A===null?!A:xY._`!${Ql1(A)}`}hV.not=vzA;var uzK=kzA(hV.operators.AND);function BzK(...A){return A.reduce(uzK)}hV.and=BzK;var mzK=kzA(hV.operators.OR);function gzK(...A){return A.reduce(mzK)}hV.or=gzK;function kzA(A){return(q,K)=>q===xY.nil?K:K===xY.nil?q:xY._`${Ql1(q)} ${A} ${Ql1(K)}`}function Ql1(A){return A instanceof xY.Name?A:xY._`(${A})`}});var kz=C((bzA)=>{Object.defineProperty(bzA,"__esModule",{value:!0});bzA.checkStrictMode=bzA.getErrorPath=bzA.Type=bzA.useFunc=bzA.setEvaluated=bzA.evaluatedPropsToName=bzA.mergeEvaluated=bzA.eachItem=bzA.unescapeJsonPointer=bzA.escapeJsonPointer=bzA.escapeFragment=bzA.unescapeFragment=bzA.schemaRefOrVal=bzA.schemaHasRulesButRef=bzA.schemaHasRules=bzA.checkUnknownRules=bzA.alwaysValidSchema=bzA.toHash=void 0;var X_=q9(),pzK=wC6();function dzK(A){let q={};for(let K of A)q[K]=!0;return q}bzA.toHash=dzK;function czK(A,q){if(typeof q=="boolean")return q;if(Object.keys(q).length===0)return!0;return RzA(A,q),!SzA(q,A.self.RULES.all)}bzA.alwaysValidSchema=czK;function RzA(A,q=A.schema){let{opts:K,self:Y}=A;if(!K.strictSchema)return;if(typeof q==="boolean")return;let z=Y.RULES.keywords;for(let w in q)if(!z[w])IzA(A,`unknown keyword: "${w}"`)}bzA.checkUnknownRules=RzA;function SzA(A,q){if(typeof A=="boolean")return!A;for(let K in A)if(q[K])return!0;return!1}bzA.schemaHasRules=SzA;function lzK(A,q){if(typeof A=="boolean")return!A;for(let K in A)if(K!=="$ref"&&q.all[K])return!0;return!1}bzA.schemaHasRulesButRef=lzK;function izK({topSchemaRef:A,schemaPath:q},K,Y,z){if(!z){if(typeof K=="number"||typeof K=="boolean")return K;if(typeof K=="string")return X_._`${K}`}return X_._`${A}${q}${(0,X_.getProperty)(Y)}`}bzA.schemaRefOrVal=izK;function nzK(A){return CzA(decodeURIComponent(A))}bzA.unescapeFragment=nzK;function rzK(A){return encodeURIComponent(dl1(A))}bzA.escapeFragment=rzK;function dl1(A){if(typeof A=="number")return`${A}`;return A.replace(/~/g,"~0").replace(/\//g,"~1")}bzA.escapeJsonPointer=dl1;function CzA(A){return A.replace(/~1/g,"/").replace(/~0/g,"~")}bzA.unescapeJsonPointer=CzA;function ozK(A,q){if(Array.isArray(A))for(let K of A)q(K);else q(A)}bzA.eachItem=ozK;function LzA({mergeNames:A,mergeToName:q,mergeValues:K,resultToName:Y}){return(z,w,_,$)=>{let O=_===void 0?w:_ instanceof X_.Name?(w instanceof X_.Name?A(z,w,_):q(z,w,_),_):w instanceof X_.Name?(q(z,_,w),w):K(w,_);return $===X_.Name&&!(O instanceof X_.Name)?Y(z,O):O}}bzA.mergeEvaluated={props:LzA({mergeNames:(A,q,K)=>A.if(X_._`${K} !== true && ${q} !== undefined`,()=>{A.if(X_._`${q} === true`,()=>A.assign(K,!0),()=>A.assign(K,X_._`${K} || {}`).code(X_._`Object.assign(${K}, ${q})`))}),mergeToName:(A,q,K)=>A.if(X_._`${K} !== true`,()=>{if(q===!0)A.assign(K,!0);else A.assign(K,X_._`${K} || {}`),cl1(A,K,q)}),mergeValues:(A,q)=>A===!0?!0:{...A,...q},resultToName:hzA}),items:LzA({mergeNames:(A,q,K)=>A.if(X_._`${K} !== true && ${q} !== undefined`,()=>A.assign(K,X_._`${q} === true ? true : ${K} > ${q} ? ${K} : ${q}`)),mergeToName:(A,q,K)=>A.if(X_._`${K} !== true`,()=>A.assign(K,q===!0?!0:X_._`${K} > ${q} ? ${K} : ${q}`)),mergeValues:(A,q)=>A===!0?!0:Math.max(A,q),resultToName:(A,q)=>A.var("items",q)})};function hzA(A,q){if(q===!0)return A.var("props",!0);let K=A.var("props",X_._`{}`);if(q!==void 0)cl1(A,K,q);return K}bzA.evaluatedPropsToName=hzA;function cl1(A,q,K){Object.keys(K).forEach((Y)=>A.assign(X_._`${q}${(0,X_.getProperty)(Y)}`,!0))}bzA.setEvaluated=cl1;var yzA={};function azK(A,q){return A.scopeValue("func",{ref:q,code:yzA[q.code]||(yzA[q.code]=new pzK._Code(q.code))})}bzA.useFunc=azK;var pl1;(function(A){A[A.Num=0]="Num",A[A.Str=1]="Str"})(pl1||(bzA.Type=pl1={}));function szK(A,q,K){if(A instanceof X_.Name){let Y=q===pl1.Num;return K?Y?X_._`"[" + ${A} + "]"`:X_._`"['" + ${A} + "']"`:Y?X_._`"/" + ${A}`:X_._`"/" + ${A}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return K?(0,X_.getProperty)(A).toString():"/"+dl1(A)}bzA.getErrorPath=szK;function IzA(A,q,K=A.opts.strictSchema){if(!K)return;if(q=`strict mode: ${q}`,K===!0)throw Error(q);A.self.logger.warn(q)}bzA.checkStrictMode=IzA});var tp=C((uzA)=>{Object.defineProperty(uzA,"__esModule",{value:!0});var RZ=q9(),PwK={data:new RZ.Name("data"),valCxt:new RZ.Name("valCxt"),instancePath:new RZ.Name("instancePath"),parentData:new RZ.Name("parentData"),parentDataProperty:new RZ.Name("parentDataProperty"),rootData:new RZ.Name("rootData"),dynamicAnchors:new RZ.Name("dynamicAnchors"),vErrors:new RZ.Name("vErrors"),errors:new RZ.Name("errors"),this:new RZ.Name("this"),self:new RZ.Name("self"),scope:new RZ.Name("scope"),json:new RZ.Name("json"),jsonPos:new RZ.Name("jsonPos"),jsonLen:new RZ.Name("jsonLen"),jsonPart:new RZ.Name("jsonPart")};uzA.default=PwK});var $C6=C((FzA)=>{Object.defineProperty(FzA,"__esModule",{value:!0});FzA.extendErrors=FzA.resetErrorsCount=FzA.reportExtraError=FzA.reportError=FzA.keyword$DataError=FzA.keywordError=void 0;var eY=q9(),I71=kz(),vf=tp();FzA.keywordError={message:({keyword:A})=>eY.str`must pass "${A}" keyword validation`};FzA.keyword$DataError={message:({keyword:A,schemaType:q})=>q?eY.str`"${A}" keyword must be ${q} ($data)`:eY.str`"${A}" keyword is invalid ($data)`};function ZwK(A,q=FzA.keywordError,K,Y){let{it:z}=A,{gen:w,compositeRule:_,allErrors:$}=z,O=gzA(A,q,K);if(Y!==null&&Y!==void 0?Y:_||$)BzA(w,O);else mzA(z,eY._`[${O}]`)}FzA.reportError=ZwK;function GwK(A,q=FzA.keywordError,K){let{it:Y}=A,{gen:z,compositeRule:w,allErrors:_}=Y,$=gzA(A,q,K);if(BzA(z,$),!(w||_))mzA(Y,vf.default.vErrors)}FzA.reportExtraError=GwK;function fwK(A,q){A.assign(vf.default.errors,q),A.if(eY._`${vf.default.vErrors} !== null`,()=>A.if(q,()=>A.assign(eY._`${vf.default.vErrors}.length`,q),()=>A.assign(vf.default.vErrors,null)))}FzA.resetErrorsCount=fwK;function TwK({gen:A,keyword:q,schemaValue:K,data:Y,errsCount:z,it:w}){if(z===void 0)throw Error("ajv implementation error");let _=A.name("err");A.forRange("i",z,vf.default.errors,($)=>{if(A.const(_,eY._`${vf.default.vErrors}[${$}]`),A.if(eY._`${_}.instancePath === undefined`,()=>A.assign(eY._`${_}.instancePath`,(0,eY.strConcat)(vf.default.instancePath,w.errorPath))),A.assign(eY._`${_}.schemaPath`,eY.str`${w.errSchemaPath}/${q}`),w.opts.verbose)A.assign(eY._`${_}.schema`,K),A.assign(eY._`${_}.data`,Y)})}FzA.extendErrors=TwK;function BzA(A,q){let K=A.const("err",q);A.if(eY._`${vf.default.vErrors} === null`,()=>A.assign(vf.default.vErrors,eY._`[${K}]`),eY._`${vf.default.vErrors}.push(${K})`),A.code(eY._`${vf.default.errors}++`)}function mzA(A,q){let{gen:K,validateName:Y,schemaEnv:z}=A;if(z.$async)K.throw(eY._`new ${A.ValidationError}(${q})`);else K.assign(eY._`${Y}.errors`,q),K.return(!1)}var jq6={keyword:new eY.Name("keyword"),schemaPath:new eY.Name("schemaPath"),params:new eY.Name("params"),propertyName:new eY.Name("propertyName"),message:new eY.Name("message"),schema:new eY.Name("schema"),parentSchema:new eY.Name("parentSchema")};function gzA(A,q,K){let{createErrors:Y}=A.it;if(Y===!1)return eY._`{}`;return VwK(A,q,K)}function VwK(A,q,K={}){let{gen:Y,it:z}=A,w=[NwK(z,K),vwK(A,K)];return kwK(A,q,w),Y.object(...w)}function NwK({errorPath:A},{instancePath:q}){let K=q?eY.str`${A}${(0,I71.getErrorPath)(q,I71.Type.Str)}`:A;return[vf.default.instancePath,(0,eY.strConcat)(vf.default.instancePath,K)]}function vwK({keyword:A,it:{errSchemaPath:q}},{schemaPath:K,parentSchema:Y}){let z=Y?q:eY.str`${q}/${A}`;if(K)z=eY.str`${z}${(0,I71.getErrorPath)(K,I71.Type.Str)}`;return[jq6.schemaPath,z]}function kwK(A,{params:q,message:K},Y){let{keyword:z,data:w,schemaValue:_,it:$}=A,{opts:O,propertyName:H,topSchemaRef:j,schemaPath:J}=$;if(Y.push([jq6.keyword,z],[jq6.params,typeof q=="function"?q(A):q||eY._`{}`]),O.messages)Y.push([jq6.message,typeof K=="function"?K(A):K]);if(O.verbose)Y.push([jq6.schema,_],[jq6.parentSchema,eY._`${j}${J}`],[vf.default.data,w]);if(H)Y.push([jq6.propertyName,H])}});var czA=C((pzA)=>{Object.defineProperty(pzA,"__esModule",{value:!0});pzA.boolOrEmptySchema=pzA.topBoolOrEmptySchema=void 0;var SwK=$C6(),CwK=q9(),hwK=tp(),IwK={message:"boolean schema is false"};function bwK(A){let{gen:q,schema:K,validateName:Y}=A;if(K===!1)UzA(A,!1);else if(typeof K=="object"&&K.$async===!0)q.return(hwK.default.data);else q.assign(CwK._`${Y}.errors`,null),q.return(!0)}pzA.topBoolOrEmptySchema=bwK;function xwK(A,q){let{gen:K,schema:Y}=A;if(Y===!1)K.var(q,!1),UzA(A);else K.var(q,!0)}pzA.boolOrEmptySchema=xwK;function UzA(A,q){let{gen:K,data:Y}=A,z={gen:K,keyword:"false schema",data:Y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:A};(0,SwK.reportError)(z,IwK,void 0,q)}});var il1=C((lzA)=>{Object.defineProperty(lzA,"__esModule",{value:!0});lzA.getRules=lzA.isJSONType=void 0;var BwK=["string","number","integer","boolean","null","object","array"],mwK=new Set(BwK);function gwK(A){return typeof A=="string"&&mwK.has(A)}lzA.isJSONType=gwK;function FwK(){let A={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...A,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},A.number,A.string,A.array,A.object],post:{rules:[]},all:{},keywords:{}}}lzA.getRules=FwK});var nl1=C((ozA)=>{Object.defineProperty(ozA,"__esModule",{value:!0});ozA.shouldUseRule=ozA.shouldUseGroup=ozA.schemaHasRulesForType=void 0;function UwK({schema:A,self:q},K){let Y=q.RULES.types[K];return Y&&Y!==!0&&nzA(A,Y)}ozA.schemaHasRulesForType=UwK;function nzA(A,q){return q.rules.some((K)=>rzA(A,K))}ozA.shouldUseGroup=nzA;function rzA(A,q){var K;return A[q.keyword]!==void 0||((K=q.definition.implements)===null||K===void 0?void 0:K.some((Y)=>A[Y]!==void 0))}ozA.shouldUseRule=rzA});var OC6=C((AwA)=>{Object.defineProperty(AwA,"__esModule",{value:!0});AwA.reportTypeError=AwA.checkDataTypes=AwA.checkDataType=AwA.coerceAndCheckDataType=AwA.getJSONTypes=AwA.getSchemaTypes=AwA.DataType=void 0;var cwK=il1(),lwK=nl1(),iwK=$C6(),g5=q9(),szA=kz(),yj6;(function(A){A[A.Correct=0]="Correct",A[A.Wrong=1]="Wrong"})(yj6||(AwA.DataType=yj6={}));function nwK(A){let q=tzA(A.type);if(q.includes("null")){if(A.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!q.length&&A.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(A.nullable===!0)q.push("null")}return q}AwA.getSchemaTypes=nwK;function tzA(A){let q=Array.isArray(A)?A:A?[A]:[];if(q.every(cwK.isJSONType))return q;throw Error("type must be JSONType or JSONType[]: "+q.join(","))}AwA.getJSONTypes=tzA;function rwK(A,q){let{gen:K,data:Y,opts:z}=A,w=owK(q,z.coerceTypes),_=q.length>0&&!(w.length===0&&q.length===1&&(0,lwK.schemaHasRulesForType)(A,q[0]));if(_){let $=ol1(q,Y,z.strictNumbers,yj6.Wrong);K.if($,()=>{if(w.length)awK(A,q,w);else al1(A)})}return _}AwA.coerceAndCheckDataType=rwK;var ezA=new Set(["string","number","integer","boolean","null"]);function owK(A,q){return q?A.filter((K)=>ezA.has(K)||q==="array"&&K==="array"):[]}function awK(A,q,K){let{gen:Y,data:z,opts:w}=A,_=Y.let("dataType",g5._`typeof ${z}`),$=Y.let("coerced",g5._`undefined`);if(w.coerceTypes==="array")Y.if(g5._`${_} == 'object' && Array.isArray(${z}) && ${z}.length == 1`,()=>Y.assign(z,g5._`${z}[0]`).assign(_,g5._`typeof ${z}`).if(ol1(q,z,w.strictNumbers),()=>Y.assign($,z)));Y.if(g5._`${$} !== undefined`);for(let H of K)if(ezA.has(H)||H==="array"&&w.coerceTypes==="array")O(H);Y.else(),al1(A),Y.endIf(),Y.if(g5._`${$} !== undefined`,()=>{Y.assign(z,$),swK(A,$)});function O(H){switch(H){case"string":Y.elseIf(g5._`${_} == "number" || ${_} == "boolean"`).assign($,g5._`"" + ${z}`).elseIf(g5._`${z} === null`).assign($,g5._`""`);return;case"number":Y.elseIf(g5._`${_} == "boolean" || ${z} === null
              || (${_} == "string" && ${z} && ${z} == +${z})`).assign($,g5._`+${z}`);return;case"integer":Y.elseIf(g5._`${_} === "boolean" || ${z} === null
              || (${_} === "string" && ${z} && ${z} == +${z} && !(${z} % 1))`).assign($,g5._`+${z}`);return;case"boolean":Y.elseIf(g5._`${z} === "false" || ${z} === 0 || ${z} === null`).assign($,!1).elseIf(g5._`${z} === "true" || ${z} === 1`).assign($,!0);return;case"null":Y.elseIf(g5._`${z} === "" || ${z} === 0 || ${z} === false`),Y.assign($,null);return;case"array":Y.elseIf(g5._`${_} === "string" || ${_} === "number"
              || ${_} === "boolean" || ${z} === null`).assign($,g5._`[${z}]`)}}}function swK({gen:A,parentData:q,parentDataProperty:K},Y){A.if(g5._`${q} !== undefined`,()=>A.assign(g5._`${q}[${K}]`,Y))}function rl1(A,q,K,Y=yj6.Correct){let z=Y===yj6.Correct?g5.operators.EQ:g5.operators.NEQ,w;switch(A){case"null":return g5._`${q} ${z} null`;case"array":w=g5._`Array.isArray(${q})`;break;case"object":w=g5._`${q} && typeof ${q} == "object" && !Array.isArray(${q})`;break;case"integer":w=_(g5._`!(${q} % 1) && !isNaN(${q})`);break;case"number":w=_();break;default:return g5._`typeof ${q} ${z} ${A}`}return Y===yj6.Correct?w:(0,g5.not)(w);function _($=g5.nil){return(0,g5.and)(g5._`typeof ${q} == "number"`,$,K?g5._`isFinite(${q})`:g5.nil)}}AwA.checkDataType=rl1;function ol1(A,q,K,Y){if(A.length===1)return rl1(A[0],q,K,Y);let z,w=(0,szA.toHash)(A);if(w.array&&w.object){let _=g5._`typeof ${q} != "object"`;z=w.null?_:g5._`!${q} || ${_}`,delete w.null,delete w.array,delete w.object}else z=g5.nil;if(w.number)delete w.integer;for(let _ in w)z=(0,g5.and)(z,rl1(_,q,K,Y));return z}AwA.checkDataTypes=ol1;var twK={message:({schema:A})=>`must be ${A}`,params:({schema:A,schemaValue:q})=>typeof A=="string"?g5._`{type: ${A}}`:g5._`{type: ${q}}`};function al1(A){let q=ewK(A);(0,iwK.reportError)(q,twK)}AwA.reportTypeError=al1;function ewK(A){let{gen:q,data:K,schema:Y}=A,z=(0,szA.schemaRefOrVal)(A,Y,"type");return{gen:q,keyword:"type",data:K,schema:Y.type,schemaCode:z,schemaValue:z,parentSchema:Y,params:{},it:A}}});var wwA=C((YwA)=>{Object.defineProperty(YwA,"__esModule",{value:!0});YwA.assignDefaults=void 0;var Rj6=q9(),_2K=kz();function $2K(A,q){let{properties:K,items:Y}=A.schema;if(q==="object"&&K)for(let z in K)KwA(A,z,K[z].default);else if(q==="array"&&Array.isArray(Y))Y.forEach((z,w)=>KwA(A,w,z.default))}YwA.assignDefaults=$2K;function KwA(A,q,K){let{gen:Y,compositeRule:z,data:w,opts:_}=A;if(K===void 0)return;let $=Rj6._`${w}${(0,Rj6.getProperty)(q)}`;if(z){(0,_2K.checkStrictMode)(A,`default is ignored for: ${$}`);return}let O=Rj6._`${$} === undefined`;if(_.useDefaults==="empty")O=Rj6._`${O} || ${$} === null || ${$} === ""`;Y.if(O,Rj6._`${$} = ${(0,Rj6.stringify)(K)}`)}});var Fy=C((OwA)=>{Object.defineProperty(OwA,"__esModule",{value:!0});OwA.validateUnion=OwA.validateArray=OwA.usePattern=OwA.callValidateCode=OwA.schemaProperties=OwA.allSchemaProperties=OwA.noPropertyInData=OwA.propertyInData=OwA.isOwnProperty=OwA.hasPropFunc=OwA.reportMissingProp=OwA.checkMissingProp=OwA.checkReportMissingProp=void 0;var i$=q9(),sl1=kz(),$a=tp(),O2K=kz();function H2K(A,q){let{gen:K,data:Y,it:z}=A;K.if(el1(K,Y,q,z.opts.ownProperties),()=>{A.setParams({missingProperty:i$._`${q}`},!0),A.error()})}OwA.checkReportMissingProp=H2K;function j2K({gen:A,data:q,it:{opts:K}},Y,z){return(0,i$.or)(...Y.map((w)=>(0,i$.and)(el1(A,q,w,K.ownProperties),i$._`${z} = ${w}`)))}OwA.checkMissingProp=j2K;function J2K(A,q){A.setParams({missingProperty:q},!0),A.error()}OwA.reportMissingProp=J2K;function _wA(A){return A.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:i$._`Object.prototype.hasOwnProperty`})}OwA.hasPropFunc=_wA;function tl1(A,q,K){return i$._`${_wA(A)}.call(${q}, ${K})`}OwA.isOwnProperty=tl1;function M2K(A,q,K,Y){let z=i$._`${q}${(0,i$.getProperty)(K)} !== undefined`;return Y?i$._`${z} && ${tl1(A,q,K)}`:z}OwA.propertyInData=M2K;function el1(A,q,K,Y){let z=i$._`${q}${(0,i$.getProperty)(K)} === undefined`;return Y?(0,i$.or)(z,(0,i$.not)(tl1(A,q,K))):z}OwA.noPropertyInData=el1;function $wA(A){return A?Object.keys(A).filter((q)=>q!=="__proto__"):[]}OwA.allSchemaProperties=$wA;function D2K(A,q){return $wA(q).filter((K)=>!(0,sl1.alwaysValidSchema)(A,q[K]))}OwA.schemaProperties=D2K;function X2K({schemaCode:A,data:q,it:{gen:K,topSchemaRef:Y,schemaPath:z,errorPath:w},it:_},$,O,H){let j=H?i$._`${A}, ${q}, ${Y}${z}`:q,J=[[$a.default.instancePath,(0,i$.strConcat)($a.default.instancePath,w)],[$a.default.parentData,_.parentData],[$a.default.parentDataProperty,_.parentDataProperty],[$a.default.rootData,$a.default.rootData]];if(_.opts.dynamicRef)J.push([$a.default.dynamicAnchors,$a.default.dynamicAnchors]);let M=i$._`${j}, ${K.object(...J)}`;return O!==i$.nil?i$._`${$}.call(${O}, ${M})`:i$._`${$}(${M})`}OwA.callValidateCode=X2K;var P2K=i$._`new RegExp`;function W2K({gen:A,it:{opts:q}},K){let Y=q.unicodeRegExp?"u":"",{regExp:z}=q.code,w=z(K,Y);return A.scopeValue("pattern",{key:w.toString(),ref:w,code:i$._`${z.code==="new RegExp"?P2K:(0,O2K.useFunc)(A,z)}(${K}, ${Y})`})}OwA.usePattern=W2K;function Z2K(A){let{gen:q,data:K,keyword:Y,it:z}=A,w=q.name("valid");if(z.allErrors){let $=q.let("valid",!0);return _(()=>q.assign($,!1)),$}return q.var(w,!0),_(()=>q.break()),w;function _($){let O=q.const("len",i$._`${K}.length`);q.forRange("i",0,O,(H)=>{A.subschema({keyword:Y,dataProp:H,dataPropType:sl1.Type.Num},w),q.if((0,i$.not)(w),$)})}}OwA.validateArray=Z2K;function G2K(A){let{gen:q,schema:K,keyword:Y,it:z}=A;if(!Array.isArray(K))throw Error("ajv implementation error");if(K.some((O)=>(0,sl1.alwaysValidSchema)(z,O))&&!z.opts.unevaluated)return;let _=q.let("valid",!1),$=q.name("_valid");q.block(()=>K.forEach((O,H)=>{let j=A.subschema({keyword:Y,schemaProp:H,compositeRule:!0},$);if(q.assign(_,i$._`${_} || ${$}`),!A.mergeValidEvaluated(j,$))q.if((0,i$.not)(_))})),A.result(_,()=>A.reset(),()=>A.error(!0))}OwA.validateUnion=G2K});var XwA=C((MwA)=>{Object.defineProperty(MwA,"__esModule",{value:!0});MwA.validateKeywordUsage=MwA.validSchemaType=MwA.funcKeywordCode=MwA.macroKeywordCode=void 0;var kf=q9(),Jq6=tp(),h2K=Fy(),I2K=$C6();function b2K(A,q){let{gen:K,keyword:Y,schema:z,parentSchema:w,it:_}=A,$=q.macro.call(_.self,z,w,_),O=JwA(K,Y,$);if(_.opts.validateSchema!==!1)_.self.validateSchema($,!0);let H=K.name("valid");A.subschema({schema:$,schemaPath:kf.nil,errSchemaPath:`${_.errSchemaPath}/${Y}`,topSchemaRef:O,compositeRule:!0},H),A.pass(H,()=>A.error(!0))}MwA.macroKeywordCode=b2K;function x2K(A,q){var K;let{gen:Y,keyword:z,schema:w,parentSchema:_,$data:$,it:O}=A;B2K(O,q);let H=!$&&q.compile?q.compile.call(O.self,w,_,O):q.validate,j=JwA(Y,z,H),J=Y.let("valid");A.block$data(J,M),A.ok((K=q.valid)!==null&&K!==void 0?K:J);function M(){if(q.errors===!1){if(P(),q.modifying)jwA(A);W(()=>A.error())}else{let Z=q.async?D():X();if(q.modifying)jwA(A);W(()=>u2K(A,Z))}}function D(){let Z=Y.let("ruleErrs",null);return Y.try(()=>P(kf._`await `),(G)=>Y.assign(J,!1).if(kf._`${G} instanceof ${O.ValidationError}`,()=>Y.assign(Z,kf._`${G}.errors`),()=>Y.throw(G))),Z}function X(){let Z=kf._`${j}.errors`;return Y.assign(Z,null),P(kf.nil),Z}function P(Z=q.async?kf._`await `:kf.nil){let G=O.opts.passContext?Jq6.default.this:Jq6.default.self,f=!(("compile"in q)&&!$||q.schema===!1);Y.assign(J,kf._`${Z}${(0,h2K.callValidateCode)(A,j,G,f)}`,q.modifying)}function W(Z){var G;Y.if((0,kf.not)((G=q.valid)!==null&&G!==void 0?G:J),Z)}}MwA.funcKeywordCode=x2K;function jwA(A){let{gen:q,data:K,it:Y}=A;q.if(Y.parentData,()=>q.assign(K,kf._`${Y.parentData}[${Y.parentDataProperty}]`))}function u2K(A,q){let{gen:K}=A;K.if(kf._`Array.isArray(${q})`,()=>{K.assign(Jq6.default.vErrors,kf._`${Jq6.default.vErrors} === null ? ${q} : ${Jq6.default.vErrors}.concat(${q})`).assign(Jq6.default.errors,kf._`${Jq6.default.vErrors}.length`),(0,I2K.extendErrors)(A)},()=>A.error())}function B2K({schemaEnv:A},q){if(q.async&&!A.$async)throw Error("async keyword in sync schema")}function JwA(A,q,K){if(K===void 0)throw Error(`keyword "${q}" failed to compile`);return A.scopeValue("keyword",typeof K=="function"?{ref:K}:{ref:K,code:(0,kf.stringify)(K)})}function m2K(A,q,K=!1){return!q.length||q.some((Y)=>Y==="array"?Array.isArray(A):Y==="object"?A&&typeof A=="object"&&!Array.isArray(A):typeof A==Y||K&&typeof A>"u")}MwA.validSchemaType=m2K;function g2K({schema:A,opts:q,self:K,errSchemaPath:Y},z,w){if(Array.isArray(z.keyword)?!z.keyword.includes(w):z.keyword!==w)throw Error("ajv implementation error");let _=z.dependencies;if(_===null||_===void 0?void 0:_.some(($)=>!Object.prototype.hasOwnProperty.call(A,$)))throw Error(`parent schema must have dependencies of ${w}: ${_.join(",")}`);if(z.validateSchema){if(!z.validateSchema(A[w])){let O=`keyword "${w}" value is invalid at path "${Y}": `+K.errorsText(z.validateSchema.errors);if(q.validateSchema==="log")K.logger.error(O);else throw Error(O)}}}MwA.validateKeywordUsage=g2K});var GwA=C((WwA)=>{Object.defineProperty(WwA,"__esModule",{value:!0});WwA.extendSubschemaMode=WwA.extendSubschemaData=WwA.getSubschema=void 0;var dB=q9(),PwA=kz();function p2K(A,{keyword:q,schemaProp:K,schema:Y,schemaPath:z,errSchemaPath:w,topSchemaRef:_}){if(q!==void 0&&Y!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(q!==void 0){let $=A.schema[q];return K===void 0?{schema:$,schemaPath:dB._`${A.schemaPath}${(0,dB.getProperty)(q)}`,errSchemaPath:`${A.errSchemaPath}/${q}`}:{schema:$[K],schemaPath:dB._`${A.schemaPath}${(0,dB.getProperty)(q)}${(0,dB.getProperty)(K)}`,errSchemaPath:`${A.errSchemaPath}/${q}/${(0,PwA.escapeFragment)(K)}`}}if(Y!==void 0){if(z===void 0||w===void 0||_===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:Y,schemaPath:z,topSchemaRef:_,errSchemaPath:w}}throw Error('either "keyword" or "schema" must be passed')}WwA.getSubschema=p2K;function d2K(A,q,{dataProp:K,dataPropType:Y,data:z,dataTypes:w,propertyName:_}){if(z!==void 0&&K!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:$}=q;if(K!==void 0){let{errorPath:H,dataPathArr:j,opts:J}=q,M=$.let("data",dB._`${q.data}${(0,dB.getProperty)(K)}`,!0);O(M),A.errorPath=dB.str`${H}${(0,PwA.getErrorPath)(K,Y,J.jsPropertySyntax)}`,A.parentDataProperty=dB._`${K}`,A.dataPathArr=[...j,A.parentDataProperty]}if(z!==void 0){let H=z instanceof dB.Name?z:$.let("data",z,!0);if(O(H),_!==void 0)A.propertyName=_}if(w)A.dataTypes=w;function O(H){A.data=H,A.dataLevel=q.dataLevel+1,A.dataTypes=[],q.definedProperties=new Set,A.parentData=q.data,A.dataNames=[...q.dataNames,H]}}WwA.extendSubschemaData=d2K;function c2K(A,{jtdDiscriminator:q,jtdMetadata:K,compositeRule:Y,createErrors:z,allErrors:w}){if(Y!==void 0)A.compositeRule=Y;if(z!==void 0)A.createErrors=z;if(w!==void 0)A.allErrors=w;A.jtdDiscriminator=q,A.jtdMetadata=K}WwA.extendSubschemaMode=c2K});var Ai1=C((pzw,fwA)=>{fwA.exports=function A(q,K){if(q===K)return!0;if(q&&K&&typeof q=="object"&&typeof K=="object"){if(q.constructor!==K.constructor)return!1;var Y,z,w;if(Array.isArray(q)){if(Y=q.length,Y!=K.length)return!1;for(z=Y;z--!==0;)if(!A(q[z],K[z]))return!1;return!0}if(q.constructor===RegExp)return q.source===K.source&&q.flags===K.flags;if(q.valueOf!==Object.prototype.valueOf)return q.valueOf()===K.valueOf();if(q.toString!==Object.prototype.toString)return q.toString()===K.toString();if(w=Object.keys(q),Y=w.length,Y!==Object.keys(K).length)return!1;for(z=Y;z--!==0;)if(!Object.prototype.hasOwnProperty.call(K,w[z]))return!1;for(z=Y;z--!==0;){var _=w[z];if(!A(q[_],K[_]))return!1}return!0}return q!==q&&K!==K}});var VwA=C((dzw,TwA)=>{var Oa=TwA.exports=function(A,q,K){if(typeof q=="function")K=q,q={};K=q.cb||K;var Y=typeof K=="function"?K:K.pre||function(){},z=K.post||function(){};b71(q,Y,z,A,"",A)};Oa.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Oa.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Oa.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Oa.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function b71(A,q,K,Y,z,w,_,$,O,H){if(Y&&typeof Y=="object"&&!Array.isArray(Y)){q(Y,z,w,_,$,O,H);for(var j in Y){var J=Y[j];if(Array.isArray(J)){if(j in Oa.arrayKeywords)for(var M=0;M<J.length;M++)b71(A,q,K,J[M],z+"/"+j+"/"+M,w,z,j,Y,M)}else if(j in Oa.propsKeywords){if(J&&typeof J=="object")for(var D in J)b71(A,q,K,J[D],z+"/"+j+"/"+n2K(D),w,z,j,Y,D)}else if(j in Oa.keywords||A.allKeys&&!(j in Oa.skipKeywords))b71(A,q,K,J,z+"/"+j,w,z,j,Y)}K(Y,z,w,_,$,O,H)}}function n2K(A){return A.replace(/~/g,"~0").replace(/\//g,"~1")}});var HC6=C((EwA)=>{Object.defineProperty(EwA,"__esModule",{value:!0});EwA.getSchemaRefs=EwA.resolveUrl=EwA.normalizeId=EwA._getFullPath=EwA.getFullPath=EwA.inlineRef=void 0;var r2K=kz(),o2K=Ai1(),a2K=VwA(),s2K=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function t2K(A,q=!0){if(typeof A=="boolean")return!0;if(q===!0)return!qi1(A);if(!q)return!1;return NwA(A)<=q}EwA.inlineRef=t2K;var e2K=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function qi1(A){for(let q in A){if(e2K.has(q))return!0;let K=A[q];if(Array.isArray(K)&&K.some(qi1))return!0;if(typeof K=="object"&&qi1(K))return!0}return!1}function NwA(A){let q=0;for(let K in A){if(K==="$ref")return 1/0;if(q++,s2K.has(K))continue;if(typeof A[K]=="object")(0,r2K.eachItem)(A[K],(Y)=>q+=NwA(Y));if(q===1/0)return 1/0}return q}function vwA(A,q="",K){if(K!==!1)q=Sj6(q);let Y=A.parse(q);return kwA(A,Y)}EwA.getFullPath=vwA;function kwA(A,q){return A.serialize(q).split("#")[0]+"#"}EwA._getFullPath=kwA;var A_K=/#\/?$/;function Sj6(A){return A?A.replace(A_K,""):""}EwA.normalizeId=Sj6;function q_K(A,q,K){return K=Sj6(K),A.resolve(q,K)}EwA.resolveUrl=q_K;var K_K=/^[a-z_][-a-z0-9._]*$/i;function Y_K(A,q){if(typeof A=="boolean")return{};let{schemaId:K,uriResolver:Y}=this.opts,z=Sj6(A[K]||q),w={"":z},_=vwA(Y,z,!1),$={},O=new Set;return a2K(A,{allKeys:!0},(J,M,D,X)=>{if(X===void 0)return;let P=_+M,W=w[X];if(typeof J[K]=="string")W=Z.call(this,J[K]);G.call(this,J.$anchor),G.call(this,J.$dynamicAnchor),w[M]=W;function Z(f){let V=this.opts.uriResolver.resolve;if(f=Sj6(W?V(W,f):f),O.has(f))throw j(f);O.add(f);let N=this.refs[f];if(typeof N=="string")N=this.refs[N];if(typeof N=="object")H(J,N.schema,f);else if(f!==Sj6(P))if(f[0]==="#")H(J,$[f],f),$[f]=J;else this.refs[f]=P;return f}function G(f){if(typeof f=="string"){if(!K_K.test(f))throw Error(`invalid anchor "${f}"`);Z.call(this,`#${f}`)}}}),$;function H(J,M,D){if(M!==void 0&&!o2K(J,M))throw j(D)}function j(J){return Error(`reference "${J}" resolves to more than one schema`)}}EwA.getSchemaRefs=Y_K});var MC6=C((UwA)=>{Object.defineProperty(UwA,"__esModule",{value:!0});UwA.getData=UwA.KeywordCxt=UwA.validateFunctionCode=void 0;var hwA=czA(),ywA=OC6(),Yi1=nl1(),x71=OC6(),H_K=wwA(),JC6=XwA(),Ki1=GwA(),pq=q9(),B3=tp(),j_K=HC6(),ep=kz(),jC6=$C6();function J_K(A){if(xwA(A)){if(uwA(A),bwA(A)){X_K(A);return}}IwA(A,()=>(0,hwA.topBoolOrEmptySchema)(A))}UwA.validateFunctionCode=J_K;function IwA({gen:A,validateName:q,schema:K,schemaEnv:Y,opts:z},w){if(z.code.es5)A.func(q,pq._`${B3.default.data}, ${B3.default.valCxt}`,Y.$async,()=>{A.code(pq._`"use strict"; ${RwA(K,z)}`),D_K(A,z),A.code(w)});else A.func(q,pq._`${B3.default.data}, ${M_K(z)}`,Y.$async,()=>A.code(RwA(K,z)).code(w))}function M_K(A){return pq._`{${B3.default.instancePath}="", ${B3.default.parentData}, ${B3.default.parentDataProperty}, ${B3.default.rootData}=${B3.default.data}${A.dynamicRef?pq._`, ${B3.default.dynamicAnchors}={}`:pq.nil}}={}`}function D_K(A,q){A.if(B3.default.valCxt,()=>{if(A.var(B3.default.instancePath,pq._`${B3.default.valCxt}.${B3.default.instancePath}`),A.var(B3.default.parentData,pq._`${B3.default.valCxt}.${B3.default.parentData}`),A.var(B3.default.parentDataProperty,pq._`${B3.default.valCxt}.${B3.default.parentDataProperty}`),A.var(B3.default.rootData,pq._`${B3.default.valCxt}.${B3.default.rootData}`),q.dynamicRef)A.var(B3.default.dynamicAnchors,pq._`${B3.default.valCxt}.${B3.default.dynamicAnchors}`)},()=>{if(A.var(B3.default.instancePath,pq._`""`),A.var(B3.default.parentData,pq._`undefined`),A.var(B3.default.parentDataProperty,pq._`undefined`),A.var(B3.default.rootData,B3.default.data),q.dynamicRef)A.var(B3.default.dynamicAnchors,pq._`{}`)})}function X_K(A){let{schema:q,opts:K,gen:Y}=A;IwA(A,()=>{if(K.$comment&&q.$comment)mwA(A);if(f_K(A),Y.let(B3.default.vErrors,null),Y.let(B3.default.errors,0),K.unevaluated)P_K(A);BwA(A),N_K(A)});return}function P_K(A){let{gen:q,validateName:K}=A;A.evaluated=q.const("evaluated",pq._`${K}.evaluated`),q.if(pq._`${A.evaluated}.dynamicProps`,()=>q.assign(pq._`${A.evaluated}.props`,pq._`undefined`)),q.if(pq._`${A.evaluated}.dynamicItems`,()=>q.assign(pq._`${A.evaluated}.items`,pq._`undefined`))}function RwA(A,q){let K=typeof A=="object"&&A[q.schemaId];return K&&(q.code.source||q.code.process)?pq._`/*# sourceURL=${K} */`:pq.nil}function W_K(A,q){if(xwA(A)){if(uwA(A),bwA(A)){Z_K(A,q);return}}(0,hwA.boolOrEmptySchema)(A,q)}function bwA({schema:A,self:q}){if(typeof A=="boolean")return!A;for(let K in A)if(q.RULES.all[K])return!0;return!1}function xwA(A){return typeof A.schema!="boolean"}function Z_K(A,q){let{schema:K,gen:Y,opts:z}=A;if(z.$comment&&K.$comment)mwA(A);T_K(A),V_K(A);let w=Y.const("_errs",B3.default.errors);BwA(A,w),Y.var(q,pq._`${w} === ${B3.default.errors}`)}function uwA(A){(0,ep.checkUnknownRules)(A),G_K(A)}function BwA(A,q){if(A.opts.jtd)return SwA(A,[],!1,q);let K=(0,ywA.getSchemaTypes)(A.schema),Y=(0,ywA.coerceAndCheckDataType)(A,K);SwA(A,K,!Y,q)}function G_K(A){let{schema:q,errSchemaPath:K,opts:Y,self:z}=A;if(q.$ref&&Y.ignoreKeywordsWithRef&&(0,ep.schemaHasRulesButRef)(q,z.RULES))z.logger.warn(`$ref: keywords ignored in schema at path "${K}"`)}function f_K(A){let{schema:q,opts:K}=A;if(q.default!==void 0&&K.useDefaults&&K.strictSchema)(0,ep.checkStrictMode)(A,"default is ignored in the schema root")}function T_K(A){let q=A.schema[A.opts.schemaId];if(q)A.baseId=(0,j_K.resolveUrl)(A.opts.uriResolver,A.baseId,q)}function V_K(A){if(A.schema.$async&&!A.schemaEnv.$async)throw Error("async schema in sync schema")}function mwA({gen:A,schemaEnv:q,schema:K,errSchemaPath:Y,opts:z}){let w=K.$comment;if(z.$comment===!0)A.code(pq._`${B3.default.self}.logger.log(${w})`);else if(typeof z.$comment=="function"){let _=pq.str`${Y}/$comment`,$=A.scopeValue("root",{ref:q.root});A.code(pq._`${B3.default.self}.opts.$comment(${w}, ${_}, ${$}.schema)`)}}function N_K(A){let{gen:q,schemaEnv:K,validateName:Y,ValidationError:z,opts:w}=A;if(K.$async)q.if(pq._`${B3.default.errors} === 0`,()=>q.return(B3.default.data),()=>q.throw(pq._`new ${z}(${B3.default.vErrors})`));else{if(q.assign(pq._`${Y}.errors`,B3.default.vErrors),w.unevaluated)v_K(A);q.return(pq._`${B3.default.errors} === 0`)}}function v_K({gen:A,evaluated:q,props:K,items:Y}){if(K instanceof pq.Name)A.assign(pq._`${q}.props`,K);if(Y instanceof pq.Name)A.assign(pq._`${q}.items`,Y)}function SwA(A,q,K,Y){let{gen:z,schema:w,data:_,allErrors:$,opts:O,self:H}=A,{RULES:j}=H;if(w.$ref&&(O.ignoreKeywordsWithRef||!(0,ep.schemaHasRulesButRef)(w,j))){z.block(()=>FwA(A,"$ref",j.all.$ref.definition));return}if(!O.jtd)k_K(A,q);z.block(()=>{for(let M of j.rules)J(M);J(j.post)});function J(M){if(!(0,Yi1.shouldUseGroup)(w,M))return;if(M.type){if(z.if((0,x71.checkDataType)(M.type,_,O.strictNumbers)),CwA(A,M),q.length===1&&q[0]===M.type&&K)z.else(),(0,x71.reportTypeError)(A);z.endIf()}else CwA(A,M);if(!$)z.if(pq._`${B3.default.errors} === ${Y||0}`)}}function CwA(A,q){let{gen:K,schema:Y,opts:{useDefaults:z}}=A;if(z)(0,H_K.assignDefaults)(A,q.type);K.block(()=>{for(let w of q.rules)if((0,Yi1.shouldUseRule)(Y,w))FwA(A,w.keyword,w.definition,q.type)})}function k_K(A,q){if(A.schemaEnv.meta||!A.opts.strictTypes)return;if(E_K(A,q),!A.opts.allowUnionTypes)L_K(A,q);y_K(A,A.dataTypes)}function E_K(A,q){if(!q.length)return;if(!A.dataTypes.length){A.dataTypes=q;return}q.forEach((K)=>{if(!gwA(A.dataTypes,K))zi1(A,`type "${K}" not allowed by context "${A.dataTypes.join(",")}"`)}),S_K(A,q)}function L_K(A,q){if(q.length>1&&!(q.length===2&&q.includes("null")))zi1(A,"use allowUnionTypes to allow union type keyword")}function y_K(A,q){let K=A.self.RULES.all;for(let Y in K){let z=K[Y];if(typeof z=="object"&&(0,Yi1.shouldUseRule)(A.schema,z)){let{type:w}=z.definition;if(w.length&&!w.some((_)=>R_K(q,_)))zi1(A,`missing type "${w.join(",")}" for keyword "${Y}"`)}}}function R_K(A,q){return A.includes(q)||q==="number"&&A.includes("integer")}function gwA(A,q){return A.includes(q)||q==="integer"&&A.includes("number")}function S_K(A,q){let K=[];for(let Y of A.dataTypes)if(gwA(q,Y))K.push(Y);else if(q.includes("integer")&&Y==="number")K.push("integer");A.dataTypes=K}function zi1(A,q){let K=A.schemaEnv.baseId+A.errSchemaPath;q+=` at "${K}" (strictTypes)`,(0,ep.checkStrictMode)(A,q,A.opts.strictTypes)}class wi1{constructor(A,q,K){if((0,JC6.validateKeywordUsage)(A,q,K),this.gen=A.gen,this.allErrors=A.allErrors,this.keyword=K,this.data=A.data,this.schema=A.schema[K],this.$data=q.$data&&A.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ep.schemaRefOrVal)(A,this.schema,K,this.$data),this.schemaType=q.schemaType,this.parentSchema=A.schema,this.params={},this.it=A,this.def=q,this.$data)this.schemaCode=A.gen.const("vSchema",QwA(this.$data,A));else if(this.schemaCode=this.schemaValue,!(0,JC6.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw Error(`${K} value must be ${JSON.stringify(q.schemaType)}`);if("code"in q?q.trackErrors:q.errors!==!1)this.errsCount=A.gen.const("_errs",B3.default.errors)}result(A,q,K){this.failResult((0,pq.not)(A),q,K)}failResult(A,q,K){if(this.gen.if(A),K)K();else this.error();if(q){if(this.gen.else(),q(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(A,q){this.failResult((0,pq.not)(A),void 0,q)}fail(A){if(A===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(A),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(A){if(!this.$data)return this.fail(A);let{schemaCode:q}=this;this.fail(pq._`${q} !== undefined && (${(0,pq.or)(this.invalid$data(),A)})`)}error(A,q,K){if(q){this.setParams(q),this._error(A,K),this.setParams({});return}this._error(A,K)}_error(A,q){(A?jC6.reportExtraError:jC6.reportError)(this,this.def.error,q)}$dataError(){(0,jC6.reportError)(this,this.def.$dataError||jC6.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,jC6.resetErrorsCount)(this.gen,this.errsCount)}ok(A){if(!this.allErrors)this.gen.if(A)}setParams(A,q){if(q)Object.assign(this.params,A);else this.params=A}block$data(A,q,K=pq.nil){this.gen.block(()=>{this.check$data(A,K),q()})}check$data(A=pq.nil,q=pq.nil){if(!this.$data)return;let{gen:K,schemaCode:Y,schemaType:z,def:w}=this;if(K.if((0,pq.or)(pq._`${Y} === undefined`,q)),A!==pq.nil)K.assign(A,!0);if(z.length||w.validateSchema){if(K.elseIf(this.invalid$data()),this.$dataError(),A!==pq.nil)K.assign(A,!1)}K.else()}invalid$data(){let{gen:A,schemaCode:q,schemaType:K,def:Y,it:z}=this;return(0,pq.or)(w(),_());function w(){if(K.length){if(!(q instanceof pq.Name))throw Error("ajv implementation error");let $=Array.isArray(K)?K:[K];return pq._`${(0,x71.checkDataTypes)($,q,z.opts.strictNumbers,x71.DataType.Wrong)}`}return pq.nil}function _(){if(Y.validateSchema){let $=A.scopeValue("validate$data",{ref:Y.validateSchema});return pq._`!${$}(${q})`}return pq.nil}}subschema(A,q){let K=(0,Ki1.getSubschema)(this.it,A);(0,Ki1.extendSubschemaData)(K,this.it,A),(0,Ki1.extendSubschemaMode)(K,A);let Y={...this.it,...K,items:void 0,props:void 0};return W_K(Y,q),Y}mergeEvaluated(A,q){let{it:K,gen:Y}=this;if(!K.opts.unevaluated)return;if(K.props!==!0&&A.props!==void 0)K.props=ep.mergeEvaluated.props(Y,A.props,K.props,q);if(K.items!==!0&&A.items!==void 0)K.items=ep.mergeEvaluated.items(Y,A.items,K.items,q)}mergeValidEvaluated(A,q){let{it:K,gen:Y}=this;if(K.opts.unevaluated&&(K.props!==!0||K.items!==!0))return Y.if(q,()=>this.mergeEvaluated(A,pq.Name)),!0}}UwA.KeywordCxt=wi1;function FwA(A,q,K,Y){let z=new wi1(A,K,q);if("code"in K)K.code(z,Y);else if(z.$data&&K.validate)(0,JC6.funcKeywordCode)(z,K);else if("macro"in K)(0,JC6.macroKeywordCode)(z,K);else if(K.compile||K.validate)(0,JC6.funcKeywordCode)(z,K)}var C_K=/^\/(?:[^~]|~0|~1)*$/,h_K=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function QwA(A,{dataLevel:q,dataNames:K,dataPathArr:Y}){let z,w;if(A==="")return B3.default.rootData;if(A[0]==="/"){if(!C_K.test(A))throw Error(`Invalid JSON-pointer: ${A}`);z=A,w=B3.default.rootData}else{let H=h_K.exec(A);if(!H)throw Error(`Invalid JSON-pointer: ${A}`);let j=+H[1];if(z=H[2],z==="#"){if(j>=q)throw Error(O("property/index",j));return Y[q-j]}if(j>q)throw Error(O("data",j));if(w=K[q-j],!z)return w}let _=w,$=z.split("/");for(let H of $)if(H)w=pq._`${w}${(0,pq.getProperty)((0,ep.unescapeJsonPointer)(H))}`,_=pq._`${_} && ${w}`;return _;function O(H,j){return`Cannot access ${H} ${j} levels up, current level is ${q}`}}UwA.getData=QwA});var u71=C((cwA)=>{Object.defineProperty(cwA,"__esModule",{value:!0});class dwA extends Error{constructor(A){super("validation failed");this.errors=A,this.ajv=this.validation=!0}}cwA.default=dwA});var DC6=C((iwA)=>{Object.defineProperty(iwA,"__esModule",{value:!0});var _i1=HC6();class lwA extends Error{constructor(A,q,K,Y){super(Y||`can't resolve reference ${K} from id ${q}`);this.missingRef=(0,_i1.resolveUrl)(A,q,K),this.missingSchema=(0,_i1.normalizeId)((0,_i1.getFullPath)(A,this.missingRef))}}iwA.default=lwA});var m71=C((owA)=>{Object.defineProperty(owA,"__esModule",{value:!0});owA.resolveSchema=owA.getCompilingSchema=owA.resolveRef=owA.compileSchema=owA.SchemaEnv=void 0;var MI=q9(),B_K=u71(),Mq6=tp(),DI=HC6(),nwA=kz(),m_K=MC6();class XC6{constructor(A){var q;this.refs={},this.dynamicAnchors={};let K;if(typeof A.schema=="object")K=A.schema;this.schema=A.schema,this.schemaId=A.schemaId,this.root=A.root||this,this.baseId=(q=A.baseId)!==null&&q!==void 0?q:(0,DI.normalizeId)(K===null||K===void 0?void 0:K[A.schemaId||"$id"]),this.schemaPath=A.schemaPath,this.localRefs=A.localRefs,this.meta=A.meta,this.$async=K===null||K===void 0?void 0:K.$async,this.refs={}}}owA.SchemaEnv=XC6;function Oi1(A){let q=rwA.call(this,A);if(q)return q;let K=(0,DI.getFullPath)(this.opts.uriResolver,A.root.baseId),{es5:Y,lines:z}=this.opts.code,{ownProperties:w}=this.opts,_=new MI.CodeGen(this.scope,{es5:Y,lines:z,ownProperties:w}),$;if(A.$async)$=_.scopeValue("Error",{ref:B_K.default,code:MI._`require("ajv/dist/runtime/validation_error").default`});let O=_.scopeName("validate");A.validateName=O;let H={gen:_,allErrors:this.opts.allErrors,data:Mq6.default.data,parentData:Mq6.default.parentData,parentDataProperty:Mq6.default.parentDataProperty,dataNames:[Mq6.default.data],dataPathArr:[MI.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:A.schema,code:(0,MI.stringify)(A.schema)}:{ref:A.schema}),validateName:O,ValidationError:$,schema:A.schema,schemaEnv:A,rootId:K,baseId:A.baseId||K,schemaPath:MI.nil,errSchemaPath:A.schemaPath||(this.opts.jtd?"":"#"),errorPath:MI._`""`,opts:this.opts,self:this},j;try{this._compilations.add(A),(0,m_K.validateFunctionCode)(H),_.optimize(this.opts.code.optimize);let J=_.toString();if(j=`${_.scopeRefs(Mq6.default.scope)}return ${J}`,this.opts.code.process)j=this.opts.code.process(j,A);let D=Function(`${Mq6.default.self}`,`${Mq6.default.scope}`,j)(this,this.scope.get());if(this.scope.value(O,{ref:D}),D.errors=null,D.schema=A.schema,D.schemaEnv=A,A.$async)D.$async=!0;if(this.opts.code.source===!0)D.source={validateName:O,validateCode:J,scopeValues:_._values};if(this.opts.unevaluated){let{props:X,items:P}=H;if(D.evaluated={props:X instanceof MI.Name?void 0:X,items:P instanceof MI.Name?void 0:P,dynamicProps:X instanceof MI.Name,dynamicItems:P instanceof MI.Name},D.source)D.source.evaluated=(0,MI.stringify)(D.evaluated)}return A.validate=D,A}catch(J){if(delete A.validate,delete A.validateName,j)this.logger.error("Error compiling schema, function code:",j);throw J}finally{this._compilations.delete(A)}}owA.compileSchema=Oi1;function g_K(A,q,K){var Y;K=(0,DI.resolveUrl)(this.opts.uriResolver,q,K);let z=A.refs[K];if(z)return z;let w=U_K.call(this,A,K);if(w===void 0){let _=(Y=A.localRefs)===null||Y===void 0?void 0:Y[K],{schemaId:$}=this.opts;if(_)w=new XC6({schema:_,schemaId:$,root:A,baseId:q})}if(w===void 0)return;return A.refs[K]=F_K.call(this,w)}owA.resolveRef=g_K;function F_K(A){if((0,DI.inlineRef)(A.schema,this.opts.inlineRefs))return A.schema;return A.validate?A:Oi1.call(this,A)}function rwA(A){for(let q of this._compilations)if(Q_K(q,A))return q}owA.getCompilingSchema=rwA;function Q_K(A,q){return A.schema===q.schema&&A.root===q.root&&A.baseId===q.baseId}function U_K(A,q){let K;while(typeof(K=this.refs[q])=="string")q=K;return K||this.schemas[q]||B71.call(this,A,q)}function B71(A,q){let K=this.opts.uriResolver.parse(q),Y=(0,DI._getFullPath)(this.opts.uriResolver,K),z=(0,DI.getFullPath)(this.opts.uriResolver,A.baseId,void 0);if(Object.keys(A.schema).length>0&&Y===z)return $i1.call(this,K,A);let w=(0,DI.normalizeId)(Y),_=this.refs[w]||this.schemas[w];if(typeof _=="string"){let $=B71.call(this,A,_);if(typeof($===null||$===void 0?void 0:$.schema)!=="object")return;return $i1.call(this,K,$)}if(typeof(_===null||_===void 0?void 0:_.schema)!=="object")return;if(!_.validate)Oi1.call(this,_);if(w===(0,DI.normalizeId)(q)){let{schema:$}=_,{schemaId:O}=this.opts,H=$[O];if(H)z=(0,DI.resolveUrl)(this.opts.uriResolver,z,H);return new XC6({schema:$,schemaId:O,root:A,baseId:z})}return $i1.call(this,K,_)}owA.resolveSchema=B71;var p_K=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function $i1(A,{baseId:q,schema:K,root:Y}){var z;if(((z=A.fragment)===null||z===void 0?void 0:z[0])!=="/")return;for(let $ of A.fragment.slice(1).split("/")){if(typeof K==="boolean")return;let O=K[(0,nwA.unescapeFragment)($)];if(O===void 0)return;K=O;let H=typeof K==="object"&&K[this.opts.schemaId];if(!p_K.has($)&&H)q=(0,DI.resolveUrl)(this.opts.uriResolver,q,H)}let w;if(typeof K!="boolean"&&K.$ref&&!(0,nwA.schemaHasRulesButRef)(K,this.RULES)){let $=(0,DI.resolveUrl)(this.opts.uriResolver,q,K.$ref);w=B71.call(this,Y,$)}let{schemaId:_}=this.opts;if(w=w||new XC6({schema:K,schemaId:_,root:Y,baseId:q}),w.schema!==w.root.schema)return w;return}});var swA=C((ozw,n_K)=>{n_K.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ewA=C((azw,twA)=>{var r_K={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};twA.exports={HEX:r_K}});var $2A=C((szw,_2A)=>{var{HEX:o_K}=ewA(),a_K=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function Y2A(A){if(w2A(A,".")<3)return{host:A,isIPV4:!1};let q=A.match(a_K)||[],[K]=q;if(K)return{host:t_K(K,"."),isIPV4:!0};else return{host:A,isIPV4:!1}}function Hi1(A,q=!1){let K="",Y=!0;for(let z of A){if(o_K[z]===void 0)return;if(z!=="0"&&Y===!0)Y=!1;if(!Y)K+=z}if(q&&K.length===0)K="0";return K}function s_K(A){let q=0,K={error:!1,address:"",zone:""},Y=[],z=[],w=!1,_=!1,$=!1;function O(){if(z.length){if(w===!1){let H=Hi1(z);if(H!==void 0)Y.push(H);else return K.error=!0,!1}z.length=0}return!0}for(let H=0;H<A.length;H++){let j=A[H];if(j==="["||j==="]")continue;if(j===":"){if(_===!0)$=!0;if(!O())break;if(q++,Y.push(":"),q>7){K.error=!0;break}if(H-1>=0&&A[H-1]===":")_=!0;continue}else if(j==="%"){if(!O())break;w=!0}else{z.push(j);continue}}if(z.length)if(w)K.zone=z.join("");else if($)Y.push(z.join(""));else Y.push(Hi1(z));return K.address=Y.join(""),K}function z2A(A){if(w2A(A,":")<2)return{host:A,isIPV6:!1};let q=s_K(A);if(!q.error){let{address:K,address:Y}=q;if(q.zone)K+="%"+q.zone,Y+="%25"+q.zone;return{host:K,escapedHost:Y,isIPV6:!0}}else return{host:A,isIPV6:!1}}function t_K(A,q){let K="",Y=!0,z=A.length;for(let w=0;w<z;w++){let _=A[w];if(_==="0"&&Y){if(w+1<=z&&A[w+1]===q||w+1===z)K+=_,Y=!1}else{if(_===q)Y=!0;else Y=!1;K+=_}}return K}function w2A(A,q){let K=0;for(let Y=0;Y<A.length;Y++)if(A[Y]===q)K++;return K}var A2A=/^\.\.?\//u,q2A=/^\/\.(?:\/|$)/u,K2A=/^\/\.\.(?:\/|$)/u,e_K=/^\/?(?:.|\n)*?(?=\/|$)/u;function A$K(A){let q=[];while(A.length)if(A.match(A2A))A=A.replace(A2A,"");else if(A.match(q2A))A=A.replace(q2A,"/");else if(A.match(K2A))A=A.replace(K2A,"/"),q.pop();else if(A==="."||A==="..")A="";else{let K=A.match(e_K);if(K){let Y=K[0];A=A.slice(Y.length),q.push(Y)}else throw Error("Unexpected dot segment condition")}return q.join("")}function q$K(A,q){let K=q!==!0?escape:unescape;if(A.scheme!==void 0)A.scheme=K(A.scheme);if(A.userinfo!==void 0)A.userinfo=K(A.userinfo);if(A.host!==void 0)A.host=K(A.host);if(A.path!==void 0)A.path=K(A.path);if(A.query!==void 0)A.query=K(A.query);if(A.fragment!==void 0)A.fragment=K(A.fragment);return A}function K$K(A){let q=[];if(A.userinfo!==void 0)q.push(A.userinfo),q.push("@");if(A.host!==void 0){let K=unescape(A.host),Y=Y2A(K);if(Y.isIPV4)K=Y.host;else{let z=z2A(Y.host);if(z.isIPV6===!0)K=`[${z.escapedHost}]`;else K=A.host}q.push(K)}if(typeof A.port==="number"||typeof A.port==="string")q.push(":"),q.push(String(A.port));return q.length?q.join(""):void 0}_2A.exports={recomposeAuthority:K$K,normalizeComponentEncoding:q$K,removeDotSegments:A$K,normalizeIPv4:Y2A,normalizeIPv6:z2A,stringArrayToHexStripped:Hi1}});var D2A=C((tzw,M2A)=>{var Y$K=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,z$K=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function O2A(A){return typeof A.secure==="boolean"?A.secure:String(A.scheme).toLowerCase()==="wss"}function H2A(A){if(!A.host)A.error=A.error||"HTTP URIs must have a host.";return A}function j2A(A){let q=String(A.scheme).toLowerCase()==="https";if(A.port===(q?443:80)||A.port==="")A.port=void 0;if(!A.path)A.path="/";return A}function w$K(A){return A.secure=O2A(A),A.resourceName=(A.path||"/")+(A.query?"?"+A.query:""),A.path=void 0,A.query=void 0,A}function _$K(A){if(A.port===(O2A(A)?443:80)||A.port==="")A.port=void 0;if(typeof A.secure==="boolean")A.scheme=A.secure?"wss":"ws",A.secure=void 0;if(A.resourceName){let[q,K]=A.resourceName.split("?");A.path=q&&q!=="/"?q:void 0,A.query=K,A.resourceName=void 0}return A.fragment=void 0,A}function $$K(A,q){if(!A.path)return A.error="URN can not be parsed",A;let K=A.path.match(z$K);if(K){let Y=q.scheme||A.scheme||"urn";A.nid=K[1].toLowerCase(),A.nss=K[2];let z=`${Y}:${q.nid||A.nid}`,w=ji1[z];if(A.path=void 0,w)A=w.parse(A,q)}else A.error=A.error||"URN can not be parsed.";return A}function O$K(A,q){let K=q.scheme||A.scheme||"urn",Y=A.nid.toLowerCase(),z=`${K}:${q.nid||Y}`,w=ji1[z];if(w)A=w.serialize(A,q);let _=A,$=A.nss;return _.path=`${Y||q.nid}:${$}`,q.skipEscape=!0,_}function H$K(A,q){let K=A;if(K.uuid=K.nss,K.nss=void 0,!q.tolerant&&(!K.uuid||!Y$K.test(K.uuid)))K.error=K.error||"UUID is not valid.";return K}function j$K(A){let q=A;return q.nss=(A.uuid||"").toLowerCase(),q}var J2A={scheme:"http",domainHost:!0,parse:H2A,serialize:j2A},J$K={scheme:"https",domainHost:J2A.domainHost,parse:H2A,serialize:j2A},g71={scheme:"ws",domainHost:!0,parse:w$K,serialize:_$K},M$K={scheme:"wss",domainHost:g71.domainHost,parse:g71.parse,serialize:g71.serialize},D$K={scheme:"urn",parse:$$K,serialize:O$K,skipNormalize:!0},X$K={scheme:"urn:uuid",parse:H$K,serialize:j$K,skipNormalize:!0},ji1={http:J2A,https:J$K,ws:g71,wss:M$K,urn:D$K,"urn:uuid":X$K};M2A.exports=ji1});var P2A=C((ezw,Q71)=>{var{normalizeIPv6:P$K,normalizeIPv4:W$K,removeDotSegments:PC6,recomposeAuthority:Z$K,normalizeComponentEncoding:F71}=$2A(),Ji1=D2A();function G$K(A,q){if(typeof A==="string")A=cB(Ad(A,q),q);else if(typeof A==="object")A=Ad(cB(A,q),q);return A}function f$K(A,q,K){let Y=Object.assign({scheme:"null"},K),z=X2A(Ad(A,Y),Ad(q,Y),Y,!0);return cB(z,{...Y,skipEscape:!0})}function X2A(A,q,K,Y){let z={};if(!Y)A=Ad(cB(A,K),K),q=Ad(cB(q,K),K);if(K=K||{},!K.tolerant&&q.scheme)z.scheme=q.scheme,z.userinfo=q.userinfo,z.host=q.host,z.port=q.port,z.path=PC6(q.path||""),z.query=q.query;else{if(q.userinfo!==void 0||q.host!==void 0||q.port!==void 0)z.userinfo=q.userinfo,z.host=q.host,z.port=q.port,z.path=PC6(q.path||""),z.query=q.query;else{if(!q.path)if(z.path=A.path,q.query!==void 0)z.query=q.query;else z.query=A.query;else{if(q.path.charAt(0)==="/")z.path=PC6(q.path);else{if((A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)&&!A.path)z.path="/"+q.path;else if(!A.path)z.path=q.path;else z.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+q.path;z.path=PC6(z.path)}z.query=q.query}z.userinfo=A.userinfo,z.host=A.host,z.port=A.port}z.scheme=A.scheme}return z.fragment=q.fragment,z}function T$K(A,q,K){if(typeof A==="string")A=unescape(A),A=cB(F71(Ad(A,K),!0),{...K,skipEscape:!0});else if(typeof A==="object")A=cB(F71(A,!0),{...K,skipEscape:!0});if(typeof q==="string")q=unescape(q),q=cB(F71(Ad(q,K),!0),{...K,skipEscape:!0});else if(typeof q==="object")q=cB(F71(q,!0),{...K,skipEscape:!0});return A.toLowerCase()===q.toLowerCase()}function cB(A,q){let K={host:A.host,scheme:A.scheme,userinfo:A.userinfo,port:A.port,path:A.path,query:A.query,nid:A.nid,nss:A.nss,uuid:A.uuid,fragment:A.fragment,reference:A.reference,resourceName:A.resourceName,secure:A.secure,error:""},Y=Object.assign({},q),z=[],w=Ji1[(Y.scheme||K.scheme||"").toLowerCase()];if(w&&w.serialize)w.serialize(K,Y);if(K.path!==void 0)if(!Y.skipEscape){if(K.path=escape(K.path),K.scheme!==void 0)K.path=K.path.split("%3A").join(":")}else K.path=unescape(K.path);if(Y.reference!=="suffix"&&K.scheme)z.push(K.scheme,":");let _=Z$K(K);if(_!==void 0){if(Y.reference!=="suffix")z.push("//");if(z.push(_),K.path&&K.path.charAt(0)!=="/")z.push("/")}if(K.path!==void 0){let $=K.path;if(!Y.absolutePath&&(!w||!w.absolutePath))$=PC6($);if(_===void 0)$=$.replace(/^\/\//u,"/%2F");z.push($)}if(K.query!==void 0)z.push("?",K.query);if(K.fragment!==void 0)z.push("#",K.fragment);return z.join("")}var V$K=Array.from({length:127},(A,q)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(q)));function N$K(A){let q=0;for(let K=0,Y=A.length;K<Y;++K)if(q=A.charCodeAt(K),q>126||V$K[q])return!0;return!1}var v$K=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Ad(A,q){let K=Object.assign({},q),Y={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},z=A.indexOf("%")!==-1,w=!1;if(K.reference==="suffix")A=(K.scheme?K.scheme+":":"")+"//"+A;let _=A.match(v$K);if(_){if(Y.scheme=_[1],Y.userinfo=_[3],Y.host=_[4],Y.port=parseInt(_[5],10),Y.path=_[6]||"",Y.query=_[7],Y.fragment=_[8],isNaN(Y.port))Y.port=_[5];if(Y.host){let O=W$K(Y.host);if(O.isIPV4===!1){let H=P$K(O.host);Y.host=H.host.toLowerCase(),w=H.isIPV6}else Y.host=O.host,w=!0}if(Y.scheme===void 0&&Y.userinfo===void 0&&Y.host===void 0&&Y.port===void 0&&Y.query===void 0&&!Y.path)Y.reference="same-document";else if(Y.scheme===void 0)Y.reference="relative";else if(Y.fragment===void 0)Y.reference="absolute";else Y.reference="uri";if(K.reference&&K.reference!=="suffix"&&K.reference!==Y.reference)Y.error=Y.error||"URI is not a "+K.reference+" reference.";let $=Ji1[(K.scheme||Y.scheme||"").toLowerCase()];if(!K.unicodeSupport&&(!$||!$.unicodeSupport)){if(Y.host&&(K.domainHost||$&&$.domainHost)&&w===!1&&N$K(Y.host))try{Y.host=URL.domainToASCII(Y.host.toLowerCase())}catch(O){Y.error=Y.error||"Host's domain name can not be converted to ASCII: "+O}}if(!$||$&&!$.skipNormalize){if(z&&Y.scheme!==void 0)Y.scheme=unescape(Y.scheme);if(z&&Y.host!==void 0)Y.host=unescape(Y.host);if(Y.path)Y.path=escape(unescape(Y.path));if(Y.fragment)Y.fragment=encodeURI(decodeURIComponent(Y.fragment))}if($&&$.parse)$.parse(Y,K)}else Y.error=Y.error||"URI can not be parsed.";return Y}var Mi1={SCHEMES:Ji1,normalize:G$K,resolve:f$K,resolveComponents:X2A,equal:T$K,serialize:cB,parse:Ad};Q71.exports=Mi1;Q71.exports.default=Mi1;Q71.exports.fastUri=Mi1});var G2A=C((Z2A)=>{Object.defineProperty(Z2A,"__esModule",{value:!0});var W2A=P2A();W2A.code='require("ajv/dist/runtime/uri").default';Z2A.default=W2A});var L2A=C((qd)=>{Object.defineProperty(qd,"__esModule",{value:!0});qd.CodeGen=qd.Name=qd.nil=qd.stringify=qd.str=qd._=qd.KeywordCxt=void 0;var E$K=MC6();Object.defineProperty(qd,"KeywordCxt",{enumerable:!0,get:function(){return E$K.KeywordCxt}});var Cj6=q9();Object.defineProperty(qd,"_",{enumerable:!0,get:function(){return Cj6._}});Object.defineProperty(qd,"str",{enumerable:!0,get:function(){return Cj6.str}});Object.defineProperty(qd,"stringify",{enumerable:!0,get:function(){return Cj6.stringify}});Object.defineProperty(qd,"nil",{enumerable:!0,get:function(){return Cj6.nil}});Object.defineProperty(qd,"Name",{enumerable:!0,get:function(){return Cj6.Name}});Object.defineProperty(qd,"CodeGen",{enumerable:!0,get:function(){return Cj6.CodeGen}});var L$K=u71(),v2A=DC6(),y$K=il1(),WC6=m71(),R$K=q9(),ZC6=HC6(),U71=OC6(),Xi1=kz(),f2A=swA(),S$K=G2A(),k2A=(A,q)=>new RegExp(A,q);k2A.code="new RegExp";var C$K=["removeAdditional","useDefaults","coerceTypes"],h$K=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),I$K={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b$K={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},T2A=200;function x$K(A){var q,K,Y,z,w,_,$,O,H,j,J,M,D,X,P,W,Z,G,f,V,N,v,y,R,h;let B=A.strict,x=(q=A.code)===null||q===void 0?void 0:q.optimize,F=x===!0||x===void 0?1:x||0,g=(Y=(K=A.code)===null||K===void 0?void 0:K.regExp)!==null&&Y!==void 0?Y:k2A,b=(z=A.uriResolver)!==null&&z!==void 0?z:S$K.default;return{strictSchema:(_=(w=A.strictSchema)!==null&&w!==void 0?w:B)!==null&&_!==void 0?_:!0,strictNumbers:(O=($=A.strictNumbers)!==null&&$!==void 0?$:B)!==null&&O!==void 0?O:!0,strictTypes:(j=(H=A.strictTypes)!==null&&H!==void 0?H:B)!==null&&j!==void 0?j:"log",strictTuples:(M=(J=A.strictTuples)!==null&&J!==void 0?J:B)!==null&&M!==void 0?M:"log",strictRequired:(X=(D=A.strictRequired)!==null&&D!==void 0?D:B)!==null&&X!==void 0?X:!1,code:A.code?{...A.code,optimize:F,regExp:g}:{optimize:F,regExp:g},loopRequired:(P=A.loopRequired)!==null&&P!==void 0?P:T2A,loopEnum:(W=A.loopEnum)!==null&&W!==void 0?W:T2A,meta:(Z=A.meta)!==null&&Z!==void 0?Z:!0,messages:(G=A.messages)!==null&&G!==void 0?G:!0,inlineRefs:(f=A.inlineRefs)!==null&&f!==void 0?f:!0,schemaId:(V=A.schemaId)!==null&&V!==void 0?V:"$id",addUsedSchema:(N=A.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(v=A.validateSchema)!==null&&v!==void 0?v:!0,validateFormats:(y=A.validateFormats)!==null&&y!==void 0?y:!0,unicodeRegExp:(R=A.unicodeRegExp)!==null&&R!==void 0?R:!0,int32range:(h=A.int32range)!==null&&h!==void 0?h:!0,uriResolver:b}}class p71{constructor(A={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,A=this.opts={...A,...x$K(A)};let{es5:q,lines:K}=this.opts.code;this.scope=new R$K.ValueScope({scope:{},prefixes:h$K,es5:q,lines:K}),this.logger=Q$K(A.logger);let Y=A.validateFormats;if(A.validateFormats=!1,this.RULES=(0,y$K.getRules)(),V2A.call(this,I$K,A,"NOT SUPPORTED"),V2A.call(this,b$K,A,"DEPRECATED","warn"),this._metaOpts=g$K.call(this),A.formats)B$K.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),A.keywords)m$K.call(this,A.keywords);if(typeof A.meta=="object")this.addMetaSchema(A.meta);u$K.call(this),A.validateFormats=Y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:A,meta:q,schemaId:K}=this.opts,Y=f2A;if(K==="id")Y={...f2A},Y.id=Y.$id,delete Y.$id;if(q&&A)this.addMetaSchema(Y,Y[K],!1)}defaultMeta(){let{meta:A,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof A=="object"?A[q]||A:void 0}validate(A,q){let K;if(typeof A=="string"){if(K=this.getSchema(A),!K)throw Error(`no schema with key or ref "${A}"`)}else K=this.compile(A);let Y=K(q);if(!("$async"in K))this.errors=K.errors;return Y}compile(A,q){let K=this._addSchema(A,q);return K.validate||this._compileSchemaEnv(K)}compileAsync(A,q){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:K}=this.opts;return Y.call(this,A,q);async function Y(H,j){await z.call(this,H.$schema);let J=this._addSchema(H,j);return J.validate||w.call(this,J)}async function z(H){if(H&&!this.getSchema(H))await Y.call(this,{$ref:H},!0)}async function w(H){try{return this._compileSchemaEnv(H)}catch(j){if(!(j instanceof v2A.default))throw j;return _.call(this,j),await $.call(this,j.missingSchema),w.call(this,H)}}function _({missingSchema:H,missingRef:j}){if(this.refs[H])throw Error(`AnySchema ${H} is loaded but ${j} cannot be resolved`)}async function $(H){let j=await O.call(this,H);if(!this.refs[H])await z.call(this,j.$schema);if(!this.refs[H])this.addSchema(j,H,q)}async function O(H){let j=this._loading[H];if(j)return j;try{return await(this._loading[H]=K(H))}finally{delete this._loading[H]}}}addSchema(A,q,K,Y=this.opts.validateSchema){if(Array.isArray(A)){for(let w of A)this.addSchema(w,void 0,K,Y);return this}let z;if(typeof A==="object"){let{schemaId:w}=this.opts;if(z=A[w],z!==void 0&&typeof z!="string")throw Error(`schema ${w} must be string`)}return q=(0,ZC6.normalizeId)(q||z),this._checkUnique(q),this.schemas[q]=this._addSchema(A,K,q,Y,!0),this}addMetaSchema(A,q,K=this.opts.validateSchema){return this.addSchema(A,q,!0,K),this}validateSchema(A,q){if(typeof A=="boolean")return!0;let K;if(K=A.$schema,K!==void 0&&typeof K!="string")throw Error("$schema must be a string");if(K=K||this.opts.defaultMeta||this.defaultMeta(),!K)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let Y=this.validate(K,A);if(!Y&&q){let z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(z);else throw Error(z)}return Y}getSchema(A){let q;while(typeof(q=N2A.call(this,A))=="string")A=q;if(q===void 0){let{schemaId:K}=this.opts,Y=new WC6.SchemaEnv({schema:{},schemaId:K});if(q=WC6.resolveSchema.call(this,Y,A),!q)return;this.refs[A]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(A){if(A instanceof RegExp)return this._removeAllSchemas(this.schemas,A),this._removeAllSchemas(this.refs,A),this;switch(typeof A){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let q=N2A.call(this,A);if(typeof q=="object")this._cache.delete(q.schema);return delete this.schemas[A],delete this.refs[A],this}case"object":{let q=A;this._cache.delete(q);let K=A[this.opts.schemaId];if(K)K=(0,ZC6.normalizeId)(K),delete this.schemas[K],delete this.refs[K];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(A){for(let q of A)this.addKeyword(q);return this}addKeyword(A,q){let K;if(typeof A=="string"){if(K=A,typeof q=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=K}else if(typeof A=="object"&&q===void 0){if(q=A,K=q.keyword,Array.isArray(K)&&!K.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(p$K.call(this,K,q),!q)return(0,Xi1.eachItem)(K,(z)=>Di1.call(this,z)),this;c$K.call(this,q);let Y={...q,type:(0,U71.getJSONTypes)(q.type),schemaType:(0,U71.getJSONTypes)(q.schemaType)};return(0,Xi1.eachItem)(K,Y.type.length===0?(z)=>Di1.call(this,z,Y):(z)=>Y.type.forEach((w)=>Di1.call(this,z,Y,w))),this}getKeyword(A){let q=this.RULES.all[A];return typeof q=="object"?q.definition:!!q}removeKeyword(A){let{RULES:q}=this;delete q.keywords[A],delete q.all[A];for(let K of q.rules){let Y=K.rules.findIndex((z)=>z.keyword===A);if(Y>=0)K.rules.splice(Y,1)}return this}addFormat(A,q){if(typeof q=="string")q=new RegExp(q);return this.formats[A]=q,this}errorsText(A=this.errors,{separator:q=", ",dataVar:K="data"}={}){if(!A||A.length===0)return"No errors";return A.map((Y)=>`${K}${Y.instancePath} ${Y.message}`).reduce((Y,z)=>Y+q+z)}$dataMetaSchema(A,q){let K=this.RULES.all;A=JSON.parse(JSON.stringify(A));for(let Y of q){let z=Y.split("/").slice(1),w=A;for(let _ of z)w=w[_];for(let _ in K){let $=K[_];if(typeof $!="object")continue;let{$data:O}=$.definition,H=w[_];if(O&&H)w[_]=E2A(H)}}return A}_removeAllSchemas(A,q){for(let K in A){let Y=A[K];if(!q||q.test(K)){if(typeof Y=="string")delete A[K];else if(Y&&!Y.meta)this._cache.delete(Y.schema),delete A[K]}}}_addSchema(A,q,K,Y=this.opts.validateSchema,z=this.opts.addUsedSchema){let w,{schemaId:_}=this.opts;if(typeof A=="object")w=A[_];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof A!="boolean")throw Error("schema must be object or boolean");let $=this._cache.get(A);if($!==void 0)return $;K=(0,ZC6.normalizeId)(w||K);let O=ZC6.getSchemaRefs.call(this,A,K);if($=new WC6.SchemaEnv({schema:A,schemaId:_,meta:q,baseId:K,localRefs:O}),this._cache.set($.schema,$),z&&!K.startsWith("#")){if(K)this._checkUnique(K);this.refs[K]=$}if(Y)this.validateSchema(A,!0);return $}_checkUnique(A){if(this.schemas[A]||this.refs[A])throw Error(`schema with key or id "${A}" already exists`)}_compileSchemaEnv(A){if(A.meta)this._compileMetaSchema(A);else WC6.compileSchema.call(this,A);if(!A.validate)throw Error("ajv implementation error");return A.validate}_compileMetaSchema(A){let q=this.opts;this.opts=this._metaOpts;try{WC6.compileSchema.call(this,A)}finally{this.opts=q}}}p71.ValidationError=L$K.default;p71.MissingRefError=v2A.default;qd.default=p71;function V2A(A,q,K,Y="error"){for(let z in A){let w=z;if(w in q)this.logger[Y](`${K}: option ${z}. ${A[w]}`)}}function N2A(A){return A=(0,ZC6.normalizeId)(A),this.schemas[A]||this.refs[A]}function u$K(){let A=this.opts.schemas;if(!A)return;if(Array.isArray(A))this.addSchema(A);else for(let q in A)this.addSchema(A[q],q)}function B$K(){for(let A in this.opts.formats){let q=this.opts.formats[A];if(q)this.addFormat(A,q)}}function m$K(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let q in A){let K=A[q];if(!K.keyword)K.keyword=q;this.addKeyword(K)}}function g$K(){let A={...this.opts};for(let q of C$K)delete A[q];return A}var F$K={log(){},warn(){},error(){}};function Q$K(A){if(A===!1)return F$K;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw Error("logger must implement log, warn and error methods")}var U$K=/^[a-z_$][a-z0-9_$:-]*$/i;function p$K(A,q){let{RULES:K}=this;if((0,Xi1.eachItem)(A,(Y)=>{if(K.keywords[Y])throw Error(`Keyword ${Y} is already defined`);if(!U$K.test(Y))throw Error(`Keyword ${Y} has invalid name`)}),!q)return;if(q.$data&&!(("code"in q)||("validate"in q)))throw Error('$data keyword must have "code" or "validate" function')}function Di1(A,q,K){var Y;let z=q===null||q===void 0?void 0:q.post;if(K&&z)throw Error('keyword with "post" flag cannot have "type"');let{RULES:w}=this,_=z?w.post:w.rules.find(({type:O})=>O===K);if(!_)_={type:K,rules:[]},w.rules.push(_);if(w.keywords[A]=!0,!q)return;let $={keyword:A,definition:{...q,type:(0,U71.getJSONTypes)(q.type),schemaType:(0,U71.getJSONTypes)(q.schemaType)}};if(q.before)d$K.call(this,_,$,q.before);else _.rules.push($);w.all[A]=$,(Y=q.implements)===null||Y===void 0||Y.forEach((O)=>this.addKeyword(O))}function d$K(A,q,K){let Y=A.rules.findIndex((z)=>z.keyword===K);if(Y>=0)A.rules.splice(Y,0,q);else A.rules.push(q),this.logger.warn(`rule ${K} is not defined`)}function c$K(A){let{metaSchema:q}=A;if(q===void 0)return;if(A.$data&&this.opts.$data)q=E2A(q);A.validateSchema=this.compile(q,!0)}var l$K={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function E2A(A){return{anyOf:[A,l$K]}}});var R2A=C((y2A)=>{Object.defineProperty(y2A,"__esModule",{value:!0});var r$K={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};y2A.default=r$K});var x2A=C((I2A)=>{Object.defineProperty(I2A,"__esModule",{value:!0});I2A.callRef=I2A.getValidate=void 0;var a$K=DC6(),S2A=Fy(),IV=q9(),hj6=tp(),C2A=m71(),d71=kz(),s$K={keyword:"$ref",schemaType:"string",code(A){let{gen:q,schema:K,it:Y}=A,{baseId:z,schemaEnv:w,validateName:_,opts:$,self:O}=Y,{root:H}=w;if((K==="#"||K==="#/")&&z===H.baseId)return J();let j=C2A.resolveRef.call(O,H,z,K);if(j===void 0)throw new a$K.default(Y.opts.uriResolver,z,K);if(j instanceof C2A.SchemaEnv)return M(j);return D(j);function J(){if(w===H)return c71(A,_,w,w.$async);let X=q.scopeValue("root",{ref:H});return c71(A,IV._`${X}.validate`,H,H.$async)}function M(X){let P=h2A(A,X);c71(A,P,X,X.$async)}function D(X){let P=q.scopeValue("schema",$.code.source===!0?{ref:X,code:(0,IV.stringify)(X)}:{ref:X}),W=q.name("valid"),Z=A.subschema({schema:X,dataTypes:[],schemaPath:IV.nil,topSchemaRef:P,errSchemaPath:K},W);A.mergeEvaluated(Z),A.ok(W)}}};function h2A(A,q){let{gen:K}=A;return q.validate?K.scopeValue("validate",{ref:q.validate}):IV._`${K.scopeValue("wrapper",{ref:q})}.validate`}I2A.getValidate=h2A;function c71(A,q,K,Y){let{gen:z,it:w}=A,{allErrors:_,schemaEnv:$,opts:O}=w,H=O.passContext?hj6.default.this:IV.nil;if(Y)j();else J();function j(){if(!$.$async)throw Error("async schema referenced by sync schema");let X=z.let("valid");z.try(()=>{if(z.code(IV._`await ${(0,S2A.callValidateCode)(A,q,H)}`),D(q),!_)z.assign(X,!0)},(P)=>{if(z.if(IV._`!(${P} instanceof ${w.ValidationError})`,()=>z.throw(P)),M(P),!_)z.assign(X,!1)}),A.ok(X)}function J(){A.result((0,S2A.callValidateCode)(A,q,H),()=>D(q),()=>M(q))}function M(X){let P=IV._`${X}.errors`;z.assign(hj6.default.vErrors,IV._`${hj6.default.vErrors} === null ? ${P} : ${hj6.default.vErrors}.concat(${P})`),z.assign(hj6.default.errors,IV._`${hj6.default.vErrors}.length`)}function D(X){var P;if(!w.opts.unevaluated)return;let W=(P=K===null||K===void 0?void 0:K.validate)===null||P===void 0?void 0:P.evaluated;if(w.props!==!0)if(W&&!W.dynamicProps){if(W.props!==void 0)w.props=d71.mergeEvaluated.props(z,W.props,w.props)}else{let Z=z.var("props",IV._`${X}.evaluated.props`);w.props=d71.mergeEvaluated.props(z,Z,w.props,IV.Name)}if(w.items!==!0)if(W&&!W.dynamicItems){if(W.items!==void 0)w.items=d71.mergeEvaluated.items(z,W.items,w.items)}else{let Z=z.var("items",IV._`${X}.evaluated.items`);w.items=d71.mergeEvaluated.items(z,Z,w.items,IV.Name)}}}I2A.callRef=c71;I2A.default=s$K});var B2A=C((u2A)=>{Object.defineProperty(u2A,"__esModule",{value:!0});var AOK=R2A(),qOK=x2A(),KOK=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",AOK.default,qOK.default];u2A.default=KOK});var g2A=C((m2A)=>{Object.defineProperty(m2A,"__esModule",{value:!0});var l71=q9(),Ha=l71.operators,i71={maximum:{okStr:"<=",ok:Ha.LTE,fail:Ha.GT},minimum:{okStr:">=",ok:Ha.GTE,fail:Ha.LT},exclusiveMaximum:{okStr:"<",ok:Ha.LT,fail:Ha.GTE},exclusiveMinimum:{okStr:">",ok:Ha.GT,fail:Ha.LTE}},zOK={message:({keyword:A,schemaCode:q})=>l71.str`must be ${i71[A].okStr} ${q}`,params:({keyword:A,schemaCode:q})=>l71._`{comparison: ${i71[A].okStr}, limit: ${q}}`},wOK={keyword:Object.keys(i71),type:"number",schemaType:"number",$data:!0,error:zOK,code(A){let{keyword:q,data:K,schemaCode:Y}=A;A.fail$data(l71._`${K} ${i71[q].fail} ${Y} || isNaN(${K})`)}};m2A.default=wOK});var Q2A=C((F2A)=>{Object.defineProperty(F2A,"__esModule",{value:!0});var GC6=q9(),$OK={message:({schemaCode:A})=>GC6.str`must be multiple of ${A}`,params:({schemaCode:A})=>GC6._`{multipleOf: ${A}}`},OOK={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:$OK,code(A){let{gen:q,data:K,schemaCode:Y,it:z}=A,w=z.opts.multipleOfPrecision,_=q.let("res"),$=w?GC6._`Math.abs(Math.round(${_}) - ${_}) > 1e-${w}`:GC6._`${_} !== parseInt(${_})`;A.fail$data(GC6._`(${Y} === 0 || (${_} = ${K}/${Y}, ${$}))`)}};F2A.default=OOK});var d2A=C((p2A)=>{Object.defineProperty(p2A,"__esModule",{value:!0});function U2A(A){let q=A.length,K=0,Y=0,z;while(Y<q)if(K++,z=A.charCodeAt(Y++),z>=55296&&z<=56319&&Y<q){if(z=A.charCodeAt(Y),(z&64512)===56320)Y++}return K}p2A.default=U2A;U2A.code='require("ajv/dist/runtime/ucs2length").default'});var l2A=C((c2A)=>{Object.defineProperty(c2A,"__esModule",{value:!0});var Dq6=q9(),JOK=kz(),MOK=d2A(),DOK={message({keyword:A,schemaCode:q}){let K=A==="maxLength"?"more":"fewer";return Dq6.str`must NOT have ${K} than ${q} characters`},params:({schemaCode:A})=>Dq6._`{limit: ${A}}`},XOK={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:DOK,code(A){let{keyword:q,data:K,schemaCode:Y,it:z}=A,w=q==="maxLength"?Dq6.operators.GT:Dq6.operators.LT,_=z.opts.unicode===!1?Dq6._`${K}.length`:Dq6._`${(0,JOK.useFunc)(A.gen,MOK.default)}(${K})`;A.fail$data(Dq6._`${_} ${w} ${Y}`)}};c2A.default=XOK});var n2A=C((i2A)=>{Object.defineProperty(i2A,"__esModule",{value:!0});var WOK=Fy(),n71=q9(),ZOK={message:({schemaCode:A})=>n71.str`must match pattern "${A}"`,params:({schemaCode:A})=>n71._`{pattern: ${A}}`},GOK={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ZOK,code(A){let{data:q,$data:K,schema:Y,schemaCode:z,it:w}=A,_=w.opts.unicodeRegExp?"u":"",$=K?n71._`(new RegExp(${z}, ${_}))`:(0,WOK.usePattern)(A,Y);A.fail$data(n71._`!${$}.test(${q})`)}};i2A.default=GOK});var o2A=C((r2A)=>{Object.defineProperty(r2A,"__esModule",{value:!0});var fC6=q9(),TOK={message({keyword:A,schemaCode:q}){let K=A==="maxProperties"?"more":"fewer";return fC6.str`must NOT have ${K} than ${q} properties`},params:({schemaCode:A})=>fC6._`{limit: ${A}}`},VOK={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:TOK,code(A){let{keyword:q,data:K,schemaCode:Y}=A,z=q==="maxProperties"?fC6.operators.GT:fC6.operators.LT;A.fail$data(fC6._`Object.keys(${K}).length ${z} ${Y}`)}};r2A.default=VOK});var s2A=C((a2A)=>{Object.defineProperty(a2A,"__esModule",{value:!0});var TC6=Fy(),VC6=q9(),vOK=kz(),kOK={message:({params:{missingProperty:A}})=>VC6.str`must have required property '${A}'`,params:({params:{missingProperty:A}})=>VC6._`{missingProperty: ${A}}`},EOK={keyword:"required",type:"object",schemaType:"array",$data:!0,error:kOK,code(A){let{gen:q,schema:K,schemaCode:Y,data:z,$data:w,it:_}=A,{opts:$}=_;if(!w&&K.length===0)return;let O=K.length>=$.loopRequired;if(_.allErrors)H();else j();if($.strictRequired){let D=A.parentSchema.properties,{definedProperties:X}=A.it;for(let P of K)if((D===null||D===void 0?void 0:D[P])===void 0&&!X.has(P)){let W=_.schemaEnv.baseId+_.errSchemaPath,Z=`required property "${P}" is not defined at "${W}" (strictRequired)`;(0,vOK.checkStrictMode)(_,Z,_.opts.strictRequired)}}function H(){if(O||w)A.block$data(VC6.nil,J);else for(let D of K)(0,TC6.checkReportMissingProp)(A,D)}function j(){let D=q.let("missing");if(O||w){let X=q.let("valid",!0);A.block$data(X,()=>M(D,X)),A.ok(X)}else q.if((0,TC6.checkMissingProp)(A,K,D)),(0,TC6.reportMissingProp)(A,D),q.else()}function J(){q.forOf("prop",Y,(D)=>{A.setParams({missingProperty:D}),q.if((0,TC6.noPropertyInData)(q,z,D,$.ownProperties),()=>A.error())})}function M(D,X){A.setParams({missingProperty:D}),q.forOf(D,Y,()=>{q.assign(X,(0,TC6.propertyInData)(q,z,D,$.ownProperties)),q.if((0,VC6.not)(X),()=>{A.error(),q.break()})},VC6.nil)}}};a2A.default=EOK});var e2A=C((t2A)=>{Object.defineProperty(t2A,"__esModule",{value:!0});var NC6=q9(),yOK={message({keyword:A,schemaCode:q}){let K=A==="maxItems"?"more":"fewer";return NC6.str`must NOT have ${K} than ${q} items`},params:({schemaCode:A})=>NC6._`{limit: ${A}}`},ROK={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yOK,code(A){let{keyword:q,data:K,schemaCode:Y}=A,z=q==="maxItems"?NC6.operators.GT:NC6.operators.LT;A.fail$data(NC6._`${K}.length ${z} ${Y}`)}};t2A.default=ROK});var r71=C((q_A)=>{Object.defineProperty(q_A,"__esModule",{value:!0});var A_A=Ai1();A_A.code='require("ajv/dist/runtime/equal").default';q_A.default=A_A});var Y_A=C((K_A)=>{Object.defineProperty(K_A,"__esModule",{value:!0});var Pi1=OC6(),X0=q9(),hOK=kz(),IOK=r71(),bOK={message:({params:{i:A,j:q}})=>X0.str`must NOT have duplicate items (items ## ${q} and ${A} are identical)`,params:({params:{i:A,j:q}})=>X0._`{i: ${A}, j: ${q}}`},xOK={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:bOK,code(A){let{gen:q,data:K,$data:Y,schema:z,parentSchema:w,schemaCode:_,it:$}=A;if(!Y&&!z)return;let O=q.let("valid"),H=w.items?(0,Pi1.getSchemaTypes)(w.items):[];A.block$data(O,j,X0._`${_} === false`),A.ok(O);function j(){let X=q.let("i",X0._`${K}.length`),P=q.let("j");A.setParams({i:X,j:P}),q.assign(O,!0),q.if(X0._`${X} > 1`,()=>(J()?M:D)(X,P))}function J(){return H.length>0&&!H.some((X)=>X==="object"||X==="array")}function M(X,P){let W=q.name("item"),Z=(0,Pi1.checkDataTypes)(H,W,$.opts.strictNumbers,Pi1.DataType.Wrong),G=q.const("indices",X0._`{}`);q.for(X0._`;${X}--;`,()=>{if(q.let(W,X0._`${K}[${X}]`),q.if(Z,X0._`continue`),H.length>1)q.if(X0._`typeof ${W} == "string"`,X0._`${W} += "_"`);q.if(X0._`typeof ${G}[${W}] == "number"`,()=>{q.assign(P,X0._`${G}[${W}]`),A.error(),q.assign(O,!1).break()}).code(X0._`${G}[${W}] = ${X}`)})}function D(X,P){let W=(0,hOK.useFunc)(q,IOK.default),Z=q.name("outer");q.label(Z).for(X0._`;${X}--;`,()=>q.for(X0._`${P} = ${X}; ${P}--;`,()=>q.if(X0._`${W}(${K}[${X}], ${K}[${P}])`,()=>{A.error(),q.assign(O,!1).break(Z)})))}}};K_A.default=xOK});var w_A=C((z_A)=>{Object.defineProperty(z_A,"__esModule",{value:!0});var Wi1=q9(),BOK=kz(),mOK=r71(),gOK={message:"must be equal to constant",params:({schemaCode:A})=>Wi1._`{allowedValue: ${A}}`},FOK={keyword:"const",$data:!0,error:gOK,code(A){let{gen:q,data:K,$data:Y,schemaCode:z,schema:w}=A;if(Y||w&&typeof w=="object")A.fail$data(Wi1._`!${(0,BOK.useFunc)(q,mOK.default)}(${K}, ${z})`);else A.fail(Wi1._`${w} !== ${K}`)}};z_A.default=FOK});var $_A=C((__A)=>{Object.defineProperty(__A,"__esModule",{value:!0});var vC6=q9(),UOK=kz(),pOK=r71(),dOK={message:"must be equal to one of the allowed values",params:({schemaCode:A})=>vC6._`{allowedValues: ${A}}`},cOK={keyword:"enum",schemaType:"array",$data:!0,error:dOK,code(A){let{gen:q,data:K,$data:Y,schema:z,schemaCode:w,it:_}=A;if(!Y&&z.length===0)throw Error("enum must have non-empty array");let $=z.length>=_.opts.loopEnum,O,H=()=>O!==null&&O!==void 0?O:O=(0,UOK.useFunc)(q,pOK.default),j;if($||Y)j=q.let("valid"),A.block$data(j,J);else{if(!Array.isArray(z))throw Error("ajv implementation error");let D=q.const("vSchema",w);j=(0,vC6.or)(...z.map((X,P)=>M(D,P)))}A.pass(j);function J(){q.assign(j,!1),q.forOf("v",w,(D)=>q.if(vC6._`${H()}(${K}, ${D})`,()=>q.assign(j,!0).break()))}function M(D,X){let P=z[X];return typeof P==="object"&&P!==null?vC6._`${H()}(${K}, ${D}[${X}])`:vC6._`${K} === ${P}`}}};__A.default=cOK});var H_A=C((O_A)=>{Object.defineProperty(O_A,"__esModule",{value:!0});var iOK=g2A(),nOK=Q2A(),rOK=l2A(),oOK=n2A(),aOK=o2A(),sOK=s2A(),tOK=e2A(),eOK=Y_A(),AHK=w_A(),qHK=$_A(),KHK=[iOK.default,nOK.default,rOK.default,oOK.default,aOK.default,sOK.default,tOK.default,eOK.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},AHK.default,qHK.default];O_A.default=KHK});var Gi1=C((J_A)=>{Object.defineProperty(J_A,"__esModule",{value:!0});J_A.validateAdditionalItems=void 0;var Xq6=q9(),Zi1=kz(),zHK={message:({params:{len:A}})=>Xq6.str`must NOT have more than ${A} items`,params:({params:{len:A}})=>Xq6._`{limit: ${A}}`},wHK={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:zHK,code(A){let{parentSchema:q,it:K}=A,{items:Y}=q;if(!Array.isArray(Y)){(0,Zi1.checkStrictMode)(K,'"additionalItems" is ignored when "items" is not an array of schemas');return}j_A(A,Y)}};function j_A(A,q){let{gen:K,schema:Y,data:z,keyword:w,it:_}=A;_.items=!0;let $=K.const("len",Xq6._`${z}.length`);if(Y===!1)A.setParams({len:q.length}),A.pass(Xq6._`${$} <= ${q.length}`);else if(typeof Y=="object"&&!(0,Zi1.alwaysValidSchema)(_,Y)){let H=K.var("valid",Xq6._`${$} <= ${q.length}`);K.if((0,Xq6.not)(H),()=>O(H)),A.ok(H)}function O(H){K.forRange("i",q.length,$,(j)=>{if(A.subschema({keyword:w,dataProp:j,dataPropType:Zi1.Type.Num},H),!_.allErrors)K.if((0,Xq6.not)(H),()=>K.break())})}}J_A.validateAdditionalItems=j_A;J_A.default=wHK});var fi1=C((P_A)=>{Object.defineProperty(P_A,"__esModule",{value:!0});P_A.validateTuple=void 0;var D_A=q9(),o71=kz(),$HK=Fy(),OHK={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(A){let{schema:q,it:K}=A;if(Array.isArray(q))return X_A(A,"additionalItems",q);if(K.items=!0,(0,o71.alwaysValidSchema)(K,q))return;A.ok((0,$HK.validateArray)(A))}};function X_A(A,q,K=A.schema){let{gen:Y,parentSchema:z,data:w,keyword:_,it:$}=A;if(j(z),$.opts.unevaluated&&K.length&&$.items!==!0)$.items=o71.mergeEvaluated.items(Y,K.length,$.items);let O=Y.name("valid"),H=Y.const("len",D_A._`${w}.length`);K.forEach((J,M)=>{if((0,o71.alwaysValidSchema)($,J))return;Y.if(D_A._`${H} > ${M}`,()=>A.subschema({keyword:_,schemaProp:M,dataProp:M},O)),A.ok(O)});function j(J){let{opts:M,errSchemaPath:D}=$,X=K.length,P=X===J.minItems&&(X===J.maxItems||J[q]===!1);if(M.strictTuples&&!P){let W=`"${_}" is ${X}-tuple, but minItems or maxItems/${q} are not specified or different at path "${D}"`;(0,o71.checkStrictMode)($,W,M.strictTuples)}}}P_A.validateTuple=X_A;P_A.default=OHK});var G_A=C((Z_A)=>{Object.defineProperty(Z_A,"__esModule",{value:!0});var jHK=fi1(),JHK={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(A)=>(0,jHK.validateTuple)(A,"items")};Z_A.default=JHK});var V_A=C((T_A)=>{Object.defineProperty(T_A,"__esModule",{value:!0});var f_A=q9(),DHK=kz(),XHK=Fy(),PHK=Gi1(),WHK={message:({params:{len:A}})=>f_A.str`must NOT have more than ${A} items`,params:({params:{len:A}})=>f_A._`{limit: ${A}}`},ZHK={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:WHK,code(A){let{schema:q,parentSchema:K,it:Y}=A,{prefixItems:z}=K;if(Y.items=!0,(0,DHK.alwaysValidSchema)(Y,q))return;if(z)(0,PHK.validateAdditionalItems)(A,z);else A.ok((0,XHK.validateArray)(A))}};T_A.default=ZHK});var v_A=C((N_A)=>{Object.defineProperty(N_A,"__esModule",{value:!0});var Qy=q9(),a71=kz(),fHK={message:({params:{min:A,max:q}})=>q===void 0?Qy.str`must contain at least ${A} valid item(s)`:Qy.str`must contain at least ${A} and no more than ${q} valid item(s)`,params:({params:{min:A,max:q}})=>q===void 0?Qy._`{minContains: ${A}}`:Qy._`{minContains: ${A}, maxContains: ${q}}`},THK={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:fHK,code(A){let{gen:q,schema:K,parentSchema:Y,data:z,it:w}=A,_,$,{minContains:O,maxContains:H}=Y;if(w.opts.next)_=O===void 0?1:O,$=H;else _=1;let j=q.const("len",Qy._`${z}.length`);if(A.setParams({min:_,max:$}),$===void 0&&_===0){(0,a71.checkStrictMode)(w,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&_>$){(0,a71.checkStrictMode)(w,'"minContains" > "maxContains" is always invalid'),A.fail();return}if((0,a71.alwaysValidSchema)(w,K)){let P=Qy._`${j} >= ${_}`;if($!==void 0)P=Qy._`${P} && ${j} <= ${$}`;A.pass(P);return}w.items=!0;let J=q.name("valid");if($===void 0&&_===1)D(J,()=>q.if(J,()=>q.break()));else if(_===0){if(q.let(J,!0),$!==void 0)q.if(Qy._`${z}.length > 0`,M)}else q.let(J,!1),M();A.result(J,()=>A.reset());function M(){let P=q.name("_valid"),W=q.let("count",0);D(P,()=>q.if(P,()=>X(W)))}function D(P,W){q.forRange("i",0,j,(Z)=>{A.subschema({keyword:"contains",dataProp:Z,dataPropType:a71.Type.Num,compositeRule:!0},P),W()})}function X(P){if(q.code(Qy._`${P}++`),$===void 0)q.if(Qy._`${P} >= ${_}`,()=>q.assign(J,!0).break());else if(q.if(Qy._`${P} > ${$}`,()=>q.assign(J,!1).break()),_===1)q.assign(J,!0);else q.if(Qy._`${P} >= ${_}`,()=>q.assign(J,!0))}}};N_A.default=THK});var S_A=C((L_A)=>{Object.defineProperty(L_A,"__esModule",{value:!0});L_A.validateSchemaDeps=L_A.validatePropertyDeps=L_A.error=void 0;var Ti1=q9(),NHK=kz(),kC6=Fy();L_A.error={message:({params:{property:A,depsCount:q,deps:K}})=>{let Y=q===1?"property":"properties";return Ti1.str`must have ${Y} ${K} when property ${A} is present`},params:({params:{property:A,depsCount:q,deps:K,missingProperty:Y}})=>Ti1._`{property: ${A},
    missingProperty: ${Y},
    depsCount: ${q},
    deps: ${K}}`};var vHK={keyword:"dependencies",type:"object",schemaType:"object",error:L_A.error,code(A){let[q,K]=kHK(A);k_A(A,q),E_A(A,K)}};function kHK({schema:A}){let q={},K={};for(let Y in A){if(Y==="__proto__")continue;let z=Array.isArray(A[Y])?q:K;z[Y]=A[Y]}return[q,K]}function k_A(A,q=A.schema){let{gen:K,data:Y,it:z}=A;if(Object.keys(q).length===0)return;let w=K.let("missing");for(let _ in q){let $=q[_];if($.length===0)continue;let O=(0,kC6.propertyInData)(K,Y,_,z.opts.ownProperties);if(A.setParams({property:_,depsCount:$.length,deps:$.join(", ")}),z.allErrors)K.if(O,()=>{for(let H of $)(0,kC6.checkReportMissingProp)(A,H)});else K.if(Ti1._`${O} && (${(0,kC6.checkMissingProp)(A,$,w)})`),(0,kC6.reportMissingProp)(A,w),K.else()}}L_A.validatePropertyDeps=k_A;function E_A(A,q=A.schema){let{gen:K,data:Y,keyword:z,it:w}=A,_=K.name("valid");for(let $ in q){if((0,NHK.alwaysValidSchema)(w,q[$]))continue;K.if((0,kC6.propertyInData)(K,Y,$,w.opts.ownProperties),()=>{let O=A.subschema({keyword:z,schemaProp:$},_);A.mergeValidEvaluated(O,_)},()=>K.var(_,!0)),A.ok(_)}}L_A.validateSchemaDeps=E_A;L_A.default=vHK});var I_A=C((h_A)=>{Object.defineProperty(h_A,"__esModule",{value:!0});var C_A=q9(),yHK=kz(),RHK={message:"property name must be valid",params:({params:A})=>C_A._`{propertyName: ${A.propertyName}}`},SHK={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:RHK,code(A){let{gen:q,schema:K,data:Y,it:z}=A;if((0,yHK.alwaysValidSchema)(z,K))return;let w=q.name("valid");q.forIn("key",Y,(_)=>{A.setParams({propertyName:_}),A.subschema({keyword:"propertyNames",data:_,dataTypes:["string"],propertyName:_,compositeRule:!0},w),q.if((0,C_A.not)(w),()=>{if(A.error(!0),!z.allErrors)q.break()})}),A.ok(w)}};h_A.default=SHK});var Vi1=C((b_A)=>{Object.defineProperty(b_A,"__esModule",{value:!0});var s71=Fy(),XI=q9(),hHK=tp(),t71=kz(),IHK={message:"must NOT have additional properties",params:({params:A})=>XI._`{additionalProperty: ${A.additionalProperty}}`},bHK={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:IHK,code(A){let{gen:q,schema:K,parentSchema:Y,data:z,errsCount:w,it:_}=A;if(!w)throw Error("ajv implementation error");let{allErrors:$,opts:O}=_;if(_.props=!0,O.removeAdditional!=="all"&&(0,t71.alwaysValidSchema)(_,K))return;let H=(0,s71.allSchemaProperties)(Y.properties),j=(0,s71.allSchemaProperties)(Y.patternProperties);J(),A.ok(XI._`${w} === ${hHK.default.errors}`);function J(){q.forIn("key",z,(W)=>{if(!H.length&&!j.length)X(W);else q.if(M(W),()=>X(W))})}function M(W){let Z;if(H.length>8){let G=(0,t71.schemaRefOrVal)(_,Y.properties,"properties");Z=(0,s71.isOwnProperty)(q,G,W)}else if(H.length)Z=(0,XI.or)(...H.map((G)=>XI._`${W} === ${G}`));else Z=XI.nil;if(j.length)Z=(0,XI.or)(Z,...j.map((G)=>XI._`${(0,s71.usePattern)(A,G)}.test(${W})`));return(0,XI.not)(Z)}function D(W){q.code(XI._`delete ${z}[${W}]`)}function X(W){if(O.removeAdditional==="all"||O.removeAdditional&&K===!1){D(W);return}if(K===!1){if(A.setParams({additionalProperty:W}),A.error(),!$)q.break();return}if(typeof K=="object"&&!(0,t71.alwaysValidSchema)(_,K)){let Z=q.name("valid");if(O.removeAdditional==="failing")P(W,Z,!1),q.if((0,XI.not)(Z),()=>{A.reset(),D(W)});else if(P(W,Z),!$)q.if((0,XI.not)(Z),()=>q.break())}}function P(W,Z,G){let f={keyword:"additionalProperties",dataProp:W,dataPropType:t71.Type.Str};if(G===!1)Object.assign(f,{compositeRule:!0,createErrors:!1,allErrors:!1});A.subschema(f,Z)}}};b_A.default=bHK});var m_A=C((B_A)=>{Object.defineProperty(B_A,"__esModule",{value:!0});var uHK=MC6(),x_A=Fy(),Ni1=kz(),u_A=Vi1(),BHK={keyword:"properties",type:"object",schemaType:"object",code(A){let{gen:q,schema:K,parentSchema:Y,data:z,it:w}=A;if(w.opts.removeAdditional==="all"&&Y.additionalProperties===void 0)u_A.default.code(new uHK.KeywordCxt(w,u_A.default,"additionalProperties"));let _=(0,x_A.allSchemaProperties)(K);for(let J of _)w.definedProperties.add(J);if(w.opts.unevaluated&&_.length&&w.props!==!0)w.props=Ni1.mergeEvaluated.props(q,(0,Ni1.toHash)(_),w.props);let $=_.filter((J)=>!(0,Ni1.alwaysValidSchema)(w,K[J]));if($.length===0)return;let O=q.name("valid");for(let J of $){if(H(J))j(J);else{if(q.if((0,x_A.propertyInData)(q,z,J,w.opts.ownProperties)),j(J),!w.allErrors)q.else().var(O,!0);q.endIf()}A.it.definedProperties.add(J),A.ok(O)}function H(J){return w.opts.useDefaults&&!w.compositeRule&&K[J].default!==void 0}function j(J){A.subschema({keyword:"properties",schemaProp:J,dataProp:J},O)}}};B_A.default=BHK});var p_A=C((U_A)=>{Object.defineProperty(U_A,"__esModule",{value:!0});var g_A=Fy(),e71=q9(),F_A=kz(),Q_A=kz(),gHK={keyword:"patternProperties",type:"object",schemaType:"object",code(A){let{gen:q,schema:K,data:Y,parentSchema:z,it:w}=A,{opts:_}=w,$=(0,g_A.allSchemaProperties)(K),O=$.filter((P)=>(0,F_A.alwaysValidSchema)(w,K[P]));if($.length===0||O.length===$.length&&(!w.opts.unevaluated||w.props===!0))return;let H=_.strictSchema&&!_.allowMatchingProperties&&z.properties,j=q.name("valid");if(w.props!==!0&&!(w.props instanceof e71.Name))w.props=(0,Q_A.evaluatedPropsToName)(q,w.props);let{props:J}=w;M();function M(){for(let P of $){if(H)D(P);if(w.allErrors)X(P);else q.var(j,!0),X(P),q.if(j)}}function D(P){for(let W in H)if(new RegExp(P).test(W))(0,F_A.checkStrictMode)(w,`property ${W} matches pattern ${P} (use allowMatchingProperties)`)}function X(P){q.forIn("key",Y,(W)=>{q.if(e71._`${(0,g_A.usePattern)(A,P)}.test(${W})`,()=>{let Z=O.includes(P);if(!Z)A.subschema({keyword:"patternProperties",schemaProp:P,dataProp:W,dataPropType:Q_A.Type.Str},j);if(w.opts.unevaluated&&J!==!0)q.assign(e71._`${J}[${W}]`,!0);else if(!Z&&!w.allErrors)q.if((0,e71.not)(j),()=>q.break())})})}}};U_A.default=gHK});var c_A=C((d_A)=>{Object.defineProperty(d_A,"__esModule",{value:!0});var QHK=kz(),UHK={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(A){let{gen:q,schema:K,it:Y}=A;if((0,QHK.alwaysValidSchema)(Y,K)){A.fail();return}let z=q.name("valid");A.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},z),A.failResult(z,()=>A.reset(),()=>A.error())},error:{message:"must NOT be valid"}};d_A.default=UHK});var i_A=C((l_A)=>{Object.defineProperty(l_A,"__esModule",{value:!0});var dHK=Fy(),cHK={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dHK.validateUnion,error:{message:"must match a schema in anyOf"}};l_A.default=cHK});var r_A=C((n_A)=>{Object.defineProperty(n_A,"__esModule",{value:!0});var A41=q9(),iHK=kz(),nHK={message:"must match exactly one schema in oneOf",params:({params:A})=>A41._`{passingSchemas: ${A.passing}}`},rHK={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nHK,code(A){let{gen:q,schema:K,parentSchema:Y,it:z}=A;if(!Array.isArray(K))throw Error("ajv implementation error");if(z.opts.discriminator&&Y.discriminator)return;let w=K,_=q.let("valid",!1),$=q.let("passing",null),O=q.name("_valid");A.setParams({passing:$}),q.block(H),A.result(_,()=>A.reset(),()=>A.error(!0));function H(){w.forEach((j,J)=>{let M;if((0,iHK.alwaysValidSchema)(z,j))q.var(O,!0);else M=A.subschema({keyword:"oneOf",schemaProp:J,compositeRule:!0},O);if(J>0)q.if(A41._`${O} && ${_}`).assign(_,!1).assign($,A41._`[${$}, ${J}]`).else();q.if(O,()=>{if(q.assign(_,!0),q.assign($,J),M)A.mergeEvaluated(M,A41.Name)})})}}};n_A.default=rHK});var a_A=C((o_A)=>{Object.defineProperty(o_A,"__esModule",{value:!0});var aHK=kz(),sHK={keyword:"allOf",schemaType:"array",code(A){let{gen:q,schema:K,it:Y}=A;if(!Array.isArray(K))throw Error("ajv implementation error");let z=q.name("valid");K.forEach((w,_)=>{if((0,aHK.alwaysValidSchema)(Y,w))return;let $=A.subschema({keyword:"allOf",schemaProp:_},z);A.ok(z),A.mergeEvaluated($)})}};o_A.default=sHK});var A$A=C((e_A)=>{Object.defineProperty(e_A,"__esModule",{value:!0});var q41=q9(),t_A=kz(),eHK={message:({params:A})=>q41.str`must match "${A.ifClause}" schema`,params:({params:A})=>q41._`{failingKeyword: ${A.ifClause}}`},AjK={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:eHK,code(A){let{gen:q,parentSchema:K,it:Y}=A;if(K.then===void 0&&K.else===void 0)(0,t_A.checkStrictMode)(Y,'"if" without "then" and "else" is ignored');let z=s_A(Y,"then"),w=s_A(Y,"else");if(!z&&!w)return;let _=q.let("valid",!0),$=q.name("_valid");if(O(),A.reset(),z&&w){let j=q.let("ifClause");A.setParams({ifClause:j}),q.if($,H("then",j),H("else",j))}else if(z)q.if($,H("then"));else q.if((0,q41.not)($),H("else"));A.pass(_,()=>A.error(!0));function O(){let j=A.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},$);A.mergeEvaluated(j)}function H(j,J){return()=>{let M=A.subschema({keyword:j},$);if(q.assign(_,$),A.mergeValidEvaluated(M,_),J)q.assign(J,q41._`${j}`);else A.setParams({ifClause:j})}}}};function s_A(A,q){let K=A.schema[q];return K!==void 0&&!(0,t_A.alwaysValidSchema)(A,K)}e_A.default=AjK});var K$A=C((q$A)=>{Object.defineProperty(q$A,"__esModule",{value:!0});var KjK=kz(),YjK={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:A,parentSchema:q,it:K}){if(q.if===void 0)(0,KjK.checkStrictMode)(K,`"${A}" without "if" is ignored`)}};q$A.default=YjK});var z$A=C((Y$A)=>{Object.defineProperty(Y$A,"__esModule",{value:!0});var wjK=Gi1(),_jK=G_A(),$jK=fi1(),OjK=V_A(),HjK=v_A(),jjK=S_A(),JjK=I_A(),MjK=Vi1(),DjK=m_A(),XjK=p_A(),PjK=c_A(),WjK=i_A(),ZjK=r_A(),GjK=a_A(),fjK=A$A(),TjK=K$A();function VjK(A=!1){let q=[PjK.default,WjK.default,ZjK.default,GjK.default,fjK.default,TjK.default,JjK.default,MjK.default,jjK.default,DjK.default,XjK.default];if(A)q.push(_jK.default,OjK.default);else q.push(wjK.default,$jK.default);return q.push(HjK.default),q}Y$A.default=VjK});var _$A=C((w$A)=>{Object.defineProperty(w$A,"__esModule",{value:!0});var PJ=q9(),vjK={message:({schemaCode:A})=>PJ.str`must match format "${A}"`,params:({schemaCode:A})=>PJ._`{format: ${A}}`},kjK={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:vjK,code(A,q){let{gen:K,data:Y,$data:z,schema:w,schemaCode:_,it:$}=A,{opts:O,errSchemaPath:H,schemaEnv:j,self:J}=$;if(!O.validateFormats)return;if(z)M();else D();function M(){let X=K.scopeValue("formats",{ref:J.formats,code:O.code.formats}),P=K.const("fDef",PJ._`${X}[${_}]`),W=K.let("fType"),Z=K.let("format");K.if(PJ._`typeof ${P} == "object" && !(${P} instanceof RegExp)`,()=>K.assign(W,PJ._`${P}.type || "string"`).assign(Z,PJ._`${P}.validate`),()=>K.assign(W,PJ._`"string"`).assign(Z,P)),A.fail$data((0,PJ.or)(G(),f()));function G(){if(O.strictSchema===!1)return PJ.nil;return PJ._`${_} && !${Z}`}function f(){let V=j.$async?PJ._`(${P}.async ? await ${Z}(${Y}) : ${Z}(${Y}))`:PJ._`${Z}(${Y})`,N=PJ._`(typeof ${Z} == "function" ? ${V} : ${Z}.test(${Y}))`;return PJ._`${Z} && ${Z} !== true && ${W} === ${q} && !${N}`}}function D(){let X=J.formats[w];if(!X){G();return}if(X===!0)return;let[P,W,Z]=f(X);if(P===q)A.pass(V());function G(){if(O.strictSchema===!1){J.logger.warn(N());return}throw Error(N());function N(){return`unknown format "${w}" ignored in schema at path "${H}"`}}function f(N){let v=N instanceof RegExp?(0,PJ.regexpCode)(N):O.code.formats?PJ._`${O.code.formats}${(0,PJ.getProperty)(w)}`:void 0,y=K.scopeValue("formats",{key:w,ref:N,code:v});if(typeof N=="object"&&!(N instanceof RegExp))return[N.type||"string",N.validate,PJ._`${y}.validate`];return["string",N,y]}function V(){if(typeof X=="object"&&!(X instanceof RegExp)&&X.async){if(!j.$async)throw Error("async format in sync schema");return PJ._`await ${Z}(${Y})`}return typeof W=="function"?PJ._`${Z}(${Y})`:PJ._`${Z}.test(${Y})`}}}};w$A.default=kjK});var O$A=C(($$A)=>{Object.defineProperty($$A,"__esModule",{value:!0});var LjK=_$A(),yjK=[LjK.default];$$A.default=yjK});var J$A=C((H$A)=>{Object.defineProperty(H$A,"__esModule",{value:!0});H$A.contentVocabulary=H$A.metadataVocabulary=void 0;H$A.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];H$A.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var X$A=C((D$A)=>{Object.defineProperty(D$A,"__esModule",{value:!0});var CjK=B2A(),hjK=H_A(),IjK=z$A(),bjK=O$A(),M$A=J$A(),xjK=[CjK.default,hjK.default,(0,IjK.default)(),bjK.default,M$A.metadataVocabulary,M$A.contentVocabulary];D$A.default=xjK});var G$A=C((W$A)=>{Object.defineProperty(W$A,"__esModule",{value:!0});W$A.DiscrError=void 0;var P$A;(function(A){A.Tag="tag",A.Mapping="mapping"})(P$A||(W$A.DiscrError=P$A={}))});var V$A=C((T$A)=>{Object.defineProperty(T$A,"__esModule",{value:!0});var Ij6=q9(),vi1=G$A(),f$A=m71(),BjK=DC6(),mjK=kz(),gjK={message:({params:{discrError:A,tagName:q}})=>A===vi1.DiscrError.Tag?`tag "${q}" must be string`:`value of tag "${q}" must be in oneOf`,params:({params:{discrError:A,tag:q,tagName:K}})=>Ij6._`{error: ${A}, tag: ${K}, tagValue: ${q}}`},FjK={keyword:"discriminator",type:"object",schemaType:"object",error:gjK,code(A){let{gen:q,data:K,schema:Y,parentSchema:z,it:w}=A,{oneOf:_}=z;if(!w.opts.discriminator)throw Error("discriminator: requires discriminator option");let $=Y.propertyName;if(typeof $!="string")throw Error("discriminator: requires propertyName");if(Y.mapping)throw Error("discriminator: mapping is not supported");if(!_)throw Error("discriminator: requires oneOf keyword");let O=q.let("valid",!1),H=q.const("tag",Ij6._`${K}${(0,Ij6.getProperty)($)}`);q.if(Ij6._`typeof ${H} == "string"`,()=>j(),()=>A.error(!1,{discrError:vi1.DiscrError.Tag,tag:H,tagName:$})),A.ok(O);function j(){let D=M();q.if(!1);for(let X in D)q.elseIf(Ij6._`${H} === ${X}`),q.assign(O,J(D[X]));q.else(),A.error(!1,{discrError:vi1.DiscrError.Mapping,tag:H,tagName:$}),q.endIf()}function J(D){let X=q.name("valid"),P=A.subschema({keyword:"oneOf",schemaProp:D},X);return A.mergeEvaluated(P,Ij6.Name),X}function M(){var D;let X={},P=Z(z),W=!0;for(let V=0;V<_.length;V++){let N=_[V];if((N===null||N===void 0?void 0:N.$ref)&&!(0,mjK.schemaHasRulesButRef)(N,w.self.RULES)){let y=N.$ref;if(N=f$A.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,y),N instanceof f$A.SchemaEnv)N=N.schema;if(N===void 0)throw new BjK.default(w.opts.uriResolver,w.baseId,y)}let v=(D=N===null||N===void 0?void 0:N.properties)===null||D===void 0?void 0:D[$];if(typeof v!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);W=W&&(P||Z(N)),G(v,V)}if(!W)throw Error(`discriminator: "${$}" must be required`);return X;function Z({required:V}){return Array.isArray(V)&&V.includes($)}function G(V,N){if(V.const)f(V.const,N);else if(V.enum)for(let v of V.enum)f(v,N);else throw Error(`discriminator: "properties/${$}" must have "const" or "enum"`)}function f(V,N){if(typeof V!="string"||V in X)throw Error(`discriminator: "${$}" values must be unique strings`);X[V]=N}}}};T$A.default=FjK});var N$A=C((nww,UjK)=>{UjK.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Y41=C((bV,ki1)=>{Object.defineProperty(bV,"__esModule",{value:!0});bV.MissingRefError=bV.ValidationError=bV.CodeGen=bV.Name=bV.nil=bV.stringify=bV.str=bV._=bV.KeywordCxt=bV.Ajv=void 0;var pjK=L2A(),djK=X$A(),cjK=V$A(),v$A=N$A(),ljK=["/properties"],K41="http://json-schema.org/draft-07/schema";class EC6 extends pjK.default{_addVocabularies(){if(super._addVocabularies(),djK.default.forEach((A)=>this.addVocabulary(A)),this.opts.discriminator)this.addKeyword(cjK.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let A=this.opts.$data?this.$dataMetaSchema(v$A,ljK):v$A;this.addMetaSchema(A,K41,!1),this.refs["http://json-schema.org/schema"]=K41}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(K41)?K41:void 0)}}bV.Ajv=EC6;ki1.exports=bV=EC6;ki1.exports.Ajv=EC6;Object.defineProperty(bV,"__esModule",{value:!0});bV.default=EC6;var ijK=MC6();Object.defineProperty(bV,"KeywordCxt",{enumerable:!0,get:function(){return ijK.KeywordCxt}});var bj6=q9();Object.defineProperty(bV,"_",{enumerable:!0,get:function(){return bj6._}});Object.defineProperty(bV,"str",{enumerable:!0,get:function(){return bj6.str}});Object.defineProperty(bV,"stringify",{enumerable:!0,get:function(){return bj6.stringify}});Object.defineProperty(bV,"nil",{enumerable:!0,get:function(){return bj6.nil}});Object.defineProperty(bV,"Name",{enumerable:!0,get:function(){return bj6.Name}});Object.defineProperty(bV,"CodeGen",{enumerable:!0,get:function(){return bj6.CodeGen}});var njK=u71();Object.defineProperty(bV,"ValidationError",{enumerable:!0,get:function(){return njK.default}});var rjK=DC6();Object.defineProperty(bV,"MissingRefError",{enumerable:!0,get:function(){return rjK.default}})});var b$A=C((h$A)=>{Object.defineProperty(h$A,"__esModule",{value:!0});h$A.formatNames=h$A.fastFormats=h$A.fullFormats=void 0;function lB(A,q){return{validate:A,compare:q}}h$A.fullFormats={date:lB(y$A,Ri1),time:lB(Li1(!0),Si1),"date-time":lB(k$A(!0),S$A),"iso-time":lB(Li1(),R$A),"iso-date-time":lB(k$A(),C$A),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:KJK,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:HJK,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:YJK,int32:{type:"number",validate:_JK},int64:{type:"number",validate:$JK},float:{type:"number",validate:L$A},double:{type:"number",validate:L$A},password:!0,binary:!0};h$A.fastFormats={...h$A.fullFormats,date:lB(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Ri1),time:lB(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Si1),"date-time":lB(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,S$A),"iso-time":lB(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,R$A),"iso-date-time":lB(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,C$A),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};h$A.formatNames=Object.keys(h$A.fullFormats);function sjK(A){return A%4===0&&(A%100!==0||A%400===0)}var tjK=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,ejK=[0,31,28,31,30,31,30,31,31,30,31,30,31];function y$A(A){let q=tjK.exec(A);if(!q)return!1;let K=+q[1],Y=+q[2],z=+q[3];return Y>=1&&Y<=12&&z>=1&&z<=(Y===2&&sjK(K)?29:ejK[Y])}function Ri1(A,q){if(!(A&&q))return;if(A>q)return 1;if(A<q)return-1;return 0}var Ei1=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Li1(A){return function(K){let Y=Ei1.exec(K);if(!Y)return!1;let z=+Y[1],w=+Y[2],_=+Y[3],$=Y[4],O=Y[5]==="-"?-1:1,H=+(Y[6]||0),j=+(Y[7]||0);if(H>23||j>59||A&&!$)return!1;if(z<=23&&w<=59&&_<60)return!0;let J=w-j*O,M=z-H*O-(J<0?1:0);return(M===23||M===-1)&&(J===59||J===-1)&&_<61}}function Si1(A,q){if(!(A&&q))return;let K=new Date("2020-01-01T"+A).valueOf(),Y=new Date("2020-01-01T"+q).valueOf();if(!(K&&Y))return;return K-Y}function R$A(A,q){if(!(A&&q))return;let K=Ei1.exec(A),Y=Ei1.exec(q);if(!(K&&Y))return;if(A=K[1]+K[2]+K[3],q=Y[1]+Y[2]+Y[3],A>q)return 1;if(A<q)return-1;return 0}var yi1=/t|\s/i;function k$A(A){let q=Li1(A);return function(Y){let z=Y.split(yi1);return z.length===2&&y$A(z[0])&&q(z[1])}}function S$A(A,q){if(!(A&&q))return;let K=new Date(A).valueOf(),Y=new Date(q).valueOf();if(!(K&&Y))return;return K-Y}function C$A(A,q){if(!(A&&q))return;let[K,Y]=A.split(yi1),[z,w]=q.split(yi1),_=Ri1(K,z);if(_===void 0)return;return _||Si1(Y,w)}var AJK=/\/|:/,qJK=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function KJK(A){return AJK.test(A)&&qJK.test(A)}var E$A=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function YJK(A){return E$A.lastIndex=0,E$A.test(A)}var zJK=-2147483648,wJK=2147483647;function _JK(A){return Number.isInteger(A)&&A<=wJK&&A>=zJK}function $JK(A){return Number.isInteger(A)}function L$A(){return!0}var OJK=/[^\\]\\Z/;function HJK(A){if(OJK.test(A))return!1;try{return new RegExp(A),!0}catch(q){return!1}}});var u$A=C((x$A)=>{Object.defineProperty(x$A,"__esModule",{value:!0});x$A.formatLimitDefinition=void 0;var JJK=Y41(),PI=q9(),ja=PI.operators,z41={formatMaximum:{okStr:"<=",ok:ja.LTE,fail:ja.GT},formatMinimum:{okStr:">=",ok:ja.GTE,fail:ja.LT},formatExclusiveMaximum:{okStr:"<",ok:ja.LT,fail:ja.GTE},formatExclusiveMinimum:{okStr:">",ok:ja.GT,fail:ja.LTE}},MJK={message:({keyword:A,schemaCode:q})=>PI.str`should be ${z41[A].okStr} ${q}`,params:({keyword:A,schemaCode:q})=>PI._`{comparison: ${z41[A].okStr}, limit: ${q}}`};x$A.formatLimitDefinition={keyword:Object.keys(z41),type:"string",schemaType:"string",$data:!0,error:MJK,code(A){let{gen:q,data:K,schemaCode:Y,keyword:z,it:w}=A,{opts:_,self:$}=w;if(!_.validateFormats)return;let O=new JJK.KeywordCxt(w,$.RULES.all.format.definition,"format");if(O.$data)H();else j();function H(){let M=q.scopeValue("formats",{ref:$.formats,code:_.code.formats}),D=q.const("fmt",PI._`${M}[${O.schemaCode}]`);A.fail$data((0,PI.or)(PI._`typeof ${D} != "object"`,PI._`${D} instanceof RegExp`,PI._`typeof ${D}.compare != "function"`,J(D)))}function j(){let M=O.schema,D=$.formats[M];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw Error(`"${z}": format "${M}" does not define "compare" function`);let X=q.scopeValue("formats",{key:M,ref:D,code:_.code.formats?PI._`${_.code.formats}${(0,PI.getProperty)(M)}`:void 0});A.fail$data(J(X))}function J(M){return PI._`${M}.compare(${K}, ${Y}) ${z41[z].fail} 0`}},dependencies:["format"]};var DJK=(A)=>{return A.addKeyword(x$A.formatLimitDefinition),A};x$A.default=DJK});var F$A=C((LC6,g$A)=>{Object.defineProperty(LC6,"__esModule",{value:!0});var xj6=b$A(),PJK=u$A(),Ii1=q9(),B$A=new Ii1.Name("fullFormats"),WJK=new Ii1.Name("fastFormats"),bi1=(A,q={keywords:!0})=>{if(Array.isArray(q))return m$A(A,q,xj6.fullFormats,B$A),A;let[K,Y]=q.mode==="fast"?[xj6.fastFormats,WJK]:[xj6.fullFormats,B$A],z=q.formats||xj6.formatNames;if(m$A(A,z,K,Y),q.keywords)(0,PJK.default)(A);return A};bi1.get=(A,q="full")=>{let Y=(q==="fast"?xj6.fastFormats:xj6.fullFormats)[A];if(!Y)throw Error(`Unknown format "${A}"`);return Y};function m$A(A,q,K,Y){var z,w;(z=(w=A.opts.code).formats)!==null&&z!==void 0||(w.formats=Ii1._`require("ajv-formats/dist/formats").${Y}`);for(let _ of q)A.addFormat(_,K[_])}g$A.exports=LC6=bi1;Object.defineProperty(LC6,"__esModule",{value:!0});LC6.default=bi1});function ZJK(){let A=new Q$A.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return U$A.default(A),A}class yC6{constructor(A){this._ajv=A??ZJK()}getValidator(A){let q="$id"in A&&typeof A.$id==="string"?this._ajv.getSchema(A.$id)??this._ajv.compile(A):this._ajv.compile(A);return(K)=>{if(q(K))return{valid:!0,data:K,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(q.errors)}}}}var Q$A,U$A;var xi1=k(()=>{Q$A=e(Y41(),1),U$A=e(F$A(),1)});class ui1{constructor(A){this._server=A}requestStream(A,q,K){return this._server.requestStream(A,q,K)}createMessageStream(A,q){let K=this._server.getClientCapabilities();if((A.tools||A.toolChoice)&&!K?.sampling?.tools)throw Error("Client does not support sampling tools capability.");if(A.messages.length>0){let Y=A.messages[A.messages.length-1],z=Array.isArray(Y.content)?Y.content:[Y.content],w=z.some((H)=>H.type==="tool_result"),_=A.messages.length>1?A.messages[A.messages.length-2]:void 0,$=_?Array.isArray(_.content)?_.content:[_.content]:[],O=$.some((H)=>H.type==="tool_use");if(w){if(z.some((H)=>H.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!O)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(O){let H=new Set($.filter((J)=>J.type==="tool_use").map((J)=>J.id)),j=new Set(z.filter((J)=>J.type==="tool_result").map((J)=>J.toolUseId));if(H.size!==j.size||![...H].every((J)=>j.has(J)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:A},t46,q)}elicitInputStream(A,q){let K=this._server.getClientCapabilities(),Y=A.mode??"form";switch(Y){case"url":{if(!K?.elicitation?.url)throw Error("Client does not support url elicitation.");break}case"form":{if(!K?.elicitation?.form)throw Error("Client does not support form elicitation.");break}}let z=Y==="form"&&A.mode===void 0?{...A,mode:"form"}:A;return this.requestStream({method:"elicitation/create",params:z},io,q)}async getTask(A,q){return this._server.getTask({taskId:A},q)}async getTaskResult(A,q,K){return this._server.getTaskResult({taskId:A},q,K)}async listTasks(A,q){return this._server.listTasks(A?{cursor:A}:void 0,q)}async cancelTask(A,q){return this._server.cancelTask({taskId:A},q)}}var p$A=k(()=>{uX()});function w41(A,q,K){if(!A)throw Error(`${K} does not support task creation (required for ${q})`);switch(q){case"tools/call":if(!A.tools?.call)throw Error(`${K} does not support task creation for tools/call (required for ${q})`);break;default:break}}function _41(A,q,K){if(!A)throw Error(`${K} does not support task creation (required for ${q})`);switch(q){case"sampling/createMessage":if(!A.sampling?.createMessage)throw Error(`${K} does not support task creation for sampling/createMessage (required for ${q})`);break;case"elicitation/create":if(!A.elicitation?.create)throw Error(`${K} does not support task creation for elicitation/create (required for ${q})`);break;default:break}}var RC6;var Bi1=k(()=>{Il1();uX();xi1();qC6();p$A();RC6=class RC6 extends YC6{constructor(A,q){super(q);if(this._serverInfo=A,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(bS6.options.map((K,Y)=>[K,Y])),this.isMessageIgnored=(K,Y)=>{let z=this._loggingLevels.get(Y);return z?this.LOG_LEVEL_SEVERITY.get(K)<this.LOG_LEVEL_SEVERITY.get(z):!1},this._capabilities=q?.capabilities??{},this._instructions=q?.instructions,this._jsonSchemaValidator=q?.jsonSchemaValidator??new yC6,this.setRequestHandler(Vc1,(K)=>this._oninitialize(K)),this.setNotificationHandler(BA1,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(hc1,async(K,Y)=>{let z=Y.sessionId||Y.requestInfo?.headers["mcp-session-id"]||void 0,{level:w}=K.params,_=bS6.safeParse(w);if(_.success)this._loggingLevels.set(z,_.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new ui1(this)};return this._experimental}registerCapabilities(A){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=T71(this._capabilities,A)}setRequestHandler(A,q){let Y=vj6(A)?.method;if(!Y)throw Error("Schema is missing a method literal");let z;if(Ka(Y)){let _=Y;z=_._zod?.def?.value??_.value}else{let _=Y;z=_._def?.value??_.value}if(typeof z!=="string")throw Error("Schema method literal must be a string");if(z==="tools/call"){let _=async($,O)=>{let H=Nf(s46,$);if(!H.success){let D=H.error instanceof Error?H.error.message:String(H.error);throw new fq(YK.InvalidParams,`Invalid tools/call request: ${D}`)}let{params:j}=H.data,J=await Promise.resolve(q($,O));if(j.task){let D=Nf(Up,J);if(!D.success){let X=D.error instanceof Error?D.error.message:String(D.error);throw new fq(YK.InvalidParams,`Invalid task creation result: ${X}`)}return D.data}let M=Nf(gB,J);if(!M.success){let D=M.error instanceof Error?M.error.message:String(M.error);throw new fq(YK.InvalidParams,`Invalid tools/call result: ${D}`)}return M.data};return super.setRequestHandler(A,_)}return super.setRequestHandler(A,q)}assertCapabilityForMethod(A){switch(A){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${A})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${A})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${A})`);break;case"ping":break}}assertNotificationCapability(A){switch(A){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${A})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${A})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${A})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${A})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${A})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(A){if(!this._capabilities)return;switch(A){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${A})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${A})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${A})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${A})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${A})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${A})`);break;case"ping":case"initialize":break}}assertTaskCapability(A){_41(this._clientCapabilities?.tasks?.requests,A,"Client")}assertTaskHandlerCapability(A){if(!this._capabilities)return;w41(this._capabilities.tasks?.requests,A,"Server")}async _oninitialize(A){let q=A.params.protocolVersion;return this._clientCapabilities=A.params.capabilities,this._clientVersion=A.params.clientInfo,{protocolVersion:IA1.includes(q)?q:co,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Qp)}async createMessage(A,q){if(A.tools||A.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if(A.messages.length>0){let K=A.messages[A.messages.length-1],Y=Array.isArray(K.content)?K.content:[K.content],z=Y.some((O)=>O.type==="tool_result"),w=A.messages.length>1?A.messages[A.messages.length-2]:void 0,_=w?Array.isArray(w.content)?w.content:[w.content]:[],$=_.some((O)=>O.type==="tool_use");if(z){if(Y.some((O)=>O.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!$)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if($){let O=new Set(_.filter((j)=>j.type==="tool_use").map((j)=>j.id)),H=new Set(Y.filter((j)=>j.type==="tool_result").map((j)=>j.toolUseId));if(O.size!==H.size||![...O].every((j)=>H.has(j)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if(A.tools)return this.request({method:"sampling/createMessage",params:A},xS6,q);return this.request({method:"sampling/createMessage",params:A},t46,q)}async elicitInput(A,q){switch(A.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let Y=A;return this.request({method:"elicitation/create",params:Y},io,q)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let Y=A.mode==="form"?A:{...A,mode:"form"},z=await this.request({method:"elicitation/create",params:Y},io,q);if(z.action==="accept"&&z.content&&Y.requestedSchema)try{let _=this._jsonSchemaValidator.getValidator(Y.requestedSchema)(z.content);if(!_.valid)throw new fq(YK.InvalidParams,`Elicitation response content does not match requested schema: ${_.errorMessage}`)}catch(w){if(w instanceof fq)throw w;throw new fq(YK.InternalError,`Error validating elicitation response: ${w instanceof Error?w.message:String(w)}`)}return z}}}createElicitationCompletionNotifier(A,q){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:A}},q)}async listRoots(A,q){return this.request({method:"roots/list",params:A},uc1,q)}async sendLoggingMessage(A,q){if(this._capabilities.logging){if(!this.isMessageIgnored(A.level,q))return this.notification({method:"notifications/message",params:A})}}async sendResourceUpdated(A){return this.notification({method:"notifications/resources/updated",params:A})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}});class d$A{clients=new Map;tabRoutes=new Map;context;notificationHandler=null;constructor(A){this.context=A}setNotificationHandler(A){this.notificationHandler=A;for(let q of this.clients.values())q.setNotificationHandler(A)}async ensureConnected(){let{logger:A,serverName:q}=this.context;this.refreshClients();let K=[];for(let z of this.clients.values())if(!z.isConnected())K.push(z.ensureConnected().catch(()=>!1));if(K.length>0)await Promise.all(K);let Y=this.getConnectedClients().length;if(Y===0)return A.info(`[${q}] No connected sockets in pool`),!1;return A.info(`[${q}] Socket pool: ${Y} connected`),!0}async callTool(A,q,K){if(A==="tabs_context_mcp")return this.callTabsContext(q);let Y=q.tabId;if(Y!==void 0){let w=this.tabRoutes.get(Y);if(w){let _=this.clients.get(w);if(_?.isConnected())return _.callTool(A,q)}}let z=this.getConnectedClients();if(z.length===0)throw new Vf(`[${this.context.serverName}] No connected sockets available`);return z[0].callTool(A,q)}async setPermissionMode(A,q){let K=this.getConnectedClients();await Promise.all(K.map((Y)=>Y.setPermissionMode(A,q)))}isConnected(){return this.getConnectedClients().length>0}disconnect(){for(let A of this.clients.values())A.disconnect();this.clients.clear(),this.tabRoutes.clear()}getConnectedClients(){return[...this.clients.values()].filter((A)=>A.isConnected())}async callTabsContext(A){let{logger:q,serverName:K}=this.context,Y=this.getConnectedClients();if(Y.length===0)throw new Vf(`[${K}] No connected sockets available`);if(Y.length===1){let _=await Y[0].callTool("tabs_context_mcp",A);return this.updateTabRoutes(_,this.getSocketPathForClient(Y[0])),_}let z=await Promise.allSettled(Y.map(async(_)=>{let $=await _.callTool("tabs_context_mcp",A),O=this.getSocketPathForClient(_);return{result:$,socketPath:O}})),w=[];this.tabRoutes.clear();for(let _ of z){if(_.status!=="fulfilled"){q.info(`[${K}] tabs_context_mcp failed on one socket: ${_.reason}`);continue}let{result:$,socketPath:O}=_.value;this.updateTabRoutes($,O);let H=this.extractTabs($);if(H)w.push(...H)}if(w.length>0){let _=w.map(($)=>{let O=$;return`  • tabId ${O.tabId}: "${O.title}" (${O.url})`}).join(`
`);return{result:{content:[{type:"text",text:JSON.stringify({availableTabs:w})},{type:"text",text:`

Tab Context:
- Available tabs:
${_}`}]}}}for(let _ of z)if(_.status==="fulfilled")return _.value.result;throw new Vf(`[${K}] All sockets failed for tabs_context_mcp`)}updateTabRoutes(A,q){let K=this.extractTabs(A);if(!K)return;for(let Y of K)if(typeof Y==="object"&&Y!==null&&"tabId"in Y){let z=Y.tabId;this.tabRoutes.set(z,q)}}extractTabs(A){if(!A||typeof A!=="object")return null;let K=A.result?.content;if(!K||!Array.isArray(K))return null;for(let Y of K)if(Y.type==="text"&&Y.text)try{let z=JSON.parse(Y.text);if(Array.isArray(z))return z;if(z&&Array.isArray(z.availableTabs))return z.availableTabs}catch{}return null}getSocketPathForClient(A){for(let[q,K]of this.clients.entries())if(K===A)return q;return""}refreshClients(){let A=this.getAvailableSocketPaths(),{logger:q,serverName:K}=this.context;for(let Y of A)if(!this.clients.has(Y)){q.info(`[${K}] Adding socket to pool: ${Y}`);let z={...this.context,socketPath:Y,getSocketPath:void 0,getSocketPaths:void 0},w=w71(z);if(w.disableAutoReconnect=!0,this.notificationHandler)w.setNotificationHandler(this.notificationHandler);this.clients.set(Y,w)}for(let[Y,z]of this.clients.entries())if(!A.includes(Y)){q.info(`[${K}] Removing stale socket from pool: ${Y}`),z.disconnect(),this.clients.delete(Y);for(let[w,_]of this.tabRoutes.entries())if(_===Y)this.tabRoutes.delete(w)}}getAvailableSocketPaths(){return this.context.getSocketPaths?.()??[]}}function c$A(A){return new d$A(A)}var l$A=k(()=>{iS6()});async function GJK(A,q,K,Y,z){let w=await q.callTool(K,Y,z);if(A.logger.silly(`[${A.serverName}] Received result from socket bridge: ${JSON.stringify(w)}`),w===null||w===void 0)return{content:[{type:"text",text:"Tool execution completed"}]};let{result:_,error:$}=w,O=$||_,H=!!$;if(!O)return{content:[{type:"text",text:"Tool execution completed"}]};if(H&&VJK(O.content))A.onAuthenticationError();let{content:j}=O;if(j&&Array.isArray(j)){if(H)return{content:j.map((M)=>{if(typeof M==="object"&&M!==null&&"type"in M)return M;return{type:"text",text:String(M)}}),isError:!0};return{content:j.map((M)=>{if(typeof M==="object"&&M!==null&&"type"in M&&"source"in M){let D=M;if(D.type==="image"&&typeof D.source==="object"&&D.source!==null&&"data"in D.source)return{type:"image",data:D.source.data,mimeType:"media_type"in D.source?D.source.media_type||"image/png":"image/png"}}if(typeof M==="object"&&M!==null&&"type"in M)return M;return{type:"text",text:String(M)}}),isError:H}}if(typeof j==="string")return{content:[{type:"text",text:j}],isError:H};return A.logger.warn(`[${A.serverName}] Unexpected result format from socket bridge`,w),{content:[{type:"text",text:JSON.stringify(w)}],isError:H}}function mi1(A){return{content:[{type:"text",text:A.onToolCallDisconnected()}]}}async function fJK(A,q){let K=["ask","skip_all_permission_checks","follow_a_plan"],Y=q.mode,z=Y&&K.includes(Y)?Y:"ask";if(A.setPermissionMode)await A.setPermissionMode(z,q.allowed_domains);return{content:[{type:"text",text:`Permission mode set to: ${z}`}]}}async function TJK(A,q){if(!A.bridgeConfig)return{content:[{type:"text",text:"Browser switching is only available with bridge connections."}],isError:!0};if(!await q.ensureConnected())return mi1(A);let Y=await q.switchBrowser?.()??null;if(Y==="no_other_browsers")return{content:[{type:"text",text:"No other browsers available to switch to. Open Chrome with the Claude extension in another browser to switch."}],isError:!0};if(Y)return{content:[{type:"text",text:`Connected to browser "${Y.name}".`}]};return{content:[{type:"text",text:"No browser responded within the timeout. Make sure Chrome is open with the Claude extension installed, then try again."}],isError:!0}}function VJK(A){return(Array.isArray(A)?A.map((K)=>{if(typeof K==="string")return K;if(typeof K==="object"&&K!==null&&"text"in K&&typeof K.text==="string")return K.text;return""}).join(" "):String(A)).toLowerCase().includes("re-authenticated")}var i$A=async(A,q,K,Y,z)=>{if(K==="set_permission_mode")return fJK(q,Y);if(K==="switch_browser")return TJK(A,q);try{let w=await q.ensureConnected();if(A.logger.silly(`[${A.serverName}] Server is connected: ${w}. Received tool call: ${K} with args: ${JSON.stringify(Y)}.`),w)return await GJK(A,q,K,Y,z);return mi1(A)}catch(w){if(A.logger.info(`[${A.serverName}] Error calling tool:`,w),w instanceof Vf)return mi1(A);return{content:[{type:"text",text:`Error calling tool, please try again. : ${w instanceof Error?w.message:String(w)}`}],isError:!0}}};var n$A=k(()=>{iS6()});function gi1(A){return A.bridgeConfig?O71(A):A.getSocketPaths?c$A(A):w71(A)}function $41(A,q){let{serverName:K,logger:Y}=A,z=q??gi1(A),w=new RC6({name:K,version:"1.0.0"},{capabilities:{tools:{},logging:{}}});return w.setRequestHandler(CS6,async()=>{if(A.isDisabled?.())return{tools:[]};return{tools:A.bridgeConfig?ip:ip.filter((_)=>_.name!=="switch_browser")}}),w.setRequestHandler(s46,async(_)=>{return Y.info(`[${K}] Executing tool: ${_.params.name}`),i$A(A,z,_.params.name,_.params.arguments||{})}),z.setNotificationHandler((_)=>{Y.info(`[${K}] Forwarding MCP notification: ${_.method}`),w.notification({method:_.method,params:_.params}).catch(($)=>{Y.info(`[${K}] Failed to forward MCP notification: ${$.message}`)})}),w}var r$A=k(()=>{Bi1();uX();ec1();Al1();iS6();l$A();n$A()});var o$A={};m1(o$A,{localPlatformLabel:()=>_71,createClaudeForChromeMcpServer:()=>$41,createChromeSocketClient:()=>gi1,createBridgeClient:()=>O71,BridgeClient:()=>$71,BROWSER_TOOLS:()=>ip});var SC6=k(()=>{ec1();Al1();r$A()});var j2=C((a$A)=>{Object.defineProperty(a$A,"__esModule",{value:!0});a$A.isFunction=void 0;function NJK(A){return typeof A==="function"}a$A.isFunction=NJK});var Ja=C((t$A)=>{Object.defineProperty(t$A,"__esModule",{value:!0});t$A.createErrorClass=void 0;function vJK(A){var q=function(Y){Error.call(Y),Y.stack=Error().stack},K=A(q);return K.prototype=Object.create(Error.prototype),K.prototype.constructor=K,K}t$A.createErrorClass=vJK});var Fi1=C((AOA)=>{Object.defineProperty(AOA,"__esModule",{value:!0});AOA.UnsubscriptionError=void 0;var kJK=Ja();AOA.UnsubscriptionError=kJK.createErrorClass(function(A){return function(K){A(this),this.message=K?K.length+` errors occurred during unsubscription:
`+K.map(function(Y,z){return z+1+") "+Y.toString()}).join(`
  `):"",this.name="UnsubscriptionError",this.errors=K}})});var Kd=C((KOA)=>{Object.defineProperty(KOA,"__esModule",{value:!0});KOA.arrRemove=void 0;function EJK(A,q){if(A){var K=A.indexOf(q);0<=K&&A.splice(K,1)}}KOA.arrRemove=EJK});var xk=C((xV)=>{var zOA=xV&&xV.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")},wOA=xV&&xV.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},_OA=xV&&xV.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(xV,"__esModule",{value:!0});xV.isSubscription=xV.EMPTY_SUBSCRIPTION=xV.Subscription=void 0;var CC6=j2(),Qi1=Fi1(),$OA=Kd(),Ui1=function(){function A(q){this.initialTeardown=q,this.closed=!1,this._parentage=null,this._finalizers=null}return A.prototype.unsubscribe=function(){var q,K,Y,z,w;if(!this.closed){this.closed=!0;var _=this._parentage;if(_)if(this._parentage=null,Array.isArray(_))try{for(var $=zOA(_),O=$.next();!O.done;O=$.next()){var H=O.value;H.remove(this)}}catch(P){q={error:P}}finally{try{if(O&&!O.done&&(K=$.return))K.call($)}finally{if(q)throw q.error}}else _.remove(this);var j=this.initialTeardown;if(CC6.isFunction(j))try{j()}catch(P){w=P instanceof Qi1.UnsubscriptionError?P.errors:[P]}var J=this._finalizers;if(J){this._finalizers=null;try{for(var M=zOA(J),D=M.next();!D.done;D=M.next()){var X=D.value;try{OOA(X)}catch(P){if(w=w!==null&&w!==void 0?w:[],P instanceof Qi1.UnsubscriptionError)w=_OA(_OA([],wOA(w)),wOA(P.errors));else w.push(P)}}}catch(P){Y={error:P}}finally{try{if(D&&!D.done&&(z=M.return))z.call(M)}finally{if(Y)throw Y.error}}}if(w)throw new Qi1.UnsubscriptionError(w)}},A.prototype.add=function(q){var K;if(q&&q!==this)if(this.closed)OOA(q);else{if(q instanceof A){if(q.closed||q._hasParent(this))return;q._addParent(this)}(this._finalizers=(K=this._finalizers)!==null&&K!==void 0?K:[]).push(q)}},A.prototype._hasParent=function(q){var K=this._parentage;return K===q||Array.isArray(K)&&K.includes(q)},A.prototype._addParent=function(q){var K=this._parentage;this._parentage=Array.isArray(K)?(K.push(q),K):K?[K,q]:q},A.prototype._removeParent=function(q){var K=this._parentage;if(K===q)this._parentage=null;else if(Array.isArray(K))$OA.arrRemove(K,q)},A.prototype.remove=function(q){var K=this._finalizers;if(K&&$OA.arrRemove(K,q),q instanceof A)q._removeParent(this)},A.EMPTY=function(){var q=new A;return q.closed=!0,q}(),A}();xV.Subscription=Ui1;xV.EMPTY_SUBSCRIPTION=Ui1.EMPTY;function LJK(A){return A instanceof Ui1||A&&"closed"in A&&CC6.isFunction(A.remove)&&CC6.isFunction(A.add)&&CC6.isFunction(A.unsubscribe)}xV.isSubscription=LJK;function OOA(A){if(CC6.isFunction(A))A();else A.unsubscribe()}});var uj6=C((HOA)=>{Object.defineProperty(HOA,"__esModule",{value:!0});HOA.config=void 0;HOA.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var pi1=C((iB)=>{var JOA=iB&&iB.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},MOA=iB&&iB.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(iB,"__esModule",{value:!0});iB.timeoutProvider=void 0;iB.timeoutProvider={setTimeout:function(A,q){var K=[];for(var Y=2;Y<arguments.length;Y++)K[Y-2]=arguments[Y];var z=iB.timeoutProvider.delegate;if(z===null||z===void 0?void 0:z.setTimeout)return z.setTimeout.apply(z,MOA([A,q],JOA(K)));return setTimeout.apply(void 0,MOA([A,q],JOA(K)))},clearTimeout:function(A){var q=iB.timeoutProvider.delegate;return((q===null||q===void 0?void 0:q.clearTimeout)||clearTimeout)(A)},delegate:void 0}});var di1=C((DOA)=>{Object.defineProperty(DOA,"__esModule",{value:!0});DOA.reportUnhandledError=void 0;var yJK=uj6(),RJK=pi1();function SJK(A){RJK.timeoutProvider.setTimeout(function(){var q=yJK.config.onUnhandledError;if(q)q(A);else throw A})}DOA.reportUnhandledError=SJK});var P0=C((POA)=>{Object.defineProperty(POA,"__esModule",{value:!0});POA.noop=void 0;function CJK(){}POA.noop=CJK});var fOA=C((ZOA)=>{Object.defineProperty(ZOA,"__esModule",{value:!0});ZOA.createNotification=ZOA.nextNotification=ZOA.errorNotification=ZOA.COMPLETE_NOTIFICATION=void 0;ZOA.COMPLETE_NOTIFICATION=function(){return O41("C",void 0,void 0)}();function hJK(A){return O41("E",void 0,A)}ZOA.errorNotification=hJK;function IJK(A){return O41("N",A,void 0)}ZOA.nextNotification=IJK;function O41(A,q,K){return{kind:A,value:q,error:K}}ZOA.createNotification=O41});var H41=C((VOA)=>{Object.defineProperty(VOA,"__esModule",{value:!0});VOA.captureError=VOA.errorContext=void 0;var TOA=uj6(),Pq6=null;function BJK(A){if(TOA.config.useDeprecatedSynchronousErrorHandling){var q=!Pq6;if(q)Pq6={errorThrown:!1,error:null};if(A(),q){var K=Pq6,Y=K.errorThrown,z=K.error;if(Pq6=null,Y)throw z}}else A()}VOA.errorContext=BJK;function mJK(A){if(TOA.config.useDeprecatedSynchronousErrorHandling&&Pq6)Pq6.errorThrown=!0,Pq6.error=A}VOA.captureError=mJK});var Bj6=C((WI)=>{var EOA=WI&&WI.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(WI,"__esModule",{value:!0});WI.EMPTY_OBSERVER=WI.SafeSubscriber=WI.Subscriber=void 0;var FJK=j2(),vOA=xk(),ni1=uj6(),QJK=di1(),kOA=P0(),ci1=fOA(),UJK=pi1(),pJK=H41(),LOA=function(A){EOA(q,A);function q(K){var Y=A.call(this)||this;if(Y.isStopped=!1,K){if(Y.destination=K,vOA.isSubscription(K))K.add(Y)}else Y.destination=WI.EMPTY_OBSERVER;return Y}return q.create=function(K,Y,z){return new yOA(K,Y,z)},q.prototype.next=function(K){if(this.isStopped)ii1(ci1.nextNotification(K),this);else this._next(K)},q.prototype.error=function(K){if(this.isStopped)ii1(ci1.errorNotification(K),this);else this.isStopped=!0,this._error(K)},q.prototype.complete=function(){if(this.isStopped)ii1(ci1.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},q.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,A.prototype.unsubscribe.call(this),this.destination=null},q.prototype._next=function(K){this.destination.next(K)},q.prototype._error=function(K){try{this.destination.error(K)}finally{this.unsubscribe()}},q.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},q}(vOA.Subscription);WI.Subscriber=LOA;var dJK=Function.prototype.bind;function li1(A,q){return dJK.call(A,q)}var cJK=function(){function A(q){this.partialObserver=q}return A.prototype.next=function(q){var K=this.partialObserver;if(K.next)try{K.next(q)}catch(Y){j41(Y)}},A.prototype.error=function(q){var K=this.partialObserver;if(K.error)try{K.error(q)}catch(Y){j41(Y)}else j41(q)},A.prototype.complete=function(){var q=this.partialObserver;if(q.complete)try{q.complete()}catch(K){j41(K)}},A}(),yOA=function(A){EOA(q,A);function q(K,Y,z){var w=A.call(this)||this,_;if(FJK.isFunction(K)||!K)_={next:K!==null&&K!==void 0?K:void 0,error:Y!==null&&Y!==void 0?Y:void 0,complete:z!==null&&z!==void 0?z:void 0};else{var $;if(w&&ni1.config.useDeprecatedNextContext)$=Object.create(K),$.unsubscribe=function(){return w.unsubscribe()},_={next:K.next&&li1(K.next,$),error:K.error&&li1(K.error,$),complete:K.complete&&li1(K.complete,$)};else _=K}return w.destination=new cJK(_),w}return q}(LOA);WI.SafeSubscriber=yOA;function j41(A){if(ni1.config.useDeprecatedSynchronousErrorHandling)pJK.captureError(A);else QJK.reportUnhandledError(A)}function lJK(A){throw A}function ii1(A,q){var K=ni1.config.onStoppedNotification;K&&UJK.timeoutProvider.setTimeout(function(){return K(A,q)})}WI.EMPTY_OBSERVER={closed:!0,next:kOA.noop,error:lJK,complete:kOA.noop}});var hC6=C((ROA)=>{Object.defineProperty(ROA,"__esModule",{value:!0});ROA.observable=void 0;ROA.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var W0=C((COA)=>{Object.defineProperty(COA,"__esModule",{value:!0});COA.identity=void 0;function iJK(A){return A}COA.identity=iJK});var IC6=C((bOA)=>{Object.defineProperty(bOA,"__esModule",{value:!0});bOA.pipeFromArray=bOA.pipe=void 0;var nJK=W0();function rJK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return IOA(A)}bOA.pipe=rJK;function IOA(A){if(A.length===0)return nJK.identity;if(A.length===1)return A[0];return function(K){return A.reduce(function(Y,z){return z(Y)},K)}}bOA.pipeFromArray=IOA});var g2=C((BOA)=>{Object.defineProperty(BOA,"__esModule",{value:!0});BOA.Observable=void 0;var oi1=Bj6(),aJK=xk(),sJK=hC6(),tJK=IC6(),eJK=uj6(),ri1=j2(),AMK=H41(),qMK=function(){function A(q){if(q)this._subscribe=q}return A.prototype.lift=function(q){var K=new A;return K.source=this,K.operator=q,K},A.prototype.subscribe=function(q,K,Y){var z=this,w=YMK(q)?q:new oi1.SafeSubscriber(q,K,Y);return AMK.errorContext(function(){var _=z,$=_.operator,O=_.source;w.add($?$.call(w,O):O?z._subscribe(w):z._trySubscribe(w))}),w},A.prototype._trySubscribe=function(q){try{return this._subscribe(q)}catch(K){q.error(K)}},A.prototype.forEach=function(q,K){var Y=this;return K=uOA(K),new K(function(z,w){var _=new oi1.SafeSubscriber({next:function($){try{q($)}catch(O){w(O),_.unsubscribe()}},error:w,complete:z});Y.subscribe(_)})},A.prototype._subscribe=function(q){var K;return(K=this.source)===null||K===void 0?void 0:K.subscribe(q)},A.prototype[sJK.observable]=function(){return this},A.prototype.pipe=function(){var q=[];for(var K=0;K<arguments.length;K++)q[K]=arguments[K];return tJK.pipeFromArray(q)(this)},A.prototype.toPromise=function(q){var K=this;return q=uOA(q),new q(function(Y,z){var w;K.subscribe(function(_){return w=_},function(_){return z(_)},function(){return Y(w)})})},A.create=function(q){return new A(q)},A}();BOA.Observable=qMK;function uOA(A){var q;return(q=A!==null&&A!==void 0?A:eJK.config.Promise)!==null&&q!==void 0?q:Promise}function KMK(A){return A&&ri1.isFunction(A.next)&&ri1.isFunction(A.error)&&ri1.isFunction(A.complete)}function YMK(A){return A&&A instanceof oi1.Subscriber||KMK(A)&&aJK.isSubscription(A)}});var L4=C((FOA)=>{Object.defineProperty(FOA,"__esModule",{value:!0});FOA.operate=FOA.hasLift=void 0;var zMK=j2();function gOA(A){return zMK.isFunction(A===null||A===void 0?void 0:A.lift)}FOA.hasLift=gOA;function wMK(A){return function(q){if(gOA(q))return q.lift(function(K){try{return A(K,this)}catch(Y){this.error(Y)}});throw TypeError("Unable to lift unknown Observable type")}}FOA.operate=wMK});var bq=C((Ma)=>{var $MK=Ma&&Ma.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.OperatorSubscriber=Ma.createOperatorSubscriber=void 0;var OMK=Bj6();function HMK(A,q,K,Y,z){return new UOA(A,q,K,Y,z)}Ma.createOperatorSubscriber=HMK;var UOA=function(A){$MK(q,A);function q(K,Y,z,w,_,$){var O=A.call(this,K)||this;return O.onFinalize=_,O.shouldUnsubscribe=$,O._next=Y?function(H){try{Y(H)}catch(j){K.error(j)}}:A.prototype._next,O._error=w?function(H){try{w(H)}catch(j){K.error(j)}finally{this.unsubscribe()}}:A.prototype._error,O._complete=z?function(){try{z()}catch(H){K.error(H)}finally{this.unsubscribe()}}:A.prototype._complete,O}return q.prototype.unsubscribe=function(){var K;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var Y=this.closed;A.prototype.unsubscribe.call(this),!Y&&((K=this.onFinalize)===null||K===void 0||K.call(this))}},q}(OMK.Subscriber);Ma.OperatorSubscriber=UOA});var J41=C((pOA)=>{Object.defineProperty(pOA,"__esModule",{value:!0});pOA.refCount=void 0;var jMK=L4(),JMK=bq();function MMK(){return jMK.operate(function(A,q){var K=null;A._refCount++;var Y=JMK.createOperatorSubscriber(q,void 0,void 0,void 0,function(){if(!A||A._refCount<=0||0<--A._refCount){K=null;return}var z=A._connection,w=K;if(K=null,z&&(!w||z===w))z.unsubscribe();q.unsubscribe()});if(A.subscribe(Y),!Y.closed)K=A.connect()})}pOA.refCount=MMK});var bC6=C((mj6)=>{var DMK=mj6&&mj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(mj6,"__esModule",{value:!0});mj6.ConnectableObservable=void 0;var XMK=g2(),cOA=xk(),PMK=J41(),WMK=bq(),ZMK=L4(),GMK=function(A){DMK(q,A);function q(K,Y){var z=A.call(this)||this;if(z.source=K,z.subjectFactory=Y,z._subject=null,z._refCount=0,z._connection=null,ZMK.hasLift(K))z.lift=K.lift;return z}return q.prototype._subscribe=function(K){return this.getSubject().subscribe(K)},q.prototype.getSubject=function(){var K=this._subject;if(!K||K.isStopped)this._subject=this.subjectFactory();return this._subject},q.prototype._teardown=function(){this._refCount=0;var K=this._connection;this._subject=this._connection=null,K===null||K===void 0||K.unsubscribe()},q.prototype.connect=function(){var K=this,Y=this._connection;if(!Y){Y=this._connection=new cOA.Subscription;var z=this.getSubject();if(Y.add(this.source.subscribe(WMK.createOperatorSubscriber(z,void 0,function(){K._teardown(),z.complete()},function(w){K._teardown(),z.error(w)},function(){return K._teardown()}))),Y.closed)this._connection=null,Y=cOA.Subscription.EMPTY}return Y},q.prototype.refCount=function(){return PMK.refCount()(this)},q}(XMK.Observable);mj6.ConnectableObservable=GMK});var iOA=C((lOA)=>{Object.defineProperty(lOA,"__esModule",{value:!0});lOA.performanceTimestampProvider=void 0;lOA.performanceTimestampProvider={now:function(){return(lOA.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var si1=C((ZI)=>{var nOA=ZI&&ZI.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},rOA=ZI&&ZI.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(ZI,"__esModule",{value:!0});ZI.animationFrameProvider=void 0;var fMK=xk();ZI.animationFrameProvider={schedule:function(A){var q=requestAnimationFrame,K=cancelAnimationFrame,Y=ZI.animationFrameProvider.delegate;if(Y)q=Y.requestAnimationFrame,K=Y.cancelAnimationFrame;var z=q(function(w){K=void 0,A(w)});return new fMK.Subscription(function(){return K===null||K===void 0?void 0:K(z)})},requestAnimationFrame:function(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=ZI.animationFrameProvider.delegate;return((K===null||K===void 0?void 0:K.requestAnimationFrame)||requestAnimationFrame).apply(void 0,rOA([],nOA(A)))},cancelAnimationFrame:function(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=ZI.animationFrameProvider.delegate;return((K===null||K===void 0?void 0:K.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,rOA([],nOA(A)))},delegate:void 0}});var eOA=C((sOA)=>{Object.defineProperty(sOA,"__esModule",{value:!0});sOA.animationFrames=void 0;var TMK=g2(),VMK=iOA(),oOA=si1();function NMK(A){return A?aOA(A):vMK}sOA.animationFrames=NMK;function aOA(A){return new TMK.Observable(function(q){var K=A||VMK.performanceTimestampProvider,Y=K.now(),z=0,w=function(){if(!q.closed)z=oOA.animationFrameProvider.requestAnimationFrame(function(_){z=0;var $=K.now();q.next({timestamp:A?$:_,elapsed:$-Y}),w()})};return w(),function(){if(z)oOA.animationFrameProvider.cancelAnimationFrame(z)}})}var vMK=aOA()});var ti1=C((AHA)=>{Object.defineProperty(AHA,"__esModule",{value:!0});AHA.ObjectUnsubscribedError=void 0;var kMK=Ja();AHA.ObjectUnsubscribedError=kMK.createErrorClass(function(A){return function(){A(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var Z0=C((nB)=>{var YHA=nB&&nB.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}(),EMK=nB&&nB.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(nB,"__esModule",{value:!0});nB.AnonymousSubject=nB.Subject=void 0;var KHA=g2(),An1=xk(),LMK=ti1(),yMK=Kd(),ei1=H41(),zHA=function(A){YHA(q,A);function q(){var K=A.call(this)||this;return K.closed=!1,K.currentObservers=null,K.observers=[],K.isStopped=!1,K.hasError=!1,K.thrownError=null,K}return q.prototype.lift=function(K){var Y=new qn1(this,this);return Y.operator=K,Y},q.prototype._throwIfClosed=function(){if(this.closed)throw new LMK.ObjectUnsubscribedError},q.prototype.next=function(K){var Y=this;ei1.errorContext(function(){var z,w;if(Y._throwIfClosed(),!Y.isStopped){if(!Y.currentObservers)Y.currentObservers=Array.from(Y.observers);try{for(var _=EMK(Y.currentObservers),$=_.next();!$.done;$=_.next()){var O=$.value;O.next(K)}}catch(H){z={error:H}}finally{try{if($&&!$.done&&(w=_.return))w.call(_)}finally{if(z)throw z.error}}}})},q.prototype.error=function(K){var Y=this;ei1.errorContext(function(){if(Y._throwIfClosed(),!Y.isStopped){Y.hasError=Y.isStopped=!0,Y.thrownError=K;var z=Y.observers;while(z.length)z.shift().error(K)}})},q.prototype.complete=function(){var K=this;ei1.errorContext(function(){if(K._throwIfClosed(),!K.isStopped){K.isStopped=!0;var Y=K.observers;while(Y.length)Y.shift().complete()}})},q.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(q.prototype,"observed",{get:function(){var K;return((K=this.observers)===null||K===void 0?void 0:K.length)>0},enumerable:!1,configurable:!0}),q.prototype._trySubscribe=function(K){return this._throwIfClosed(),A.prototype._trySubscribe.call(this,K)},q.prototype._subscribe=function(K){return this._throwIfClosed(),this._checkFinalizedStatuses(K),this._innerSubscribe(K)},q.prototype._innerSubscribe=function(K){var Y=this,z=this,w=z.hasError,_=z.isStopped,$=z.observers;if(w||_)return An1.EMPTY_SUBSCRIPTION;return this.currentObservers=null,$.push(K),new An1.Subscription(function(){Y.currentObservers=null,yMK.arrRemove($,K)})},q.prototype._checkFinalizedStatuses=function(K){var Y=this,z=Y.hasError,w=Y.thrownError,_=Y.isStopped;if(z)K.error(w);else if(_)K.complete()},q.prototype.asObservable=function(){var K=new KHA.Observable;return K.source=this,K},q.create=function(K,Y){return new qn1(K,Y)},q}(KHA.Observable);nB.Subject=zHA;var qn1=function(A){YHA(q,A);function q(K,Y){var z=A.call(this)||this;return z.destination=K,z.source=Y,z}return q.prototype.next=function(K){var Y,z;(z=(Y=this.destination)===null||Y===void 0?void 0:Y.next)===null||z===void 0||z.call(Y,K)},q.prototype.error=function(K){var Y,z;(z=(Y=this.destination)===null||Y===void 0?void 0:Y.error)===null||z===void 0||z.call(Y,K)},q.prototype.complete=function(){var K,Y;(Y=(K=this.destination)===null||K===void 0?void 0:K.complete)===null||Y===void 0||Y.call(K)},q.prototype._subscribe=function(K){var Y,z;return(z=(Y=this.source)===null||Y===void 0?void 0:Y.subscribe(K))!==null&&z!==void 0?z:An1.EMPTY_SUBSCRIPTION},q}(zHA);nB.AnonymousSubject=qn1});var Kn1=C((gj6)=>{var RMK=gj6&&gj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(gj6,"__esModule",{value:!0});gj6.BehaviorSubject=void 0;var SMK=Z0(),CMK=function(A){RMK(q,A);function q(K){var Y=A.call(this)||this;return Y._value=K,Y}return Object.defineProperty(q.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),q.prototype._subscribe=function(K){var Y=A.prototype._subscribe.call(this,K);return!Y.closed&&K.next(this._value),Y},q.prototype.getValue=function(){var K=this,Y=K.hasError,z=K.thrownError,w=K._value;if(Y)throw z;return this._throwIfClosed(),w},q.prototype.next=function(K){A.prototype.next.call(this,this._value=K)},q}(SMK.Subject);gj6.BehaviorSubject=CMK});var M41=C((wHA)=>{Object.defineProperty(wHA,"__esModule",{value:!0});wHA.dateTimestampProvider=void 0;wHA.dateTimestampProvider={now:function(){return(wHA.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var D41=C((Fj6)=>{var hMK=Fj6&&Fj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(Fj6,"__esModule",{value:!0});Fj6.ReplaySubject=void 0;var IMK=Z0(),bMK=M41(),xMK=function(A){hMK(q,A);function q(K,Y,z){if(K===void 0)K=1/0;if(Y===void 0)Y=1/0;if(z===void 0)z=bMK.dateTimestampProvider;var w=A.call(this)||this;return w._bufferSize=K,w._windowTime=Y,w._timestampProvider=z,w._buffer=[],w._infiniteTimeWindow=!0,w._infiniteTimeWindow=Y===1/0,w._bufferSize=Math.max(1,K),w._windowTime=Math.max(1,Y),w}return q.prototype.next=function(K){var Y=this,z=Y.isStopped,w=Y._buffer,_=Y._infiniteTimeWindow,$=Y._timestampProvider,O=Y._windowTime;if(!z)w.push(K),!_&&w.push($.now()+O);this._trimBuffer(),A.prototype.next.call(this,K)},q.prototype._subscribe=function(K){this._throwIfClosed(),this._trimBuffer();var Y=this._innerSubscribe(K),z=this,w=z._infiniteTimeWindow,_=z._buffer,$=_.slice();for(var O=0;O<$.length&&!K.closed;O+=w?1:2)K.next($[O]);return this._checkFinalizedStatuses(K),Y},q.prototype._trimBuffer=function(){var K=this,Y=K._bufferSize,z=K._timestampProvider,w=K._buffer,_=K._infiniteTimeWindow,$=(_?1:2)*Y;if(Y<1/0&&$<w.length&&w.splice(0,w.length-$),!_){var O=z.now(),H=0;for(var j=1;j<w.length&&w[j]<=O;j+=2)H=j;H&&w.splice(0,H+1)}},q}(IMK.Subject);Fj6.ReplaySubject=xMK});var X41=C((Qj6)=>{var uMK=Qj6&&Qj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(Qj6,"__esModule",{value:!0});Qj6.AsyncSubject=void 0;var BMK=Z0(),mMK=function(A){uMK(q,A);function q(){var K=A!==null&&A.apply(this,arguments)||this;return K._value=null,K._hasValue=!1,K._isComplete=!1,K}return q.prototype._checkFinalizedStatuses=function(K){var Y=this,z=Y.hasError,w=Y._hasValue,_=Y._value,$=Y.thrownError,O=Y.isStopped,H=Y._isComplete;if(z)K.error($);else if(O||H)w&&K.next(_),K.complete()},q.prototype.next=function(K){if(!this.isStopped)this._value=K,this._hasValue=!0},q.prototype.complete=function(){var K=this,Y=K._hasValue,z=K._value,w=K._isComplete;if(!w)this._isComplete=!0,Y&&A.prototype.next.call(this,z),A.prototype.complete.call(this)},q}(BMK.Subject);Qj6.AsyncSubject=mMK});var _HA=C((Uj6)=>{var gMK=Uj6&&Uj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(Uj6,"__esModule",{value:!0});Uj6.Action=void 0;var FMK=xk(),QMK=function(A){gMK(q,A);function q(K,Y){return A.call(this)||this}return q.prototype.schedule=function(K,Y){if(Y===void 0)Y=0;return this},q}(FMK.Subscription);Uj6.Action=QMK});var HHA=C((rB)=>{var $HA=rB&&rB.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},OHA=rB&&rB.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(rB,"__esModule",{value:!0});rB.intervalProvider=void 0;rB.intervalProvider={setInterval:function(A,q){var K=[];for(var Y=2;Y<arguments.length;Y++)K[Y-2]=arguments[Y];var z=rB.intervalProvider.delegate;if(z===null||z===void 0?void 0:z.setInterval)return z.setInterval.apply(z,OHA([A,q],$HA(K)));return setInterval.apply(void 0,OHA([A,q],$HA(K)))},clearInterval:function(A){var q=rB.intervalProvider.delegate;return((q===null||q===void 0?void 0:q.clearInterval)||clearInterval)(A)},delegate:void 0}});var dj6=C((pj6)=>{var UMK=pj6&&pj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(pj6,"__esModule",{value:!0});pj6.AsyncAction=void 0;var pMK=_HA(),jHA=HHA(),dMK=Kd(),cMK=function(A){UMK(q,A);function q(K,Y){var z=A.call(this,K,Y)||this;return z.scheduler=K,z.work=Y,z.pending=!1,z}return q.prototype.schedule=function(K,Y){var z;if(Y===void 0)Y=0;if(this.closed)return this;this.state=K;var w=this.id,_=this.scheduler;if(w!=null)this.id=this.recycleAsyncId(_,w,Y);return this.pending=!0,this.delay=Y,this.id=(z=this.id)!==null&&z!==void 0?z:this.requestAsyncId(_,this.id,Y),this},q.prototype.requestAsyncId=function(K,Y,z){if(z===void 0)z=0;return jHA.intervalProvider.setInterval(K.flush.bind(K,this),z)},q.prototype.recycleAsyncId=function(K,Y,z){if(z===void 0)z=0;if(z!=null&&this.delay===z&&this.pending===!1)return Y;if(Y!=null)jHA.intervalProvider.clearInterval(Y);return},q.prototype.execute=function(K,Y){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var z=this._execute(K,Y);if(z)return z;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},q.prototype._execute=function(K,Y){var z=!1,w;try{this.work(K)}catch(_){z=!0,w=_?_:Error("Scheduled action threw falsy error")}if(z)return this.unsubscribe(),w},q.prototype.unsubscribe=function(){if(!this.closed){var K=this,Y=K.id,z=K.scheduler,w=z.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,dMK.arrRemove(w,this),Y!=null)this.id=this.recycleAsyncId(z,Y,null);this.delay=null,A.prototype.unsubscribe.call(this)}},q}(pMK.Action);pj6.AsyncAction=cMK});var XHA=C((MHA)=>{Object.defineProperty(MHA,"__esModule",{value:!0});MHA.TestTools=MHA.Immediate=void 0;var lMK=1,zn1,P41={};function JHA(A){if(A in P41)return delete P41[A],!0;return!1}MHA.Immediate={setImmediate:function(A){var q=lMK++;if(P41[q]=!0,!zn1)zn1=Promise.resolve();return zn1.then(function(){return JHA(q)&&A()}),q},clearImmediate:function(A){JHA(A)}};MHA.TestTools={pending:function(){return Object.keys(P41).length}}});var WHA=C((oB)=>{var nMK=oB&&oB.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},rMK=oB&&oB.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(oB,"__esModule",{value:!0});oB.immediateProvider=void 0;var PHA=XHA(),oMK=PHA.Immediate.setImmediate,aMK=PHA.Immediate.clearImmediate;oB.immediateProvider={setImmediate:function(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=oB.immediateProvider.delegate;return((K===null||K===void 0?void 0:K.setImmediate)||oMK).apply(void 0,rMK([],nMK(A)))},clearImmediate:function(A){var q=oB.immediateProvider.delegate;return((q===null||q===void 0?void 0:q.clearImmediate)||aMK)(A)},delegate:void 0}});var GHA=C((cj6)=>{var sMK=cj6&&cj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(cj6,"__esModule",{value:!0});cj6.AsapAction=void 0;var tMK=dj6(),ZHA=WHA(),eMK=function(A){sMK(q,A);function q(K,Y){var z=A.call(this,K,Y)||this;return z.scheduler=K,z.work=Y,z}return q.prototype.requestAsyncId=function(K,Y,z){if(z===void 0)z=0;if(z!==null&&z>0)return A.prototype.requestAsyncId.call(this,K,Y,z);return K.actions.push(this),K._scheduled||(K._scheduled=ZHA.immediateProvider.setImmediate(K.flush.bind(K,void 0)))},q.prototype.recycleAsyncId=function(K,Y,z){var w;if(z===void 0)z=0;if(z!=null?z>0:this.delay>0)return A.prototype.recycleAsyncId.call(this,K,Y,z);var _=K.actions;if(Y!=null&&((w=_[_.length-1])===null||w===void 0?void 0:w.id)!==Y){if(ZHA.immediateProvider.clearImmediate(Y),K._scheduled===Y)K._scheduled=void 0}return},q}(tMK.AsyncAction);cj6.AsapAction=eMK});var wn1=C((fHA)=>{Object.defineProperty(fHA,"__esModule",{value:!0});fHA.Scheduler=void 0;var ADK=M41(),qDK=function(){function A(q,K){if(K===void 0)K=A.now;this.schedulerActionCtor=q,this.now=K}return A.prototype.schedule=function(q,K,Y){if(K===void 0)K=0;return new this.schedulerActionCtor(this,q).schedule(Y,K)},A.now=ADK.dateTimestampProvider.now,A}();fHA.Scheduler=qDK});var ij6=C((lj6)=>{var KDK=lj6&&lj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(lj6,"__esModule",{value:!0});lj6.AsyncScheduler=void 0;var VHA=wn1(),YDK=function(A){KDK(q,A);function q(K,Y){if(Y===void 0)Y=VHA.Scheduler.now;var z=A.call(this,K,Y)||this;return z.actions=[],z._active=!1,z}return q.prototype.flush=function(K){var Y=this.actions;if(this._active){Y.push(K);return}var z;this._active=!0;do if(z=K.execute(K.state,K.delay))break;while(K=Y.shift());if(this._active=!1,z){while(K=Y.shift())K.unsubscribe();throw z}},q}(VHA.Scheduler);lj6.AsyncScheduler=YDK});var NHA=C((nj6)=>{var zDK=nj6&&nj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(nj6,"__esModule",{value:!0});nj6.AsapScheduler=void 0;var wDK=ij6(),_DK=function(A){zDK(q,A);function q(){return A!==null&&A.apply(this,arguments)||this}return q.prototype.flush=function(K){this._active=!0;var Y=this._scheduled;this._scheduled=void 0;var z=this.actions,w;K=K||z.shift();do if(w=K.execute(K.state,K.delay))break;while((K=z[0])&&K.id===Y&&z.shift());if(this._active=!1,w){while((K=z[0])&&K.id===Y&&z.shift())K.unsubscribe();throw w}},q}(wDK.AsyncScheduler);nj6.AsapScheduler=_DK});var LHA=C((vHA)=>{Object.defineProperty(vHA,"__esModule",{value:!0});vHA.asap=vHA.asapScheduler=void 0;var $DK=GHA(),ODK=NHA();vHA.asapScheduler=new ODK.AsapScheduler($DK.AsapAction);vHA.asap=vHA.asapScheduler});var uV=C((yHA)=>{Object.defineProperty(yHA,"__esModule",{value:!0});yHA.async=yHA.asyncScheduler=void 0;var HDK=dj6(),jDK=ij6();yHA.asyncScheduler=new jDK.AsyncScheduler(HDK.AsyncAction);yHA.async=yHA.asyncScheduler});var CHA=C((rj6)=>{var JDK=rj6&&rj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(rj6,"__esModule",{value:!0});rj6.QueueAction=void 0;var MDK=dj6(),DDK=function(A){JDK(q,A);function q(K,Y){var z=A.call(this,K,Y)||this;return z.scheduler=K,z.work=Y,z}return q.prototype.schedule=function(K,Y){if(Y===void 0)Y=0;if(Y>0)return A.prototype.schedule.call(this,K,Y);return this.delay=Y,this.state=K,this.scheduler.flush(this),this},q.prototype.execute=function(K,Y){return Y>0||this.closed?A.prototype.execute.call(this,K,Y):this._execute(K,Y)},q.prototype.requestAsyncId=function(K,Y,z){if(z===void 0)z=0;if(z!=null&&z>0||z==null&&this.delay>0)return A.prototype.requestAsyncId.call(this,K,Y,z);return K.flush(this),0},q}(MDK.AsyncAction);rj6.QueueAction=DDK});var hHA=C((oj6)=>{var XDK=oj6&&oj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(oj6,"__esModule",{value:!0});oj6.QueueScheduler=void 0;var PDK=ij6(),WDK=function(A){XDK(q,A);function q(){return A!==null&&A.apply(this,arguments)||this}return q}(PDK.AsyncScheduler);oj6.QueueScheduler=WDK});var uHA=C((IHA)=>{Object.defineProperty(IHA,"__esModule",{value:!0});IHA.queue=IHA.queueScheduler=void 0;var ZDK=CHA(),GDK=hHA();IHA.queueScheduler=new GDK.QueueScheduler(ZDK.QueueAction);IHA.queue=IHA.queueScheduler});var mHA=C((aj6)=>{var fDK=aj6&&aj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(aj6,"__esModule",{value:!0});aj6.AnimationFrameAction=void 0;var TDK=dj6(),BHA=si1(),VDK=function(A){fDK(q,A);function q(K,Y){var z=A.call(this,K,Y)||this;return z.scheduler=K,z.work=Y,z}return q.prototype.requestAsyncId=function(K,Y,z){if(z===void 0)z=0;if(z!==null&&z>0)return A.prototype.requestAsyncId.call(this,K,Y,z);return K.actions.push(this),K._scheduled||(K._scheduled=BHA.animationFrameProvider.requestAnimationFrame(function(){return K.flush(void 0)}))},q.prototype.recycleAsyncId=function(K,Y,z){var w;if(z===void 0)z=0;if(z!=null?z>0:this.delay>0)return A.prototype.recycleAsyncId.call(this,K,Y,z);var _=K.actions;if(Y!=null&&Y===K._scheduled&&((w=_[_.length-1])===null||w===void 0?void 0:w.id)!==Y)BHA.animationFrameProvider.cancelAnimationFrame(Y),K._scheduled=void 0;return},q}(TDK.AsyncAction);aj6.AnimationFrameAction=VDK});var gHA=C((sj6)=>{var NDK=sj6&&sj6.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(sj6,"__esModule",{value:!0});sj6.AnimationFrameScheduler=void 0;var vDK=ij6(),kDK=function(A){NDK(q,A);function q(){return A!==null&&A.apply(this,arguments)||this}return q.prototype.flush=function(K){this._active=!0;var Y;if(K)Y=K.id;else Y=this._scheduled,this._scheduled=void 0;var z=this.actions,w;K=K||z.shift();do if(w=K.execute(K.state,K.delay))break;while((K=z[0])&&K.id===Y&&z.shift());if(this._active=!1,w){while((K=z[0])&&K.id===Y&&z.shift())K.unsubscribe();throw w}},q}(vDK.AsyncScheduler);sj6.AnimationFrameScheduler=kDK});var pHA=C((FHA)=>{Object.defineProperty(FHA,"__esModule",{value:!0});FHA.animationFrame=FHA.animationFrameScheduler=void 0;var EDK=mHA(),LDK=gHA();FHA.animationFrameScheduler=new LDK.AnimationFrameScheduler(EDK.AnimationFrameAction);FHA.animationFrame=FHA.animationFrameScheduler});var lHA=C((Da)=>{var dHA=Da&&Da.__extends||function(){var A=function(q,K){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,z){Y.__proto__=z}||function(Y,z){for(var w in z)if(Object.prototype.hasOwnProperty.call(z,w))Y[w]=z[w]},A(q,K)};return function(q,K){if(typeof K!=="function"&&K!==null)throw TypeError("Class extends value "+String(K)+" is not a constructor or null");A(q,K);function Y(){this.constructor=q}q.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}}();Object.defineProperty(Da,"__esModule",{value:!0});Da.VirtualAction=Da.VirtualTimeScheduler=void 0;var yDK=dj6(),RDK=xk(),SDK=ij6(),CDK=function(A){dHA(q,A);function q(K,Y){if(K===void 0)K=cHA;if(Y===void 0)Y=1/0;var z=A.call(this,K,function(){return z.frame})||this;return z.maxFrames=Y,z.frame=0,z.index=-1,z}return q.prototype.flush=function(){var K=this,Y=K.actions,z=K.maxFrames,w,_;while((_=Y[0])&&_.delay<=z)if(Y.shift(),this.frame=_.delay,w=_.execute(_.state,_.delay))break;if(w){while(_=Y.shift())_.unsubscribe();throw w}},q.frameTimeFactor=10,q}(SDK.AsyncScheduler);Da.VirtualTimeScheduler=CDK;var cHA=function(A){dHA(q,A);function q(K,Y,z){if(z===void 0)z=K.index+=1;var w=A.call(this,K,Y)||this;return w.scheduler=K,w.work=Y,w.index=z,w.active=!0,w.index=K.index=z,w}return q.prototype.schedule=function(K,Y){if(Y===void 0)Y=0;if(Number.isFinite(Y)){if(!this.id)return A.prototype.schedule.call(this,K,Y);this.active=!1;var z=new q(this.scheduler,this.work);return this.add(z),z.schedule(K,Y)}else return RDK.Subscription.EMPTY},q.prototype.requestAsyncId=function(K,Y,z){if(z===void 0)z=0;this.delay=K.frame+z;var w=K.actions;return w.push(this),w.sort(q.sortActions),1},q.prototype.recycleAsyncId=function(K,Y,z){if(z===void 0)z=0;return},q.prototype._execute=function(K,Y){if(this.active===!0)return A.prototype._execute.call(this,K,Y)},q.sortActions=function(K,Y){if(K.delay===Y.delay)if(K.index===Y.index)return 0;else if(K.index>Y.index)return 1;else return-1;else if(K.delay>Y.delay)return 1;else return-1},q}(yDK.AsyncAction);Da.VirtualAction=cHA});var GI=C((nHA)=>{Object.defineProperty(nHA,"__esModule",{value:!0});nHA.empty=nHA.EMPTY=void 0;var iHA=g2();nHA.EMPTY=new iHA.Observable(function(A){return A.complete()});function hDK(A){return A?IDK(A):nHA.EMPTY}nHA.empty=hDK;function IDK(A){return new iHA.Observable(function(q){return A.schedule(function(){return q.complete()})})}});var xC6=C((aHA)=>{Object.defineProperty(aHA,"__esModule",{value:!0});aHA.isScheduler=void 0;var bDK=j2();function xDK(A){return A&&bDK.isFunction(A.schedule)}aHA.isScheduler=xDK});var BV=C((tHA)=>{Object.defineProperty(tHA,"__esModule",{value:!0});tHA.popNumber=tHA.popScheduler=tHA.popResultSelector=void 0;var uDK=j2(),BDK=xC6();function _n1(A){return A[A.length-1]}function mDK(A){return uDK.isFunction(_n1(A))?A.pop():void 0}tHA.popResultSelector=mDK;function gDK(A){return BDK.isScheduler(_n1(A))?A.pop():void 0}tHA.popScheduler=gDK;function FDK(A,q){return typeof _n1(A)==="number"?A.pop():q}tHA.popNumber=FDK});var W41=C((AjA)=>{Object.defineProperty(AjA,"__esModule",{value:!0});AjA.isArrayLike=void 0;AjA.isArrayLike=function(A){return A&&typeof A.length==="number"&&typeof A!=="function"}});var $n1=C((KjA)=>{Object.defineProperty(KjA,"__esModule",{value:!0});KjA.isPromise=void 0;var pDK=j2();function dDK(A){return pDK.isFunction(A===null||A===void 0?void 0:A.then)}KjA.isPromise=dDK});var On1=C((zjA)=>{Object.defineProperty(zjA,"__esModule",{value:!0});zjA.isInteropObservable=void 0;var cDK=hC6(),lDK=j2();function iDK(A){return lDK.isFunction(A[cDK.observable])}zjA.isInteropObservable=iDK});var Hn1=C((_jA)=>{Object.defineProperty(_jA,"__esModule",{value:!0});_jA.isAsyncIterable=void 0;var nDK=j2();function rDK(A){return Symbol.asyncIterator&&nDK.isFunction(A===null||A===void 0?void 0:A[Symbol.asyncIterator])}_jA.isAsyncIterable=rDK});var jn1=C((OjA)=>{Object.defineProperty(OjA,"__esModule",{value:!0});OjA.createInvalidObservableTypeError=void 0;function oDK(A){return TypeError("You provided "+(A!==null&&typeof A==="object"?"an invalid object":"'"+A+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}OjA.createInvalidObservableTypeError=oDK});var Jn1=C((JjA)=>{Object.defineProperty(JjA,"__esModule",{value:!0});JjA.iterator=JjA.getSymbolIterator=void 0;function jjA(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}JjA.getSymbolIterator=jjA;JjA.iterator=jjA()});var Mn1=C((DjA)=>{Object.defineProperty(DjA,"__esModule",{value:!0});DjA.isIterable=void 0;var sDK=Jn1(),tDK=j2();function eDK(A){return tDK.isFunction(A===null||A===void 0?void 0:A[sDK.iterator])}DjA.isIterable=eDK});var Z41=C((Uy)=>{var AXK=Uy&&Uy.__generator||function(A,q){var K={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},Y,z,w,_;return _={next:$(0),throw:$(1),return:$(2)},typeof Symbol==="function"&&(_[Symbol.iterator]=function(){return this}),_;function $(H){return function(j){return O([H,j])}}function O(H){if(Y)throw TypeError("Generator is already executing.");while(K)try{if(Y=1,z&&(w=H[0]&2?z.return:H[0]?z.throw||((w=z.return)&&w.call(z),0):z.next)&&!(w=w.call(z,H[1])).done)return w;if(z=0,w)H=[H[0]&2,w.value];switch(H[0]){case 0:case 1:w=H;break;case 4:return K.label++,{value:H[1],done:!1};case 5:K.label++,z=H[1],H=[0];continue;case 7:H=K.ops.pop(),K.trys.pop();continue;default:if((w=K.trys,!(w=w.length>0&&w[w.length-1]))&&(H[0]===6||H[0]===2)){K=0;continue}if(H[0]===3&&(!w||H[1]>w[0]&&H[1]<w[3])){K.label=H[1];break}if(H[0]===6&&K.label<w[1]){K.label=w[1],w=H;break}if(w&&K.label<w[2]){K.label=w[2],K.ops.push(H);break}if(w[2])K.ops.pop();K.trys.pop();continue}H=q.call(A,K)}catch(j){H=[6,j],z=0}finally{Y=w=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},tj6=Uy&&Uy.__await||function(A){return this instanceof tj6?(this.v=A,this):new tj6(A)},qXK=Uy&&Uy.__asyncGenerator||function(A,q,K){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var Y=K.apply(A,q||[]),z,w=[];return z={},_("next"),_("throw"),_("return"),z[Symbol.asyncIterator]=function(){return this},z;function _(M){if(Y[M])z[M]=function(D){return new Promise(function(X,P){w.push([M,D,X,P])>1||$(M,D)})}}function $(M,D){try{O(Y[M](D))}catch(X){J(w[0][3],X)}}function O(M){M.value instanceof tj6?Promise.resolve(M.value.v).then(H,j):J(w[0][2],M)}function H(M){$("next",M)}function j(M){$("throw",M)}function J(M,D){if(M(D),w.shift(),w.length)$(w[0][0],w[0][1])}};Object.defineProperty(Uy,"__esModule",{value:!0});Uy.isReadableStreamLike=Uy.readableStreamLikeToAsyncGenerator=void 0;var KXK=j2();function YXK(A){return qXK(this,arguments,function(){var K,Y,z,w;return AXK(this,function(_){switch(_.label){case 0:K=A.getReader(),_.label=1;case 1:_.trys.push([1,,9,10]),_.label=2;case 2:return[4,tj6(K.read())];case 3:if(Y=_.sent(),z=Y.value,w=Y.done,!w)return[3,5];return[4,tj6(void 0)];case 4:return[2,_.sent()];case 5:return[4,tj6(z)];case 6:return[4,_.sent()];case 7:return _.sent(),[3,2];case 8:return[3,10];case 9:return K.releaseLock(),[7];case 10:return[2]}})})}Uy.readableStreamLikeToAsyncGenerator=YXK;function zXK(A){return KXK.isFunction(A===null||A===void 0?void 0:A.getReader)}Uy.isReadableStreamLike=zXK});var E5=C((xO)=>{var wXK=xO&&xO.__awaiter||function(A,q,K,Y){function z(w){return w instanceof K?w:new K(function(_){_(w)})}return new(K||(K=Promise))(function(w,_){function $(j){try{H(Y.next(j))}catch(J){_(J)}}function O(j){try{H(Y.throw(j))}catch(J){_(J)}}function H(j){j.done?w(j.value):z(j.value).then($,O)}H((Y=Y.apply(A,q||[])).next())})},_XK=xO&&xO.__generator||function(A,q){var K={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},Y,z,w,_;return _={next:$(0),throw:$(1),return:$(2)},typeof Symbol==="function"&&(_[Symbol.iterator]=function(){return this}),_;function $(H){return function(j){return O([H,j])}}function O(H){if(Y)throw TypeError("Generator is already executing.");while(K)try{if(Y=1,z&&(w=H[0]&2?z.return:H[0]?z.throw||((w=z.return)&&w.call(z),0):z.next)&&!(w=w.call(z,H[1])).done)return w;if(z=0,w)H=[H[0]&2,w.value];switch(H[0]){case 0:case 1:w=H;break;case 4:return K.label++,{value:H[1],done:!1};case 5:K.label++,z=H[1],H=[0];continue;case 7:H=K.ops.pop(),K.trys.pop();continue;default:if((w=K.trys,!(w=w.length>0&&w[w.length-1]))&&(H[0]===6||H[0]===2)){K=0;continue}if(H[0]===3&&(!w||H[1]>w[0]&&H[1]<w[3])){K.label=H[1];break}if(H[0]===6&&K.label<w[1]){K.label=w[1],w=H;break}if(w&&K.label<w[2]){K.label=w[2],K.ops.push(H);break}if(w[2])K.ops.pop();K.trys.pop();continue}H=q.call(A,K)}catch(j){H=[6,j],z=0}finally{Y=w=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},$XK=xO&&xO.__asyncValues||function(A){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var q=A[Symbol.asyncIterator],K;return q?q.call(A):(A=typeof Dn1==="function"?Dn1(A):A[Symbol.iterator](),K={},Y("next"),Y("throw"),Y("return"),K[Symbol.asyncIterator]=function(){return this},K);function Y(w){K[w]=A[w]&&function(_){return new Promise(function($,O){_=A[w](_),z($,O,_.done,_.value)})}}function z(w,_,$,O){Promise.resolve(O).then(function(H){w({value:H,done:$})},_)}},Dn1=xO&&xO.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xO,"__esModule",{value:!0});xO.fromReadableStreamLike=xO.fromAsyncIterable=xO.fromIterable=xO.fromPromise=xO.fromArrayLike=xO.fromInteropObservable=xO.innerFrom=void 0;var OXK=W41(),HXK=$n1(),ej6=g2(),jXK=On1(),JXK=Hn1(),MXK=jn1(),DXK=Mn1(),PjA=Z41(),XXK=j2(),PXK=di1(),WXK=hC6();function ZXK(A){if(A instanceof ej6.Observable)return A;if(A!=null){if(jXK.isInteropObservable(A))return WjA(A);if(OXK.isArrayLike(A))return ZjA(A);if(HXK.isPromise(A))return GjA(A);if(JXK.isAsyncIterable(A))return Xn1(A);if(DXK.isIterable(A))return fjA(A);if(PjA.isReadableStreamLike(A))return TjA(A)}throw MXK.createInvalidObservableTypeError(A)}xO.innerFrom=ZXK;function WjA(A){return new ej6.Observable(function(q){var K=A[WXK.observable]();if(XXK.isFunction(K.subscribe))return K.subscribe(q);throw TypeError("Provided object does not correctly implement Symbol.observable")})}xO.fromInteropObservable=WjA;function ZjA(A){return new ej6.Observable(function(q){for(var K=0;K<A.length&&!q.closed;K++)q.next(A[K]);q.complete()})}xO.fromArrayLike=ZjA;function GjA(A){return new ej6.Observable(function(q){A.then(function(K){if(!q.closed)q.next(K),q.complete()},function(K){return q.error(K)}).then(null,PXK.reportUnhandledError)})}xO.fromPromise=GjA;function fjA(A){return new ej6.Observable(function(q){var K,Y;try{for(var z=Dn1(A),w=z.next();!w.done;w=z.next()){var _=w.value;if(q.next(_),q.closed)return}}catch($){K={error:$}}finally{try{if(w&&!w.done&&(Y=z.return))Y.call(z)}finally{if(K)throw K.error}}q.complete()})}xO.fromIterable=fjA;function Xn1(A){return new ej6.Observable(function(q){GXK(A,q).catch(function(K){return q.error(K)})})}xO.fromAsyncIterable=Xn1;function TjA(A){return Xn1(PjA.readableStreamLikeToAsyncGenerator(A))}xO.fromReadableStreamLike=TjA;function GXK(A,q){var K,Y,z,w;return wXK(this,void 0,void 0,function(){var _,$;return _XK(this,function(O){switch(O.label){case 0:O.trys.push([0,5,6,11]),K=$XK(A),O.label=1;case 1:return[4,K.next()];case 2:if(Y=O.sent(),!!Y.done)return[3,4];if(_=Y.value,q.next(_),q.closed)return[2];O.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return $=O.sent(),z={error:$},[3,11];case 6:if(O.trys.push([6,,9,10]),!(Y&&!Y.done&&(w=K.return)))return[3,8];return[4,w.call(K)];case 7:O.sent(),O.label=8;case 8:return[3,10];case 9:if(z)throw z.error;return[7];case 10:return[7];case 11:return q.complete(),[2]}})})}});var Yd=C((VjA)=>{Object.defineProperty(VjA,"__esModule",{value:!0});VjA.executeSchedule=void 0;function fXK(A,q,K,Y,z){if(Y===void 0)Y=0;if(z===void 0)z=!1;var w=q.schedule(function(){if(K(),z)A.add(this.schedule(null,Y));else this.unsubscribe()},Y);if(A.add(w),!z)return w}VjA.executeSchedule=fXK});var AJ6=C((vjA)=>{Object.defineProperty(vjA,"__esModule",{value:!0});vjA.observeOn=void 0;var Pn1=Yd(),TXK=L4(),VXK=bq();function NXK(A,q){if(q===void 0)q=0;return TXK.operate(function(K,Y){K.subscribe(VXK.createOperatorSubscriber(Y,function(z){return Pn1.executeSchedule(Y,A,function(){return Y.next(z)},q)},function(){return Pn1.executeSchedule(Y,A,function(){return Y.complete()},q)},function(z){return Pn1.executeSchedule(Y,A,function(){return Y.error(z)},q)}))})}vjA.observeOn=NXK});var qJ6=C((EjA)=>{Object.defineProperty(EjA,"__esModule",{value:!0});EjA.subscribeOn=void 0;var vXK=L4();function kXK(A,q){if(q===void 0)q=0;return vXK.operate(function(K,Y){Y.add(A.schedule(function(){return K.subscribe(Y)},q))})}EjA.subscribeOn=kXK});var SjA=C((yjA)=>{Object.defineProperty(yjA,"__esModule",{value:!0});yjA.scheduleObservable=void 0;var EXK=E5(),LXK=AJ6(),yXK=qJ6();function RXK(A,q){return EXK.innerFrom(A).pipe(yXK.subscribeOn(q),LXK.observeOn(q))}yjA.scheduleObservable=RXK});var IjA=C((CjA)=>{Object.defineProperty(CjA,"__esModule",{value:!0});CjA.schedulePromise=void 0;var SXK=E5(),CXK=AJ6(),hXK=qJ6();function IXK(A,q){return SXK.innerFrom(A).pipe(hXK.subscribeOn(q),CXK.observeOn(q))}CjA.schedulePromise=IXK});var ujA=C((bjA)=>{Object.defineProperty(bjA,"__esModule",{value:!0});bjA.scheduleArray=void 0;var bXK=g2();function xXK(A,q){return new bXK.Observable(function(K){var Y=0;return q.schedule(function(){if(Y===A.length)K.complete();else if(K.next(A[Y++]),!K.closed)this.schedule()})})}bjA.scheduleArray=xXK});var Wn1=C((mjA)=>{Object.defineProperty(mjA,"__esModule",{value:!0});mjA.scheduleIterable=void 0;var uXK=g2(),BXK=Jn1(),mXK=j2(),BjA=Yd();function gXK(A,q){return new uXK.Observable(function(K){var Y;return BjA.executeSchedule(K,q,function(){Y=A[BXK.iterator](),BjA.executeSchedule(K,q,function(){var z,w,_;try{z=Y.next(),w=z.value,_=z.done}catch($){K.error($);return}if(_)K.complete();else K.next(w)},0,!0)}),function(){return mXK.isFunction(Y===null||Y===void 0?void 0:Y.return)&&Y.return()}})}mjA.scheduleIterable=gXK});var Zn1=C((QjA)=>{Object.defineProperty(QjA,"__esModule",{value:!0});QjA.scheduleAsyncIterable=void 0;var FXK=g2(),FjA=Yd();function QXK(A,q){if(!A)throw Error("Iterable cannot be null");return new FXK.Observable(function(K){FjA.executeSchedule(K,q,function(){var Y=A[Symbol.asyncIterator]();FjA.executeSchedule(K,q,function(){Y.next().then(function(z){if(z.done)K.complete();else K.next(z.value)})},0,!0)})})}QjA.scheduleAsyncIterable=QXK});var cjA=C((pjA)=>{Object.defineProperty(pjA,"__esModule",{value:!0});pjA.scheduleReadableStreamLike=void 0;var UXK=Zn1(),pXK=Z41();function dXK(A,q){return UXK.scheduleAsyncIterable(pXK.readableStreamLikeToAsyncGenerator(A),q)}pjA.scheduleReadableStreamLike=dXK});var Gn1=C((ljA)=>{Object.defineProperty(ljA,"__esModule",{value:!0});ljA.scheduled=void 0;var cXK=SjA(),lXK=IjA(),iXK=ujA(),nXK=Wn1(),rXK=Zn1(),oXK=On1(),aXK=$n1(),sXK=W41(),tXK=Mn1(),eXK=Hn1(),APK=jn1(),qPK=Z41(),KPK=cjA();function YPK(A,q){if(A!=null){if(oXK.isInteropObservable(A))return cXK.scheduleObservable(A,q);if(sXK.isArrayLike(A))return iXK.scheduleArray(A,q);if(aXK.isPromise(A))return lXK.schedulePromise(A,q);if(eXK.isAsyncIterable(A))return rXK.scheduleAsyncIterable(A,q);if(tXK.isIterable(A))return nXK.scheduleIterable(A,q);if(qPK.isReadableStreamLike(A))return KPK.scheduleReadableStreamLike(A,q)}throw APK.createInvalidObservableTypeError(A)}ljA.scheduled=YPK});var zd=C((njA)=>{Object.defineProperty(njA,"__esModule",{value:!0});njA.from=void 0;var zPK=Gn1(),wPK=E5();function _PK(A,q){return q?zPK.scheduled(A,q):wPK.innerFrom(A)}njA.from=_PK});var G41=C((ojA)=>{Object.defineProperty(ojA,"__esModule",{value:!0});ojA.of=void 0;var $PK=BV(),OPK=zd();function HPK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=$PK.popScheduler(A);return OPK.from(A,K)}ojA.of=HPK});var fn1=C((sjA)=>{Object.defineProperty(sjA,"__esModule",{value:!0});sjA.throwError=void 0;var jPK=g2(),JPK=j2();function MPK(A,q){var K=JPK.isFunction(A)?A:function(){return A},Y=function(z){return z.error(K())};return new jPK.Observable(q?function(z){return q.schedule(Y,0,z)}:Y)}sjA.throwError=MPK});var f41=C((qJA)=>{Object.defineProperty(qJA,"__esModule",{value:!0});qJA.observeNotification=qJA.Notification=qJA.NotificationKind=void 0;var DPK=GI(),XPK=G41(),PPK=fn1(),WPK=j2(),ZPK;(function(A){A.NEXT="N",A.ERROR="E",A.COMPLETE="C"})(ZPK=qJA.NotificationKind||(qJA.NotificationKind={}));var GPK=function(){function A(q,K,Y){this.kind=q,this.value=K,this.error=Y,this.hasValue=q==="N"}return A.prototype.observe=function(q){return AJA(this,q)},A.prototype.do=function(q,K,Y){var z=this,w=z.kind,_=z.value,$=z.error;return w==="N"?q===null||q===void 0?void 0:q(_):w==="E"?K===null||K===void 0?void 0:K($):Y===null||Y===void 0?void 0:Y()},A.prototype.accept=function(q,K,Y){var z;return WPK.isFunction((z=q)===null||z===void 0?void 0:z.next)?this.observe(q):this.do(q,K,Y)},A.prototype.toObservable=function(){var q=this,K=q.kind,Y=q.value,z=q.error,w=K==="N"?XPK.of(Y):K==="E"?PPK.throwError(function(){return z}):K==="C"?DPK.EMPTY:0;if(!w)throw TypeError("Unexpected notification kind "+K);return w},A.createNext=function(q){return new A("N",q)},A.createError=function(q){return new A("E",void 0,q)},A.createComplete=function(){return A.completeNotification},A.completeNotification=new A("C"),A}();qJA.Notification=GPK;function AJA(A,q){var K,Y,z,w=A,_=w.kind,$=w.value,O=w.error;if(typeof _!=="string")throw TypeError('Invalid notification, missing "kind"');_==="N"?(K=q.next)===null||K===void 0||K.call(q,$):_==="E"?(Y=q.error)===null||Y===void 0||Y.call(q,O):(z=q.complete)===null||z===void 0||z.call(q)}qJA.observeNotification=AJA});var _JA=C((zJA)=>{Object.defineProperty(zJA,"__esModule",{value:!0});zJA.isObservable=void 0;var TPK=g2(),YJA=j2();function VPK(A){return!!A&&(A instanceof TPK.Observable||YJA.isFunction(A.lift)&&YJA.isFunction(A.subscribe))}zJA.isObservable=VPK});var Xa=C(($JA)=>{Object.defineProperty($JA,"__esModule",{value:!0});$JA.EmptyError=void 0;var NPK=Ja();$JA.EmptyError=NPK.createErrorClass(function(A){return function(){A(this),this.name="EmptyError",this.message="no elements in sequence"}})});var JJA=C((HJA)=>{Object.defineProperty(HJA,"__esModule",{value:!0});HJA.lastValueFrom=void 0;var vPK=Xa();function kPK(A,q){var K=typeof q==="object";return new Promise(function(Y,z){var w=!1,_;A.subscribe({next:function($){_=$,w=!0},error:z,complete:function(){if(w)Y(_);else if(K)Y(q.defaultValue);else z(new vPK.EmptyError)}})})}HJA.lastValueFrom=kPK});var XJA=C((MJA)=>{Object.defineProperty(MJA,"__esModule",{value:!0});MJA.firstValueFrom=void 0;var EPK=Xa(),LPK=Bj6();function yPK(A,q){var K=typeof q==="object";return new Promise(function(Y,z){var w=new LPK.SafeSubscriber({next:function(_){Y(_),w.unsubscribe()},error:z,complete:function(){if(K)Y(q.defaultValue);else z(new EPK.EmptyError)}});A.subscribe(w)})}MJA.firstValueFrom=yPK});var Tn1=C((PJA)=>{Object.defineProperty(PJA,"__esModule",{value:!0});PJA.ArgumentOutOfRangeError=void 0;var RPK=Ja();PJA.ArgumentOutOfRangeError=RPK.createErrorClass(function(A){return function(){A(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Vn1=C((ZJA)=>{Object.defineProperty(ZJA,"__esModule",{value:!0});ZJA.NotFoundError=void 0;var SPK=Ja();ZJA.NotFoundError=SPK.createErrorClass(function(A){return function(K){A(this),this.name="NotFoundError",this.message=K}})});var Nn1=C((fJA)=>{Object.defineProperty(fJA,"__esModule",{value:!0});fJA.SequenceError=void 0;var CPK=Ja();fJA.SequenceError=CPK.createErrorClass(function(A){return function(K){A(this),this.name="SequenceError",this.message=K}})});var T41=C((VJA)=>{Object.defineProperty(VJA,"__esModule",{value:!0});VJA.isValidDate=void 0;function hPK(A){return A instanceof Date&&!isNaN(A)}VJA.isValidDate=hPK});var uC6=C((vJA)=>{Object.defineProperty(vJA,"__esModule",{value:!0});vJA.timeout=vJA.TimeoutError=void 0;var IPK=uV(),bPK=T41(),xPK=L4(),uPK=E5(),BPK=Ja(),mPK=bq(),gPK=Yd();vJA.TimeoutError=BPK.createErrorClass(function(A){return function(K){if(K===void 0)K=null;A(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=K}});function FPK(A,q){var K=bPK.isValidDate(A)?{first:A}:typeof A==="number"?{each:A}:A,Y=K.first,z=K.each,w=K.with,_=w===void 0?QPK:w,$=K.scheduler,O=$===void 0?q!==null&&q!==void 0?q:IPK.asyncScheduler:$,H=K.meta,j=H===void 0?null:H;if(Y==null&&z==null)throw TypeError("No timeout provided.");return xPK.operate(function(J,M){var D,X,P=null,W=0,Z=function(G){X=gPK.executeSchedule(M,O,function(){try{D.unsubscribe(),uPK.innerFrom(_({meta:j,lastValue:P,seen:W})).subscribe(M)}catch(f){M.error(f)}},G)};D=J.subscribe(mPK.createOperatorSubscriber(M,function(G){X===null||X===void 0||X.unsubscribe(),W++,M.next(P=G),z>0&&Z(z)},void 0,void 0,function(){if(!(X===null||X===void 0?void 0:X.closed))X===null||X===void 0||X.unsubscribe();P=null})),!W&&Z(Y!=null?typeof Y==="number"?Y:+Y-O.now():z)})}vJA.timeout=FPK;function QPK(A){throw new vJA.TimeoutError(A)}});var wd=C((LJA)=>{Object.defineProperty(LJA,"__esModule",{value:!0});LJA.map=void 0;var UPK=L4(),pPK=bq();function dPK(A,q){return UPK.operate(function(K,Y){var z=0;K.subscribe(pPK.createOperatorSubscriber(Y,function(w){Y.next(A.call(q,w,z++))}))})}LJA.map=dPK});var Wa=C((Pa)=>{var cPK=Pa&&Pa.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},lPK=Pa&&Pa.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.mapOneOrManyArgs=void 0;var iPK=wd(),nPK=Array.isArray;function rPK(A,q){return nPK(q)?A.apply(void 0,lPK([],cPK(q))):A(q)}function oPK(A){return iPK.map(function(q){return rPK(A,q)})}Pa.mapOneOrManyArgs=oPK});var kn1=C((Za)=>{var aPK=Za&&Za.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},RJA=Za&&Za.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Za,"__esModule",{value:!0});Za.bindCallbackInternals=void 0;var sPK=xC6(),tPK=g2(),ePK=qJ6(),A0K=Wa(),q0K=AJ6(),K0K=X41();function vn1(A,q,K,Y){if(K)if(sPK.isScheduler(K))Y=K;else return function(){var z=[];for(var w=0;w<arguments.length;w++)z[w]=arguments[w];return vn1(A,q,Y).apply(this,z).pipe(A0K.mapOneOrManyArgs(K))};if(Y)return function(){var z=[];for(var w=0;w<arguments.length;w++)z[w]=arguments[w];return vn1(A,q).apply(this,z).pipe(ePK.subscribeOn(Y),q0K.observeOn(Y))};return function(){var z=this,w=[];for(var _=0;_<arguments.length;_++)w[_]=arguments[_];var $=new K0K.AsyncSubject,O=!0;return new tPK.Observable(function(H){var j=$.subscribe(H);if(O){O=!1;var J=!1,M=!1;if(q.apply(z,RJA(RJA([],aPK(w)),[function(){var D=[];for(var X=0;X<arguments.length;X++)D[X]=arguments[X];if(A){var P=D.shift();if(P!=null){$.error(P);return}}if($.next(1<D.length?D:D[0]),M=!0,J)$.complete()}])),M)$.complete();J=!0}return j})}}Za.bindCallbackInternals=vn1});var hJA=C((SJA)=>{Object.defineProperty(SJA,"__esModule",{value:!0});SJA.bindCallback=void 0;var Y0K=kn1();function z0K(A,q,K){return Y0K.bindCallbackInternals(!1,A,q,K)}SJA.bindCallback=z0K});var xJA=C((IJA)=>{Object.defineProperty(IJA,"__esModule",{value:!0});IJA.bindNodeCallback=void 0;var w0K=kn1();function _0K(A,q,K){return w0K.bindCallbackInternals(!0,A,q,K)}IJA.bindNodeCallback=_0K});var En1=C((uJA)=>{Object.defineProperty(uJA,"__esModule",{value:!0});uJA.argsArgArrayOrObject=void 0;var $0K=Array.isArray,O0K=Object.getPrototypeOf,H0K=Object.prototype,j0K=Object.keys;function J0K(A){if(A.length===1){var q=A[0];if($0K(q))return{args:q,keys:null};if(M0K(q)){var K=j0K(q);return{args:K.map(function(Y){return q[Y]}),keys:K}}}return{args:A,keys:null}}uJA.argsArgArrayOrObject=J0K;function M0K(A){return A&&typeof A==="object"&&O0K(A)===H0K}});var Ln1=C((mJA)=>{Object.defineProperty(mJA,"__esModule",{value:!0});mJA.createObject=void 0;function D0K(A,q){return A.reduce(function(K,Y,z){return K[Y]=q[z],K},{})}mJA.createObject=D0K});var V41=C((cJA)=>{Object.defineProperty(cJA,"__esModule",{value:!0});cJA.combineLatestInit=cJA.combineLatest=void 0;var X0K=g2(),P0K=En1(),UJA=zd(),pJA=W0(),W0K=Wa(),FJA=BV(),Z0K=Ln1(),G0K=bq(),f0K=Yd();function T0K(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=FJA.popScheduler(A),Y=FJA.popResultSelector(A),z=P0K.argsArgArrayOrObject(A),w=z.args,_=z.keys;if(w.length===0)return UJA.from([],K);var $=new X0K.Observable(dJA(w,K,_?function(O){return Z0K.createObject(_,O)}:pJA.identity));return Y?$.pipe(W0K.mapOneOrManyArgs(Y)):$}cJA.combineLatest=T0K;function dJA(A,q,K){if(K===void 0)K=pJA.identity;return function(Y){QJA(q,function(){var z=A.length,w=Array(z),_=z,$=z,O=function(j){QJA(q,function(){var J=UJA.from(A[j],q),M=!1;J.subscribe(G0K.createOperatorSubscriber(Y,function(D){if(w[j]=D,!M)M=!0,$--;if(!$)Y.next(K(w.slice()))},function(){if(!--_)Y.complete()}))},Y)};for(var H=0;H<z;H++)O(H)},Y)}}cJA.combineLatestInit=dJA;function QJA(A,q,K){if(A)f0K.executeSchedule(K,A,q);else q()}});var N41=C((nJA)=>{Object.defineProperty(nJA,"__esModule",{value:!0});nJA.mergeInternals=void 0;var N0K=E5(),v0K=Yd(),iJA=bq();function k0K(A,q,K,Y,z,w,_,$){var O=[],H=0,j=0,J=!1,M=function(){if(J&&!O.length&&!H)q.complete()},D=function(P){return H<Y?X(P):O.push(P)},X=function(P){w&&q.next(P),H++;var W=!1;N0K.innerFrom(K(P,j++)).subscribe(iJA.createOperatorSubscriber(q,function(Z){if(z===null||z===void 0||z(Z),w)D(Z);else q.next(Z)},function(){W=!0},void 0,function(){if(W)try{H--;var Z=function(){var G=O.shift();if(_)v0K.executeSchedule(q,_,function(){return X(G)});else X(G)};while(O.length&&H<Y)Z();M()}catch(G){q.error(G)}}))};return A.subscribe(iJA.createOperatorSubscriber(q,D,function(){J=!0,M()})),function(){$===null||$===void 0||$()}}nJA.mergeInternals=k0K});var aB=C((aJA)=>{Object.defineProperty(aJA,"__esModule",{value:!0});aJA.mergeMap=void 0;var E0K=wd(),L0K=E5(),y0K=L4(),R0K=N41(),S0K=j2();function oJA(A,q,K){if(K===void 0)K=1/0;if(S0K.isFunction(q))return oJA(function(Y,z){return E0K.map(function(w,_){return q(Y,w,z,_)})(L0K.innerFrom(A(Y,z)))},K);else if(typeof q==="number")K=q;return y0K.operate(function(Y,z){return R0K.mergeInternals(Y,z,A,K)})}aJA.mergeMap=oJA});var KJ6=C((tJA)=>{Object.defineProperty(tJA,"__esModule",{value:!0});tJA.mergeAll=void 0;var C0K=aB(),h0K=W0();function I0K(A){if(A===void 0)A=1/0;return C0K.mergeMap(h0K.identity,A)}tJA.mergeAll=I0K});var BC6=C((AMA)=>{Object.defineProperty(AMA,"__esModule",{value:!0});AMA.concatAll=void 0;var b0K=KJ6();function x0K(){return b0K.mergeAll(1)}AMA.concatAll=x0K});var mC6=C((KMA)=>{Object.defineProperty(KMA,"__esModule",{value:!0});KMA.concat=void 0;var u0K=BC6(),B0K=BV(),m0K=zd();function g0K(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return u0K.concatAll()(m0K.from(A,B0K.popScheduler(A)))}KMA.concat=g0K});var gC6=C((zMA)=>{Object.defineProperty(zMA,"__esModule",{value:!0});zMA.defer=void 0;var F0K=g2(),Q0K=E5();function U0K(A){return new F0K.Observable(function(q){Q0K.innerFrom(A()).subscribe(q)})}zMA.defer=U0K});var OMA=C((_MA)=>{Object.defineProperty(_MA,"__esModule",{value:!0});_MA.connectable=void 0;var p0K=Z0(),d0K=g2(),c0K=gC6(),l0K={connector:function(){return new p0K.Subject},resetOnDisconnect:!0};function i0K(A,q){if(q===void 0)q=l0K;var K=null,Y=q.connector,z=q.resetOnDisconnect,w=z===void 0?!0:z,_=Y(),$=new d0K.Observable(function(O){return _.subscribe(O)});return $.connect=function(){if(!K||K.closed){if(K=c0K.defer(function(){return A}).subscribe(_),w)K.add(function(){return _=Y()})}return K},$}_MA.connectable=i0K});var JMA=C((HMA)=>{Object.defineProperty(HMA,"__esModule",{value:!0});HMA.forkJoin=void 0;var n0K=g2(),r0K=En1(),o0K=E5(),a0K=BV(),s0K=bq(),t0K=Wa(),e0K=Ln1();function AWK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=a0K.popResultSelector(A),Y=r0K.argsArgArrayOrObject(A),z=Y.args,w=Y.keys,_=new n0K.Observable(function($){var O=z.length;if(!O){$.complete();return}var H=Array(O),j=O,J=O,M=function(X){var P=!1;o0K.innerFrom(z[X]).subscribe(s0K.createOperatorSubscriber($,function(W){if(!P)P=!0,J--;H[X]=W},function(){return j--},void 0,function(){if(!j||!P){if(!J)$.next(w?e0K.createObject(w,H):H);$.complete()}}))};for(var D=0;D<O;D++)M(D)});return K?_.pipe(t0K.mapOneOrManyArgs(K)):_}HMA.forkJoin=AWK});var DMA=C((YJ6)=>{var qWK=YJ6&&YJ6.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w};Object.defineProperty(YJ6,"__esModule",{value:!0});YJ6.fromEvent=void 0;var KWK=E5(),YWK=g2(),zWK=aB(),wWK=W41(),Wq6=j2(),_WK=Wa(),$WK=["addListener","removeListener"],OWK=["addEventListener","removeEventListener"],HWK=["on","off"];function yn1(A,q,K,Y){if(Wq6.isFunction(K))Y=K,K=void 0;if(Y)return yn1(A,q,K).pipe(_WK.mapOneOrManyArgs(Y));var z=qWK(MWK(A)?OWK.map(function($){return function(O){return A[$](q,O,K)}}):jWK(A)?$WK.map(MMA(A,q)):JWK(A)?HWK.map(MMA(A,q)):[],2),w=z[0],_=z[1];if(!w){if(wWK.isArrayLike(A))return zWK.mergeMap(function($){return yn1($,q,K)})(KWK.innerFrom(A))}if(!w)throw TypeError("Invalid event target");return new YWK.Observable(function($){var O=function(){var H=[];for(var j=0;j<arguments.length;j++)H[j]=arguments[j];return $.next(1<H.length?H:H[0])};return w(O),function(){return _(O)}})}YJ6.fromEvent=yn1;function MMA(A,q){return function(K){return function(Y){return A[K](q,Y)}}}function jWK(A){return Wq6.isFunction(A.addListener)&&Wq6.isFunction(A.removeListener)}function JWK(A){return Wq6.isFunction(A.on)&&Wq6.isFunction(A.off)}function MWK(A){return Wq6.isFunction(A.addEventListener)&&Wq6.isFunction(A.removeEventListener)}});var ZMA=C((PMA)=>{Object.defineProperty(PMA,"__esModule",{value:!0});PMA.fromEventPattern=void 0;var DWK=g2(),XWK=j2(),PWK=Wa();function XMA(A,q,K){if(K)return XMA(A,q).pipe(PWK.mapOneOrManyArgs(K));return new DWK.Observable(function(Y){var z=function(){var _=[];for(var $=0;$<arguments.length;$++)_[$]=arguments[$];return Y.next(_.length===1?_[0]:_)},w=A(z);return XWK.isFunction(q)?function(){return q(z,w)}:void 0})}PMA.fromEventPattern=XMA});var fMA=C((zJ6)=>{var WWK=zJ6&&zJ6.__generator||function(A,q){var K={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},Y,z,w,_;return _={next:$(0),throw:$(1),return:$(2)},typeof Symbol==="function"&&(_[Symbol.iterator]=function(){return this}),_;function $(H){return function(j){return O([H,j])}}function O(H){if(Y)throw TypeError("Generator is already executing.");while(K)try{if(Y=1,z&&(w=H[0]&2?z.return:H[0]?z.throw||((w=z.return)&&w.call(z),0):z.next)&&!(w=w.call(z,H[1])).done)return w;if(z=0,w)H=[H[0]&2,w.value];switch(H[0]){case 0:case 1:w=H;break;case 4:return K.label++,{value:H[1],done:!1};case 5:K.label++,z=H[1],H=[0];continue;case 7:H=K.ops.pop(),K.trys.pop();continue;default:if((w=K.trys,!(w=w.length>0&&w[w.length-1]))&&(H[0]===6||H[0]===2)){K=0;continue}if(H[0]===3&&(!w||H[1]>w[0]&&H[1]<w[3])){K.label=H[1];break}if(H[0]===6&&K.label<w[1]){K.label=w[1],w=H;break}if(w&&K.label<w[2]){K.label=w[2],K.ops.push(H);break}if(w[2])K.ops.pop();K.trys.pop();continue}H=q.call(A,K)}catch(j){H=[6,j],z=0}finally{Y=w=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}};Object.defineProperty(zJ6,"__esModule",{value:!0});zJ6.generate=void 0;var GMA=W0(),ZWK=xC6(),GWK=gC6(),fWK=Wn1();function TWK(A,q,K,Y,z){var w,_,$,O;if(arguments.length===1)w=A,O=w.initialState,q=w.condition,K=w.iterate,_=w.resultSelector,$=_===void 0?GMA.identity:_,z=w.scheduler;else if(O=A,!Y||ZWK.isScheduler(Y))$=GMA.identity,z=Y;else $=Y;function H(){var j;return WWK(this,function(J){switch(J.label){case 0:j=O,J.label=1;case 1:if(!(!q||q(j)))return[3,4];return[4,$(j)];case 2:J.sent(),J.label=3;case 3:return j=K(j),[3,1];case 4:return[2]}})}return GWK.defer(z?function(){return fWK.scheduleIterable(H(),z)}:H)}zJ6.generate=TWK});var NMA=C((TMA)=>{Object.defineProperty(TMA,"__esModule",{value:!0});TMA.iif=void 0;var VWK=gC6();function NWK(A,q,K){return VWK.defer(function(){return A()?q:K})}TMA.iif=NWK});var Ga=C((vMA)=>{Object.defineProperty(vMA,"__esModule",{value:!0});vMA.timer=void 0;var vWK=g2(),kWK=uV(),EWK=xC6(),LWK=T41();function yWK(A,q,K){if(A===void 0)A=0;if(K===void 0)K=kWK.async;var Y=-1;if(q!=null)if(EWK.isScheduler(q))K=q;else Y=q;return new vWK.Observable(function(z){var w=LWK.isValidDate(A)?+A-K.now():A;if(w<0)w=0;var _=0;return K.schedule(function(){if(!z.closed)if(z.next(_++),0<=Y)this.schedule(void 0,Y);else z.complete()},w)})}vMA.timer=yWK});var Rn1=C((EMA)=>{Object.defineProperty(EMA,"__esModule",{value:!0});EMA.interval=void 0;var RWK=uV(),SWK=Ga();function CWK(A,q){if(A===void 0)A=0;if(q===void 0)q=RWK.asyncScheduler;if(A<0)A=0;return SWK.timer(A,A,q)}EMA.interval=CWK});var CMA=C((RMA)=>{Object.defineProperty(RMA,"__esModule",{value:!0});RMA.merge=void 0;var hWK=KJ6(),IWK=E5(),bWK=GI(),yMA=BV(),xWK=zd();function uWK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=yMA.popScheduler(A),Y=yMA.popNumber(A,1/0),z=A;return!z.length?bWK.EMPTY:z.length===1?IWK.innerFrom(z[0]):hWK.mergeAll(Y)(xWK.from(z,K))}RMA.merge=uWK});var Sn1=C((hMA)=>{Object.defineProperty(hMA,"__esModule",{value:!0});hMA.never=hMA.NEVER=void 0;var BWK=g2(),mWK=P0();hMA.NEVER=new BWK.Observable(mWK.noop);function gWK(){return hMA.NEVER}hMA.never=gWK});var Zq6=C((xMA)=>{Object.defineProperty(xMA,"__esModule",{value:!0});xMA.argsOrArgArray=void 0;var FWK=Array.isArray;function QWK(A){return A.length===1&&FWK(A[0])?A[0]:A}xMA.argsOrArgArray=QWK});var Cn1=C((mMA)=>{Object.defineProperty(mMA,"__esModule",{value:!0});mMA.onErrorResumeNext=void 0;var UWK=g2(),pWK=Zq6(),dWK=bq(),BMA=P0(),cWK=E5();function lWK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=pWK.argsOrArgArray(A);return new UWK.Observable(function(Y){var z=0,w=function(){if(z<K.length){var _=void 0;try{_=cWK.innerFrom(K[z++])}catch(O){w();return}var $=new dWK.OperatorSubscriber(Y,void 0,BMA.noop,BMA.noop);_.subscribe($),$.add(w)}else Y.complete()};w()})}mMA.onErrorResumeNext=lWK});var UMA=C((FMA)=>{Object.defineProperty(FMA,"__esModule",{value:!0});FMA.pairs=void 0;var iWK=zd();function nWK(A,q){return iWK.from(Object.entries(A),q)}FMA.pairs=nWK});var hn1=C((pMA)=>{Object.defineProperty(pMA,"__esModule",{value:!0});pMA.not=void 0;function rWK(A,q){return function(K,Y){return!A.call(q,K,Y)}}pMA.not=rWK});var _d=C((cMA)=>{Object.defineProperty(cMA,"__esModule",{value:!0});cMA.filter=void 0;var oWK=L4(),aWK=bq();function sWK(A,q){return oWK.operate(function(K,Y){var z=0;K.subscribe(aWK.createOperatorSubscriber(Y,function(w){return A.call(q,w,z++)&&Y.next(w)}))})}cMA.filter=sWK});var aMA=C((rMA)=>{Object.defineProperty(rMA,"__esModule",{value:!0});rMA.partition=void 0;var tWK=hn1(),iMA=_d(),nMA=E5();function eWK(A,q,K){return[iMA.filter(q,K)(nMA.innerFrom(A)),iMA.filter(tWK.not(q,K))(nMA.innerFrom(A))]}rMA.partition=eWK});var In1=C((eMA)=>{Object.defineProperty(eMA,"__esModule",{value:!0});eMA.raceInit=eMA.race=void 0;var AZK=g2(),sMA=E5(),qZK=Zq6(),KZK=bq();function YZK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return A=qZK.argsOrArgArray(A),A.length===1?sMA.innerFrom(A[0]):new AZK.Observable(tMA(A))}eMA.race=YZK;function tMA(A){return function(q){var K=[],Y=function(w){K.push(sMA.innerFrom(A[w]).subscribe(KZK.createOperatorSubscriber(q,function(_){if(K){for(var $=0;$<K.length;$++)$!==w&&K[$].unsubscribe();K=null}q.next(_)})))};for(var z=0;K&&!q.closed&&z<A.length;z++)Y(z)}}eMA.raceInit=tMA});var YDA=C((qDA)=>{Object.defineProperty(qDA,"__esModule",{value:!0});qDA.range=void 0;var wZK=g2(),_ZK=GI();function $ZK(A,q,K){if(q==null)q=A,A=0;if(q<=0)return _ZK.EMPTY;var Y=q+A;return new wZK.Observable(K?function(z){var w=A;return K.schedule(function(){if(w<Y)z.next(w++),this.schedule();else z.complete()})}:function(z){var w=A;while(w<Y&&!z.closed)z.next(w++);z.complete()})}qDA.range=$ZK});var _DA=C((zDA)=>{Object.defineProperty(zDA,"__esModule",{value:!0});zDA.using=void 0;var OZK=g2(),HZK=E5(),jZK=GI();function JZK(A,q){return new OZK.Observable(function(K){var Y=A(),z=q(Y),w=z?HZK.innerFrom(z):jZK.EMPTY;return w.subscribe(K),function(){if(Y)Y.unsubscribe()}})}zDA.using=JZK});var v41=C((fa)=>{var MZK=fa&&fa.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},DZK=fa&&fa.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(fa,"__esModule",{value:!0});fa.zip=void 0;var XZK=g2(),PZK=E5(),WZK=Zq6(),ZZK=GI(),GZK=bq(),fZK=BV();function TZK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=fZK.popResultSelector(A),Y=WZK.argsOrArgArray(A);return Y.length?new XZK.Observable(function(z){var w=Y.map(function(){return[]}),_=Y.map(function(){return!1});z.add(function(){w=_=null});var $=function(H){PZK.innerFrom(Y[H]).subscribe(GZK.createOperatorSubscriber(z,function(j){if(w[H].push(j),w.every(function(M){return M.length})){var J=w.map(function(M){return M.shift()});if(z.next(K?K.apply(void 0,DZK([],MZK(J))):J),w.some(function(M,D){return!M.length&&_[D]}))z.complete()}},function(){_[H]=!0,!w[H].length&&z.complete()}))};for(var O=0;!z.closed&&O<Y.length;O++)$(O);return function(){w=_=null}}):ZZK.EMPTY}fa.zip=TZK});var ODA=C(($DA)=>{Object.defineProperty($DA,"__esModule",{value:!0})});var k41=C((jDA)=>{Object.defineProperty(jDA,"__esModule",{value:!0});jDA.audit=void 0;var VZK=L4(),NZK=E5(),HDA=bq();function vZK(A){return VZK.operate(function(q,K){var Y=!1,z=null,w=null,_=!1,$=function(){if(w===null||w===void 0||w.unsubscribe(),w=null,Y){Y=!1;var H=z;z=null,K.next(H)}_&&K.complete()},O=function(){w=null,_&&K.complete()};q.subscribe(HDA.createOperatorSubscriber(K,function(H){if(Y=!0,z=H,!w)NZK.innerFrom(A(H)).subscribe(w=HDA.createOperatorSubscriber(K,$,O))},function(){_=!0,(!Y||!w||w.closed)&&K.complete()}))})}jDA.audit=vZK});var bn1=C((MDA)=>{Object.defineProperty(MDA,"__esModule",{value:!0});MDA.auditTime=void 0;var kZK=uV(),EZK=k41(),LZK=Ga();function yZK(A,q){if(q===void 0)q=kZK.asyncScheduler;return EZK.audit(function(){return LZK.timer(A,q)})}MDA.auditTime=yZK});var xn1=C((PDA)=>{Object.defineProperty(PDA,"__esModule",{value:!0});PDA.buffer=void 0;var RZK=L4(),SZK=P0(),XDA=bq(),CZK=E5();function hZK(A){return RZK.operate(function(q,K){var Y=[];return q.subscribe(XDA.createOperatorSubscriber(K,function(z){return Y.push(z)},function(){K.next(Y),K.complete()})),CZK.innerFrom(A).subscribe(XDA.createOperatorSubscriber(K,function(){var z=Y;Y=[],K.next(z)},SZK.noop)),function(){Y=null}})}PDA.buffer=hZK});var Bn1=C((wJ6)=>{var un1=wJ6&&wJ6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wJ6,"__esModule",{value:!0});wJ6.bufferCount=void 0;var IZK=L4(),bZK=bq(),xZK=Kd();function uZK(A,q){if(q===void 0)q=null;return q=q!==null&&q!==void 0?q:A,IZK.operate(function(K,Y){var z=[],w=0;K.subscribe(bZK.createOperatorSubscriber(Y,function(_){var $,O,H,j,J=null;if(w++%q===0)z.push([]);try{for(var M=un1(z),D=M.next();!D.done;D=M.next()){var X=D.value;if(X.push(_),A<=X.length)J=J!==null&&J!==void 0?J:[],J.push(X)}}catch(Z){$={error:Z}}finally{try{if(D&&!D.done&&(O=M.return))O.call(M)}finally{if($)throw $.error}}if(J)try{for(var P=un1(J),W=P.next();!W.done;W=P.next()){var X=W.value;xZK.arrRemove(z,X),Y.next(X)}}catch(Z){H={error:Z}}finally{try{if(W&&!W.done&&(j=P.return))j.call(P)}finally{if(H)throw H.error}}},function(){var _,$;try{for(var O=un1(z),H=O.next();!H.done;H=O.next()){var j=H.value;Y.next(j)}}catch(J){_={error:J}}finally{try{if(H&&!H.done&&($=O.return))$.call(O)}finally{if(_)throw _.error}}Y.complete()},void 0,function(){z=null}))})}wJ6.bufferCount=uZK});var mn1=C((_J6)=>{var BZK=_J6&&_J6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(_J6,"__esModule",{value:!0});_J6.bufferTime=void 0;var mZK=xk(),gZK=L4(),FZK=bq(),QZK=Kd(),UZK=uV(),pZK=BV(),ZDA=Yd();function dZK(A){var q,K,Y=[];for(var z=1;z<arguments.length;z++)Y[z-1]=arguments[z];var w=(q=pZK.popScheduler(Y))!==null&&q!==void 0?q:UZK.asyncScheduler,_=(K=Y[0])!==null&&K!==void 0?K:null,$=Y[1]||1/0;return gZK.operate(function(O,H){var j=[],J=!1,M=function(P){var{buffer:W,subs:Z}=P;Z.unsubscribe(),QZK.arrRemove(j,P),H.next(W),J&&D()},D=function(){if(j){var P=new mZK.Subscription;H.add(P);var W=[],Z={buffer:W,subs:P};j.push(Z),ZDA.executeSchedule(P,w,function(){return M(Z)},A)}};if(_!==null&&_>=0)ZDA.executeSchedule(H,w,D,_,!0);else J=!0;D();var X=FZK.createOperatorSubscriber(H,function(P){var W,Z,G=j.slice();try{for(var f=BZK(G),V=f.next();!V.done;V=f.next()){var N=V.value,v=N.buffer;v.push(P),$<=v.length&&M(N)}}catch(y){W={error:y}}finally{try{if(V&&!V.done&&(Z=f.return))Z.call(f)}finally{if(W)throw W.error}}},function(){while(j===null||j===void 0?void 0:j.length)H.next(j.shift().buffer);X===null||X===void 0||X.unsubscribe(),H.complete(),H.unsubscribe()},void 0,function(){return j=null});O.subscribe(X)})}_J6.bufferTime=dZK});var Fn1=C(($J6)=>{var cZK=$J6&&$J6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($J6,"__esModule",{value:!0});$J6.bufferToggle=void 0;var lZK=xk(),iZK=L4(),GDA=E5(),gn1=bq(),fDA=P0(),nZK=Kd();function rZK(A,q){return iZK.operate(function(K,Y){var z=[];GDA.innerFrom(A).subscribe(gn1.createOperatorSubscriber(Y,function(w){var _=[];z.push(_);var $=new lZK.Subscription,O=function(){nZK.arrRemove(z,_),Y.next(_),$.unsubscribe()};$.add(GDA.innerFrom(q(w)).subscribe(gn1.createOperatorSubscriber(Y,O,fDA.noop)))},fDA.noop)),K.subscribe(gn1.createOperatorSubscriber(Y,function(w){var _,$;try{for(var O=cZK(z),H=O.next();!H.done;H=O.next()){var j=H.value;j.push(w)}}catch(J){_={error:J}}finally{try{if(H&&!H.done&&($=O.return))$.call(O)}finally{if(_)throw _.error}}},function(){while(z.length>0)Y.next(z.shift());Y.complete()}))})}$J6.bufferToggle=rZK});var Qn1=C((VDA)=>{Object.defineProperty(VDA,"__esModule",{value:!0});VDA.bufferWhen=void 0;var oZK=L4(),aZK=P0(),TDA=bq(),sZK=E5();function tZK(A){return oZK.operate(function(q,K){var Y=null,z=null,w=function(){z===null||z===void 0||z.unsubscribe();var _=Y;Y=[],_&&K.next(_),sZK.innerFrom(A()).subscribe(z=TDA.createOperatorSubscriber(K,w,aZK.noop))};w(),q.subscribe(TDA.createOperatorSubscriber(K,function(_){return Y===null||Y===void 0?void 0:Y.push(_)},function(){Y&&K.next(Y),K.complete()},void 0,function(){return Y=z=null}))})}VDA.bufferWhen=tZK});var Un1=C((kDA)=>{Object.defineProperty(kDA,"__esModule",{value:!0});kDA.catchError=void 0;var eZK=E5(),AGK=bq(),qGK=L4();function vDA(A){return qGK.operate(function(q,K){var Y=null,z=!1,w;if(Y=q.subscribe(AGK.createOperatorSubscriber(K,void 0,void 0,function(_){if(w=eZK.innerFrom(A(_,vDA(A)(q))),Y)Y.unsubscribe(),Y=null,w.subscribe(K);else z=!0})),z)Y.unsubscribe(),Y=null,w.subscribe(K)})}kDA.catchError=vDA});var pn1=C((LDA)=>{Object.defineProperty(LDA,"__esModule",{value:!0});LDA.scanInternals=void 0;var KGK=bq();function YGK(A,q,K,Y,z){return function(w,_){var $=K,O=q,H=0;w.subscribe(KGK.createOperatorSubscriber(_,function(j){var J=H++;O=$?A(O,j,J):($=!0,j),Y&&_.next(O)},z&&function(){$&&_.next(O),_.complete()}))}}LDA.scanInternals=YGK});var Gq6=C((RDA)=>{Object.defineProperty(RDA,"__esModule",{value:!0});RDA.reduce=void 0;var zGK=pn1(),wGK=L4();function _GK(A,q){return wGK.operate(zGK.scanInternals(A,q,arguments.length>=2,!1,!0))}RDA.reduce=_GK});var E41=C((CDA)=>{Object.defineProperty(CDA,"__esModule",{value:!0});CDA.toArray=void 0;var $GK=Gq6(),OGK=L4(),HGK=function(A,q){return A.push(q),A};function jGK(){return OGK.operate(function(A,q){$GK.reduce(HGK,[])(A).subscribe(q)})}CDA.toArray=jGK});var dn1=C((IDA)=>{Object.defineProperty(IDA,"__esModule",{value:!0});IDA.joinAllInternals=void 0;var JGK=W0(),MGK=Wa(),DGK=IC6(),XGK=aB(),PGK=E41();function WGK(A,q){return DGK.pipe(PGK.toArray(),XGK.mergeMap(function(K){return A(K)}),q?MGK.mapOneOrManyArgs(q):JGK.identity)}IDA.joinAllInternals=WGK});var L41=C((xDA)=>{Object.defineProperty(xDA,"__esModule",{value:!0});xDA.combineLatestAll=void 0;var ZGK=V41(),GGK=dn1();function fGK(A){return GGK.joinAllInternals(ZGK.combineLatest,A)}xDA.combineLatestAll=fGK});var cn1=C((BDA)=>{Object.defineProperty(BDA,"__esModule",{value:!0});BDA.combineAll=void 0;var TGK=L41();BDA.combineAll=TGK.combineLatestAll});var ln1=C((Ta)=>{var gDA=Ta&&Ta.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},FDA=Ta&&Ta.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.combineLatest=void 0;var VGK=V41(),NGK=L4(),vGK=Zq6(),kGK=Wa(),EGK=IC6(),LGK=BV();function QDA(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=LGK.popResultSelector(A);return K?EGK.pipe(QDA.apply(void 0,FDA([],gDA(A))),kGK.mapOneOrManyArgs(K)):NGK.operate(function(Y,z){VGK.combineLatestInit(FDA([Y],gDA(vGK.argsOrArgArray(A))))(z)})}Ta.combineLatest=QDA});var in1=C((Va)=>{var yGK=Va&&Va.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},RGK=Va&&Va.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Va,"__esModule",{value:!0});Va.combineLatestWith=void 0;var SGK=ln1();function CGK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return SGK.combineLatest.apply(void 0,RGK([],yGK(A)))}Va.combineLatestWith=CGK});var y41=C((pDA)=>{Object.defineProperty(pDA,"__esModule",{value:!0});pDA.concatMap=void 0;var UDA=aB(),hGK=j2();function IGK(A,q){return hGK.isFunction(q)?UDA.mergeMap(A,q,1):UDA.mergeMap(A,1)}pDA.concatMap=IGK});var nn1=C((lDA)=>{Object.defineProperty(lDA,"__esModule",{value:!0});lDA.concatMapTo=void 0;var cDA=y41(),bGK=j2();function xGK(A,q){return bGK.isFunction(q)?cDA.concatMap(function(){return A},q):cDA.concatMap(function(){return A})}lDA.concatMapTo=xGK});var rn1=C((Na)=>{var uGK=Na&&Na.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},BGK=Na&&Na.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Na,"__esModule",{value:!0});Na.concat=void 0;var mGK=L4(),gGK=BC6(),FGK=BV(),QGK=zd();function UGK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=FGK.popScheduler(A);return mGK.operate(function(Y,z){gGK.concatAll()(QGK.from(BGK([Y],uGK(A)),K)).subscribe(z)})}Na.concat=UGK});var on1=C((va)=>{var pGK=va&&va.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},dGK=va&&va.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(va,"__esModule",{value:!0});va.concatWith=void 0;var cGK=rn1();function lGK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return cGK.concat.apply(void 0,dGK([],pGK(A)))}va.concatWith=lGK});var oDA=C((nDA)=>{Object.defineProperty(nDA,"__esModule",{value:!0});nDA.fromSubscribable=void 0;var iGK=g2();function nGK(A){return new iGK.Observable(function(q){return A.subscribe(q)})}nDA.fromSubscribable=nGK});var FC6=C((aDA)=>{Object.defineProperty(aDA,"__esModule",{value:!0});aDA.connect=void 0;var rGK=Z0(),oGK=E5(),aGK=L4(),sGK=oDA(),tGK={connector:function(){return new rGK.Subject}};function eGK(A,q){if(q===void 0)q=tGK;var K=q.connector;return aGK.operate(function(Y,z){var w=K();oGK.innerFrom(A(sGK.fromSubscribable(w))).subscribe(z),z.add(Y.subscribe(w))})}aDA.connect=eGK});var an1=C((tDA)=>{Object.defineProperty(tDA,"__esModule",{value:!0});tDA.count=void 0;var AfK=Gq6();function qfK(A){return AfK.reduce(function(q,K,Y){return!A||A(K,Y)?q+1:q},0)}tDA.count=qfK});var sn1=C((qXA)=>{Object.defineProperty(qXA,"__esModule",{value:!0});qXA.debounce=void 0;var KfK=L4(),YfK=P0(),AXA=bq(),zfK=E5();function wfK(A){return KfK.operate(function(q,K){var Y=!1,z=null,w=null,_=function(){if(w===null||w===void 0||w.unsubscribe(),w=null,Y){Y=!1;var $=z;z=null,K.next($)}};q.subscribe(AXA.createOperatorSubscriber(K,function($){w===null||w===void 0||w.unsubscribe(),Y=!0,z=$,w=AXA.createOperatorSubscriber(K,_,YfK.noop),zfK.innerFrom(A($)).subscribe(w)},function(){_(),K.complete()},void 0,function(){z=w=null}))})}qXA.debounce=wfK});var tn1=C((YXA)=>{Object.defineProperty(YXA,"__esModule",{value:!0});YXA.debounceTime=void 0;var _fK=uV(),$fK=L4(),OfK=bq();function HfK(A,q){if(q===void 0)q=_fK.asyncScheduler;return $fK.operate(function(K,Y){var z=null,w=null,_=null,$=function(){if(z){z.unsubscribe(),z=null;var H=w;w=null,Y.next(H)}};function O(){var H=_+A,j=q.now();if(j<H){z=this.schedule(void 0,H-j),Y.add(z);return}$()}K.subscribe(OfK.createOperatorSubscriber(Y,function(H){if(w=H,_=q.now(),!z)z=q.schedule(O,A),Y.add(z)},function(){$(),Y.complete()},void 0,function(){w=z=null}))})}YXA.debounceTime=HfK});var OJ6=C((wXA)=>{Object.defineProperty(wXA,"__esModule",{value:!0});wXA.defaultIfEmpty=void 0;var jfK=L4(),JfK=bq();function MfK(A){return jfK.operate(function(q,K){var Y=!1;q.subscribe(JfK.createOperatorSubscriber(K,function(z){Y=!0,K.next(z)},function(){if(!Y)K.next(A);K.complete()}))})}wXA.defaultIfEmpty=MfK});var HJ6=C(($XA)=>{Object.defineProperty($XA,"__esModule",{value:!0});$XA.take=void 0;var DfK=GI(),XfK=L4(),PfK=bq();function WfK(A){return A<=0?function(){return DfK.EMPTY}:XfK.operate(function(q,K){var Y=0;q.subscribe(PfK.createOperatorSubscriber(K,function(z){if(++Y<=A){if(K.next(z),A<=Y)K.complete()}}))})}$XA.take=WfK});var R41=C((HXA)=>{Object.defineProperty(HXA,"__esModule",{value:!0});HXA.ignoreElements=void 0;var ZfK=L4(),GfK=bq(),ffK=P0();function TfK(){return ZfK.operate(function(A,q){A.subscribe(GfK.createOperatorSubscriber(q,ffK.noop))})}HXA.ignoreElements=TfK});var S41=C((JXA)=>{Object.defineProperty(JXA,"__esModule",{value:!0});JXA.mapTo=void 0;var VfK=wd();function NfK(A){return VfK.map(function(){return A})}JXA.mapTo=NfK});var C41=C((PXA)=>{Object.defineProperty(PXA,"__esModule",{value:!0});PXA.delayWhen=void 0;var vfK=mC6(),DXA=HJ6(),kfK=R41(),EfK=S41(),LfK=aB(),yfK=E5();function XXA(A,q){if(q)return function(K){return vfK.concat(q.pipe(DXA.take(1),kfK.ignoreElements()),K.pipe(XXA(A)))};return LfK.mergeMap(function(K,Y){return yfK.innerFrom(A(K,Y)).pipe(DXA.take(1),EfK.mapTo(K))})}PXA.delayWhen=XXA});var en1=C((ZXA)=>{Object.defineProperty(ZXA,"__esModule",{value:!0});ZXA.delay=void 0;var RfK=uV(),SfK=C41(),CfK=Ga();function hfK(A,q){if(q===void 0)q=RfK.asyncScheduler;var K=CfK.timer(A,q);return SfK.delayWhen(function(){return K})}ZXA.delay=hfK});var Ar1=C((fXA)=>{Object.defineProperty(fXA,"__esModule",{value:!0});fXA.dematerialize=void 0;var IfK=f41(),bfK=L4(),xfK=bq();function ufK(){return bfK.operate(function(A,q){A.subscribe(xfK.createOperatorSubscriber(q,function(K){return IfK.observeNotification(K,q)}))})}fXA.dematerialize=ufK});var qr1=C((NXA)=>{Object.defineProperty(NXA,"__esModule",{value:!0});NXA.distinct=void 0;var BfK=L4(),VXA=bq(),mfK=P0(),gfK=E5();function FfK(A,q){return BfK.operate(function(K,Y){var z=new Set;K.subscribe(VXA.createOperatorSubscriber(Y,function(w){var _=A?A(w):w;if(!z.has(_))z.add(_),Y.next(w)})),q&&gfK.innerFrom(q).subscribe(VXA.createOperatorSubscriber(Y,function(){return z.clear()},mfK.noop))})}NXA.distinct=FfK});var h41=C((kXA)=>{Object.defineProperty(kXA,"__esModule",{value:!0});kXA.distinctUntilChanged=void 0;var QfK=W0(),UfK=L4(),pfK=bq();function dfK(A,q){if(q===void 0)q=QfK.identity;return A=A!==null&&A!==void 0?A:cfK,UfK.operate(function(K,Y){var z,w=!0;K.subscribe(pfK.createOperatorSubscriber(Y,function(_){var $=q(_);if(w||!A(z,$))w=!1,z=$,Y.next(_)}))})}kXA.distinctUntilChanged=dfK;function cfK(A,q){return A===q}});var Kr1=C((LXA)=>{Object.defineProperty(LXA,"__esModule",{value:!0});LXA.distinctUntilKeyChanged=void 0;var lfK=h41();function ifK(A,q){return lfK.distinctUntilChanged(function(K,Y){return q?q(K[A],Y[A]):K[A]===Y[A]})}LXA.distinctUntilKeyChanged=ifK});var jJ6=C((RXA)=>{Object.defineProperty(RXA,"__esModule",{value:!0});RXA.throwIfEmpty=void 0;var nfK=Xa(),rfK=L4(),ofK=bq();function afK(A){if(A===void 0)A=sfK;return rfK.operate(function(q,K){var Y=!1;q.subscribe(ofK.createOperatorSubscriber(K,function(z){Y=!0,K.next(z)},function(){return Y?K.complete():K.error(A())}))})}RXA.throwIfEmpty=afK;function sfK(){return new nfK.EmptyError}});var Yr1=C((hXA)=>{Object.defineProperty(hXA,"__esModule",{value:!0});hXA.elementAt=void 0;var CXA=Tn1(),tfK=_d(),efK=jJ6(),ATK=OJ6(),qTK=HJ6();function KTK(A,q){if(A<0)throw new CXA.ArgumentOutOfRangeError;var K=arguments.length>=2;return function(Y){return Y.pipe(tfK.filter(function(z,w){return w===A}),qTK.take(1),K?ATK.defaultIfEmpty(q):efK.throwIfEmpty(function(){return new CXA.ArgumentOutOfRangeError}))}}hXA.elementAt=KTK});var zr1=C((ka)=>{var YTK=ka&&ka.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},zTK=ka&&ka.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(ka,"__esModule",{value:!0});ka.endWith=void 0;var wTK=mC6(),_TK=G41();function $TK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return function(K){return wTK.concat(K,_TK.of.apply(void 0,zTK([],YTK(A))))}}ka.endWith=$TK});var wr1=C((bXA)=>{Object.defineProperty(bXA,"__esModule",{value:!0});bXA.every=void 0;var OTK=L4(),HTK=bq();function jTK(A,q){return OTK.operate(function(K,Y){var z=0;K.subscribe(HTK.createOperatorSubscriber(Y,function(w){if(!A.call(q,w,z++,K))Y.next(!1),Y.complete()},function(){Y.next(!0),Y.complete()}))})}bXA.every=jTK});var I41=C((gXA)=>{Object.defineProperty(gXA,"__esModule",{value:!0});gXA.exhaustMap=void 0;var JTK=wd(),uXA=E5(),MTK=L4(),BXA=bq();function mXA(A,q){if(q)return function(K){return K.pipe(mXA(function(Y,z){return uXA.innerFrom(A(Y,z)).pipe(JTK.map(function(w,_){return q(Y,w,z,_)}))}))};return MTK.operate(function(K,Y){var z=0,w=null,_=!1;K.subscribe(BXA.createOperatorSubscriber(Y,function($){if(!w)w=BXA.createOperatorSubscriber(Y,void 0,function(){w=null,_&&Y.complete()}),uXA.innerFrom(A($,z++)).subscribe(w)},function(){_=!0,!w&&Y.complete()}))})}gXA.exhaustMap=mXA});var b41=C((QXA)=>{Object.defineProperty(QXA,"__esModule",{value:!0});QXA.exhaustAll=void 0;var DTK=I41(),XTK=W0();function PTK(){return DTK.exhaustMap(XTK.identity)}QXA.exhaustAll=PTK});var _r1=C((pXA)=>{Object.defineProperty(pXA,"__esModule",{value:!0});pXA.exhaust=void 0;var WTK=b41();pXA.exhaust=WTK.exhaustAll});var $r1=C((cXA)=>{Object.defineProperty(cXA,"__esModule",{value:!0});cXA.expand=void 0;var ZTK=L4(),GTK=N41();function fTK(A,q,K){if(q===void 0)q=1/0;return q=(q||0)<1?1/0:q,ZTK.operate(function(Y,z){return GTK.mergeInternals(Y,z,A,q,void 0,!0,K)})}cXA.expand=fTK});var Or1=C((iXA)=>{Object.defineProperty(iXA,"__esModule",{value:!0});iXA.finalize=void 0;var TTK=L4();function VTK(A){return TTK.operate(function(q,K){try{q.subscribe(K)}finally{K.add(A)}})}iXA.finalize=VTK});var x41=C((oXA)=>{Object.defineProperty(oXA,"__esModule",{value:!0});oXA.createFind=oXA.find=void 0;var NTK=L4(),vTK=bq();function kTK(A,q){return NTK.operate(rXA(A,q,"value"))}oXA.find=kTK;function rXA(A,q,K){var Y=K==="index";return function(z,w){var _=0;z.subscribe(vTK.createOperatorSubscriber(w,function($){var O=_++;if(A.call(q,$,O,z))w.next(Y?O:$),w.complete()},function(){w.next(Y?-1:void 0),w.complete()}))}}oXA.createFind=rXA});var Hr1=C((sXA)=>{Object.defineProperty(sXA,"__esModule",{value:!0});sXA.findIndex=void 0;var LTK=L4(),yTK=x41();function RTK(A,q){return LTK.operate(yTK.createFind(A,q,"index"))}sXA.findIndex=RTK});var jr1=C((eXA)=>{Object.defineProperty(eXA,"__esModule",{value:!0});eXA.first=void 0;var STK=Xa(),CTK=_d(),hTK=HJ6(),ITK=OJ6(),bTK=jJ6(),xTK=W0();function uTK(A,q){var K=arguments.length>=2;return function(Y){return Y.pipe(A?CTK.filter(function(z,w){return A(z,w,Y)}):xTK.identity,hTK.take(1),K?ITK.defaultIfEmpty(q):bTK.throwIfEmpty(function(){return new STK.EmptyError}))}}eXA.first=uTK});var Jr1=C((KPA)=>{Object.defineProperty(KPA,"__esModule",{value:!0});KPA.groupBy=void 0;var BTK=g2(),mTK=E5(),gTK=Z0(),FTK=L4(),qPA=bq();function QTK(A,q,K,Y){return FTK.operate(function(z,w){var _;if(!q||typeof q==="function")_=q;else K=q.duration,_=q.element,Y=q.connector;var $=new Map,O=function(X){$.forEach(X),X(w)},H=function(X){return O(function(P){return P.error(X)})},j=0,J=!1,M=new qPA.OperatorSubscriber(w,function(X){try{var P=A(X),W=$.get(P);if(!W){$.set(P,W=Y?Y():new gTK.Subject);var Z=D(P,W);if(w.next(Z),K){var G=qPA.createOperatorSubscriber(W,function(){W.complete(),G===null||G===void 0||G.unsubscribe()},void 0,void 0,function(){return $.delete(P)});M.add(mTK.innerFrom(K(Z)).subscribe(G))}}W.next(_?_(X):X)}catch(f){H(f)}},function(){return O(function(X){return X.complete()})},H,function(){return $.clear()},function(){return J=!0,j===0});z.subscribe(M);function D(X,P){var W=new BTK.Observable(function(Z){j++;var G=P.subscribe(Z);return function(){G.unsubscribe(),--j===0&&J&&M.unsubscribe()}});return W.key=X,W}})}KPA.groupBy=QTK});var Mr1=C((zPA)=>{Object.defineProperty(zPA,"__esModule",{value:!0});zPA.isEmpty=void 0;var UTK=L4(),pTK=bq();function dTK(){return UTK.operate(function(A,q){A.subscribe(pTK.createOperatorSubscriber(q,function(){q.next(!1),q.complete()},function(){q.next(!0),q.complete()}))})}zPA.isEmpty=dTK});var u41=C((JJ6)=>{var cTK=JJ6&&JJ6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(JJ6,"__esModule",{value:!0});JJ6.takeLast=void 0;var lTK=GI(),iTK=L4(),nTK=bq();function rTK(A){return A<=0?function(){return lTK.EMPTY}:iTK.operate(function(q,K){var Y=[];q.subscribe(nTK.createOperatorSubscriber(K,function(z){Y.push(z),A<Y.length&&Y.shift()},function(){var z,w;try{for(var _=cTK(Y),$=_.next();!$.done;$=_.next()){var O=$.value;K.next(O)}}catch(H){z={error:H}}finally{try{if($&&!$.done&&(w=_.return))w.call(_)}finally{if(z)throw z.error}}K.complete()},void 0,function(){Y=null}))})}JJ6.takeLast=rTK});var Dr1=C((_PA)=>{Object.defineProperty(_PA,"__esModule",{value:!0});_PA.last=void 0;var oTK=Xa(),aTK=_d(),sTK=u41(),tTK=jJ6(),eTK=OJ6(),AVK=W0();function qVK(A,q){var K=arguments.length>=2;return function(Y){return Y.pipe(A?aTK.filter(function(z,w){return A(z,w,Y)}):AVK.identity,sTK.takeLast(1),K?eTK.defaultIfEmpty(q):tTK.throwIfEmpty(function(){return new oTK.EmptyError}))}}_PA.last=qVK});var Pr1=C((OPA)=>{Object.defineProperty(OPA,"__esModule",{value:!0});OPA.materialize=void 0;var Xr1=f41(),KVK=L4(),YVK=bq();function zVK(){return KVK.operate(function(A,q){A.subscribe(YVK.createOperatorSubscriber(q,function(K){q.next(Xr1.Notification.createNext(K))},function(){q.next(Xr1.Notification.createComplete()),q.complete()},function(K){q.next(Xr1.Notification.createError(K)),q.complete()}))})}OPA.materialize=zVK});var Wr1=C((jPA)=>{Object.defineProperty(jPA,"__esModule",{value:!0});jPA.max=void 0;var wVK=Gq6(),_VK=j2();function $VK(A){return wVK.reduce(_VK.isFunction(A)?function(q,K){return A(q,K)>0?q:K}:function(q,K){return q>K?q:K})}jPA.max=$VK});var Zr1=C((MPA)=>{Object.defineProperty(MPA,"__esModule",{value:!0});MPA.flatMap=void 0;var OVK=aB();MPA.flatMap=OVK.mergeMap});var Gr1=C((PPA)=>{Object.defineProperty(PPA,"__esModule",{value:!0});PPA.mergeMapTo=void 0;var XPA=aB(),HVK=j2();function jVK(A,q,K){if(K===void 0)K=1/0;if(HVK.isFunction(q))return XPA.mergeMap(function(){return A},q,K);if(typeof q==="number")K=q;return XPA.mergeMap(function(){return A},K)}PPA.mergeMapTo=jVK});var fr1=C((ZPA)=>{Object.defineProperty(ZPA,"__esModule",{value:!0});ZPA.mergeScan=void 0;var JVK=L4(),MVK=N41();function DVK(A,q,K){if(K===void 0)K=1/0;return JVK.operate(function(Y,z){var w=q;return MVK.mergeInternals(Y,z,function(_,$){return A(w,_,$)},K,function(_){w=_},!1,void 0,function(){return w=null})})}ZPA.mergeScan=DVK});var Tr1=C((Ea)=>{var XVK=Ea&&Ea.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},PVK=Ea&&Ea.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.merge=void 0;var WVK=L4(),ZVK=KJ6(),fPA=BV(),GVK=zd();function fVK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=fPA.popScheduler(A),Y=fPA.popNumber(A,1/0);return WVK.operate(function(z,w){ZVK.mergeAll(Y)(GVK.from(PVK([z],XVK(A)),K)).subscribe(w)})}Ea.merge=fVK});var Vr1=C((La)=>{var TVK=La&&La.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},VVK=La&&La.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(La,"__esModule",{value:!0});La.mergeWith=void 0;var NVK=Tr1();function vVK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return NVK.merge.apply(void 0,VVK([],TVK(A)))}La.mergeWith=vVK});var Nr1=C((TPA)=>{Object.defineProperty(TPA,"__esModule",{value:!0});TPA.min=void 0;var kVK=Gq6(),EVK=j2();function LVK(A){return kVK.reduce(EVK.isFunction(A)?function(q,K){return A(q,K)<0?q:K}:function(q,K){return q<K?q:K})}TPA.min=LVK});var QC6=C((vPA)=>{Object.defineProperty(vPA,"__esModule",{value:!0});vPA.multicast=void 0;var yVK=bC6(),NPA=j2(),RVK=FC6();function SVK(A,q){var K=NPA.isFunction(A)?A:function(){return A};if(NPA.isFunction(q))return RVK.connect(q,{connector:K});return function(Y){return new yVK.ConnectableObservable(Y,K)}}vPA.multicast=SVK});var vr1=C((sB)=>{var CVK=sB&&sB.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},hVK=sB&&sB.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(sB,"__esModule",{value:!0});sB.onErrorResumeNext=sB.onErrorResumeNextWith=void 0;var IVK=Zq6(),bVK=Cn1();function EPA(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=IVK.argsOrArgArray(A);return function(Y){return bVK.onErrorResumeNext.apply(void 0,hVK([Y],CVK(K)))}}sB.onErrorResumeNextWith=EPA;sB.onErrorResumeNext=EPA});var kr1=C((LPA)=>{Object.defineProperty(LPA,"__esModule",{value:!0});LPA.pairwise=void 0;var xVK=L4(),uVK=bq();function BVK(){return xVK.operate(function(A,q){var K,Y=!1;A.subscribe(uVK.createOperatorSubscriber(q,function(z){var w=K;K=z,Y&&q.next([w,z]),Y=!0}))})}LPA.pairwise=BVK});var Er1=C((RPA)=>{Object.defineProperty(RPA,"__esModule",{value:!0});RPA.pluck=void 0;var mVK=wd();function gVK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=A.length;if(K===0)throw Error("list of properties cannot be empty.");return mVK.map(function(Y){var z=Y;for(var w=0;w<K;w++){var _=z===null||z===void 0?void 0:z[A[w]];if(typeof _<"u")z=_;else return}return z})}RPA.pluck=gVK});var Lr1=C((CPA)=>{Object.defineProperty(CPA,"__esModule",{value:!0});CPA.publish=void 0;var FVK=Z0(),QVK=QC6(),UVK=FC6();function pVK(A){return A?function(q){return UVK.connect(A)(q)}:function(q){return QVK.multicast(new FVK.Subject)(q)}}CPA.publish=pVK});var yr1=C((IPA)=>{Object.defineProperty(IPA,"__esModule",{value:!0});IPA.publishBehavior=void 0;var dVK=Kn1(),cVK=bC6();function lVK(A){return function(q){var K=new dVK.BehaviorSubject(A);return new cVK.ConnectableObservable(q,function(){return K})}}IPA.publishBehavior=lVK});var Rr1=C((xPA)=>{Object.defineProperty(xPA,"__esModule",{value:!0});xPA.publishLast=void 0;var iVK=X41(),nVK=bC6();function rVK(){return function(A){var q=new iVK.AsyncSubject;return new nVK.ConnectableObservable(A,function(){return q})}}xPA.publishLast=rVK});var Sr1=C((mPA)=>{Object.defineProperty(mPA,"__esModule",{value:!0});mPA.publishReplay=void 0;var oVK=D41(),aVK=QC6(),BPA=j2();function sVK(A,q,K,Y){if(K&&!BPA.isFunction(K))Y=K;var z=BPA.isFunction(K)?K:void 0;return function(w){return aVK.multicast(new oVK.ReplaySubject(A,q,Y),z)(w)}}mPA.publishReplay=sVK});var B41=C((ya)=>{var tVK=ya&&ya.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},eVK=ya&&ya.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(ya,"__esModule",{value:!0});ya.raceWith=void 0;var ANK=In1(),qNK=L4(),KNK=W0();function YNK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return!A.length?KNK.identity:qNK.operate(function(K,Y){ANK.raceInit(eVK([K],tVK(A)))(Y)})}ya.raceWith=YNK});var Cr1=C((QPA)=>{Object.defineProperty(QPA,"__esModule",{value:!0});QPA.repeat=void 0;var zNK=GI(),wNK=L4(),FPA=bq(),_NK=E5(),$NK=Ga();function ONK(A){var q,K=1/0,Y;if(A!=null)if(typeof A==="object")q=A.count,K=q===void 0?1/0:q,Y=A.delay;else K=A;return K<=0?function(){return zNK.EMPTY}:wNK.operate(function(z,w){var _=0,$,O=function(){if($===null||$===void 0||$.unsubscribe(),$=null,Y!=null){var j=typeof Y==="number"?$NK.timer(Y):_NK.innerFrom(Y(_)),J=FPA.createOperatorSubscriber(w,function(){J.unsubscribe(),H()});j.subscribe(J)}else H()},H=function(){var j=!1;if($=z.subscribe(FPA.createOperatorSubscriber(w,void 0,function(){if(++_<K)if($)O();else j=!0;else w.complete()})),j)O()};H()})}QPA.repeat=ONK});var hr1=C((dPA)=>{Object.defineProperty(dPA,"__esModule",{value:!0});dPA.repeatWhen=void 0;var HNK=E5(),jNK=Z0(),JNK=L4(),pPA=bq();function MNK(A){return JNK.operate(function(q,K){var Y,z=!1,w,_=!1,$=!1,O=function(){return $&&_&&(K.complete(),!0)},H=function(){if(!w)w=new jNK.Subject,HNK.innerFrom(A(w)).subscribe(pPA.createOperatorSubscriber(K,function(){if(Y)j();else z=!0},function(){_=!0,O()}));return w},j=function(){if($=!1,Y=q.subscribe(pPA.createOperatorSubscriber(K,void 0,function(){$=!0,!O()&&H().next()})),z)Y.unsubscribe(),Y=null,z=!1,j()};j()})}dPA.repeatWhen=MNK});var Ir1=C((iPA)=>{Object.defineProperty(iPA,"__esModule",{value:!0});iPA.retry=void 0;var DNK=L4(),lPA=bq(),XNK=W0(),PNK=Ga(),WNK=E5();function ZNK(A){if(A===void 0)A=1/0;var q;if(A&&typeof A==="object")q=A;else q={count:A};var K=q.count,Y=K===void 0?1/0:K,z=q.delay,w=q.resetOnSuccess,_=w===void 0?!1:w;return Y<=0?XNK.identity:DNK.operate(function($,O){var H=0,j,J=function(){var M=!1;if(j=$.subscribe(lPA.createOperatorSubscriber(O,function(D){if(_)H=0;O.next(D)},void 0,function(D){if(H++<Y){var X=function(){if(j)j.unsubscribe(),j=null,J();else M=!0};if(z!=null){var P=typeof z==="number"?PNK.timer(z):WNK.innerFrom(z(D,H)),W=lPA.createOperatorSubscriber(O,function(){W.unsubscribe(),X()},function(){O.complete()});P.subscribe(W)}else X()}else O.error(D)})),M)j.unsubscribe(),j=null,J()};J()})}iPA.retry=ZNK});var br1=C((oPA)=>{Object.defineProperty(oPA,"__esModule",{value:!0});oPA.retryWhen=void 0;var GNK=E5(),fNK=Z0(),TNK=L4(),rPA=bq();function VNK(A){return TNK.operate(function(q,K){var Y,z=!1,w,_=function(){if(Y=q.subscribe(rPA.createOperatorSubscriber(K,void 0,void 0,function($){if(!w)w=new fNK.Subject,GNK.innerFrom(A(w)).subscribe(rPA.createOperatorSubscriber(K,function(){return Y?_():z=!0}));if(w)w.next($)})),z)Y.unsubscribe(),Y=null,z=!1,_()};_()})}oPA.retryWhen=VNK});var m41=C((tPA)=>{Object.defineProperty(tPA,"__esModule",{value:!0});tPA.sample=void 0;var NNK=E5(),vNK=L4(),kNK=P0(),sPA=bq();function ENK(A){return vNK.operate(function(q,K){var Y=!1,z=null;q.subscribe(sPA.createOperatorSubscriber(K,function(w){Y=!0,z=w})),NNK.innerFrom(A).subscribe(sPA.createOperatorSubscriber(K,function(){if(Y){Y=!1;var w=z;z=null,K.next(w)}},kNK.noop))})}tPA.sample=ENK});var xr1=C((A0A)=>{Object.defineProperty(A0A,"__esModule",{value:!0});A0A.sampleTime=void 0;var LNK=uV(),yNK=m41(),RNK=Rn1();function SNK(A,q){if(q===void 0)q=LNK.asyncScheduler;return yNK.sample(RNK.interval(A,q))}A0A.sampleTime=SNK});var ur1=C((K0A)=>{Object.defineProperty(K0A,"__esModule",{value:!0});K0A.scan=void 0;var CNK=L4(),hNK=pn1();function INK(A,q){return CNK.operate(hNK.scanInternals(A,q,arguments.length>=2,!0))}K0A.scan=INK});var Br1=C((w0A)=>{Object.defineProperty(w0A,"__esModule",{value:!0});w0A.sequenceEqual=void 0;var bNK=L4(),xNK=bq(),uNK=E5();function BNK(A,q){if(q===void 0)q=function(K,Y){return K===Y};return bNK.operate(function(K,Y){var z=z0A(),w=z0A(),_=function(O){Y.next(O),Y.complete()},$=function(O,H){var j=xNK.createOperatorSubscriber(Y,function(J){var{buffer:M,complete:D}=H;if(M.length===0)D?_(!1):O.buffer.push(J);else!q(J,M.shift())&&_(!1)},function(){O.complete=!0;var{complete:J,buffer:M}=H;J&&_(M.length===0),j===null||j===void 0||j.unsubscribe()});return j};K.subscribe($(z,w)),uNK.innerFrom(A).subscribe($(w,z))})}w0A.sequenceEqual=BNK;function z0A(){return{buffer:[],complete:!1}}});var g41=C((Ra)=>{var mNK=Ra&&Ra.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},gNK=Ra&&Ra.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.share=void 0;var $0A=E5(),FNK=Z0(),O0A=Bj6(),QNK=L4();function UNK(A){if(A===void 0)A={};var q=A.connector,K=q===void 0?function(){return new FNK.Subject}:q,Y=A.resetOnError,z=Y===void 0?!0:Y,w=A.resetOnComplete,_=w===void 0?!0:w,$=A.resetOnRefCountZero,O=$===void 0?!0:$;return function(H){var j,J,M,D=0,X=!1,P=!1,W=function(){J===null||J===void 0||J.unsubscribe(),J=void 0},Z=function(){W(),j=M=void 0,X=P=!1},G=function(){var f=j;Z(),f===null||f===void 0||f.unsubscribe()};return QNK.operate(function(f,V){if(D++,!P&&!X)W();var N=M=M!==null&&M!==void 0?M:K();if(V.add(function(){if(D--,D===0&&!P&&!X)J=mr1(G,O)}),N.subscribe(V),!j&&D>0)j=new O0A.SafeSubscriber({next:function(v){return N.next(v)},error:function(v){P=!0,W(),J=mr1(Z,z,v),N.error(v)},complete:function(){X=!0,W(),J=mr1(Z,_),N.complete()}}),$0A.innerFrom(f).subscribe(j)})(H)}}Ra.share=UNK;function mr1(A,q){var K=[];for(var Y=2;Y<arguments.length;Y++)K[Y-2]=arguments[Y];if(q===!0){A();return}if(q===!1)return;var z=new O0A.SafeSubscriber({next:function(){z.unsubscribe(),A()}});return $0A.innerFrom(q.apply(void 0,gNK([],mNK(K)))).subscribe(z)}});var gr1=C((H0A)=>{Object.defineProperty(H0A,"__esModule",{value:!0});H0A.shareReplay=void 0;var pNK=D41(),dNK=g41();function cNK(A,q,K){var Y,z,w,_,$=!1;if(A&&typeof A==="object")Y=A.bufferSize,_=Y===void 0?1/0:Y,z=A.windowTime,q=z===void 0?1/0:z,w=A.refCount,$=w===void 0?!1:w,K=A.scheduler;else _=A!==null&&A!==void 0?A:1/0;return dNK.share({connector:function(){return new pNK.ReplaySubject(_,q,K)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:$})}H0A.shareReplay=cNK});var Fr1=C((J0A)=>{Object.defineProperty(J0A,"__esModule",{value:!0});J0A.single=void 0;var lNK=Xa(),iNK=Nn1(),nNK=Vn1(),rNK=L4(),oNK=bq();function aNK(A){return rNK.operate(function(q,K){var Y=!1,z,w=!1,_=0;q.subscribe(oNK.createOperatorSubscriber(K,function($){if(w=!0,!A||A($,_++,q))Y&&K.error(new iNK.SequenceError("Too many matching values")),Y=!0,z=$},function(){if(Y)K.next(z),K.complete();else K.error(w?new nNK.NotFoundError("No matching values"):new lNK.EmptyError)}))})}J0A.single=aNK});var Qr1=C((D0A)=>{Object.defineProperty(D0A,"__esModule",{value:!0});D0A.skip=void 0;var sNK=_d();function tNK(A){return sNK.filter(function(q,K){return A<=K})}D0A.skip=tNK});var Ur1=C((P0A)=>{Object.defineProperty(P0A,"__esModule",{value:!0});P0A.skipLast=void 0;var eNK=W0(),AvK=L4(),qvK=bq();function KvK(A){return A<=0?eNK.identity:AvK.operate(function(q,K){var Y=Array(A),z=0;return q.subscribe(qvK.createOperatorSubscriber(K,function(w){var _=z++;if(_<A)Y[_]=w;else{var $=_%A,O=Y[$];Y[$]=w,K.next(O)}})),function(){Y=null}})}P0A.skipLast=KvK});var pr1=C((G0A)=>{Object.defineProperty(G0A,"__esModule",{value:!0});G0A.skipUntil=void 0;var YvK=L4(),Z0A=bq(),zvK=E5(),wvK=P0();function _vK(A){return YvK.operate(function(q,K){var Y=!1,z=Z0A.createOperatorSubscriber(K,function(){z===null||z===void 0||z.unsubscribe(),Y=!0},wvK.noop);zvK.innerFrom(A).subscribe(z),q.subscribe(Z0A.createOperatorSubscriber(K,function(w){return Y&&K.next(w)}))})}G0A.skipUntil=_vK});var dr1=C((T0A)=>{Object.defineProperty(T0A,"__esModule",{value:!0});T0A.skipWhile=void 0;var $vK=L4(),OvK=bq();function HvK(A){return $vK.operate(function(q,K){var Y=!1,z=0;q.subscribe(OvK.createOperatorSubscriber(K,function(w){return(Y||(Y=!A(w,z++)))&&K.next(w)}))})}T0A.skipWhile=HvK});var cr1=C((v0A)=>{Object.defineProperty(v0A,"__esModule",{value:!0});v0A.startWith=void 0;var N0A=mC6(),jvK=BV(),JvK=L4();function MvK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=jvK.popScheduler(A);return JvK.operate(function(Y,z){(K?N0A.concat(A,Y,K):N0A.concat(A,Y)).subscribe(z)})}v0A.startWith=MvK});var MJ6=C((L0A)=>{Object.defineProperty(L0A,"__esModule",{value:!0});L0A.switchMap=void 0;var DvK=E5(),XvK=L4(),E0A=bq();function PvK(A,q){return XvK.operate(function(K,Y){var z=null,w=0,_=!1,$=function(){return _&&!z&&Y.complete()};K.subscribe(E0A.createOperatorSubscriber(Y,function(O){z===null||z===void 0||z.unsubscribe();var H=0,j=w++;DvK.innerFrom(A(O,j)).subscribe(z=E0A.createOperatorSubscriber(Y,function(J){return Y.next(q?q(O,J,j,H++):J)},function(){z=null,$()}))},function(){_=!0,$()}))})}L0A.switchMap=PvK});var lr1=C((R0A)=>{Object.defineProperty(R0A,"__esModule",{value:!0});R0A.switchAll=void 0;var WvK=MJ6(),ZvK=W0();function GvK(){return WvK.switchMap(ZvK.identity)}R0A.switchAll=GvK});var ir1=C((h0A)=>{Object.defineProperty(h0A,"__esModule",{value:!0});h0A.switchMapTo=void 0;var C0A=MJ6(),fvK=j2();function TvK(A,q){return fvK.isFunction(q)?C0A.switchMap(function(){return A},q):C0A.switchMap(function(){return A})}h0A.switchMapTo=TvK});var nr1=C((b0A)=>{Object.defineProperty(b0A,"__esModule",{value:!0});b0A.switchScan=void 0;var VvK=MJ6(),NvK=L4();function vvK(A,q){return NvK.operate(function(K,Y){var z=q;return VvK.switchMap(function(w,_){return A(z,w,_)},function(w,_){return z=_,_})(K).subscribe(Y),function(){z=null}})}b0A.switchScan=vvK});var rr1=C((u0A)=>{Object.defineProperty(u0A,"__esModule",{value:!0});u0A.takeUntil=void 0;var kvK=L4(),EvK=bq(),LvK=E5(),yvK=P0();function RvK(A){return kvK.operate(function(q,K){LvK.innerFrom(A).subscribe(EvK.createOperatorSubscriber(K,function(){return K.complete()},yvK.noop)),!K.closed&&q.subscribe(K)})}u0A.takeUntil=RvK});var or1=C((m0A)=>{Object.defineProperty(m0A,"__esModule",{value:!0});m0A.takeWhile=void 0;var SvK=L4(),CvK=bq();function hvK(A,q){if(q===void 0)q=!1;return SvK.operate(function(K,Y){var z=0;K.subscribe(CvK.createOperatorSubscriber(Y,function(w){var _=A(w,z++);(_||q)&&Y.next(w),!_&&Y.complete()}))})}m0A.takeWhile=hvK});var ar1=C((F0A)=>{Object.defineProperty(F0A,"__esModule",{value:!0});F0A.tap=void 0;var IvK=j2(),bvK=L4(),xvK=bq(),uvK=W0();function BvK(A,q,K){var Y=IvK.isFunction(A)||q||K?{next:A,error:q,complete:K}:A;return Y?bvK.operate(function(z,w){var _;(_=Y.subscribe)===null||_===void 0||_.call(Y);var $=!0;z.subscribe(xvK.createOperatorSubscriber(w,function(O){var H;(H=Y.next)===null||H===void 0||H.call(Y,O),w.next(O)},function(){var O;$=!1,(O=Y.complete)===null||O===void 0||O.call(Y),w.complete()},function(O){var H;$=!1,(H=Y.error)===null||H===void 0||H.call(Y,O),w.error(O)},function(){var O,H;if($)(O=Y.unsubscribe)===null||O===void 0||O.call(Y);(H=Y.finalize)===null||H===void 0||H.call(Y)}))}):uvK.identity}F0A.tap=BvK});var F41=C((p0A)=>{Object.defineProperty(p0A,"__esModule",{value:!0});p0A.throttle=void 0;var mvK=L4(),U0A=bq(),gvK=E5();function FvK(A,q){return mvK.operate(function(K,Y){var z=q!==null&&q!==void 0?q:{},w=z.leading,_=w===void 0?!0:w,$=z.trailing,O=$===void 0?!1:$,H=!1,j=null,J=null,M=!1,D=function(){if(J===null||J===void 0||J.unsubscribe(),J=null,O)W(),M&&Y.complete()},X=function(){J=null,M&&Y.complete()},P=function(Z){return J=gvK.innerFrom(A(Z)).subscribe(U0A.createOperatorSubscriber(Y,D,X))},W=function(){if(H){H=!1;var Z=j;j=null,Y.next(Z),!M&&P(Z)}};K.subscribe(U0A.createOperatorSubscriber(Y,function(Z){H=!0,j=Z,!(J&&!J.closed)&&(_?W():P(Z))},function(){M=!0,!(O&&H&&J&&!J.closed)&&Y.complete()}))})}p0A.throttle=FvK});var sr1=C((c0A)=>{Object.defineProperty(c0A,"__esModule",{value:!0});c0A.throttleTime=void 0;var QvK=uV(),UvK=F41(),pvK=Ga();function dvK(A,q,K){if(q===void 0)q=QvK.asyncScheduler;var Y=pvK.timer(A,q);return UvK.throttle(function(){return Y},K)}c0A.throttleTime=dvK});var tr1=C((n0A)=>{Object.defineProperty(n0A,"__esModule",{value:!0});n0A.TimeInterval=n0A.timeInterval=void 0;var cvK=uV(),lvK=L4(),ivK=bq();function nvK(A){if(A===void 0)A=cvK.asyncScheduler;return lvK.operate(function(q,K){var Y=A.now();q.subscribe(ivK.createOperatorSubscriber(K,function(z){var w=A.now(),_=w-Y;Y=w,K.next(new i0A(z,_))}))})}n0A.timeInterval=nvK;var i0A=function(){function A(q,K){this.value=q,this.interval=K}return A}();n0A.TimeInterval=i0A});var er1=C((o0A)=>{Object.defineProperty(o0A,"__esModule",{value:!0});o0A.timeoutWith=void 0;var ovK=uV(),avK=T41(),svK=uC6();function tvK(A,q,K){var Y,z,w;if(K=K!==null&&K!==void 0?K:ovK.async,avK.isValidDate(A))Y=A;else if(typeof A==="number")z=A;if(q)w=function(){return q};else throw TypeError("No observable provided to switch to");if(Y==null&&z==null)throw TypeError("No timeout provided.");return svK.timeout({first:Y,each:z,scheduler:K,with:w})}o0A.timeoutWith=tvK});var Ao1=C((s0A)=>{Object.defineProperty(s0A,"__esModule",{value:!0});s0A.timestamp=void 0;var evK=M41(),AkK=wd();function qkK(A){if(A===void 0)A=evK.dateTimestampProvider;return AkK.map(function(q){return{value:q,timestamp:A.now()}})}s0A.timestamp=qkK});var qo1=C((qWA)=>{Object.defineProperty(qWA,"__esModule",{value:!0});qWA.window=void 0;var e0A=Z0(),KkK=L4(),AWA=bq(),YkK=P0(),zkK=E5();function wkK(A){return KkK.operate(function(q,K){var Y=new e0A.Subject;K.next(Y.asObservable());var z=function(w){Y.error(w),K.error(w)};return q.subscribe(AWA.createOperatorSubscriber(K,function(w){return Y===null||Y===void 0?void 0:Y.next(w)},function(){Y.complete(),K.complete()},z)),zkK.innerFrom(A).subscribe(AWA.createOperatorSubscriber(K,function(){Y.complete(),K.next(Y=new e0A.Subject)},YkK.noop,z)),function(){Y===null||Y===void 0||Y.unsubscribe(),Y=null}})}qWA.window=wkK});var Ko1=C((DJ6)=>{var _kK=DJ6&&DJ6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(DJ6,"__esModule",{value:!0});DJ6.windowCount=void 0;var YWA=Z0(),$kK=L4(),OkK=bq();function HkK(A,q){if(q===void 0)q=0;var K=q>0?q:A;return $kK.operate(function(Y,z){var w=[new YWA.Subject],_=[],$=0;z.next(w[0].asObservable()),Y.subscribe(OkK.createOperatorSubscriber(z,function(O){var H,j;try{for(var J=_kK(w),M=J.next();!M.done;M=J.next()){var D=M.value;D.next(O)}}catch(W){H={error:W}}finally{try{if(M&&!M.done&&(j=J.return))j.call(J)}finally{if(H)throw H.error}}var X=$-A+1;if(X>=0&&X%K===0)w.shift().complete();if(++$%K===0){var P=new YWA.Subject;w.push(P),z.next(P.asObservable())}},function(){while(w.length>0)w.shift().complete();z.complete()},function(O){while(w.length>0)w.shift().error(O);z.error(O)},function(){_=null,w=null}))})}DJ6.windowCount=HkK});var Yo1=C((wWA)=>{Object.defineProperty(wWA,"__esModule",{value:!0});wWA.windowTime=void 0;var jkK=Z0(),JkK=uV(),MkK=xk(),DkK=L4(),XkK=bq(),PkK=Kd(),WkK=BV(),zWA=Yd();function ZkK(A){var q,K,Y=[];for(var z=1;z<arguments.length;z++)Y[z-1]=arguments[z];var w=(q=WkK.popScheduler(Y))!==null&&q!==void 0?q:JkK.asyncScheduler,_=(K=Y[0])!==null&&K!==void 0?K:null,$=Y[1]||1/0;return DkK.operate(function(O,H){var j=[],J=!1,M=function(W){var{window:Z,subs:G}=W;Z.complete(),G.unsubscribe(),PkK.arrRemove(j,W),J&&D()},D=function(){if(j){var W=new MkK.Subscription;H.add(W);var Z=new jkK.Subject,G={window:Z,subs:W,seen:0};j.push(G),H.next(Z.asObservable()),zWA.executeSchedule(W,w,function(){return M(G)},A)}};if(_!==null&&_>=0)zWA.executeSchedule(H,w,D,_,!0);else J=!0;D();var X=function(W){return j.slice().forEach(W)},P=function(W){X(function(Z){var G=Z.window;return W(G)}),W(H),H.unsubscribe()};return O.subscribe(XkK.createOperatorSubscriber(H,function(W){X(function(Z){Z.window.next(W),$<=++Z.seen&&M(Z)})},function(){return P(function(W){return W.complete()})},function(W){return P(function(Z){return Z.error(W)})})),function(){j=null}})}wWA.windowTime=ZkK});var wo1=C((XJ6)=>{var GkK=XJ6&&XJ6.__values||function(A){var q=typeof Symbol==="function"&&Symbol.iterator,K=q&&A[q],Y=0;if(K)return K.call(A);if(A&&typeof A.length==="number")return{next:function(){if(A&&Y>=A.length)A=void 0;return{value:A&&A[Y++],done:!A}}};throw TypeError(q?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(XJ6,"__esModule",{value:!0});XJ6.windowToggle=void 0;var fkK=Z0(),TkK=xk(),VkK=L4(),$WA=E5(),zo1=bq(),OWA=P0(),NkK=Kd();function vkK(A,q){return VkK.operate(function(K,Y){var z=[],w=function(_){while(0<z.length)z.shift().error(_);Y.error(_)};$WA.innerFrom(A).subscribe(zo1.createOperatorSubscriber(Y,function(_){var $=new fkK.Subject;z.push($);var O=new TkK.Subscription,H=function(){NkK.arrRemove(z,$),$.complete(),O.unsubscribe()},j;try{j=$WA.innerFrom(q(_))}catch(J){w(J);return}Y.next($.asObservable()),O.add(j.subscribe(zo1.createOperatorSubscriber(Y,H,OWA.noop,w)))},OWA.noop)),K.subscribe(zo1.createOperatorSubscriber(Y,function(_){var $,O,H=z.slice();try{for(var j=GkK(H),J=j.next();!J.done;J=j.next()){var M=J.value;M.next(_)}}catch(D){$={error:D}}finally{try{if(J&&!J.done&&(O=j.return))O.call(j)}finally{if($)throw $.error}}},function(){while(0<z.length)z.shift().complete();Y.complete()},w,function(){while(0<z.length)z.shift().unsubscribe()}))})}XJ6.windowToggle=vkK});var _o1=C((jWA)=>{Object.defineProperty(jWA,"__esModule",{value:!0});jWA.windowWhen=void 0;var kkK=Z0(),EkK=L4(),HWA=bq(),LkK=E5();function ykK(A){return EkK.operate(function(q,K){var Y,z,w=function($){Y.error($),K.error($)},_=function(){z===null||z===void 0||z.unsubscribe(),Y===null||Y===void 0||Y.complete(),Y=new kkK.Subject,K.next(Y.asObservable());var $;try{$=LkK.innerFrom(A())}catch(O){w(O);return}$.subscribe(z=HWA.createOperatorSubscriber(K,_,_,w))};_(),q.subscribe(HWA.createOperatorSubscriber(K,function($){return Y.next($)},function(){Y.complete(),K.complete()},w,function(){z===null||z===void 0||z.unsubscribe(),Y=null}))})}jWA.windowWhen=ykK});var $o1=C((Sa)=>{var MWA=Sa&&Sa.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},DWA=Sa&&Sa.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.withLatestFrom=void 0;var RkK=L4(),XWA=bq(),SkK=E5(),CkK=W0(),hkK=P0(),IkK=BV();function bkK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];var K=IkK.popResultSelector(A);return RkK.operate(function(Y,z){var w=A.length,_=Array(w),$=A.map(function(){return!1}),O=!1,H=function(J){SkK.innerFrom(A[J]).subscribe(XWA.createOperatorSubscriber(z,function(M){if(_[J]=M,!O&&!$[J])$[J]=!0,(O=$.every(CkK.identity))&&($=null)},hkK.noop))};for(var j=0;j<w;j++)H(j);Y.subscribe(XWA.createOperatorSubscriber(z,function(J){if(O){var M=DWA([J],MWA(_));z.next(K?K.apply(void 0,DWA([],MWA(M))):M)}}))})}Sa.withLatestFrom=bkK});var Oo1=C((PWA)=>{Object.defineProperty(PWA,"__esModule",{value:!0});PWA.zipAll=void 0;var xkK=v41(),ukK=dn1();function BkK(A){return ukK.joinAllInternals(xkK.zip,A)}PWA.zipAll=BkK});var Ho1=C((Ca)=>{var mkK=Ca&&Ca.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},gkK=Ca&&Ca.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Ca,"__esModule",{value:!0});Ca.zip=void 0;var FkK=v41(),QkK=L4();function UkK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return QkK.operate(function(K,Y){FkK.zip.apply(void 0,gkK([K],mkK(A))).subscribe(Y)})}Ca.zip=UkK});var jo1=C((ha)=>{var pkK=ha&&ha.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},dkK=ha&&ha.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(ha,"__esModule",{value:!0});ha.zipWith=void 0;var ckK=Ho1();function lkK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return ckK.zip.apply(void 0,dkK([],pkK(A)))}ha.zipWith=lkK});var vWA=C((J1)=>{var ikK=J1&&J1.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;Object.defineProperty(A,Y,{enumerable:!0,get:function(){return q[K]}})}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),nkK=J1&&J1.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))ikK(q,A,K)};Object.defineProperty(J1,"__esModule",{value:!0});J1.interval=J1.iif=J1.generate=J1.fromEventPattern=J1.fromEvent=J1.from=J1.forkJoin=J1.empty=J1.defer=J1.connectable=J1.concat=J1.combineLatest=J1.bindNodeCallback=J1.bindCallback=J1.UnsubscriptionError=J1.TimeoutError=J1.SequenceError=J1.ObjectUnsubscribedError=J1.NotFoundError=J1.EmptyError=J1.ArgumentOutOfRangeError=J1.firstValueFrom=J1.lastValueFrom=J1.isObservable=J1.identity=J1.noop=J1.pipe=J1.NotificationKind=J1.Notification=J1.Subscriber=J1.Subscription=J1.Scheduler=J1.VirtualAction=J1.VirtualTimeScheduler=J1.animationFrameScheduler=J1.animationFrame=J1.queueScheduler=J1.queue=J1.asyncScheduler=J1.async=J1.asapScheduler=J1.asap=J1.AsyncSubject=J1.ReplaySubject=J1.BehaviorSubject=J1.Subject=J1.animationFrames=J1.observable=J1.ConnectableObservable=J1.Observable=void 0;J1.filter=J1.expand=J1.exhaustMap=J1.exhaustAll=J1.exhaust=J1.every=J1.endWith=J1.elementAt=J1.distinctUntilKeyChanged=J1.distinctUntilChanged=J1.distinct=J1.dematerialize=J1.delayWhen=J1.delay=J1.defaultIfEmpty=J1.debounceTime=J1.debounce=J1.count=J1.connect=J1.concatWith=J1.concatMapTo=J1.concatMap=J1.concatAll=J1.combineLatestWith=J1.combineLatestAll=J1.combineAll=J1.catchError=J1.bufferWhen=J1.bufferToggle=J1.bufferTime=J1.bufferCount=J1.buffer=J1.auditTime=J1.audit=J1.config=J1.NEVER=J1.EMPTY=J1.scheduled=J1.zip=J1.using=J1.timer=J1.throwError=J1.range=J1.race=J1.partition=J1.pairs=J1.onErrorResumeNext=J1.of=J1.never=J1.merge=void 0;J1.switchMap=J1.switchAll=J1.subscribeOn=J1.startWith=J1.skipWhile=J1.skipUntil=J1.skipLast=J1.skip=J1.single=J1.shareReplay=J1.share=J1.sequenceEqual=J1.scan=J1.sampleTime=J1.sample=J1.refCount=J1.retryWhen=J1.retry=J1.repeatWhen=J1.repeat=J1.reduce=J1.raceWith=J1.publishReplay=J1.publishLast=J1.publishBehavior=J1.publish=J1.pluck=J1.pairwise=J1.onErrorResumeNextWith=J1.observeOn=J1.multicast=J1.min=J1.mergeWith=J1.mergeScan=J1.mergeMapTo=J1.mergeMap=J1.flatMap=J1.mergeAll=J1.max=J1.materialize=J1.mapTo=J1.map=J1.last=J1.isEmpty=J1.ignoreElements=J1.groupBy=J1.first=J1.findIndex=J1.find=J1.finalize=void 0;J1.zipWith=J1.zipAll=J1.withLatestFrom=J1.windowWhen=J1.windowToggle=J1.windowTime=J1.windowCount=J1.window=J1.toArray=J1.timestamp=J1.timeoutWith=J1.timeout=J1.timeInterval=J1.throwIfEmpty=J1.throttleTime=J1.throttle=J1.tap=J1.takeWhile=J1.takeUntil=J1.takeLast=J1.take=J1.switchScan=J1.switchMapTo=void 0;var rkK=g2();Object.defineProperty(J1,"Observable",{enumerable:!0,get:function(){return rkK.Observable}});var okK=bC6();Object.defineProperty(J1,"ConnectableObservable",{enumerable:!0,get:function(){return okK.ConnectableObservable}});var akK=hC6();Object.defineProperty(J1,"observable",{enumerable:!0,get:function(){return akK.observable}});var skK=eOA();Object.defineProperty(J1,"animationFrames",{enumerable:!0,get:function(){return skK.animationFrames}});var tkK=Z0();Object.defineProperty(J1,"Subject",{enumerable:!0,get:function(){return tkK.Subject}});var ekK=Kn1();Object.defineProperty(J1,"BehaviorSubject",{enumerable:!0,get:function(){return ekK.BehaviorSubject}});var AEK=D41();Object.defineProperty(J1,"ReplaySubject",{enumerable:!0,get:function(){return AEK.ReplaySubject}});var qEK=X41();Object.defineProperty(J1,"AsyncSubject",{enumerable:!0,get:function(){return qEK.AsyncSubject}});var ZWA=LHA();Object.defineProperty(J1,"asap",{enumerable:!0,get:function(){return ZWA.asap}});Object.defineProperty(J1,"asapScheduler",{enumerable:!0,get:function(){return ZWA.asapScheduler}});var GWA=uV();Object.defineProperty(J1,"async",{enumerable:!0,get:function(){return GWA.async}});Object.defineProperty(J1,"asyncScheduler",{enumerable:!0,get:function(){return GWA.asyncScheduler}});var fWA=uHA();Object.defineProperty(J1,"queue",{enumerable:!0,get:function(){return fWA.queue}});Object.defineProperty(J1,"queueScheduler",{enumerable:!0,get:function(){return fWA.queueScheduler}});var TWA=pHA();Object.defineProperty(J1,"animationFrame",{enumerable:!0,get:function(){return TWA.animationFrame}});Object.defineProperty(J1,"animationFrameScheduler",{enumerable:!0,get:function(){return TWA.animationFrameScheduler}});var VWA=lHA();Object.defineProperty(J1,"VirtualTimeScheduler",{enumerable:!0,get:function(){return VWA.VirtualTimeScheduler}});Object.defineProperty(J1,"VirtualAction",{enumerable:!0,get:function(){return VWA.VirtualAction}});var KEK=wn1();Object.defineProperty(J1,"Scheduler",{enumerable:!0,get:function(){return KEK.Scheduler}});var YEK=xk();Object.defineProperty(J1,"Subscription",{enumerable:!0,get:function(){return YEK.Subscription}});var zEK=Bj6();Object.defineProperty(J1,"Subscriber",{enumerable:!0,get:function(){return zEK.Subscriber}});var NWA=f41();Object.defineProperty(J1,"Notification",{enumerable:!0,get:function(){return NWA.Notification}});Object.defineProperty(J1,"NotificationKind",{enumerable:!0,get:function(){return NWA.NotificationKind}});var wEK=IC6();Object.defineProperty(J1,"pipe",{enumerable:!0,get:function(){return wEK.pipe}});var _EK=P0();Object.defineProperty(J1,"noop",{enumerable:!0,get:function(){return _EK.noop}});var $EK=W0();Object.defineProperty(J1,"identity",{enumerable:!0,get:function(){return $EK.identity}});var OEK=_JA();Object.defineProperty(J1,"isObservable",{enumerable:!0,get:function(){return OEK.isObservable}});var HEK=JJA();Object.defineProperty(J1,"lastValueFrom",{enumerable:!0,get:function(){return HEK.lastValueFrom}});var jEK=XJA();Object.defineProperty(J1,"firstValueFrom",{enumerable:!0,get:function(){return jEK.firstValueFrom}});var JEK=Tn1();Object.defineProperty(J1,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return JEK.ArgumentOutOfRangeError}});var MEK=Xa();Object.defineProperty(J1,"EmptyError",{enumerable:!0,get:function(){return MEK.EmptyError}});var DEK=Vn1();Object.defineProperty(J1,"NotFoundError",{enumerable:!0,get:function(){return DEK.NotFoundError}});var XEK=ti1();Object.defineProperty(J1,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return XEK.ObjectUnsubscribedError}});var PEK=Nn1();Object.defineProperty(J1,"SequenceError",{enumerable:!0,get:function(){return PEK.SequenceError}});var WEK=uC6();Object.defineProperty(J1,"TimeoutError",{enumerable:!0,get:function(){return WEK.TimeoutError}});var ZEK=Fi1();Object.defineProperty(J1,"UnsubscriptionError",{enumerable:!0,get:function(){return ZEK.UnsubscriptionError}});var GEK=hJA();Object.defineProperty(J1,"bindCallback",{enumerable:!0,get:function(){return GEK.bindCallback}});var fEK=xJA();Object.defineProperty(J1,"bindNodeCallback",{enumerable:!0,get:function(){return fEK.bindNodeCallback}});var TEK=V41();Object.defineProperty(J1,"combineLatest",{enumerable:!0,get:function(){return TEK.combineLatest}});var VEK=mC6();Object.defineProperty(J1,"concat",{enumerable:!0,get:function(){return VEK.concat}});var NEK=OMA();Object.defineProperty(J1,"connectable",{enumerable:!0,get:function(){return NEK.connectable}});var vEK=gC6();Object.defineProperty(J1,"defer",{enumerable:!0,get:function(){return vEK.defer}});var kEK=GI();Object.defineProperty(J1,"empty",{enumerable:!0,get:function(){return kEK.empty}});var EEK=JMA();Object.defineProperty(J1,"forkJoin",{enumerable:!0,get:function(){return EEK.forkJoin}});var LEK=zd();Object.defineProperty(J1,"from",{enumerable:!0,get:function(){return LEK.from}});var yEK=DMA();Object.defineProperty(J1,"fromEvent",{enumerable:!0,get:function(){return yEK.fromEvent}});var REK=ZMA();Object.defineProperty(J1,"fromEventPattern",{enumerable:!0,get:function(){return REK.fromEventPattern}});var SEK=fMA();Object.defineProperty(J1,"generate",{enumerable:!0,get:function(){return SEK.generate}});var CEK=NMA();Object.defineProperty(J1,"iif",{enumerable:!0,get:function(){return CEK.iif}});var hEK=Rn1();Object.defineProperty(J1,"interval",{enumerable:!0,get:function(){return hEK.interval}});var IEK=CMA();Object.defineProperty(J1,"merge",{enumerable:!0,get:function(){return IEK.merge}});var bEK=Sn1();Object.defineProperty(J1,"never",{enumerable:!0,get:function(){return bEK.never}});var xEK=G41();Object.defineProperty(J1,"of",{enumerable:!0,get:function(){return xEK.of}});var uEK=Cn1();Object.defineProperty(J1,"onErrorResumeNext",{enumerable:!0,get:function(){return uEK.onErrorResumeNext}});var BEK=UMA();Object.defineProperty(J1,"pairs",{enumerable:!0,get:function(){return BEK.pairs}});var mEK=aMA();Object.defineProperty(J1,"partition",{enumerable:!0,get:function(){return mEK.partition}});var gEK=In1();Object.defineProperty(J1,"race",{enumerable:!0,get:function(){return gEK.race}});var FEK=YDA();Object.defineProperty(J1,"range",{enumerable:!0,get:function(){return FEK.range}});var QEK=fn1();Object.defineProperty(J1,"throwError",{enumerable:!0,get:function(){return QEK.throwError}});var UEK=Ga();Object.defineProperty(J1,"timer",{enumerable:!0,get:function(){return UEK.timer}});var pEK=_DA();Object.defineProperty(J1,"using",{enumerable:!0,get:function(){return pEK.using}});var dEK=v41();Object.defineProperty(J1,"zip",{enumerable:!0,get:function(){return dEK.zip}});var cEK=Gn1();Object.defineProperty(J1,"scheduled",{enumerable:!0,get:function(){return cEK.scheduled}});var lEK=GI();Object.defineProperty(J1,"EMPTY",{enumerable:!0,get:function(){return lEK.EMPTY}});var iEK=Sn1();Object.defineProperty(J1,"NEVER",{enumerable:!0,get:function(){return iEK.NEVER}});nkK(ODA(),J1);var nEK=uj6();Object.defineProperty(J1,"config",{enumerable:!0,get:function(){return nEK.config}});var rEK=k41();Object.defineProperty(J1,"audit",{enumerable:!0,get:function(){return rEK.audit}});var oEK=bn1();Object.defineProperty(J1,"auditTime",{enumerable:!0,get:function(){return oEK.auditTime}});var aEK=xn1();Object.defineProperty(J1,"buffer",{enumerable:!0,get:function(){return aEK.buffer}});var sEK=Bn1();Object.defineProperty(J1,"bufferCount",{enumerable:!0,get:function(){return sEK.bufferCount}});var tEK=mn1();Object.defineProperty(J1,"bufferTime",{enumerable:!0,get:function(){return tEK.bufferTime}});var eEK=Fn1();Object.defineProperty(J1,"bufferToggle",{enumerable:!0,get:function(){return eEK.bufferToggle}});var ALK=Qn1();Object.defineProperty(J1,"bufferWhen",{enumerable:!0,get:function(){return ALK.bufferWhen}});var qLK=Un1();Object.defineProperty(J1,"catchError",{enumerable:!0,get:function(){return qLK.catchError}});var KLK=cn1();Object.defineProperty(J1,"combineAll",{enumerable:!0,get:function(){return KLK.combineAll}});var YLK=L41();Object.defineProperty(J1,"combineLatestAll",{enumerable:!0,get:function(){return YLK.combineLatestAll}});var zLK=in1();Object.defineProperty(J1,"combineLatestWith",{enumerable:!0,get:function(){return zLK.combineLatestWith}});var wLK=BC6();Object.defineProperty(J1,"concatAll",{enumerable:!0,get:function(){return wLK.concatAll}});var _LK=y41();Object.defineProperty(J1,"concatMap",{enumerable:!0,get:function(){return _LK.concatMap}});var $LK=nn1();Object.defineProperty(J1,"concatMapTo",{enumerable:!0,get:function(){return $LK.concatMapTo}});var OLK=on1();Object.defineProperty(J1,"concatWith",{enumerable:!0,get:function(){return OLK.concatWith}});var HLK=FC6();Object.defineProperty(J1,"connect",{enumerable:!0,get:function(){return HLK.connect}});var jLK=an1();Object.defineProperty(J1,"count",{enumerable:!0,get:function(){return jLK.count}});var JLK=sn1();Object.defineProperty(J1,"debounce",{enumerable:!0,get:function(){return JLK.debounce}});var MLK=tn1();Object.defineProperty(J1,"debounceTime",{enumerable:!0,get:function(){return MLK.debounceTime}});var DLK=OJ6();Object.defineProperty(J1,"defaultIfEmpty",{enumerable:!0,get:function(){return DLK.defaultIfEmpty}});var XLK=en1();Object.defineProperty(J1,"delay",{enumerable:!0,get:function(){return XLK.delay}});var PLK=C41();Object.defineProperty(J1,"delayWhen",{enumerable:!0,get:function(){return PLK.delayWhen}});var WLK=Ar1();Object.defineProperty(J1,"dematerialize",{enumerable:!0,get:function(){return WLK.dematerialize}});var ZLK=qr1();Object.defineProperty(J1,"distinct",{enumerable:!0,get:function(){return ZLK.distinct}});var GLK=h41();Object.defineProperty(J1,"distinctUntilChanged",{enumerable:!0,get:function(){return GLK.distinctUntilChanged}});var fLK=Kr1();Object.defineProperty(J1,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return fLK.distinctUntilKeyChanged}});var TLK=Yr1();Object.defineProperty(J1,"elementAt",{enumerable:!0,get:function(){return TLK.elementAt}});var VLK=zr1();Object.defineProperty(J1,"endWith",{enumerable:!0,get:function(){return VLK.endWith}});var NLK=wr1();Object.defineProperty(J1,"every",{enumerable:!0,get:function(){return NLK.every}});var vLK=_r1();Object.defineProperty(J1,"exhaust",{enumerable:!0,get:function(){return vLK.exhaust}});var kLK=b41();Object.defineProperty(J1,"exhaustAll",{enumerable:!0,get:function(){return kLK.exhaustAll}});var ELK=I41();Object.defineProperty(J1,"exhaustMap",{enumerable:!0,get:function(){return ELK.exhaustMap}});var LLK=$r1();Object.defineProperty(J1,"expand",{enumerable:!0,get:function(){return LLK.expand}});var yLK=_d();Object.defineProperty(J1,"filter",{enumerable:!0,get:function(){return yLK.filter}});var RLK=Or1();Object.defineProperty(J1,"finalize",{enumerable:!0,get:function(){return RLK.finalize}});var SLK=x41();Object.defineProperty(J1,"find",{enumerable:!0,get:function(){return SLK.find}});var CLK=Hr1();Object.defineProperty(J1,"findIndex",{enumerable:!0,get:function(){return CLK.findIndex}});var hLK=jr1();Object.defineProperty(J1,"first",{enumerable:!0,get:function(){return hLK.first}});var ILK=Jr1();Object.defineProperty(J1,"groupBy",{enumerable:!0,get:function(){return ILK.groupBy}});var bLK=R41();Object.defineProperty(J1,"ignoreElements",{enumerable:!0,get:function(){return bLK.ignoreElements}});var xLK=Mr1();Object.defineProperty(J1,"isEmpty",{enumerable:!0,get:function(){return xLK.isEmpty}});var uLK=Dr1();Object.defineProperty(J1,"last",{enumerable:!0,get:function(){return uLK.last}});var BLK=wd();Object.defineProperty(J1,"map",{enumerable:!0,get:function(){return BLK.map}});var mLK=S41();Object.defineProperty(J1,"mapTo",{enumerable:!0,get:function(){return mLK.mapTo}});var gLK=Pr1();Object.defineProperty(J1,"materialize",{enumerable:!0,get:function(){return gLK.materialize}});var FLK=Wr1();Object.defineProperty(J1,"max",{enumerable:!0,get:function(){return FLK.max}});var QLK=KJ6();Object.defineProperty(J1,"mergeAll",{enumerable:!0,get:function(){return QLK.mergeAll}});var ULK=Zr1();Object.defineProperty(J1,"flatMap",{enumerable:!0,get:function(){return ULK.flatMap}});var pLK=aB();Object.defineProperty(J1,"mergeMap",{enumerable:!0,get:function(){return pLK.mergeMap}});var dLK=Gr1();Object.defineProperty(J1,"mergeMapTo",{enumerable:!0,get:function(){return dLK.mergeMapTo}});var cLK=fr1();Object.defineProperty(J1,"mergeScan",{enumerable:!0,get:function(){return cLK.mergeScan}});var lLK=Vr1();Object.defineProperty(J1,"mergeWith",{enumerable:!0,get:function(){return lLK.mergeWith}});var iLK=Nr1();Object.defineProperty(J1,"min",{enumerable:!0,get:function(){return iLK.min}});var nLK=QC6();Object.defineProperty(J1,"multicast",{enumerable:!0,get:function(){return nLK.multicast}});var rLK=AJ6();Object.defineProperty(J1,"observeOn",{enumerable:!0,get:function(){return rLK.observeOn}});var oLK=vr1();Object.defineProperty(J1,"onErrorResumeNextWith",{enumerable:!0,get:function(){return oLK.onErrorResumeNextWith}});var aLK=kr1();Object.defineProperty(J1,"pairwise",{enumerable:!0,get:function(){return aLK.pairwise}});var sLK=Er1();Object.defineProperty(J1,"pluck",{enumerable:!0,get:function(){return sLK.pluck}});var tLK=Lr1();Object.defineProperty(J1,"publish",{enumerable:!0,get:function(){return tLK.publish}});var eLK=yr1();Object.defineProperty(J1,"publishBehavior",{enumerable:!0,get:function(){return eLK.publishBehavior}});var AyK=Rr1();Object.defineProperty(J1,"publishLast",{enumerable:!0,get:function(){return AyK.publishLast}});var qyK=Sr1();Object.defineProperty(J1,"publishReplay",{enumerable:!0,get:function(){return qyK.publishReplay}});var KyK=B41();Object.defineProperty(J1,"raceWith",{enumerable:!0,get:function(){return KyK.raceWith}});var YyK=Gq6();Object.defineProperty(J1,"reduce",{enumerable:!0,get:function(){return YyK.reduce}});var zyK=Cr1();Object.defineProperty(J1,"repeat",{enumerable:!0,get:function(){return zyK.repeat}});var wyK=hr1();Object.defineProperty(J1,"repeatWhen",{enumerable:!0,get:function(){return wyK.repeatWhen}});var _yK=Ir1();Object.defineProperty(J1,"retry",{enumerable:!0,get:function(){return _yK.retry}});var $yK=br1();Object.defineProperty(J1,"retryWhen",{enumerable:!0,get:function(){return $yK.retryWhen}});var OyK=J41();Object.defineProperty(J1,"refCount",{enumerable:!0,get:function(){return OyK.refCount}});var HyK=m41();Object.defineProperty(J1,"sample",{enumerable:!0,get:function(){return HyK.sample}});var jyK=xr1();Object.defineProperty(J1,"sampleTime",{enumerable:!0,get:function(){return jyK.sampleTime}});var JyK=ur1();Object.defineProperty(J1,"scan",{enumerable:!0,get:function(){return JyK.scan}});var MyK=Br1();Object.defineProperty(J1,"sequenceEqual",{enumerable:!0,get:function(){return MyK.sequenceEqual}});var DyK=g41();Object.defineProperty(J1,"share",{enumerable:!0,get:function(){return DyK.share}});var XyK=gr1();Object.defineProperty(J1,"shareReplay",{enumerable:!0,get:function(){return XyK.shareReplay}});var PyK=Fr1();Object.defineProperty(J1,"single",{enumerable:!0,get:function(){return PyK.single}});var WyK=Qr1();Object.defineProperty(J1,"skip",{enumerable:!0,get:function(){return WyK.skip}});var ZyK=Ur1();Object.defineProperty(J1,"skipLast",{enumerable:!0,get:function(){return ZyK.skipLast}});var GyK=pr1();Object.defineProperty(J1,"skipUntil",{enumerable:!0,get:function(){return GyK.skipUntil}});var fyK=dr1();Object.defineProperty(J1,"skipWhile",{enumerable:!0,get:function(){return fyK.skipWhile}});var TyK=cr1();Object.defineProperty(J1,"startWith",{enumerable:!0,get:function(){return TyK.startWith}});var VyK=qJ6();Object.defineProperty(J1,"subscribeOn",{enumerable:!0,get:function(){return VyK.subscribeOn}});var NyK=lr1();Object.defineProperty(J1,"switchAll",{enumerable:!0,get:function(){return NyK.switchAll}});var vyK=MJ6();Object.defineProperty(J1,"switchMap",{enumerable:!0,get:function(){return vyK.switchMap}});var kyK=ir1();Object.defineProperty(J1,"switchMapTo",{enumerable:!0,get:function(){return kyK.switchMapTo}});var EyK=nr1();Object.defineProperty(J1,"switchScan",{enumerable:!0,get:function(){return EyK.switchScan}});var LyK=HJ6();Object.defineProperty(J1,"take",{enumerable:!0,get:function(){return LyK.take}});var yyK=u41();Object.defineProperty(J1,"takeLast",{enumerable:!0,get:function(){return yyK.takeLast}});var RyK=rr1();Object.defineProperty(J1,"takeUntil",{enumerable:!0,get:function(){return RyK.takeUntil}});var SyK=or1();Object.defineProperty(J1,"takeWhile",{enumerable:!0,get:function(){return SyK.takeWhile}});var CyK=ar1();Object.defineProperty(J1,"tap",{enumerable:!0,get:function(){return CyK.tap}});var hyK=F41();Object.defineProperty(J1,"throttle",{enumerable:!0,get:function(){return hyK.throttle}});var IyK=sr1();Object.defineProperty(J1,"throttleTime",{enumerable:!0,get:function(){return IyK.throttleTime}});var byK=jJ6();Object.defineProperty(J1,"throwIfEmpty",{enumerable:!0,get:function(){return byK.throwIfEmpty}});var xyK=tr1();Object.defineProperty(J1,"timeInterval",{enumerable:!0,get:function(){return xyK.timeInterval}});var uyK=uC6();Object.defineProperty(J1,"timeout",{enumerable:!0,get:function(){return uyK.timeout}});var ByK=er1();Object.defineProperty(J1,"timeoutWith",{enumerable:!0,get:function(){return ByK.timeoutWith}});var myK=Ao1();Object.defineProperty(J1,"timestamp",{enumerable:!0,get:function(){return myK.timestamp}});var gyK=E41();Object.defineProperty(J1,"toArray",{enumerable:!0,get:function(){return gyK.toArray}});var FyK=qo1();Object.defineProperty(J1,"window",{enumerable:!0,get:function(){return FyK.window}});var QyK=Ko1();Object.defineProperty(J1,"windowCount",{enumerable:!0,get:function(){return QyK.windowCount}});var UyK=Yo1();Object.defineProperty(J1,"windowTime",{enumerable:!0,get:function(){return UyK.windowTime}});var pyK=wo1();Object.defineProperty(J1,"windowToggle",{enumerable:!0,get:function(){return pyK.windowToggle}});var dyK=_o1();Object.defineProperty(J1,"windowWhen",{enumerable:!0,get:function(){return dyK.windowWhen}});var cyK=$o1();Object.defineProperty(J1,"withLatestFrom",{enumerable:!0,get:function(){return cyK.withLatestFrom}});var lyK=Oo1();Object.defineProperty(J1,"zipAll",{enumerable:!0,get:function(){return lyK.zipAll}});var iyK=jo1();Object.defineProperty(J1,"zipWith",{enumerable:!0,get:function(){return iyK.zipWith}})});var yWA=C((EWA)=>{Object.defineProperty(EWA,"__esModule",{value:!0});EWA.partition=void 0;var nyK=hn1(),kWA=_d();function ryK(A,q){return function(K){return[kWA.filter(A,q)(K),kWA.filter(nyK.not(A,q))(K)]}}EWA.partition=ryK});var RWA=C((Ia)=>{var oyK=Ia&&Ia.__read||function(A,q){var K=typeof Symbol==="function"&&A[Symbol.iterator];if(!K)return A;var Y=K.call(A),z,w=[],_;try{while((q===void 0||q-- >0)&&!(z=Y.next()).done)w.push(z.value)}catch($){_={error:$}}finally{try{if(z&&!z.done&&(K=Y.return))K.call(Y)}finally{if(_)throw _.error}}return w},ayK=Ia&&Ia.__spreadArray||function(A,q){for(var K=0,Y=q.length,z=A.length;K<Y;K++,z++)A[z]=q[K];return A};Object.defineProperty(Ia,"__esModule",{value:!0});Ia.race=void 0;var syK=Zq6(),tyK=B41();function eyK(){var A=[];for(var q=0;q<arguments.length;q++)A[q]=arguments[q];return tyK.raceWith.apply(void 0,ayK([],oyK(syK.argsOrArgArray(A))))}Ia.race=eyK});var SWA=C((vA)=>{Object.defineProperty(vA,"__esModule",{value:!0});vA.mergeAll=vA.merge=vA.max=vA.materialize=vA.mapTo=vA.map=vA.last=vA.isEmpty=vA.ignoreElements=vA.groupBy=vA.first=vA.findIndex=vA.find=vA.finalize=vA.filter=vA.expand=vA.exhaustMap=vA.exhaustAll=vA.exhaust=vA.every=vA.endWith=vA.elementAt=vA.distinctUntilKeyChanged=vA.distinctUntilChanged=vA.distinct=vA.dematerialize=vA.delayWhen=vA.delay=vA.defaultIfEmpty=vA.debounceTime=vA.debounce=vA.count=vA.connect=vA.concatWith=vA.concatMapTo=vA.concatMap=vA.concatAll=vA.concat=vA.combineLatestWith=vA.combineLatest=vA.combineLatestAll=vA.combineAll=vA.catchError=vA.bufferWhen=vA.bufferToggle=vA.bufferTime=vA.bufferCount=vA.buffer=vA.auditTime=vA.audit=void 0;vA.timeInterval=vA.throwIfEmpty=vA.throttleTime=vA.throttle=vA.tap=vA.takeWhile=vA.takeUntil=vA.takeLast=vA.take=vA.switchScan=vA.switchMapTo=vA.switchMap=vA.switchAll=vA.subscribeOn=vA.startWith=vA.skipWhile=vA.skipUntil=vA.skipLast=vA.skip=vA.single=vA.shareReplay=vA.share=vA.sequenceEqual=vA.scan=vA.sampleTime=vA.sample=vA.refCount=vA.retryWhen=vA.retry=vA.repeatWhen=vA.repeat=vA.reduce=vA.raceWith=vA.race=vA.publishReplay=vA.publishLast=vA.publishBehavior=vA.publish=vA.pluck=vA.partition=vA.pairwise=vA.onErrorResumeNext=vA.observeOn=vA.multicast=vA.min=vA.mergeWith=vA.mergeScan=vA.mergeMapTo=vA.mergeMap=vA.flatMap=void 0;vA.zipWith=vA.zipAll=vA.zip=vA.withLatestFrom=vA.windowWhen=vA.windowToggle=vA.windowTime=vA.windowCount=vA.window=vA.toArray=vA.timestamp=vA.timeoutWith=vA.timeout=void 0;var ARK=k41();Object.defineProperty(vA,"audit",{enumerable:!0,get:function(){return ARK.audit}});var qRK=bn1();Object.defineProperty(vA,"auditTime",{enumerable:!0,get:function(){return qRK.auditTime}});var KRK=xn1();Object.defineProperty(vA,"buffer",{enumerable:!0,get:function(){return KRK.buffer}});var YRK=Bn1();Object.defineProperty(vA,"bufferCount",{enumerable:!0,get:function(){return YRK.bufferCount}});var zRK=mn1();Object.defineProperty(vA,"bufferTime",{enumerable:!0,get:function(){return zRK.bufferTime}});var wRK=Fn1();Object.defineProperty(vA,"bufferToggle",{enumerable:!0,get:function(){return wRK.bufferToggle}});var _RK=Qn1();Object.defineProperty(vA,"bufferWhen",{enumerable:!0,get:function(){return _RK.bufferWhen}});var $RK=Un1();Object.defineProperty(vA,"catchError",{enumerable:!0,get:function(){return $RK.catchError}});var ORK=cn1();Object.defineProperty(vA,"combineAll",{enumerable:!0,get:function(){return ORK.combineAll}});var HRK=L41();Object.defineProperty(vA,"combineLatestAll",{enumerable:!0,get:function(){return HRK.combineLatestAll}});var jRK=ln1();Object.defineProperty(vA,"combineLatest",{enumerable:!0,get:function(){return jRK.combineLatest}});var JRK=in1();Object.defineProperty(vA,"combineLatestWith",{enumerable:!0,get:function(){return JRK.combineLatestWith}});var MRK=rn1();Object.defineProperty(vA,"concat",{enumerable:!0,get:function(){return MRK.concat}});var DRK=BC6();Object.defineProperty(vA,"concatAll",{enumerable:!0,get:function(){return DRK.concatAll}});var XRK=y41();Object.defineProperty(vA,"concatMap",{enumerable:!0,get:function(){return XRK.concatMap}});var PRK=nn1();Object.defineProperty(vA,"concatMapTo",{enumerable:!0,get:function(){return PRK.concatMapTo}});var WRK=on1();Object.defineProperty(vA,"concatWith",{enumerable:!0,get:function(){return WRK.concatWith}});var ZRK=FC6();Object.defineProperty(vA,"connect",{enumerable:!0,get:function(){return ZRK.connect}});var GRK=an1();Object.defineProperty(vA,"count",{enumerable:!0,get:function(){return GRK.count}});var fRK=sn1();Object.defineProperty(vA,"debounce",{enumerable:!0,get:function(){return fRK.debounce}});var TRK=tn1();Object.defineProperty(vA,"debounceTime",{enumerable:!0,get:function(){return TRK.debounceTime}});var VRK=OJ6();Object.defineProperty(vA,"defaultIfEmpty",{enumerable:!0,get:function(){return VRK.defaultIfEmpty}});var NRK=en1();Object.defineProperty(vA,"delay",{enumerable:!0,get:function(){return NRK.delay}});var vRK=C41();Object.defineProperty(vA,"delayWhen",{enumerable:!0,get:function(){return vRK.delayWhen}});var kRK=Ar1();Object.defineProperty(vA,"dematerialize",{enumerable:!0,get:function(){return kRK.dematerialize}});var ERK=qr1();Object.defineProperty(vA,"distinct",{enumerable:!0,get:function(){return ERK.distinct}});var LRK=h41();Object.defineProperty(vA,"distinctUntilChanged",{enumerable:!0,get:function(){return LRK.distinctUntilChanged}});var yRK=Kr1();Object.defineProperty(vA,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return yRK.distinctUntilKeyChanged}});var RRK=Yr1();Object.defineProperty(vA,"elementAt",{enumerable:!0,get:function(){return RRK.elementAt}});var SRK=zr1();Object.defineProperty(vA,"endWith",{enumerable:!0,get:function(){return SRK.endWith}});var CRK=wr1();Object.defineProperty(vA,"every",{enumerable:!0,get:function(){return CRK.every}});var hRK=_r1();Object.defineProperty(vA,"exhaust",{enumerable:!0,get:function(){return hRK.exhaust}});var IRK=b41();Object.defineProperty(vA,"exhaustAll",{enumerable:!0,get:function(){return IRK.exhaustAll}});var bRK=I41();Object.defineProperty(vA,"exhaustMap",{enumerable:!0,get:function(){return bRK.exhaustMap}});var xRK=$r1();Object.defineProperty(vA,"expand",{enumerable:!0,get:function(){return xRK.expand}});var uRK=_d();Object.defineProperty(vA,"filter",{enumerable:!0,get:function(){return uRK.filter}});var BRK=Or1();Object.defineProperty(vA,"finalize",{enumerable:!0,get:function(){return BRK.finalize}});var mRK=x41();Object.defineProperty(vA,"find",{enumerable:!0,get:function(){return mRK.find}});var gRK=Hr1();Object.defineProperty(vA,"findIndex",{enumerable:!0,get:function(){return gRK.findIndex}});var FRK=jr1();Object.defineProperty(vA,"first",{enumerable:!0,get:function(){return FRK.first}});var QRK=Jr1();Object.defineProperty(vA,"groupBy",{enumerable:!0,get:function(){return QRK.groupBy}});var URK=R41();Object.defineProperty(vA,"ignoreElements",{enumerable:!0,get:function(){return URK.ignoreElements}});var pRK=Mr1();Object.defineProperty(vA,"isEmpty",{enumerable:!0,get:function(){return pRK.isEmpty}});var dRK=Dr1();Object.defineProperty(vA,"last",{enumerable:!0,get:function(){return dRK.last}});var cRK=wd();Object.defineProperty(vA,"map",{enumerable:!0,get:function(){return cRK.map}});var lRK=S41();Object.defineProperty(vA,"mapTo",{enumerable:!0,get:function(){return lRK.mapTo}});var iRK=Pr1();Object.defineProperty(vA,"materialize",{enumerable:!0,get:function(){return iRK.materialize}});var nRK=Wr1();Object.defineProperty(vA,"max",{enumerable:!0,get:function(){return nRK.max}});var rRK=Tr1();Object.defineProperty(vA,"merge",{enumerable:!0,get:function(){return rRK.merge}});var oRK=KJ6();Object.defineProperty(vA,"mergeAll",{enumerable:!0,get:function(){return oRK.mergeAll}});var aRK=Zr1();Object.defineProperty(vA,"flatMap",{enumerable:!0,get:function(){return aRK.flatMap}});var sRK=aB();Object.defineProperty(vA,"mergeMap",{enumerable:!0,get:function(){return sRK.mergeMap}});var tRK=Gr1();Object.defineProperty(vA,"mergeMapTo",{enumerable:!0,get:function(){return tRK.mergeMapTo}});var eRK=fr1();Object.defineProperty(vA,"mergeScan",{enumerable:!0,get:function(){return eRK.mergeScan}});var ASK=Vr1();Object.defineProperty(vA,"mergeWith",{enumerable:!0,get:function(){return ASK.mergeWith}});var qSK=Nr1();Object.defineProperty(vA,"min",{enumerable:!0,get:function(){return qSK.min}});var KSK=QC6();Object.defineProperty(vA,"multicast",{enumerable:!0,get:function(){return KSK.multicast}});var YSK=AJ6();Object.defineProperty(vA,"observeOn",{enumerable:!0,get:function(){return YSK.observeOn}});var zSK=vr1();Object.defineProperty(vA,"onErrorResumeNext",{enumerable:!0,get:function(){return zSK.onErrorResumeNext}});var wSK=kr1();Object.defineProperty(vA,"pairwise",{enumerable:!0,get:function(){return wSK.pairwise}});var _SK=yWA();Object.defineProperty(vA,"partition",{enumerable:!0,get:function(){return _SK.partition}});var $SK=Er1();Object.defineProperty(vA,"pluck",{enumerable:!0,get:function(){return $SK.pluck}});var OSK=Lr1();Object.defineProperty(vA,"publish",{enumerable:!0,get:function(){return OSK.publish}});var HSK=yr1();Object.defineProperty(vA,"publishBehavior",{enumerable:!0,get:function(){return HSK.publishBehavior}});var jSK=Rr1();Object.defineProperty(vA,"publishLast",{enumerable:!0,get:function(){return jSK.publishLast}});var JSK=Sr1();Object.defineProperty(vA,"publishReplay",{enumerable:!0,get:function(){return JSK.publishReplay}});var MSK=RWA();Object.defineProperty(vA,"race",{enumerable:!0,get:function(){return MSK.race}});var DSK=B41();Object.defineProperty(vA,"raceWith",{enumerable:!0,get:function(){return DSK.raceWith}});var XSK=Gq6();Object.defineProperty(vA,"reduce",{enumerable:!0,get:function(){return XSK.reduce}});var PSK=Cr1();Object.defineProperty(vA,"repeat",{enumerable:!0,get:function(){return PSK.repeat}});var WSK=hr1();Object.defineProperty(vA,"repeatWhen",{enumerable:!0,get:function(){return WSK.repeatWhen}});var ZSK=Ir1();Object.defineProperty(vA,"retry",{enumerable:!0,get:function(){return ZSK.retry}});var GSK=br1();Object.defineProperty(vA,"retryWhen",{enumerable:!0,get:function(){return GSK.retryWhen}});var fSK=J41();Object.defineProperty(vA,"refCount",{enumerable:!0,get:function(){return fSK.refCount}});var TSK=m41();Object.defineProperty(vA,"sample",{enumerable:!0,get:function(){return TSK.sample}});var VSK=xr1();Object.defineProperty(vA,"sampleTime",{enumerable:!0,get:function(){return VSK.sampleTime}});var NSK=ur1();Object.defineProperty(vA,"scan",{enumerable:!0,get:function(){return NSK.scan}});var vSK=Br1();Object.defineProperty(vA,"sequenceEqual",{enumerable:!0,get:function(){return vSK.sequenceEqual}});var kSK=g41();Object.defineProperty(vA,"share",{enumerable:!0,get:function(){return kSK.share}});var ESK=gr1();Object.defineProperty(vA,"shareReplay",{enumerable:!0,get:function(){return ESK.shareReplay}});var LSK=Fr1();Object.defineProperty(vA,"single",{enumerable:!0,get:function(){return LSK.single}});var ySK=Qr1();Object.defineProperty(vA,"skip",{enumerable:!0,get:function(){return ySK.skip}});var RSK=Ur1();Object.defineProperty(vA,"skipLast",{enumerable:!0,get:function(){return RSK.skipLast}});var SSK=pr1();Object.defineProperty(vA,"skipUntil",{enumerable:!0,get:function(){return SSK.skipUntil}});var CSK=dr1();Object.defineProperty(vA,"skipWhile",{enumerable:!0,get:function(){return CSK.skipWhile}});var hSK=cr1();Object.defineProperty(vA,"startWith",{enumerable:!0,get:function(){return hSK.startWith}});var ISK=qJ6();Object.defineProperty(vA,"subscribeOn",{enumerable:!0,get:function(){return ISK.subscribeOn}});var bSK=lr1();Object.defineProperty(vA,"switchAll",{enumerable:!0,get:function(){return bSK.switchAll}});var xSK=MJ6();Object.defineProperty(vA,"switchMap",{enumerable:!0,get:function(){return xSK.switchMap}});var uSK=ir1();Object.defineProperty(vA,"switchMapTo",{enumerable:!0,get:function(){return uSK.switchMapTo}});var BSK=nr1();Object.defineProperty(vA,"switchScan",{enumerable:!0,get:function(){return BSK.switchScan}});var mSK=HJ6();Object.defineProperty(vA,"take",{enumerable:!0,get:function(){return mSK.take}});var gSK=u41();Object.defineProperty(vA,"takeLast",{enumerable:!0,get:function(){return gSK.takeLast}});var FSK=rr1();Object.defineProperty(vA,"takeUntil",{enumerable:!0,get:function(){return FSK.takeUntil}});var QSK=or1();Object.defineProperty(vA,"takeWhile",{enumerable:!0,get:function(){return QSK.takeWhile}});var USK=ar1();Object.defineProperty(vA,"tap",{enumerable:!0,get:function(){return USK.tap}});var pSK=F41();Object.defineProperty(vA,"throttle",{enumerable:!0,get:function(){return pSK.throttle}});var dSK=sr1();Object.defineProperty(vA,"throttleTime",{enumerable:!0,get:function(){return dSK.throttleTime}});var cSK=jJ6();Object.defineProperty(vA,"throwIfEmpty",{enumerable:!0,get:function(){return cSK.throwIfEmpty}});var lSK=tr1();Object.defineProperty(vA,"timeInterval",{enumerable:!0,get:function(){return lSK.timeInterval}});var iSK=uC6();Object.defineProperty(vA,"timeout",{enumerable:!0,get:function(){return iSK.timeout}});var nSK=er1();Object.defineProperty(vA,"timeoutWith",{enumerable:!0,get:function(){return nSK.timeoutWith}});var rSK=Ao1();Object.defineProperty(vA,"timestamp",{enumerable:!0,get:function(){return rSK.timestamp}});var oSK=E41();Object.defineProperty(vA,"toArray",{enumerable:!0,get:function(){return oSK.toArray}});var aSK=qo1();Object.defineProperty(vA,"window",{enumerable:!0,get:function(){return aSK.window}});var sSK=Ko1();Object.defineProperty(vA,"windowCount",{enumerable:!0,get:function(){return sSK.windowCount}});var tSK=Yo1();Object.defineProperty(vA,"windowTime",{enumerable:!0,get:function(){return tSK.windowTime}});var eSK=wo1();Object.defineProperty(vA,"windowToggle",{enumerable:!0,get:function(){return eSK.windowToggle}});var ACK=_o1();Object.defineProperty(vA,"windowWhen",{enumerable:!0,get:function(){return ACK.windowWhen}});var qCK=$o1();Object.defineProperty(vA,"withLatestFrom",{enumerable:!0,get:function(){return qCK.withLatestFrom}});var KCK=Ho1();Object.defineProperty(vA,"zip",{enumerable:!0,get:function(){return KCK.zip}});var YCK=Oo1();Object.defineProperty(vA,"zipAll",{enumerable:!0,get:function(){return YCK.zipAll}});var zCK=jo1();Object.defineProperty(vA,"zipWith",{enumerable:!0,get:function(){return zCK.zipWith}})});var Jo1=C((dJw,CWA)=>{var PJ6=1000,WJ6=PJ6*60,ZJ6=WJ6*60,fq6=ZJ6*24,OCK=fq6*7,HCK=fq6*365.25;CWA.exports=function(A,q){q=q||{};var K=typeof A;if(K==="string"&&A.length>0)return jCK(A);else if(K==="number"&&isFinite(A))return q.long?MCK(A):JCK(A);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(A))};function jCK(A){if(A=String(A),A.length>100)return;var q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(A);if(!q)return;var K=parseFloat(q[1]),Y=(q[2]||"ms").toLowerCase();switch(Y){case"years":case"year":case"yrs":case"yr":case"y":return K*HCK;case"weeks":case"week":case"w":return K*OCK;case"days":case"day":case"d":return K*fq6;case"hours":case"hour":case"hrs":case"hr":case"h":return K*ZJ6;case"minutes":case"minute":case"mins":case"min":case"m":return K*WJ6;case"seconds":case"second":case"secs":case"sec":case"s":return K*PJ6;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return K;default:return}}function JCK(A){var q=Math.abs(A);if(q>=fq6)return Math.round(A/fq6)+"d";if(q>=ZJ6)return Math.round(A/ZJ6)+"h";if(q>=WJ6)return Math.round(A/WJ6)+"m";if(q>=PJ6)return Math.round(A/PJ6)+"s";return A+"ms"}function MCK(A){var q=Math.abs(A);if(q>=fq6)return Q41(A,q,fq6,"day");if(q>=ZJ6)return Q41(A,q,ZJ6,"hour");if(q>=WJ6)return Q41(A,q,WJ6,"minute");if(q>=PJ6)return Q41(A,q,PJ6,"second");return A+" ms"}function Q41(A,q,K,Y){var z=q>=K*1.5;return Math.round(A/K)+" "+Y+(z?"s":"")}});var Mo1=C((cJw,hWA)=>{function DCK(A){K.debug=K,K.default=K,K.coerce=O,K.disable=_,K.enable=z,K.enabled=$,K.humanize=Jo1(),K.destroy=H,Object.keys(A).forEach((j)=>{K[j]=A[j]}),K.names=[],K.skips=[],K.formatters={};function q(j){let J=0;for(let M=0;M<j.length;M++)J=(J<<5)-J+j.charCodeAt(M),J|=0;return K.colors[Math.abs(J)%K.colors.length]}K.selectColor=q;function K(j){let J,M=null,D,X;function P(...W){if(!P.enabled)return;let Z=P,G=Number(new Date),f=G-(J||G);if(Z.diff=f,Z.prev=J,Z.curr=G,J=G,W[0]=K.coerce(W[0]),typeof W[0]!=="string")W.unshift("%O");let V=0;W[0]=W[0].replace(/%([a-zA-Z%])/g,(v,y)=>{if(v==="%%")return"%";V++;let R=K.formatters[y];if(typeof R==="function"){let h=W[V];v=R.call(Z,h),W.splice(V,1),V--}return v}),K.formatArgs.call(Z,W),(Z.log||K.log).apply(Z,W)}if(P.namespace=j,P.useColors=K.useColors(),P.color=K.selectColor(j),P.extend=Y,P.destroy=K.destroy,Object.defineProperty(P,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(M!==null)return M;if(D!==K.namespaces)D=K.namespaces,X=K.enabled(j);return X},set:(W)=>{M=W}}),typeof K.init==="function")K.init(P);return P}function Y(j,J){let M=K(this.namespace+(typeof J>"u"?":":J)+j);return M.log=this.log,M}function z(j){K.save(j),K.namespaces=j,K.names=[],K.skips=[];let J=(typeof j==="string"?j:"").trim().replace(" ",",").split(",").filter(Boolean);for(let M of J)if(M[0]==="-")K.skips.push(M.slice(1));else K.names.push(M)}function w(j,J){let M=0,D=0,X=-1,P=0;while(M<j.length)if(D<J.length&&(J[D]===j[M]||J[D]==="*"))if(J[D]==="*")X=D,P=M,D++;else M++,D++;else if(X!==-1)D=X+1,P++,M=P;else return!1;while(D<J.length&&J[D]==="*")D++;return D===J.length}function _(){let j=[...K.names,...K.skips.map((J)=>"-"+J)].join(",");return K.enable(""),j}function $(j){for(let J of K.skips)if(w(j,J))return!1;for(let J of K.names)if(w(j,J))return!0;return!1}function O(j){if(j instanceof Error)return j.stack||j.message;return j}function H(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return K.enable(K.load()),K}hWA.exports=DCK});var bWA=C((IWA,p41)=>{IWA.formatArgs=PCK;IWA.save=WCK;IWA.load=ZCK;IWA.useColors=XCK;IWA.storage=GCK();IWA.destroy=(()=>{let A=!1;return()=>{if(!A)A=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();IWA.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function XCK(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let A;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(A=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(A[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function PCK(A){if(A[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+A[0]+(this.useColors?"%c ":" ")+"+"+p41.exports.humanize(this.diff),!this.useColors)return;let q="color: "+this.color;A.splice(1,0,q,"color: inherit");let K=0,Y=0;A[0].replace(/%[a-zA-Z%]/g,(z)=>{if(z==="%%")return;if(K++,z==="%c")Y=K}),A.splice(Y,0,q)}IWA.log=console.debug||console.log||(()=>{});function WCK(A){try{if(A)IWA.storage.setItem("debug",A);else IWA.storage.removeItem("debug")}catch(q){}}function ZCK(){let A;try{A=IWA.storage.getItem("debug")}catch(q){}if(!A&&typeof process<"u"&&"env"in process)A=process.env.DEBUG;return A}function GCK(){try{return localStorage}catch(A){}}p41.exports=Mo1()(IWA);var{formatters:fCK}=p41.exports;fCK.j=function(A){try{return JSON.stringify(A)}catch(q){return"[UnexpectedJSONParseError]: "+q.message}}});var UC6=C((iJw,xWA)=>{xWA.exports=(A,q=process.argv)=>{let K=A.startsWith("-")?"":A.length===1?"-":"--",Y=q.indexOf(K+A),z=q.indexOf("--");return Y!==-1&&(z===-1||Y<z)}});var mWA=C((nJw,BWA)=>{var yCK=g6("os"),uWA=g6("tty"),py=UC6(),{env:gX}=process,d41;if(py("no-color")||py("no-colors")||py("color=false")||py("color=never"))d41=0;else if(py("color")||py("colors")||py("color=true")||py("color=always"))d41=1;function RCK(){if("FORCE_COLOR"in gX){if(gX.FORCE_COLOR==="true")return 1;if(gX.FORCE_COLOR==="false")return 0;return gX.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(gX.FORCE_COLOR,10),3)}}function SCK(A){if(A===0)return!1;return{level:A,hasBasic:!0,has256:A>=2,has16m:A>=3}}function CCK(A,{streamIsTTY:q,sniffFlags:K=!0}={}){let Y=RCK();if(Y!==void 0)d41=Y;let z=K?d41:Y;if(z===0)return 0;if(K){if(py("color=16m")||py("color=full")||py("color=truecolor"))return 3;if(py("color=256"))return 2}if(A&&!q&&z===void 0)return 0;let w=z||0;if(gX.TERM==="dumb")return w;if(process.platform==="win32"){let _=yCK.release().split(".");if(Number(_[0])>=10&&Number(_[2])>=10586)return Number(_[2])>=14931?3:2;return 1}if("CI"in gX){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((_)=>(_ in gX))||gX.CI_NAME==="codeship")return 1;return w}if("TEAMCITY_VERSION"in gX)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(gX.TEAMCITY_VERSION)?1:0;if(gX.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in gX){let _=Number.parseInt((gX.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(gX.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(gX.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(gX.TERM))return 1;if("COLORTERM"in gX)return 1;return w}function Do1(A,q={}){let K=CCK(A,{streamIsTTY:A&&A.isTTY,...q});return SCK(K)}BWA.exports={supportsColor:Do1,stdout:Do1({isTTY:uWA.isatty(1)}),stderr:Do1({isTTY:uWA.isatty(2)})}});var UWA=C((FWA,l41)=>{var hCK=g6("tty"),c41=g6("util");FWA.init=gCK;FWA.log=uCK;FWA.formatArgs=bCK;FWA.save=BCK;FWA.load=mCK;FWA.useColors=ICK;FWA.destroy=c41.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");FWA.colors=[6,2,3,4,5,1];try{let A=mWA();if(A&&(A.stderr||A).level>=2)FWA.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(A){}FWA.inspectOpts=Object.keys(process.env).filter((A)=>{return/^debug_/i.test(A)}).reduce((A,q)=>{let K=q.substring(6).toLowerCase().replace(/_([a-z])/g,(z,w)=>{return w.toUpperCase()}),Y=process.env[q];if(/^(yes|on|true|enabled)$/i.test(Y))Y=!0;else if(/^(no|off|false|disabled)$/i.test(Y))Y=!1;else if(Y==="null")Y=null;else Y=Number(Y);return A[K]=Y,A},{});function ICK(){return"colors"in FWA.inspectOpts?Boolean(FWA.inspectOpts.colors):hCK.isatty(process.stderr.fd)}function bCK(A){let{namespace:q,useColors:K}=this;if(K){let Y=this.color,z="\x1B[3"+(Y<8?Y:"8;5;"+Y),w=`  ${z};1m${q} \x1B[0m`;A[0]=w+A[0].split(`
`).join(`
`+w),A.push(z+"m+"+l41.exports.humanize(this.diff)+"\x1B[0m")}else A[0]=xCK()+q+" "+A[0]}function xCK(){if(FWA.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function uCK(...A){return process.stderr.write(c41.formatWithOptions(FWA.inspectOpts,...A)+`
`)}function BCK(A){if(A)process.env.DEBUG=A;else delete process.env.DEBUG}function mCK(){return process.env.DEBUG}function gCK(A){A.inspectOpts={};let q=Object.keys(FWA.inspectOpts);for(let K=0;K<q.length;K++)A.inspectOpts[q[K]]=FWA.inspectOpts[q[K]]}l41.exports=Mo1()(FWA);var{formatters:gWA}=l41.exports;gWA.o=function(A){return this.inspectOpts.colors=this.useColors,c41.inspect(A,this.inspectOpts).split(`
`).map((q)=>q.trim()).join(" ")};gWA.O=function(A){return this.inspectOpts.colors=this.useColors,c41.inspect(A,this.inspectOpts)}});var Vq6=C((oJw,Xo1)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)Xo1.exports=bWA();else Xo1.exports=UWA()});var Wo1=C((uk)=>{var __dirname="/home/runner/code/tmp/claude-cli-external-build-2207/node_modules/spawn-rx/lib/src",dy=uk&&uk.__assign||function(){return dy=Object.assign||function(A){for(var q,K=1,Y=arguments.length;K<Y;K++){q=arguments[K];for(var z in q)if(Object.prototype.hasOwnProperty.call(q,z))A[z]=q[z]}return A},dy.apply(this,arguments)},iCK=uk&&uk.__rest||function(A,q){var K={};for(var Y in A)if(Object.prototype.hasOwnProperty.call(A,Y)&&q.indexOf(Y)<0)K[Y]=A[Y];if(A!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var z=0,Y=Object.getOwnPropertySymbols(A);z<Y.length;z++)if(q.indexOf(Y[z])<0&&Object.prototype.propertyIsEnumerable.call(A,Y[z]))K[Y[z]]=A[Y[z]]}return K},nCK=uk&&uk.__spreadArray||function(A,q,K){if(K||arguments.length===2){for(var Y=0,z=q.length,w;Y<z;Y++)if(w||!(Y in q)){if(!w)w=Array.prototype.slice.call(q,0,Y);w[Y]=q[Y]}}return A.concat(w||Array.prototype.slice.call(q))};Object.defineProperty(uk,"__esModule",{value:!0});uk.findActualExecutable=i41;uk.spawnDetached=Po1;uk.spawn=cC6;uk.spawnDetachedPromise=sCK;uk.spawnPromise=tCK;var pC6=g6("path"),rCK=g6("net"),dC6=g6("fs"),ba=vWA(),pWA=SWA(),oCK=g6("child_process"),aCK=Vq6(),lWA=process.platform==="win32",GJ6=(0,aCK.default)("spawn-rx");function dWA(A){try{return dC6.statSync(A)}catch(q){return null}}function cWA(A){if(A.match(/[\\/]/))return GJ6("Path has slash in directory, bailing"),A;var q=pC6.join(".",A);if(dWA(q))return GJ6("Found executable in currect directory: ".concat(q)),dC6.realpathSync(q);var K=process.env.PATH.split(lWA?";":":");for(var Y=0,z=K;Y<z.length;Y++){var w=z[Y],_=pC6.join(w,A);if(dWA(_))return dC6.realpathSync(_)}return GJ6("Failed to find executable anywhere in path"),A}function i41(A,q){if(process.platform!=="win32")return{cmd:cWA(A),args:q};if(!dC6.existsSync(A)){var K=[".exe",".bat",".cmd",".ps1"];for(var Y=0,z=K;Y<z.length;Y++){var w=z[Y],_=cWA("".concat(A).concat(w));if(dC6.existsSync(_))return i41(_,q)}}if(A.match(/\.ps1$/i)){var $=pC6.join(process.env.SYSTEMROOT,"System32","WindowsPowerShell","v1.0","PowerShell.exe"),O=["-ExecutionPolicy","Unrestricted","-NoLogo","-NonInteractive","-File",A];return{cmd:$,args:O.concat(q)}}if(A.match(/\.(bat|cmd)$/i)){var $=pC6.join(process.env.SYSTEMROOT,"System32","cmd.exe"),H=nCK(["/C",A],q,!0);return{cmd:$,args:H}}if(A.match(/\.(js)$/i)){var $=process.execPath,j=[A];return{cmd:$,args:j.concat(q)}}return{cmd:A,args:q}}function Po1(A,q,K){var Y=i41(A,q!==null&&q!==void 0?q:[]),z=Y.cmd,w=Y.args;if(!lWA)return cC6(z,w,Object.assign({},K||{},{detached:!0}));var _=[z].concat(w),$=pC6.join(__dirname,"..","..","vendor","jobber","Jobber.exe"),O=dy(dy({},K!==null&&K!==void 0?K:{}),{detached:!0,jobber:!0});return GJ6("spawnDetached: ".concat($,", ").concat(_)),cC6($,_,O)}function cC6(A,q,K){K=K!==null&&K!==void 0?K:{};var Y=new ba.Observable(function(z){var{stdin:w,jobber:_,split:$,encoding:O}=K,H=iCK(K,["stdin","jobber","split","encoding"]),j=i41(A,q),J=j.cmd,M=j.args;GJ6("spawning process: ".concat(J," ").concat(M.join(),", ").concat(JSON.stringify(H)));var D=(0,oCK.spawn)(J,M,H),X=function(f){return function(V){if(V.length<1)return;if(K.echoOutput)(f==="stdout"?process.stdout:process.stderr).write(V);var N="<< String sent back was too long >>";try{if(typeof V==="string")N=V.toString();else N=V.toString(O||"utf8")}catch(v){N="<< Lost chunk of process output for ".concat(A," - length was ").concat(V.length,">>")}z.next({source:f,text:N})}},P=new ba.Subscription;if(K.stdin)if(D.stdin)P.add(K.stdin.subscribe({next:function(f){return D.stdin.write(f)},error:z.error.bind(z),complete:function(){return D.stdin.end()}}));else z.error(Error("opts.stdio conflicts with provided spawn opts.stdin observable, 'pipe' is required"));var W=null,Z=null,G=!1;if(D.stdout)Z=new ba.AsyncSubject,D.stdout.on("data",X("stdout")),D.stdout.on("close",function(){Z.next(!0),Z.complete()});else Z=(0,ba.of)(!0);if(D.stderr)W=new ba.AsyncSubject,D.stderr.on("data",X("stderr")),D.stderr.on("close",function(){W.next(!0),W.complete()});else W=(0,ba.of)(!0);return D.on("error",function(f){G=!0,z.error(f)}),D.on("close",function(f){G=!0;var V=(0,ba.merge)(Z,W).pipe((0,pWA.reduce)(function(N){return N},!0));if(f===0)V.subscribe(function(){return z.complete()});else V.subscribe(function(){var N=Error("Failed with exit code: ".concat(f));N.exitCode=f,N.code=f,z.error(N)})}),P.add(new ba.Subscription(function(){if(G)return;if(GJ6("Killing process: ".concat(J," ").concat(M.join())),K.jobber)rCK.connect("\\\\.\\pipe\\jobber-".concat(D.pid)),setTimeout(function(){return D.kill()},5000);else D.kill()})),P});return K.split?Y:Y.pipe((0,pWA.map)(function(z){return z===null||z===void 0?void 0:z.text}))}function iWA(A){return new Promise(function(q,K){var Y="";A.subscribe({next:function(z){return Y+=z},error:function(z){var w=Error("".concat(Y,`
`).concat(z.message));if("exitCode"in z)w.exitCode=z.exitCode,w.code=z.exitCode;K(w)},complete:function(){return q(Y)}})})}function nWA(A){return new Promise(function(q,K){var Y="",z="";A.subscribe({next:function(w){return w.source==="stdout"?Y+=w.text:z+=w.text},error:function(w){var _=Error("".concat(Y,`
`).concat(w.message));if("exitCode"in w)_.exitCode=w.exitCode,_.code=w.exitCode,_.stdout=Y,_.stderr=z;K(_)},complete:function(){return q([Y,z])}})})}function sCK(A,q,K){if(K===null||K===void 0?void 0:K.split)return nWA(Po1(A,q,dy(dy({},K!==null&&K!==void 0?K:{}),{split:!0})));else return iWA(Po1(A,q,dy(dy({},K!==null&&K!==void 0?K:{}),{split:!1})))}function tCK(A,q,K){if(K===null||K===void 0?void 0:K.split)return nWA(cC6(A,q,dy(dy({},K!==null&&K!==void 0?K:{}),{split:!0})));else return iWA(cC6(A,q,dy(dy({},K!==null&&K!==void 0?K:{}),{split:!1})))}});function fJ6(){return process.versions.bun!==void 0}function ZY(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var TJ6={};m1(TJ6,{getOauthConfig:()=>U7,fileSuffixForOauthConfig:()=>Zo1,OAUTH_BETA_HEADER:()=>G0,CONSOLE_OAUTH_SCOPES:()=>aWA,CLAUDE_AI_PROFILE_SCOPE:()=>$d,CLAUDE_AI_OAUTH_SCOPES:()=>n41,CLAUDE_AI_INFERENCE_SCOPE:()=>Bk,ALL_OAUTH_SCOPES:()=>Go1});function oWA(){return"prod"}function Zo1(){if(process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL)return"-custom-oauth";switch(oWA()){case"local":return"-local-oauth";case"staging":return"-staging-oauth";case"prod":return""}}function U7(){let A=(()=>{switch(oWA()){case"local":return qhK;case"staging":return AhK??rWA;case"prod":return rWA}})(),q=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(q){let Y=q.replace(/\/$/,"");if(!KhK.includes(Y))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");A={...A,BASE_API_URL:Y,CONSOLE_AUTHORIZE_URL:`${Y}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${Y}/oauth/authorize`,TOKEN_URL:`${Y}/v1/oauth/token`,API_KEY_URL:`${Y}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${Y}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${Y}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${Y}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${Y}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let K=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;if(K)A={...A,CLIENT_ID:K};return A}var Bk="user:inference",$d="user:profile",eCK="org:create_api_key",G0="oauth-2025-04-20",aWA,n41,Go1,rWA,AhK=void 0,qhK,KhK;var L5=k(()=>{Z8();aWA=[eCK,$d],n41=[$d,Bk,"user:sessions:claude_code","user:mcp_servers"],Go1=Array.from(new Set([...aWA,...n41])),rWA={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.ai/oauth/authorize",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},qhK={BASE_API_URL:"http://localhost:3000",CONSOLE_AUTHORIZE_URL:"http://localhost:3000/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"http://localhost:4000/oauth/authorize",TOKEN_URL:"http://localhost:3000/v1/oauth/token",API_KEY_URL:"http://localhost:3000/api/oauth/claude_cli/create_api_key",ROLES_URL:"http://localhost:3000/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"http://localhost:3000/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"http://localhost:3000/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://console.staging.ant.dev/oauth/code/callback",CLIENT_ID:"22422756-60c9-4084-8eb7-27705fd5cf9a",OAUTH_FILE_SUFFIX:"-local-oauth",MCP_PROXY_URL:"http://localhost:8205",MCP_PROXY_PATH:"/v1/toolbox/shttp/mcp/{server_id}"},KhK=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"]});var qZA=C((AMw,AZA)=>{AZA.exports=eWA;eWA.sync=zhK;var sWA=g6("fs");function YhK(A,q){var K=q.pathExt!==void 0?q.pathExt:process.env.PATHEXT;if(!K)return!0;if(K=K.split(";"),K.indexOf("")!==-1)return!0;for(var Y=0;Y<K.length;Y++){var z=K[Y].toLowerCase();if(z&&A.substr(-z.length).toLowerCase()===z)return!0}return!1}function tWA(A,q,K){if(!A.isSymbolicLink()&&!A.isFile())return!1;return YhK(q,K)}function eWA(A,q,K){sWA.stat(A,function(Y,z){K(Y,Y?!1:tWA(z,A,q))})}function zhK(A,q){return tWA(sWA.statSync(A),A,q)}});var _ZA=C((qMw,wZA)=>{wZA.exports=YZA;YZA.sync=whK;var KZA=g6("fs");function YZA(A,q,K){KZA.stat(A,function(Y,z){K(Y,Y?!1:zZA(z,q))})}function whK(A,q){return zZA(KZA.statSync(A),q)}function zZA(A,q){return A.isFile()&&_hK(A,q)}function _hK(A,q){var{mode:K,uid:Y,gid:z}=A,w=q.uid!==void 0?q.uid:process.getuid&&process.getuid(),_=q.gid!==void 0?q.gid:process.getgid&&process.getgid(),$=parseInt("100",8),O=parseInt("010",8),H=parseInt("001",8),j=$|O,J=K&H||K&O&&z===_||K&$&&Y===w||K&j&&w===0;return J}});var OZA=C((YMw,$ZA)=>{var KMw=g6("fs"),r41;if(process.platform==="win32"||global.TESTING_WINDOWS)r41=qZA();else r41=_ZA();$ZA.exports=fo1;fo1.sync=$hK;function fo1(A,q,K){if(typeof q==="function")K=q,q={};if(!K){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(Y,z){fo1(A,q||{},function(w,_){if(w)z(w);else Y(_)})})}r41(A,q||{},function(Y,z){if(Y){if(Y.code==="EACCES"||q&&q.ignoreErrors)Y=null,z=!1}K(Y,z)})}function $hK(A,q){try{return r41.sync(A,q||{})}catch(K){if(q&&q.ignoreErrors||K.code==="EACCES")return!1;else throw K}}});var PZA=C((zMw,XZA)=>{var VJ6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",HZA=g6("path"),OhK=VJ6?";":":",jZA=OZA(),JZA=(A)=>Object.assign(Error(`not found: ${A}`),{code:"ENOENT"}),MZA=(A,q)=>{let K=q.colon||OhK,Y=A.match(/\//)||VJ6&&A.match(/\\/)?[""]:[...VJ6?[process.cwd()]:[],...(q.path||process.env.PATH||"").split(K)],z=VJ6?q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",w=VJ6?z.split(K):[""];if(VJ6){if(A.indexOf(".")!==-1&&w[0]!=="")w.unshift("")}return{pathEnv:Y,pathExt:w,pathExtExe:z}},DZA=(A,q,K)=>{if(typeof q==="function")K=q,q={};if(!q)q={};let{pathEnv:Y,pathExt:z,pathExtExe:w}=MZA(A,q),_=[],$=(H)=>new Promise((j,J)=>{if(H===Y.length)return q.all&&_.length?j(_):J(JZA(A));let M=Y[H],D=/^".*"$/.test(M)?M.slice(1,-1):M,X=HZA.join(D,A),P=!D&&/^\.[\\\/]/.test(A)?A.slice(0,2)+X:X;j(O(P,H,0))}),O=(H,j,J)=>new Promise((M,D)=>{if(J===z.length)return M($(j+1));let X=z[J];jZA(H+X,{pathExt:w},(P,W)=>{if(!P&&W)if(q.all)_.push(H+X);else return M(H+X);return M(O(H,j,J+1))})});return K?$(0).then((H)=>K(null,H),K):$(0)},HhK=(A,q)=>{q=q||{};let{pathEnv:K,pathExt:Y,pathExtExe:z}=MZA(A,q),w=[];for(let _=0;_<K.length;_++){let $=K[_],O=/^".*"$/.test($)?$.slice(1,-1):$,H=HZA.join(O,A),j=!O&&/^\.[\\\/]/.test(A)?A.slice(0,2)+H:H;for(let J=0;J<Y.length;J++){let M=j+Y[J];try{if(jZA.sync(M,{pathExt:z}))if(q.all)w.push(M);else return M}catch(D){}}}if(q.all&&w.length)return w;if(q.nothrow)return null;throw JZA(A)};XZA.exports=DZA;DZA.sync=HhK});var ZZA=C((wMw,To1)=>{var WZA=(A={})=>{let q=A.env||process.env;if((A.platform||process.platform)!=="win32")return"PATH";return Object.keys(q).reverse().find((Y)=>Y.toUpperCase()==="PATH")||"Path"};To1.exports=WZA;To1.exports.default=WZA});var VZA=C((_Mw,TZA)=>{var GZA=g6("path"),jhK=PZA(),JhK=ZZA();function fZA(A,q){let K=A.options.env||process.env,Y=process.cwd(),z=A.options.cwd!=null,w=z&&process.chdir!==void 0&&!process.chdir.disabled;if(w)try{process.chdir(A.options.cwd)}catch($){}let _;try{_=jhK.sync(A.command,{path:K[JhK({env:K})],pathExt:q?GZA.delimiter:void 0})}catch($){}finally{if(w)process.chdir(Y)}if(_)_=GZA.resolve(z?A.options.cwd:"",_);return _}function MhK(A){return fZA(A)||fZA(A,!0)}TZA.exports=MhK});var NZA=C((PhK,No1)=>{var Vo1=/([()\][%!^"`<>&|;, *?])/g;function DhK(A){return A=A.replace(Vo1,"^$1"),A}function XhK(A,q){if(A=`${A}`,A=A.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),A=A.replace(/(?=(\\+?)?)\1$/,"$1$1"),A=`"${A}"`,A=A.replace(Vo1,"^$1"),q)A=A.replace(Vo1,"^$1");return A}PhK.command=DhK;PhK.argument=XhK});var kZA=C(($Mw,vZA)=>{vZA.exports=/^#!(.*)/});var LZA=C((OMw,EZA)=>{var GhK=kZA();EZA.exports=(A="")=>{let q=A.match(GhK);if(!q)return null;let[K,Y]=q[0].replace(/#! ?/,"").split(" "),z=K.split("/").pop();if(z==="env")return Y;return Y?`${z} ${Y}`:z}});var RZA=C((HMw,yZA)=>{var vo1=g6("fs"),fhK=LZA();function ThK(A){let K=Buffer.alloc(150),Y;try{Y=vo1.openSync(A,"r"),vo1.readSync(Y,K,0,150,0),vo1.closeSync(Y)}catch(z){}return fhK(K.toString())}yZA.exports=ThK});var IZA=C((jMw,hZA)=>{var VhK=g6("path"),SZA=VZA(),CZA=NZA(),NhK=RZA(),vhK=process.platform==="win32",khK=/\.(?:com|exe)$/i,EhK=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function LhK(A){A.file=SZA(A);let q=A.file&&NhK(A.file);if(q)return A.args.unshift(A.file),A.command=q,SZA(A);return A.file}function yhK(A){if(!vhK)return A;let q=LhK(A),K=!khK.test(q);if(A.options.forceShell||K){let Y=EhK.test(q);A.command=VhK.normalize(A.command),A.command=CZA.command(A.command),A.args=A.args.map((w)=>CZA.argument(w,Y));let z=[A.command].concat(A.args).join(" ");A.args=["/d","/s","/c",`"${z}"`],A.command=process.env.comspec||"cmd.exe",A.options.windowsVerbatimArguments=!0}return A}function RhK(A,q,K){if(q&&!Array.isArray(q))K=q,q=null;q=q?q.slice(0):[],K=Object.assign({},K);let Y={command:A,args:q,options:K,file:void 0,original:{command:A,args:q}};return K.shell?Y:yhK(Y)}hZA.exports=RhK});var uZA=C((JMw,xZA)=>{var ko1=process.platform==="win32";function Eo1(A,q){return Object.assign(Error(`${q} ${A.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${q} ${A.command}`,path:A.command,spawnargs:A.args})}function ShK(A,q){if(!ko1)return;let K=A.emit;A.emit=function(Y,z){if(Y==="exit"){let w=bZA(z,q);if(w)return K.call(A,"error",w)}return K.apply(A,arguments)}}function bZA(A,q){if(ko1&&A===1&&!q.file)return Eo1(q.original,"spawn");return null}function ChK(A,q){if(ko1&&A===1&&!q.file)return Eo1(q.original,"spawnSync");return null}xZA.exports={hookChildProcess:ShK,verifyENOENT:bZA,verifyENOENTSync:ChK,notFoundError:Eo1}});var Ro1=C((MMw,NJ6)=>{var BZA=g6("child_process"),Lo1=IZA(),yo1=uZA();function mZA(A,q,K){let Y=Lo1(A,q,K),z=BZA.spawn(Y.command,Y.args,Y.options);return yo1.hookChildProcess(z,Y),z}function hhK(A,q,K){let Y=Lo1(A,q,K),z=BZA.spawnSync(Y.command,Y.args,Y.options);return z.error=z.error||yo1.verifyENOENTSync(z.status,Y),z}NJ6.exports=mZA;NJ6.exports.spawn=mZA;NJ6.exports.sync=hhK;NJ6.exports._parse=Lo1;NJ6.exports._enoent=yo1});function So1(A){let q=typeof A==="string"?`
`:`
`.charCodeAt(),K=typeof A==="string"?"\r":"\r".charCodeAt();if(A[A.length-1]===q)A=A.slice(0,-1);if(A[A.length-1]===K)A=A.slice(0,-1);return A}function o41(A={}){let{env:q=process.env,platform:K=process.platform}=A;if(K!=="win32")return"PATH";return Object.keys(q).reverse().find((Y)=>Y.toUpperCase()==="PATH")||"Path"}import a41 from"node:process";import lC6 from"node:path";import{fileURLToPath as gZA}from"node:url";var IhK=({cwd:A=a41.cwd(),path:q=a41.env[o41()],preferLocal:K=!0,execPath:Y=a41.execPath,addExecPath:z=!0}={})=>{let w=A instanceof URL?gZA(A):A,_=lC6.resolve(w),$=[];if(K)bhK($,_);if(z)xhK($,Y,_);return[...$,q].join(lC6.delimiter)},bhK=(A,q)=>{let K;while(K!==q)A.push(lC6.join(q,"node_modules/.bin")),K=q,q=lC6.resolve(q,"..")},xhK=(A,q,K)=>{let Y=q instanceof URL?gZA(q):q;A.push(lC6.resolve(K,Y,".."))},FZA=({env:A=a41.env,...q}={})=>{A={...A};let K=o41({env:A});return q.path=A[K],A[K]=IhK(q),A};var QZA=()=>{};function Co1(A,q,{ignoreNonConfigurable:K=!1}={}){let{name:Y}=A;for(let z of Reflect.ownKeys(q))uhK(A,q,z,K);return mhK(A,q),UhK(A,q,Y),A}var uhK=(A,q,K,Y)=>{if(K==="length"||K==="prototype")return;if(K==="arguments"||K==="caller")return;let z=Object.getOwnPropertyDescriptor(A,K),w=Object.getOwnPropertyDescriptor(q,K);if(!BhK(z,w)&&Y)return;Object.defineProperty(A,K,w)},BhK=function(A,q){return A===void 0||A.configurable||A.writable===q.writable&&A.enumerable===q.enumerable&&A.configurable===q.configurable&&(A.writable||A.value===q.value)},mhK=(A,q)=>{let K=Object.getPrototypeOf(q);if(K===Object.getPrototypeOf(A))return;Object.setPrototypeOf(A,K)},ghK=(A,q)=>`/* Wrapped ${A}*/
${q}`,FhK,QhK,UhK=(A,q,K)=>{let Y=K===""?"":`with ${K.trim()}() `,z=ghK.bind(null,Y,q.toString());Object.defineProperty(z,"name",QhK),Object.defineProperty(A,"toString",{...FhK,value:z})};var UZA=k(()=>{FhK=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),QhK=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")});var s41,pZA=(A,q={})=>{if(typeof A!=="function")throw TypeError("Expected a function");let K,Y=0,z=A.displayName||A.name||"<anonymous>",w=function(..._){if(s41.set(w,++Y),Y===1)K=A.apply(this,_),A=null;else if(q.throw===!0)throw Error(`Function \`${z}\` can only be called once`);return K};return Co1(w,A),s41.set(w,Y),w},dZA;var cZA=k(()=>{UZA();s41=new WeakMap;pZA.callCount=(A)=>{if(!s41.has(A))throw Error(`The given function \`${A.name}\` is not wrapped by the \`onetime\` package`);return s41.get(A)};dZA=pZA});var lZA=()=>{let A=ho1-iZA+1;return Array.from({length:A},phK)},phK=(A,q)=>({name:`SIGRT${q+1}`,number:iZA+q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),iZA=34,ho1=64;var nZA;var rZA=k(()=>{nZA=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as dhK}from"node:os";var Io1=()=>{let A=lZA();return[...nZA,...A].map(chK)},chK=({name:A,number:q,description:K,action:Y,forced:z=!1,standard:w})=>{let{signals:{[A]:_}}=dhK,$=_!==void 0;return{name:A,number:$?_:q,description:K,supported:$,action:Y,forced:z,standard:w}};var oZA=k(()=>{rZA()});import{constants as lhK}from"node:os";var ihK=()=>{let A=Io1();return Object.fromEntries(A.map(nhK))},nhK=({name:A,number:q,description:K,supported:Y,action:z,forced:w,standard:_})=>[A,{name:A,number:q,description:K,supported:Y,action:z,forced:w,standard:_}],aZA,rhK=()=>{let A=Io1(),q=ho1+1,K=Array.from({length:q},(Y,z)=>ohK(z,A));return Object.assign({},...K)},ohK=(A,q)=>{let K=ahK(A,q);if(K===void 0)return{};let{name:Y,description:z,supported:w,action:_,forced:$,standard:O}=K;return{[A]:{name:Y,number:A,description:z,supported:w,action:_,forced:$,standard:O}}},ahK=(A,q)=>{let K=q.find(({name:Y})=>lhK.signals[Y]===A);if(K!==void 0)return K;return q.find((Y)=>Y.number===A)},IMw;var sZA=k(()=>{oZA();aZA=ihK(),IMw=rhK()});import shK from"node:process";var thK=({timedOut:A,timeout:q,errorCode:K,signal:Y,signalDescription:z,exitCode:w,isCanceled:_})=>{if(A)return`timed out after ${q} milliseconds`;if(_)return"was canceled";if(K!==void 0)return`failed with ${K}`;if(Y!==void 0)return`was killed with ${Y} (${z})`;if(w!==void 0)return`failed with exit code ${w}`;return"failed"},iC6=({stdout:A,stderr:q,all:K,error:Y,signal:z,exitCode:w,command:_,escapedCommand:$,timedOut:O,isCanceled:H,killed:j,parsed:{options:{timeout:J,cwd:M=shK.cwd()}}})=>{w=w===null?void 0:w,z=z===null?void 0:z;let D=z===void 0?void 0:aZA[z].description,X=Y&&Y.code,W=`Command ${thK({timedOut:O,timeout:J,errorCode:X,signal:z,signalDescription:D,exitCode:w,isCanceled:H})}: ${_}`,Z=Object.prototype.toString.call(Y)==="[object Error]",G=Z?`${W}
${Y.message}`:W,f=[G,q,A].filter(Boolean).join(`
`);if(Z)Y.originalMessage=Y.message,Y.message=f;else Y=Error(f);if(Y.shortMessage=G,Y.command=_,Y.escapedCommand=$,Y.exitCode=w,Y.signal=z,Y.signalDescription=D,Y.stdout=A,Y.stderr=q,Y.cwd=M,K!==void 0)Y.all=K;if("bufferedData"in Y)delete Y.bufferedData;return Y.failed=!0,Y.timedOut=Boolean(O),Y.isCanceled=H,Y.killed=j&&!O,Y};var tZA=k(()=>{sZA()});var t41,ehK=(A)=>t41.some((q)=>A[q]!==void 0),eZA=(A)=>{if(!A)return;let{stdio:q}=A;if(q===void 0)return t41.map((Y)=>A[Y]);if(ehK(A))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${t41.map((Y)=>`\`${Y}\``).join(", ")}`);if(typeof q==="string")return q;if(!Array.isArray(q))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof q}\``);let K=Math.max(q.length,t41.length);return Array.from({length:K},(Y,z)=>q[z])};var AGA=k(()=>{t41=["stdin","stdout","stderr"]});var Nq6;var qGA=k(()=>{Nq6=[];Nq6.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")Nq6.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Nq6.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class KGA{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(xo1[bo1])return xo1[bo1];AIK(xo1,bo1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(A,q){this.listeners[A].push(q)}removeListener(A,q){let K=this.listeners[A],Y=K.indexOf(q);if(Y===-1)return;if(Y===0&&K.length===1)K.length=0;else K.splice(Y,1)}emit(A,q,K){if(this.emitted[A])return!1;this.emitted[A]=!0;let Y=!1;for(let z of this.listeners[A])Y=z(q,K)===!0||Y;if(A==="exit")Y=this.emit("afterExit",q,K)||Y;return Y}}class Bo1{}var e41=(A)=>!!A&&typeof A==="object"&&typeof A.removeListener==="function"&&typeof A.emit==="function"&&typeof A.reallyExit==="function"&&typeof A.listeners==="function"&&typeof A.kill==="function"&&typeof A.pid==="number"&&typeof A.on==="function",bo1,xo1,AIK,qIK=(A)=>{return{onExit(q,K){return A.onExit(q,K)},load(){return A.load()},unload(){return A.unload()}}},YGA,zGA,uo1,vJ6,QMw,UMw;var Aq1=k(()=>{qGA();bo1=Symbol.for("signal-exit emitter"),xo1=globalThis,AIK=Object.defineProperty.bind(Object);YGA=class YGA extends Bo1{onExit(){return()=>{}}load(){}unload(){}};zGA=class zGA extends Bo1{#A=uo1.platform==="win32"?"SIGINT":"SIGHUP";#q=new KGA;#K;#z;#Y;#_={};#w=!1;constructor(A){super();this.#K=A,this.#_={};for(let q of Nq6)this.#_[q]=()=>{let K=this.#K.listeners(q),{count:Y}=this.#q,z=A;if(typeof z.__signal_exit_emitter__==="object"&&typeof z.__signal_exit_emitter__.count==="number")Y+=z.__signal_exit_emitter__.count;if(K.length===Y){this.unload();let w=this.#q.emit("exit",null,q),_=q==="SIGHUP"?this.#A:q;if(!w)A.kill(A.pid,_)}};this.#Y=A.reallyExit,this.#z=A.emit}onExit(A,q){if(!e41(this.#K))return()=>{};if(this.#w===!1)this.load();let K=q?.alwaysLast?"afterExit":"exit";return this.#q.on(K,A),()=>{if(this.#q.removeListener(K,A),this.#q.listeners.exit.length===0&&this.#q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#w)return;this.#w=!0,this.#q.count+=1;for(let A of Nq6)try{let q=this.#_[A];if(q)this.#K.on(A,q)}catch(q){}this.#K.emit=(A,...q)=>{return this.#H(A,...q)},this.#K.reallyExit=(A)=>{return this.#O(A)}}unload(){if(!this.#w)return;this.#w=!1,Nq6.forEach((A)=>{let q=this.#_[A];if(!q)throw Error("Listener not defined for signal: "+A);try{this.#K.removeListener(A,q)}catch(K){}}),this.#K.emit=this.#z,this.#K.reallyExit=this.#Y,this.#q.count-=1}#O(A){if(!e41(this.#K))return 0;return this.#K.exitCode=A||0,this.#q.emit("exit",this.#K.exitCode,null),this.#Y.call(this.#K,this.#K.exitCode)}#H(A,...q){let K=this.#z;if(A==="exit"&&e41(this.#K)){if(typeof q[0]==="number")this.#K.exitCode=q[0];let Y=K.call(this.#K,A,...q);return this.#q.emit("exit",this.#K.exitCode,null),Y}else return K.call(this.#K,A,...q)}};uo1=globalThis.process,{onExit:vJ6,load:QMw,unload:UMw}=qIK(e41(uo1)?new zGA(uo1):new YGA)});import KIK from"node:os";var YIK=5000,wGA=(A,q="SIGTERM",K={})=>{let Y=A(q);return zIK(A,q,K,Y),Y},zIK=(A,q,K,Y)=>{if(!wIK(q,K,Y))return;let z=$IK(K),w=setTimeout(()=>{A("SIGKILL")},z);if(w.unref)w.unref()},wIK=(A,{forceKillAfterTimeout:q},K)=>_IK(A)&&q!==!1&&K,_IK=(A)=>A===KIK.constants.signals.SIGTERM||typeof A==="string"&&A.toUpperCase()==="SIGTERM",$IK=({forceKillAfterTimeout:A=!0})=>{if(A===!0)return YIK;if(!Number.isFinite(A)||A<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${A}\` (${typeof A})`);return A},_GA=(A,q)=>{if(A.kill())q.isCanceled=!0},OIK=(A,q,K)=>{A.kill(q),K(Object.assign(Error("Timed out"),{timedOut:!0,signal:q}))},$GA=(A,{timeout:q,killSignal:K="SIGTERM"},Y)=>{if(q===0||q===void 0)return Y;let z,w=new Promise(($,O)=>{z=setTimeout(()=>{OIK(A,K,O)},q)}),_=Y.finally(()=>{clearTimeout(z)});return Promise.race([w,_])},OGA=({timeout:A})=>{if(A!==void 0&&(!Number.isFinite(A)||A<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${A}\` (${typeof A})`)},HGA=async(A,{cleanup:q,detached:K},Y)=>{if(!q||K)return Y;let z=vJ6(()=>{A.kill()});return Y.finally(()=>{z()})};var jGA=k(()=>{Aq1()});function qq1(A){return A!==null&&typeof A==="object"&&typeof A.pipe==="function"}function mo1(A){return qq1(A)&&A.writable!==!1&&typeof A._write==="function"&&typeof A._writableState==="object"}import{createWriteStream as HIK}from"node:fs";import{ChildProcess as jIK}from"node:child_process";var JIK=(A)=>A instanceof jIK&&typeof A.then==="function",go1=(A,q,K)=>{if(typeof K==="string")return A[q].pipe(HIK(K)),A;if(mo1(K))return A[q].pipe(K),A;if(!JIK(K))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!mo1(K.stdin))throw TypeError("The target child process's stdin must be available.");return A[q].pipe(K.stdin),K},JGA=(A)=>{if(A.stdout!==null)A.pipeStdout=go1.bind(void 0,A,"stdout");if(A.stderr!==null)A.pipeStderr=go1.bind(void 0,A,"stderr");if(A.all!==void 0)A.pipeAll=go1.bind(void 0,A,"all")};var MGA=()=>{};var nC6=async(A,{init:q,convertChunk:K,getSize:Y,truncateChunk:z,addChunk:w,getFinalChunk:_,finalize:$},{maxBuffer:O=Number.POSITIVE_INFINITY}={})=>{if(!DIK(A))throw Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let H=q();H.length=0;try{for await(let j of A){let J=XIK(j),M=K[J](j,H);PGA({convertedChunk:M,state:H,getSize:Y,truncateChunk:z,addChunk:w,maxBuffer:O})}return MIK({state:H,convertChunk:K,getSize:Y,truncateChunk:z,addChunk:w,getFinalChunk:_,maxBuffer:O}),$(H)}catch(j){throw j.bufferedData=$(H),j}},MIK=({state:A,getSize:q,truncateChunk:K,addChunk:Y,getFinalChunk:z,maxBuffer:w})=>{let _=z(A);if(_!==void 0)PGA({convertedChunk:_,state:A,getSize:q,truncateChunk:K,addChunk:Y,maxBuffer:w})},PGA=({convertedChunk:A,state:q,getSize:K,truncateChunk:Y,addChunk:z,maxBuffer:w})=>{let _=K(A),$=q.length+_;if($<=w){DGA(A,q,z,$);return}let O=Y(A,w-q.length);if(O!==void 0)DGA(O,q,z,w);throw new Fo1},DGA=(A,q,K,Y)=>{q.contents=K(A,q,Y),q.length=Y},DIK=(A)=>typeof A==="object"&&A!==null&&typeof A[Symbol.asyncIterator]==="function",XIK=(A)=>{let q=typeof A;if(q==="string")return"string";if(q!=="object"||A===null)return"others";if(globalThis.Buffer?.isBuffer(A))return"buffer";let K=XGA.call(A);if(K==="[object ArrayBuffer]")return"arrayBuffer";if(K==="[object DataView]")return"dataView";if(Number.isInteger(A.byteLength)&&Number.isInteger(A.byteOffset)&&XGA.call(A.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},XGA,Fo1;var rC6=k(()=>{({toString:XGA}=Object.prototype);Fo1=class Fo1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var Qo1=(A)=>A,Uo1=()=>{return},po1=({contents:A})=>A,Kq1=(A)=>{throw Error(`Streams in object mode are not supported: ${String(A)}`)},Yq1=(A)=>A.length;var WGA=k(()=>{rC6()});async function do1(A,q){return nC6(A,vIK,q)}var PIK=()=>({contents:new ArrayBuffer(0)}),WIK=(A)=>ZIK.encode(A),ZIK,ZGA=(A)=>new Uint8Array(A),GGA=(A)=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength),GIK=(A,q)=>A.slice(0,q),fIK=(A,{contents:q,length:K},Y)=>{let z=VGA()?VIK(q,Y):TIK(q,Y);return new Uint8Array(z).set(A,K),z},TIK=(A,q)=>{if(q<=A.byteLength)return A;let K=new ArrayBuffer(TGA(q));return new Uint8Array(K).set(new Uint8Array(A),0),K},VIK=(A,q)=>{if(q<=A.maxByteLength)return A.resize(q),A;let K=new ArrayBuffer(q,{maxByteLength:TGA(q)});return new Uint8Array(K).set(new Uint8Array(A),0),K},TGA=(A)=>fGA**Math.ceil(Math.log(A)/Math.log(fGA)),fGA=2,NIK=({contents:A,length:q})=>VGA()?A:A.slice(0,q),VGA=()=>("resize"in ArrayBuffer.prototype),vIK;var co1=k(()=>{rC6();ZIK=new TextEncoder,vIK={init:PIK,convertChunk:{string:WIK,buffer:ZGA,arrayBuffer:ZGA,dataView:GGA,typedArray:GGA,others:Kq1},getSize:Yq1,truncateChunk:GIK,addChunk:fIK,getFinalChunk:Uo1,finalize:NIK}});async function zq1(A,q){if(!("Buffer"in globalThis))throw Error("getStreamAsBuffer() is only supported in Node.js");try{return NGA(await do1(A,q))}catch(K){if(K.bufferedData!==void 0)K.bufferedData=NGA(K.bufferedData);throw K}}var NGA=(A)=>globalThis.Buffer.from(A);var vGA=k(()=>{co1()});async function lo1(A,q){return nC6(A,RIK,q)}var kIK=()=>({contents:"",textDecoder:new TextDecoder}),wq1=(A,{textDecoder:q})=>q.decode(A,{stream:!0}),EIK=(A,{contents:q})=>q+A,LIK=(A,q)=>A.slice(0,q),yIK=({textDecoder:A})=>{let q=A.decode();return q===""?void 0:q},RIK;var kGA=k(()=>{rC6();RIK={init:kIK,convertChunk:{string:Qo1,buffer:wq1,arrayBuffer:wq1,dataView:wq1,typedArray:wq1,others:Kq1},getSize:Yq1,truncateChunk:LIK,addChunk:EIK,getFinalChunk:yIK,finalize:po1}});var EGA=k(()=>{WGA();co1();vGA();kGA();rC6()});var yGA=C((ZDw,LGA)=>{var{PassThrough:SIK}=g6("stream");LGA.exports=function(){var A=[],q=new SIK({objectMode:!0});return q.setMaxListeners(0),q.add=K,q.isEmpty=Y,q.on("unpipe",z),Array.prototype.slice.call(arguments).forEach(K),q;function K(w){if(Array.isArray(w))return w.forEach(K),this;return A.push(w),w.once("end",z.bind(null,w)),w.once("error",q.emit.bind(q,"error")),w.pipe(q,{end:!1}),this}function Y(){return A.length==0}function z(w){if(A=A.filter(function(_){return _!==w}),!A.length&&q.readable)q.end()}}});import{createReadStream as CIK,readFileSync as hIK}from"node:fs";import{setTimeout as IIK}from"node:timers/promises";var RGA,SGA=(A)=>{if(A!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},bIK=({input:A,inputFile:q})=>{if(typeof q!=="string")return A;return SGA(A),hIK(q)},CGA=(A)=>{let q=bIK(A);if(qq1(q))throw TypeError("The `input` option cannot be a stream in sync mode");return q},xIK=({input:A,inputFile:q})=>{if(typeof q!=="string")return A;return SGA(A),CIK(q)},hGA=(A,q)=>{let K=xIK(q);if(K===void 0)return;if(qq1(K))K.pipe(A.stdin);else A.stdin.end(K)},IGA=(A,{all:q})=>{if(!q||!A.stdout&&!A.stderr)return;let K=RGA.default();if(A.stdout)K.add(A.stdout);if(A.stderr)K.add(A.stderr);return K},io1=async(A,q)=>{if(!A||q===void 0)return;await IIK(0),A.destroy();try{return await q}catch(K){return K.bufferedData}},no1=(A,{encoding:q,buffer:K,maxBuffer:Y})=>{if(!A||!K)return;if(q==="utf8"||q==="utf-8")return lo1(A,{maxBuffer:Y});if(q===null||q==="buffer")return zq1(A,{maxBuffer:Y});return uIK(A,Y,q)},uIK=async(A,q,K)=>{return(await zq1(A,{maxBuffer:q})).toString(K)},bGA=async({stdout:A,stderr:q,all:K},{encoding:Y,buffer:z,maxBuffer:w},_)=>{let $=no1(A,{encoding:Y,buffer:z,maxBuffer:w}),O=no1(q,{encoding:Y,buffer:z,maxBuffer:w}),H=no1(K,{encoding:Y,buffer:z,maxBuffer:w*2});try{return await Promise.all([_,$,O,H])}catch(j){return Promise.all([{error:j,signal:j.signal,timedOut:j.timedOut},io1(A,$),io1(q,O),io1(K,H)])}};var xGA=k(()=>{EGA();RGA=e(yGA(),1)});var BIK,mIK,ro1=(A,q)=>{for(let[K,Y]of mIK){let z=typeof q==="function"?(...w)=>Reflect.apply(Y.value,q(),w):Y.value.bind(q);Reflect.defineProperty(A,K,{...Y,value:z})}},uGA=(A)=>new Promise((q,K)=>{if(A.on("exit",(Y,z)=>{q({exitCode:Y,signal:z})}),A.on("error",(Y)=>{K(Y)}),A.stdin)A.stdin.on("error",(Y)=>{K(Y)})});var BGA=k(()=>{BIK=(async()=>{})().constructor.prototype,mIK=["then","catch","finally"].map((A)=>[A,Reflect.getOwnPropertyDescriptor(BIK,A)])});import{Buffer as gIK}from"node:buffer";import{ChildProcess as FIK}from"node:child_process";var FGA=(A,q=[])=>{if(!Array.isArray(q))return[A];return[A,...q]},QIK,UIK=(A)=>{if(typeof A!=="string"||QIK.test(A))return A;return`"${A.replaceAll('"',"\\\"")}"`},oo1=(A,q)=>FGA(A,q).join(" "),ao1=(A,q)=>FGA(A,q).map((K)=>UIK(K)).join(" "),pIK,mGA=(A)=>{let q=typeof A;if(q==="string")return A;if(q==="number")return String(A);if(q==="object"&&A!==null&&!(A instanceof FIK)&&"stdout"in A){let K=typeof A.stdout;if(K==="string")return A.stdout;if(gIK.isBuffer(A.stdout))return A.stdout.toString();throw TypeError(`Unexpected "${K}" stdout in template expression`)}throw TypeError(`Unexpected "${q}" in template expression`)},gGA=(A,q,K)=>K||A.length===0||q.length===0?[...A,...q]:[...A.slice(0,-1),`${A.at(-1)}${q[0]}`,...q.slice(1)],dIK=({templates:A,expressions:q,tokens:K,index:Y,template:z})=>{let w=z??A.raw[Y],_=w.split(pIK).filter(Boolean),$=gGA(K,_,w.startsWith(" "));if(Y===q.length)return $;let O=q[Y],H=Array.isArray(O)?O.map((j)=>mGA(j)):[mGA(O)];return gGA($,H,w.endsWith(" "))},so1=(A,q)=>{let K=[];for(let[Y,z]of A.entries())K=dIK({templates:A,expressions:q,tokens:K,index:Y,template:z});return K};var QGA=k(()=>{QIK=/^[\w.-]+$/,pIK=/ +/g});import{debuglog as cIK}from"node:util";import lIK from"node:process";var UGA,_q1=(A,q)=>String(A).padStart(q,"0"),iIK=()=>{let A=new Date;return`${_q1(A.getHours(),2)}:${_q1(A.getMinutes(),2)}:${_q1(A.getSeconds(),2)}.${_q1(A.getMilliseconds(),3)}`},to1=(A,{verbose:q})=>{if(!q)return;lIK.stderr.write(`[${iIK()}] ${A}
`)};var pGA=k(()=>{UGA=cIK("execa").enabled});import{Buffer as nIK}from"node:buffer";import rIK from"node:path";import eo1 from"node:child_process";import $q1 from"node:process";function GY(A,q,K){let Y=lGA(A,q,K),z=oo1(A,q),w=ao1(A,q);to1(w,Y.options),OGA(Y.options);let _;try{_=eo1.spawn(Y.file,Y.args,Y.options)}catch(D){let X=new eo1.ChildProcess,P=Promise.reject(iC6({error:D,stdout:"",stderr:"",all:"",command:z,escapedCommand:w,parsed:Y,timedOut:!1,isCanceled:!1,killed:!1}));return ro1(X,P),X}let $=uGA(_),O=$GA(_,Y.options,$),H=HGA(_,Y.options,O),j={isCanceled:!1};_.kill=wGA.bind(null,_.kill.bind(_)),_.cancel=_GA.bind(null,_,j);let M=dZA(async()=>{let[{error:D,exitCode:X,signal:P,timedOut:W},Z,G,f]=await bGA(_,Y.options,H),V=oC6(Y.options,Z),N=oC6(Y.options,G),v=oC6(Y.options,f);if(D||X!==0||P!==null){let y=iC6({error:D,exitCode:X,signal:P,stdout:V,stderr:N,all:v,command:z,escapedCommand:w,parsed:Y,timedOut:W,isCanceled:j.isCanceled||(Y.options.signal?Y.options.signal.aborted:!1),killed:_.killed});if(!Y.options.reject)return y;throw y}return{command:z,escapedCommand:w,exitCode:0,stdout:V,stderr:N,all:v,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return hGA(_,Y.options),_.all=IGA(_,Y.options),JGA(_),ro1(_,M),_}function vq6(A,q,K){let Y=lGA(A,q,K),z=oo1(A,q),w=ao1(A,q);to1(w,Y.options);let _=CGA(Y.options),$;try{$=eo1.spawnSync(Y.file,Y.args,{...Y.options,input:_})}catch(j){throw iC6({error:j,stdout:"",stderr:"",all:"",command:z,escapedCommand:w,parsed:Y,timedOut:!1,isCanceled:!1,killed:!1})}let O=oC6(Y.options,$.stdout,$.error),H=oC6(Y.options,$.stderr,$.error);if($.error||$.status!==0||$.signal!==null){let j=iC6({stdout:O,stderr:H,error:$.error,signal:$.signal,exitCode:$.status,command:z,escapedCommand:w,parsed:Y,timedOut:$.error&&$.error.code==="ETIMEDOUT",isCanceled:!1,killed:$.signal!==null});if(!Y.options.reject)return j;throw j}return{command:z,escapedCommand:w,exitCode:0,stdout:O,stderr:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function iGA(A){function q(K,...Y){if(!Array.isArray(K))return iGA({...A,...K});let[z,...w]=so1(K,Y);return GY(z,w,dGA(A))}return q.sync=(K,...Y)=>{if(!Array.isArray(K))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[z,...w]=so1(K,Y);return vq6(z,w,dGA(A))},q}var cGA,oIK=1e8,aIK=({env:A,extendEnv:q,preferLocal:K,localDir:Y,execPath:z})=>{let w=q?{...$q1.env,...A}:A;if(K)return FZA({env:w,cwd:Y,execPath:z});return w},lGA=(A,q,K={})=>{let Y=cGA.default._parse(A,q,K);if(A=Y.command,q=Y.args,K=Y.options,K={maxBuffer:oIK,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:K.cwd||$q1.cwd(),execPath:$q1.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:UGA,...K},K.env=aIK(K),K.stdio=eZA(K),$q1.platform==="win32"&&rIK.basename(A,".exe")==="cmd")q.unshift("/q");return{file:A,args:q,options:K,parsed:Y}},oC6=(A,q,K)=>{if(typeof q!=="string"&&!nIK.isBuffer(q))return K===void 0?void 0:"";if(A.stripFinalNewline)return So1(q);return q},sIK=({input:A,inputFile:q,stdio:K})=>A===void 0&&q===void 0&&K===void 0?{stdin:"inherit"}:{},dGA=(A={})=>({preferLocal:!0,...sIK(A),...A}),nDw;var Ef=k(()=>{QZA();cZA();tZA();AGA();jGA();MGA();xGA();BGA();QGA();pGA();cGA=e(Ro1(),1);nDw=iGA()});import{execSync as tIK}from"child_process";function xa(A,q){let Y=[];try{const K=oY(Y,$2`execSync: ${A.slice(0,100)}`,0);return tIK(A,q)}catch(z){var w=z,_=1}finally{aY(Y,w,_)}}var Oq1=k(()=>{a1()});async function eIK(A){if(process.platform==="win32"){let K=await GY(`where.exe ${A}`,{shell:!0,stderr:"ignore",reject:!1});if(K.exitCode!==0||!K.stdout)return null;return K.stdout.trim().split(/\r?\n/)[0]||null}let q=await GY(`which ${A}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim()}function AbK(A){if(process.platform==="win32")try{return xa(`where.exe ${A}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return xa(`which ${A}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var Aa1,f0,Hq1;var tB=k(()=>{Ef();Oq1();Aa1=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,f0=Aa1?async(A)=>Aa1(A):eIK,Hq1=Aa1??AbK});function aC6(A,q){return function(){return A.apply(q,arguments)}}function KbK(A){return A!==null&&!sC6(A)&&A.constructor!==null&&!sC6(A.constructor)&&mk(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}function YbK(A){let q;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)q=ArrayBuffer.isView(A);else q=A&&A.buffer&&rGA(A.buffer);return q}function tC6(A,q,{allOwnKeys:K=!1}={}){if(A===null||typeof A>"u")return;let Y,z;if(typeof A!=="object")A=[A];if(kJ6(A))for(Y=0,z=A.length;Y<z;Y++)q.call(null,A[Y],Y,A);else{let w=K?Object.getOwnPropertyNames(A):Object.keys(A),_=w.length,$;for(Y=0;Y<_;Y++)$=w[Y],q.call(null,A[$],$,A)}}function aGA(A,q){q=q.toLowerCase();let K=Object.keys(A),Y=K.length,z;while(Y-- >0)if(z=K[Y],q===z.toLowerCase())return z;return null}function qa1(){let{caseless:A}=sGA(this)&&this||{},q={},K=(Y,z)=>{let w=A&&aGA(q,z)||z;if(jq1(q[w])&&jq1(Y))q[w]=qa1(q[w],Y);else if(jq1(Y))q[w]=qa1({},Y);else if(kJ6(Y))q[w]=Y.slice();else q[w]=Y};for(let Y=0,z=arguments.length;Y<z;Y++)arguments[Y]&&tC6(arguments[Y],K);return q}function xbK(A){return!!(A&&mk(A.append)&&A[Symbol.toStringTag]==="FormData"&&A[Symbol.iterator])}var qbK,Ka1,Jq1,fI=(A)=>{return A=A.toLowerCase(),(q)=>Jq1(q)===A},Mq1=(A)=>(q)=>typeof q===A,kJ6,sC6,rGA,zbK,mk,oGA,Dq1=(A)=>A!==null&&typeof A==="object",wbK=(A)=>A===!0||A===!1,jq1=(A)=>{if(Jq1(A)!=="object")return!1;let q=Ka1(A);return(q===null||q===Object.prototype||Object.getPrototypeOf(q)===null)&&!(Symbol.toStringTag in A)&&!(Symbol.iterator in A)},_bK,$bK,ObK,HbK,jbK=(A)=>Dq1(A)&&mk(A.pipe),JbK=(A)=>{let q;return A&&(typeof FormData==="function"&&A instanceof FormData||mk(A.append)&&((q=Jq1(A))==="formdata"||q==="object"&&mk(A.toString)&&A.toString()==="[object FormData]"))},MbK,DbK,XbK,PbK,WbK,ZbK=(A)=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),kq6,sGA=(A)=>!sC6(A)&&A!==kq6,GbK=(A,q,K,{allOwnKeys:Y}={})=>{return tC6(q,(z,w)=>{if(K&&mk(z))A[w]=aC6(z,K);else A[w]=z},{allOwnKeys:Y}),A},fbK=(A)=>{if(A.charCodeAt(0)===65279)A=A.slice(1);return A},TbK=(A,q,K,Y)=>{A.prototype=Object.create(q.prototype,Y),A.prototype.constructor=A,Object.defineProperty(A,"super",{value:q.prototype}),K&&Object.assign(A.prototype,K)},VbK=(A,q,K,Y)=>{let z,w,_,$={};if(q=q||{},A==null)return q;do{z=Object.getOwnPropertyNames(A),w=z.length;while(w-- >0)if(_=z[w],(!Y||Y(_,A,q))&&!$[_])q[_]=A[_],$[_]=!0;A=K!==!1&&Ka1(A)}while(A&&(!K||K(A,q))&&A!==Object.prototype);return q},NbK=(A,q,K)=>{if(A=String(A),K===void 0||K>A.length)K=A.length;K-=q.length;let Y=A.indexOf(q,K);return Y!==-1&&Y===K},vbK=(A)=>{if(!A)return null;if(kJ6(A))return A;let q=A.length;if(!oGA(q))return null;let K=Array(q);while(q-- >0)K[q]=A[q];return K},kbK,EbK=(A,q)=>{let Y=(A&&A[Symbol.iterator]).call(A),z;while((z=Y.next())&&!z.done){let w=z.value;q.call(A,w[0],w[1])}},LbK=(A,q)=>{let K,Y=[];while((K=A.exec(q))!==null)Y.push(K);return Y},ybK,RbK=(A)=>{return A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(K,Y,z){return Y.toUpperCase()+z})},nGA,SbK,tGA=(A,q)=>{let K=Object.getOwnPropertyDescriptors(A),Y={};tC6(K,(z,w)=>{let _;if((_=q(z,w,A))!==!1)Y[w]=_||z}),Object.defineProperties(A,Y)},CbK=(A)=>{tGA(A,(q,K)=>{if(mk(A)&&["arguments","caller","callee"].indexOf(K)!==-1)return!1;let Y=A[K];if(!mk(Y))return;if(q.enumerable=!1,"writable"in q){q.writable=!1;return}if(!q.set)q.set=()=>{throw Error("Can not rewrite read-only method '"+K+"'")}})},hbK=(A,q)=>{let K={},Y=(z)=>{z.forEach((w)=>{K[w]=!0})};return kJ6(A)?Y(A):Y(String(A).split(q)),K},IbK=()=>{},bbK=(A,q)=>{return A!=null&&Number.isFinite(A=+A)?A:q},ubK=(A)=>{let q=[,,,,,,,,,,],K=(Y,z)=>{if(Dq1(Y)){if(q.indexOf(Y)>=0)return;if(!("toJSON"in Y)){q[z]=Y;let w=kJ6(Y)?[]:{};return tC6(Y,(_,$)=>{let O=K(_,z+1);!sC6(O)&&(w[$]=O)}),q[z]=void 0,w}}return Y};return K(A,0)},BbK,mbK=(A)=>A&&(Dq1(A)||mk(A))&&mk(A.then)&&mk(A.catch),eGA,gbK,q8;var P_=k(()=>{({toString:qbK}=Object.prototype),{getPrototypeOf:Ka1}=Object,Jq1=((A)=>(q)=>{let K=qbK.call(q);return A[K]||(A[K]=K.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:kJ6}=Array,sC6=Mq1("undefined");rGA=fI("ArrayBuffer");zbK=Mq1("string"),mk=Mq1("function"),oGA=Mq1("number"),_bK=fI("Date"),$bK=fI("File"),ObK=fI("Blob"),HbK=fI("FileList"),MbK=fI("URLSearchParams"),[DbK,XbK,PbK,WbK]=["ReadableStream","Request","Response","Headers"].map(fI);kq6=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();kbK=((A)=>{return(q)=>{return A&&q instanceof A}})(typeof Uint8Array<"u"&&Ka1(Uint8Array)),ybK=fI("HTMLFormElement"),nGA=(({hasOwnProperty:A})=>(q,K)=>A.call(q,K))(Object.prototype),SbK=fI("RegExp");BbK=fI("AsyncFunction"),eGA=((A,q)=>{if(A)return setImmediate;return q?((K,Y)=>{return kq6.addEventListener("message",({source:z,data:w})=>{if(z===kq6&&w===K)Y.length&&Y.shift()()},!1),(z)=>{Y.push(z),kq6.postMessage(K,"*")}})(`axios@${Math.random()}`,[]):(K)=>setTimeout(K)})(typeof setImmediate==="function",mk(kq6.postMessage)),gbK=typeof queueMicrotask<"u"?queueMicrotask.bind(kq6):typeof process<"u"&&process.nextTick||eGA,q8={isArray:kJ6,isArrayBuffer:rGA,isBuffer:KbK,isFormData:JbK,isArrayBufferView:YbK,isString:zbK,isNumber:oGA,isBoolean:wbK,isObject:Dq1,isPlainObject:jq1,isReadableStream:DbK,isRequest:XbK,isResponse:PbK,isHeaders:WbK,isUndefined:sC6,isDate:_bK,isFile:$bK,isBlob:ObK,isRegExp:SbK,isFunction:mk,isStream:jbK,isURLSearchParams:MbK,isTypedArray:kbK,isFileList:HbK,forEach:tC6,merge:qa1,extend:GbK,trim:ZbK,stripBOM:fbK,inherits:TbK,toFlatObject:VbK,kindOf:Jq1,kindOfTest:fI,endsWith:NbK,toArray:vbK,forEachEntry:EbK,matchAll:LbK,isHTMLForm:ybK,hasOwnProperty:nGA,hasOwnProp:nGA,reduceDescriptors:tGA,freezeMethods:CbK,toObjectSet:hbK,toCamelCase:RbK,noop:IbK,toFiniteNumber:bbK,findKey:aGA,global:kq6,isContextDefined:sGA,isSpecCompliantForm:xbK,toJSONObject:ubK,isAsyncFn:BbK,isThenable:mbK,setImmediate:eGA,asap:gbK}});function EJ6(A,q,K,Y,z){if(Error.call(this),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack;if(this.message=A,this.name="AxiosError",q&&(this.code=q),K&&(this.config=K),Y&&(this.request=Y),z)this.response=z,this.status=z.status?z.status:null}var AfA,qfA,X4;var gk=k(()=>{P_();q8.inherits(EJ6,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:q8.toJSONObject(this.config),code:this.code,status:this.status}}});AfA=EJ6.prototype,qfA={};["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((A)=>{qfA[A]={value:A}});Object.defineProperties(EJ6,qfA);Object.defineProperty(AfA,"isAxiosError",{value:!0});EJ6.from=(A,q,K,Y,z,w)=>{let _=Object.create(AfA);return q8.toFlatObject(A,_,function(O){return O!==Error.prototype},($)=>{return $!=="isAxiosError"}),EJ6.call(_,A.message,q,K,Y,z),_.cause=A,_.name=A.name,w&&Object.assign(_,w),_};X4=EJ6});var zfA=C(($Xw,YfA)=>{var KfA=g6("stream").Stream,FbK=g6("util");YfA.exports=TI;function TI(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}FbK.inherits(TI,KfA);TI.create=function(A,q){var K=new this;q=q||{};for(var Y in q)K[Y]=q[Y];K.source=A;var z=A.emit;if(A.emit=function(){return K._handleEmit(arguments),z.apply(A,arguments)},A.on("error",function(){}),K.pauseStream)A.pause();return K};Object.defineProperty(TI.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});TI.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};TI.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};TI.prototype.pause=function(){this.source.pause()};TI.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(A){this.emit.apply(this,A)}.bind(this)),this._bufferedEvents=[]};TI.prototype.pipe=function(){var A=KfA.prototype.pipe.apply(this,arguments);return this.resume(),A};TI.prototype._handleEmit=function(A){if(this._released){this.emit.apply(this,A);return}if(A[0]==="data")this.dataSize+=A[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(A)};TI.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var A="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(A))}});var OfA=C((OXw,$fA)=>{var QbK=g6("util"),_fA=g6("stream").Stream,wfA=zfA();$fA.exports=Lj;function Lj(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}QbK.inherits(Lj,_fA);Lj.create=function(A){var q=new this;A=A||{};for(var K in A)q[K]=A[K];return q};Lj.isStreamLike=function(A){return typeof A!=="function"&&typeof A!=="string"&&typeof A!=="boolean"&&typeof A!=="number"&&!Buffer.isBuffer(A)};Lj.prototype.append=function(A){var q=Lj.isStreamLike(A);if(q){if(!(A instanceof wfA)){var K=wfA.create(A,{maxDataSize:1/0,pauseStream:this.pauseStreams});A.on("data",this._checkDataSize.bind(this)),A=K}if(this._handleErrors(A),this.pauseStreams)A.pause()}return this._streams.push(A),this};Lj.prototype.pipe=function(A,q){return _fA.prototype.pipe.call(this,A,q),this.resume(),A};Lj.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Lj.prototype._realGetNext=function(){var A=this._streams.shift();if(typeof A>"u"){this.end();return}if(typeof A!=="function"){this._pipeNext(A);return}var q=A;q(function(K){var Y=Lj.isStreamLike(K);if(Y)K.on("data",this._checkDataSize.bind(this)),this._handleErrors(K);this._pipeNext(K)}.bind(this))};Lj.prototype._pipeNext=function(A){this._currentStream=A;var q=Lj.isStreamLike(A);if(q){A.on("end",this._getNext.bind(this)),A.pipe(this,{end:!1});return}var K=A;this.write(K),this._getNext()};Lj.prototype._handleErrors=function(A){var q=this;A.on("error",function(K){q._emitError(K)})};Lj.prototype.write=function(A){this.emit("data",A)};Lj.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Lj.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};Lj.prototype.end=function(){this._reset(),this.emit("end")};Lj.prototype.destroy=function(){this._reset(),this.emit("close")};Lj.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Lj.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var A="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(A))};Lj.prototype._updateDataSize=function(){this.dataSize=0;var A=this;if(this._streams.forEach(function(q){if(!q.dataSize)return;A.dataSize+=q.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Lj.prototype._emitError=function(A){this._reset(),this.emit("error",A)}});var jfA=C((HXw,HfA)=>{var eC6=(A)=>()=>{throw Error("mime-types."+A+"() is stubbed in this build. Do not rely on axios auto-multipart serialization (plain object + Content-Type: multipart/form-data). Use native FormData or hand-roll the multipart body instead. See scripts/build-with-plugins.ts stubMimeTypes plugin.")};HfA.exports={lookup:eC6("lookup"),contentType:eC6("contentType"),extension:eC6("extension"),charset:eC6("charset"),extensions:Object.create(null),types:Object.create(null),charsets:{lookup:eC6("charsets.lookup")}}});var MfA=C((jXw,JfA)=>{JfA.exports=UbK;function UbK(A){var q=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(q)q(A);else setTimeout(A,0)}});var Ya1=C((JXw,XfA)=>{var DfA=MfA();XfA.exports=pbK;function pbK(A){var q=!1;return DfA(function(){q=!0}),function(Y,z){if(q)A(Y,z);else DfA(function(){A(Y,z)})}}});var za1=C((MXw,PfA)=>{PfA.exports=dbK;function dbK(A){Object.keys(A.jobs).forEach(cbK.bind(A)),A.jobs={}}function cbK(A){if(typeof this.jobs[A]=="function")this.jobs[A]()}});var wa1=C((DXw,ZfA)=>{var WfA=Ya1(),lbK=za1();ZfA.exports=ibK;function ibK(A,q,K,Y){var z=K.keyedList?K.keyedList[K.index]:K.index;K.jobs[z]=nbK(q,z,A[z],function(w,_){if(!(z in K.jobs))return;if(delete K.jobs[z],w)lbK(K);else K.results[z]=_;Y(w,K.results)})}function nbK(A,q,K,Y){var z;if(A.length==2)z=A(K,WfA(Y));else z=A(K,q,WfA(Y));return z}});var _a1=C((XXw,GfA)=>{GfA.exports=rbK;function rbK(A,q){var K=!Array.isArray(A),Y={index:0,keyedList:K||q?Object.keys(A):null,jobs:{},results:K?{}:[],size:K?Object.keys(A).length:A.length};if(q)Y.keyedList.sort(K?q:function(z,w){return q(A[z],A[w])});return Y}});var $a1=C((PXw,ffA)=>{var obK=za1(),abK=Ya1();ffA.exports=sbK;function sbK(A){if(!Object.keys(this.jobs).length)return;this.index=this.size,obK(this),abK(A)(null,this.results)}});var VfA=C((WXw,TfA)=>{var tbK=wa1(),ebK=_a1(),AxK=$a1();TfA.exports=qxK;function qxK(A,q,K){var Y=ebK(A);while(Y.index<(Y.keyedList||A).length)tbK(A,q,Y,function(z,w){if(z){K(z,w);return}if(Object.keys(Y.jobs).length===0){K(null,Y.results);return}}),Y.index++;return AxK.bind(Y,K)}});var Oa1=C((ZXw,Xq1)=>{var NfA=wa1(),KxK=_a1(),YxK=$a1();Xq1.exports=zxK;Xq1.exports.ascending=vfA;Xq1.exports.descending=wxK;function zxK(A,q,K,Y){var z=KxK(A,K);return NfA(A,q,z,function w(_,$){if(_){Y(_,$);return}if(z.index++,z.index<(z.keyedList||A).length){NfA(A,q,z,w);return}Y(null,z.results)}),YxK.bind(z,Y)}function vfA(A,q){return A<q?-1:A>q?1:0}function wxK(A,q){return-1*vfA(A,q)}});var EfA=C((GXw,kfA)=>{var _xK=Oa1();kfA.exports=$xK;function $xK(A,q,K){return _xK(A,q,null,K)}});var yfA=C((fXw,LfA)=>{LfA.exports={parallel:VfA(),serial:EfA(),serialOrdered:Oa1()}});var Ha1=C((TXw,RfA)=>{RfA.exports=Object});var CfA=C((VXw,SfA)=>{SfA.exports=Error});var IfA=C((NXw,hfA)=>{hfA.exports=EvalError});var xfA=C((vXw,bfA)=>{bfA.exports=RangeError});var BfA=C((kXw,ufA)=>{ufA.exports=ReferenceError});var gfA=C((EXw,mfA)=>{mfA.exports=SyntaxError});var Pq1=C((LXw,FfA)=>{FfA.exports=TypeError});var UfA=C((yXw,QfA)=>{QfA.exports=URIError});var dfA=C((RXw,pfA)=>{pfA.exports=Math.abs});var lfA=C((SXw,cfA)=>{cfA.exports=Math.floor});var nfA=C((CXw,ifA)=>{ifA.exports=Math.max});var ofA=C((hXw,rfA)=>{rfA.exports=Math.min});var sfA=C((IXw,afA)=>{afA.exports=Math.pow});var efA=C((bXw,tfA)=>{tfA.exports=Math.round});var qTA=C((xXw,ATA)=>{ATA.exports=Number.isNaN||function(q){return q!==q}});var YTA=C((uXw,KTA)=>{var OxK=qTA();KTA.exports=function(q){if(OxK(q)||q===0)return q;return q<0?-1:1}});var wTA=C((BXw,zTA)=>{zTA.exports=Object.getOwnPropertyDescriptor});var ja1=C((mXw,_TA)=>{var Wq1=wTA();if(Wq1)try{Wq1([],"length")}catch(A){Wq1=null}_TA.exports=Wq1});var OTA=C((gXw,$TA)=>{var Zq1=Object.defineProperty||!1;if(Zq1)try{Zq1({},"a",{value:1})}catch(A){Zq1=!1}$TA.exports=Zq1});var Ja1=C((FXw,HTA)=>{HTA.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var q={},K=Symbol("test"),Y=Object(K);if(typeof K==="string")return!1;if(Object.prototype.toString.call(K)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(Y)!=="[object Symbol]")return!1;var z=42;q[K]=z;for(var w in q)return!1;if(typeof Object.keys==="function"&&Object.keys(q).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(q).length!==0)return!1;var _=Object.getOwnPropertySymbols(q);if(_.length!==1||_[0]!==K)return!1;if(!Object.prototype.propertyIsEnumerable.call(q,K))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var $=Object.getOwnPropertyDescriptor(q,K);if($.value!==z||$.enumerable!==!0)return!1}return!0}});var MTA=C((QXw,JTA)=>{var jTA=typeof Symbol<"u"&&Symbol,HxK=Ja1();JTA.exports=function(){if(typeof jTA!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof jTA("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return HxK()}});var Ma1=C((UXw,DTA)=>{DTA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Da1=C((pXw,XTA)=>{var jxK=Ha1();XTA.exports=jxK.getPrototypeOf||null});var ZTA=C((dXw,WTA)=>{var JxK="Function.prototype.bind called on incompatible ",MxK=Object.prototype.toString,DxK=Math.max,XxK="[object Function]",PTA=function(q,K){var Y=[];for(var z=0;z<q.length;z+=1)Y[z]=q[z];for(var w=0;w<K.length;w+=1)Y[w+q.length]=K[w];return Y},PxK=function(q,K){var Y=[];for(var z=K||0,w=0;z<q.length;z+=1,w+=1)Y[w]=q[z];return Y},WxK=function(A,q){var K="";for(var Y=0;Y<A.length;Y+=1)if(K+=A[Y],Y+1<A.length)K+=q;return K};WTA.exports=function(q){var K=this;if(typeof K!=="function"||MxK.apply(K)!==XxK)throw TypeError(JxK+K);var Y=PxK(arguments,1),z,w=function(){if(this instanceof z){var j=K.apply(this,PTA(Y,arguments));if(Object(j)===j)return j;return this}return K.apply(q,PTA(Y,arguments))},_=DxK(0,K.length-Y.length),$=[];for(var O=0;O<_;O++)$[O]="$"+O;if(z=Function("binder","return function ("+WxK($,",")+"){ return binder.apply(this,arguments); }")(w),K.prototype){var H=function(){};H.prototype=K.prototype,z.prototype=new H,H.prototype=null}return z}});var Ah6=C((cXw,GTA)=>{var ZxK=ZTA();GTA.exports=Function.prototype.bind||ZxK});var Gq1=C((lXw,fTA)=>{fTA.exports=Function.prototype.call});var Xa1=C((iXw,TTA)=>{TTA.exports=Function.prototype.apply});var NTA=C((nXw,VTA)=>{VTA.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var kTA=C((rXw,vTA)=>{var GxK=Ah6(),fxK=Xa1(),TxK=Gq1(),VxK=NTA();vTA.exports=VxK||GxK.call(TxK,fxK)});var LTA=C((oXw,ETA)=>{var NxK=Ah6(),vxK=Pq1(),kxK=Gq1(),ExK=kTA();ETA.exports=function(q){if(q.length<1||typeof q[0]!=="function")throw new vxK("a function is required");return ExK(NxK,kxK,q)}});var ITA=C((aXw,hTA)=>{var LxK=LTA(),yTA=ja1(),STA;try{STA=[].__proto__===Array.prototype}catch(A){if(!A||typeof A!=="object"||!("code"in A)||A.code!=="ERR_PROTO_ACCESS")throw A}var Pa1=!!STA&&yTA&&yTA(Object.prototype,"__proto__"),CTA=Object,RTA=CTA.getPrototypeOf;hTA.exports=Pa1&&typeof Pa1.get==="function"?LxK([Pa1.get]):typeof RTA==="function"?function(q){return RTA(q==null?q:CTA(q))}:!1});var mTA=C((sXw,BTA)=>{var bTA=Ma1(),xTA=Da1(),uTA=ITA();BTA.exports=bTA?function(q){return bTA(q)}:xTA?function(q){if(!q||typeof q!=="object"&&typeof q!=="function")throw TypeError("getProto: not an object");return xTA(q)}:uTA?function(q){return uTA(q)}:null});var Wa1=C((tXw,gTA)=>{var yxK=Function.prototype.call,RxK=Object.prototype.hasOwnProperty,SxK=Ah6();gTA.exports=SxK.call(yxK,RxK)});var cTA=C((eXw,dTA)=>{var s9,CxK=Ha1(),hxK=CfA(),IxK=IfA(),bxK=xfA(),xxK=BfA(),SJ6=gfA(),RJ6=Pq1(),uxK=UfA(),BxK=dfA(),mxK=lfA(),gxK=nfA(),FxK=ofA(),QxK=sfA(),UxK=efA(),pxK=YTA(),UTA=Function,Za1=function(A){try{return UTA('"use strict"; return ('+A+").constructor;")()}catch(q){}},qh6=ja1(),dxK=OTA(),Ga1=function(){throw new RJ6},cxK=qh6?function(){try{return arguments.callee,Ga1}catch(A){try{return qh6(arguments,"callee").get}catch(q){return Ga1}}}():Ga1,LJ6=MTA()(),FX=mTA(),lxK=Da1(),ixK=Ma1(),pTA=Xa1(),Kh6=Gq1(),yJ6={},nxK=typeof Uint8Array>"u"||!FX?s9:FX(Uint8Array),Eq6={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?s9:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?s9:ArrayBuffer,"%ArrayIteratorPrototype%":LJ6&&FX?FX([][Symbol.iterator]()):s9,"%AsyncFromSyncIteratorPrototype%":s9,"%AsyncFunction%":yJ6,"%AsyncGenerator%":yJ6,"%AsyncGeneratorFunction%":yJ6,"%AsyncIteratorPrototype%":yJ6,"%Atomics%":typeof Atomics>"u"?s9:Atomics,"%BigInt%":typeof BigInt>"u"?s9:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?s9:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?s9:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?s9:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":hxK,"%eval%":eval,"%EvalError%":IxK,"%Float16Array%":typeof Float16Array>"u"?s9:Float16Array,"%Float32Array%":typeof Float32Array>"u"?s9:Float32Array,"%Float64Array%":typeof Float64Array>"u"?s9:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?s9:FinalizationRegistry,"%Function%":UTA,"%GeneratorFunction%":yJ6,"%Int8Array%":typeof Int8Array>"u"?s9:Int8Array,"%Int16Array%":typeof Int16Array>"u"?s9:Int16Array,"%Int32Array%":typeof Int32Array>"u"?s9:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":LJ6&&FX?FX(FX([][Symbol.iterator]())):s9,"%JSON%":typeof JSON==="object"?JSON:s9,"%Map%":typeof Map>"u"?s9:Map,"%MapIteratorPrototype%":typeof Map>"u"||!LJ6||!FX?s9:FX(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":CxK,"%Object.getOwnPropertyDescriptor%":qh6,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?s9:Promise,"%Proxy%":typeof Proxy>"u"?s9:Proxy,"%RangeError%":bxK,"%ReferenceError%":xxK,"%Reflect%":typeof Reflect>"u"?s9:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?s9:Set,"%SetIteratorPrototype%":typeof Set>"u"||!LJ6||!FX?s9:FX(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?s9:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":LJ6&&FX?FX(""[Symbol.iterator]()):s9,"%Symbol%":LJ6?Symbol:s9,"%SyntaxError%":SJ6,"%ThrowTypeError%":cxK,"%TypedArray%":nxK,"%TypeError%":RJ6,"%Uint8Array%":typeof Uint8Array>"u"?s9:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?s9:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?s9:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?s9:Uint32Array,"%URIError%":uxK,"%WeakMap%":typeof WeakMap>"u"?s9:WeakMap,"%WeakRef%":typeof WeakRef>"u"?s9:WeakRef,"%WeakSet%":typeof WeakSet>"u"?s9:WeakSet,"%Function.prototype.call%":Kh6,"%Function.prototype.apply%":pTA,"%Object.defineProperty%":dxK,"%Object.getPrototypeOf%":lxK,"%Math.abs%":BxK,"%Math.floor%":mxK,"%Math.max%":gxK,"%Math.min%":FxK,"%Math.pow%":QxK,"%Math.round%":UxK,"%Math.sign%":pxK,"%Reflect.getPrototypeOf%":ixK};if(FX)try{null.error}catch(A){fa1=FX(FX(A)),Eq6["%Error.prototype%"]=fa1}var fa1,rxK=function A(q){var K;if(q==="%AsyncFunction%")K=Za1("async function () {}");else if(q==="%GeneratorFunction%")K=Za1("function* () {}");else if(q==="%AsyncGeneratorFunction%")K=Za1("async function* () {}");else if(q==="%AsyncGenerator%"){var Y=A("%AsyncGeneratorFunction%");if(Y)K=Y.prototype}else if(q==="%AsyncIteratorPrototype%"){var z=A("%AsyncGenerator%");if(z&&FX)K=FX(z.prototype)}return Eq6[q]=K,K},FTA={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yh6=Ah6(),fq1=Wa1(),oxK=Yh6.call(Kh6,Array.prototype.concat),axK=Yh6.call(pTA,Array.prototype.splice),QTA=Yh6.call(Kh6,String.prototype.replace),Tq1=Yh6.call(Kh6,String.prototype.slice),sxK=Yh6.call(Kh6,RegExp.prototype.exec),txK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,exK=/\\(\\)?/g,AuK=function(q){var K=Tq1(q,0,1),Y=Tq1(q,-1);if(K==="%"&&Y!=="%")throw new SJ6("invalid intrinsic syntax, expected closing `%`");else if(Y==="%"&&K!=="%")throw new SJ6("invalid intrinsic syntax, expected opening `%`");var z=[];return QTA(q,txK,function(w,_,$,O){z[z.length]=$?QTA(O,exK,"$1"):_||w}),z},quK=function(q,K){var Y=q,z;if(fq1(FTA,Y))z=FTA[Y],Y="%"+z[0]+"%";if(fq1(Eq6,Y)){var w=Eq6[Y];if(w===yJ6)w=rxK(Y);if(typeof w>"u"&&!K)throw new RJ6("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:z,name:Y,value:w}}throw new SJ6("intrinsic "+q+" does not exist!")};dTA.exports=function(q,K){if(typeof q!=="string"||q.length===0)throw new RJ6("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K!=="boolean")throw new RJ6('"allowMissing" argument must be a boolean');if(sxK(/^%?[^%]*%?$/,q)===null)throw new SJ6("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=AuK(q),z=Y.length>0?Y[0]:"",w=quK("%"+z+"%",K),_=w.name,$=w.value,O=!1,H=w.alias;if(H)z=H[0],axK(Y,oxK([0,1],H));for(var j=1,J=!0;j<Y.length;j+=1){var M=Y[j],D=Tq1(M,0,1),X=Tq1(M,-1);if((D==='"'||D==="'"||D==="`"||(X==='"'||X==="'"||X==="`"))&&D!==X)throw new SJ6("property names with quotes must have matching quotes");if(M==="constructor"||!J)O=!0;if(z+="."+M,_="%"+z+"%",fq1(Eq6,_))$=Eq6[_];else if($!=null){if(!(M in $)){if(!K)throw new RJ6("base intrinsic for "+q+" exists, but the property is not available.");return}if(qh6&&j+1>=Y.length){var P=qh6($,M);if(J=!!P,J&&"get"in P&&!("originalValue"in P.get))$=P.get;else $=$[M]}else J=fq1($,M),$=$[M];if(J&&!O)Eq6[_]=$}}return $}});var iTA=C((APw,lTA)=>{var KuK=Ja1();lTA.exports=function(){return KuK()&&!!Symbol.toStringTag}});var oTA=C((qPw,rTA)=>{var YuK=cTA(),nTA=YuK("%Object.defineProperty%",!0),zuK=iTA()(),wuK=Wa1(),_uK=Pq1(),Vq1=zuK?Symbol.toStringTag:null;rTA.exports=function(q,K){var Y=arguments.length>2&&!!arguments[2]&&arguments[2].force,z=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof Y<"u"&&typeof Y!=="boolean"||typeof z<"u"&&typeof z!=="boolean")throw new _uK("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(Vq1&&(Y||!wuK(q,Vq1)))if(nTA)nTA(q,Vq1,{configurable:!z,enumerable:!1,value:K,writable:!1});else q[Vq1]=K}});var sTA=C((KPw,aTA)=>{aTA.exports=function(A,q){return Object.keys(q).forEach(function(K){A[K]=A[K]||q[K]}),A}});var eTA=C((YPw,tTA)=>{var va1=OfA(),$uK=g6("util"),Ta1=g6("path"),OuK=g6("http"),HuK=g6("https"),juK=g6("url").parse,JuK=g6("fs"),MuK=g6("stream").Stream,Va1=jfA(),DuK=yfA(),XuK=oTA(),Na1=sTA();tTA.exports=Az;$uK.inherits(Az,va1);function Az(A){if(!(this instanceof Az))return new Az(A);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],va1.call(this),A=A||{};for(var q in A)this[q]=A[q]}Az.LINE_BREAK=`\r
`;Az.DEFAULT_CONTENT_TYPE="application/octet-stream";Az.prototype.append=function(A,q,K){if(K=K||{},typeof K=="string")K={filename:K};var Y=va1.prototype.append.bind(this);if(typeof q=="number")q=""+q;if(Array.isArray(q)){this._error(Error("Arrays are not supported."));return}var z=this._multiPartHeader(A,q,K),w=this._multiPartFooter();Y(z),Y(q),Y(w),this._trackLength(z,q,K)};Az.prototype._trackLength=function(A,q,K){var Y=0;if(K.knownLength!=null)Y+=+K.knownLength;else if(Buffer.isBuffer(q))Y=q.length;else if(typeof q==="string")Y=Buffer.byteLength(q);if(this._valueLength+=Y,this._overheadLength+=Buffer.byteLength(A)+Az.LINE_BREAK.length,!q||!q.path&&!(q.readable&&Object.prototype.hasOwnProperty.call(q,"httpVersion"))&&!(q instanceof MuK))return;if(!K.knownLength)this._valuesToMeasure.push(q)};Az.prototype._lengthRetriever=function(A,q){if(Object.prototype.hasOwnProperty.call(A,"fd"))if(A.end!=null&&A.end!=1/0&&A.start!=null)q(null,A.end+1-(A.start?A.start:0));else JuK.stat(A.path,function(K,Y){var z;if(K){q(K);return}z=Y.size-(A.start?A.start:0),q(null,z)});else if(Object.prototype.hasOwnProperty.call(A,"httpVersion"))q(null,+A.headers["content-length"]);else if(Object.prototype.hasOwnProperty.call(A,"httpModule"))A.on("response",function(K){A.pause(),q(null,+K.headers["content-length"])}),A.resume();else q("Unknown stream")};Az.prototype._multiPartHeader=function(A,q,K){if(typeof K.header=="string")return K.header;var Y=this._getContentDisposition(q,K),z=this._getContentType(q,K),w="",_={"Content-Disposition":["form-data",'name="'+A+'"'].concat(Y||[]),"Content-Type":[].concat(z||[])};if(typeof K.header=="object")Na1(_,K.header);var $;for(var O in _)if(Object.prototype.hasOwnProperty.call(_,O)){if($=_[O],$==null)continue;if(!Array.isArray($))$=[$];if($.length)w+=O+": "+$.join("; ")+Az.LINE_BREAK}return"--"+this.getBoundary()+Az.LINE_BREAK+w+Az.LINE_BREAK};Az.prototype._getContentDisposition=function(A,q){var K,Y;if(typeof q.filepath==="string")K=Ta1.normalize(q.filepath).replace(/\\/g,"/");else if(q.filename||A.name||A.path)K=Ta1.basename(q.filename||A.name||A.path);else if(A.readable&&Object.prototype.hasOwnProperty.call(A,"httpVersion"))K=Ta1.basename(A.client._httpMessage.path||"");if(K)Y='filename="'+K+'"';return Y};Az.prototype._getContentType=function(A,q){var K=q.contentType;if(!K&&A.name)K=Va1.lookup(A.name);if(!K&&A.path)K=Va1.lookup(A.path);if(!K&&A.readable&&Object.prototype.hasOwnProperty.call(A,"httpVersion"))K=A.headers["content-type"];if(!K&&(q.filepath||q.filename))K=Va1.lookup(q.filepath||q.filename);if(!K&&typeof A=="object")K=Az.DEFAULT_CONTENT_TYPE;return K};Az.prototype._multiPartFooter=function(){return function(A){var q=Az.LINE_BREAK,K=this._streams.length===0;if(K)q+=this._lastBoundary();A(q)}.bind(this)};Az.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Az.LINE_BREAK};Az.prototype.getHeaders=function(A){var q,K={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(q in A)if(Object.prototype.hasOwnProperty.call(A,q))K[q.toLowerCase()]=A[q];return K};Az.prototype.setBoundary=function(A){this._boundary=A};Az.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};Az.prototype.getBuffer=function(){var A=new Buffer.alloc(0),q=this.getBoundary();for(var K=0,Y=this._streams.length;K<Y;K++)if(typeof this._streams[K]!=="function"){if(Buffer.isBuffer(this._streams[K]))A=Buffer.concat([A,this._streams[K]]);else A=Buffer.concat([A,Buffer.from(this._streams[K])]);if(typeof this._streams[K]!=="string"||this._streams[K].substring(2,q.length+2)!==q)A=Buffer.concat([A,Buffer.from(Az.LINE_BREAK)])}return Buffer.concat([A,Buffer.from(this._lastBoundary())])};Az.prototype._generateBoundary=function(){var A="--------------------------";for(var q=0;q<24;q++)A+=Math.floor(Math.random()*10).toString(16);this._boundary=A};Az.prototype.getLengthSync=function(){var A=this._overheadLength+this._valueLength;if(this._streams.length)A+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return A};Az.prototype.hasKnownLength=function(){var A=!0;if(this._valuesToMeasure.length)A=!1;return A};Az.prototype.getLength=function(A){var q=this._overheadLength+this._valueLength;if(this._streams.length)q+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(A.bind(this,null,q));return}DuK.parallel(this._valuesToMeasure,this._lengthRetriever,function(K,Y){if(K){A(K);return}Y.forEach(function(z){q+=z}),A(null,q)})};Az.prototype.submit=function(A,q){var K,Y,z={method:"post"};if(typeof A=="string")A=juK(A),Y=Na1({port:A.port,path:A.pathname,host:A.hostname,protocol:A.protocol},z);else if(Y=Na1(A,z),!Y.port)Y.port=Y.protocol=="https:"?443:80;if(Y.headers=this.getHeaders(A.headers),Y.protocol=="https:")K=HuK.request(Y);else K=OuK.request(Y);return this.getLength(function(w,_){if(w&&w!=="Unknown stream"){this._error(w);return}if(_)K.setHeader("Content-Length",_);if(this.pipe(K),q){var $,O=function(H,j){return K.removeListener("error",O),K.removeListener("response",$),q.call(this,H,j)};$=O.bind(this,null),K.on("error",O),K.on("response",$)}}.bind(this)),K};Az.prototype._error=function(A){if(!this.error)this.error=A,this.pause(),this.emit("error",A)};Az.prototype.toString=function(){return"[object FormData]"};XuK(Az,"FormData")});var AVA,Nq1;var ka1=k(()=>{AVA=e(eTA(),1),Nq1=AVA.default});function Ea1(A){return q8.isPlainObject(A)||q8.isArray(A)}function KVA(A){return q8.endsWith(A,"[]")?A.slice(0,-2):A}function qVA(A,q,K){if(!A)return q;return A.concat(q).map(function(z,w){return z=KVA(z),!K&&w?"["+z+"]":z}).join(K?".":"")}function PuK(A){return q8.isArray(A)&&!A.some(Ea1)}function ZuK(A,q,K){if(!q8.isObject(A))throw TypeError("target must be an object");q=q||new(Nq1||FormData),K=q8.toFlatObject(K,{metaTokens:!0,dots:!1,indexes:!1},!1,function(P,W){return!q8.isUndefined(W[P])});let Y=K.metaTokens,z=K.visitor||j,w=K.dots,_=K.indexes,O=(K.Blob||typeof Blob<"u"&&Blob)&&q8.isSpecCompliantForm(q);if(!q8.isFunction(z))throw TypeError("visitor must be a function");function H(X){if(X===null)return"";if(q8.isDate(X))return X.toISOString();if(!O&&q8.isBlob(X))throw new X4("Blob is not supported. Use a Buffer instead.");if(q8.isArrayBuffer(X)||q8.isTypedArray(X))return O&&typeof Blob==="function"?new Blob([X]):Buffer.from(X);return X}function j(X,P,W){let Z=X;if(X&&!W&&typeof X==="object"){if(q8.endsWith(P,"{}"))P=Y?P:P.slice(0,-2),X=JSON.stringify(X);else if(q8.isArray(X)&&PuK(X)||(q8.isFileList(X)||q8.endsWith(P,"[]"))&&(Z=q8.toArray(X)))return P=KVA(P),Z.forEach(function(f,V){!(q8.isUndefined(f)||f===null)&&q.append(_===!0?qVA([P],V,w):_===null?P:P+"[]",H(f))}),!1}if(Ea1(X))return!0;return q.append(qVA(W,P,w),H(X)),!1}let J=[],M=Object.assign(WuK,{defaultVisitor:j,convertValue:H,isVisitable:Ea1});function D(X,P){if(q8.isUndefined(X))return;if(J.indexOf(X)!==-1)throw Error("Circular reference detected in "+P.join("."));J.push(X),q8.forEach(X,function(Z,G){if((!(q8.isUndefined(Z)||Z===null)&&z.call(q,Z,q8.isString(G)?G.trim():G,P,M))===!0)D(Z,P?P.concat(G):[G])}),J.pop()}if(!q8.isObject(A))throw TypeError("data must be an object");return D(A),q}var WuK,ua;var zh6=k(()=>{P_();gk();ka1();WuK=q8.toFlatObject(q8,{},null,function(q){return/^is[A-Z]/.test(q)});ua=ZuK});function YVA(A){let q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(Y){return q[Y]})}function zVA(A,q){this._pairs=[],A&&ua(A,this,q)}var wVA,_VA;var $VA=k(()=>{zh6();wVA=zVA.prototype;wVA.append=function(q,K){this._pairs.push([q,K])};wVA.toString=function(q){let K=q?function(Y){return q.call(this,Y,YVA)}:YVA;return this._pairs.map(function(z){return K(z[0])+"="+K(z[1])},"").join("&")};_VA=zVA});function GuK(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lq6(A,q,K){if(!q)return A;let Y=K&&K.encode||GuK;if(q8.isFunction(K))K={serialize:K};let z=K&&K.serialize,w;if(z)w=z(q,K);else w=q8.isURLSearchParams(q)?q.toString():new _VA(q,K).toString(Y);if(w){let _=A.indexOf("#");if(_!==-1)A=A.slice(0,_);A+=(A.indexOf("?")===-1?"?":"&")+w}return A}var vq1=k(()=>{P_();$VA()});class OVA{constructor(){this.handlers=[]}use(A,q,K){return this.handlers.push({fulfilled:A,rejected:q,synchronous:K?K.synchronous:!1,runWhen:K?K.runWhen:null}),this.handlers.length-1}eject(A){if(this.handlers[A])this.handlers[A]=null}clear(){if(this.handlers)this.handlers=[]}forEach(A){q8.forEach(this.handlers,function(K){if(K!==null)A(K)})}}var La1;var HVA=k(()=>{P_();La1=OVA});var CJ6;var kq1=k(()=>{CJ6={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});import fuK from"url";var jVA;var JVA=k(()=>{jVA=fuK.URLSearchParams});import TuK from"crypto";var ya1="abcdefghijklmnopqrstuvwxyz",MVA="0123456789",DVA,VuK=(A=16,q=DVA.ALPHA_DIGIT)=>{let K="",{length:Y}=q,z=new Uint32Array(A);TuK.randomFillSync(z);for(let w=0;w<A;w++)K+=q[z[w]%Y];return K},XVA;var PVA=k(()=>{JVA();ka1();DVA={DIGIT:MVA,ALPHA:ya1,ALPHA_DIGIT:ya1+ya1.toUpperCase()+MVA},XVA={isNode:!0,classes:{URLSearchParams:jVA,FormData:Nq1,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:DVA,generateString:VuK,protocols:["http","https","file","data"]}});var Ca1={};m1(Ca1,{origin:()=>kuK,navigator:()=>Ra1,hasStandardBrowserWebWorkerEnv:()=>vuK,hasStandardBrowserEnv:()=>NuK,hasBrowserEnv:()=>Sa1});var Sa1,Ra1,NuK,vuK,kuK;var WVA=k(()=>{Sa1=typeof window<"u"&&typeof document<"u",Ra1=typeof navigator==="object"&&navigator||void 0,NuK=Sa1&&(!Ra1||["ReactNative","NativeScript","NS"].indexOf(Ra1.product)<0),vuK=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),kuK=Sa1&&window.location.href||"http://localhost"});var cz;var VI=k(()=>{PVA();WVA();cz={...Ca1,...XVA}});function ha1(A,q){return ua(A,new cz.classes.URLSearchParams,Object.assign({visitor:function(K,Y,z,w){if(cz.isNode&&q8.isBuffer(K))return this.append(Y,K.toString("base64")),!1;return w.defaultVisitor.apply(this,arguments)}},q))}var ZVA=k(()=>{P_();zh6();VI()});function EuK(A){return q8.matchAll(/\w+|\[(\w*)]/g,A).map((q)=>{return q[0]==="[]"?"":q[1]||q[0]})}function LuK(A){let q={},K=Object.keys(A),Y,z=K.length,w;for(Y=0;Y<z;Y++)w=K[Y],q[w]=A[w];return q}function yuK(A){function q(K,Y,z,w){let _=K[w++];if(_==="__proto__")return!0;let $=Number.isFinite(+_),O=w>=K.length;if(_=!_&&q8.isArray(z)?z.length:_,O){if(q8.hasOwnProp(z,_))z[_]=[z[_],Y];else z[_]=Y;return!$}if(!z[_]||!q8.isObject(z[_]))z[_]=[];if(q(K,Y,z[_],w)&&q8.isArray(z[_]))z[_]=LuK(z[_]);return!$}if(q8.isFormData(A)&&q8.isFunction(A.entries)){let K={};return q8.forEachEntry(A,(Y,z)=>{q(EuK(Y),z,K,0)}),K}return null}var Eq1;var Ia1=k(()=>{P_();Eq1=yuK});function RuK(A,q,K){if(q8.isString(A))try{return(q||JSON.parse)(A),q8.trim(A)}catch(Y){if(Y.name!=="SyntaxError")throw Y}return(K||JSON.stringify)(A)}var ba1,hJ6;var Lq1=k(()=>{P_();gk();kq1();zh6();ZVA();VI();Ia1();ba1={transitional:CJ6,adapter:["xhr","http","fetch"],transformRequest:[function(q,K){let Y=K.getContentType()||"",z=Y.indexOf("application/json")>-1,w=q8.isObject(q);if(w&&q8.isHTMLForm(q))q=new FormData(q);if(q8.isFormData(q))return z?JSON.stringify(Eq1(q)):q;if(q8.isArrayBuffer(q)||q8.isBuffer(q)||q8.isStream(q)||q8.isFile(q)||q8.isBlob(q)||q8.isReadableStream(q))return q;if(q8.isArrayBufferView(q))return q.buffer;if(q8.isURLSearchParams(q))return K.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),q.toString();let $;if(w){if(Y.indexOf("application/x-www-form-urlencoded")>-1)return ha1(q,this.formSerializer).toString();if(($=q8.isFileList(q))||Y.indexOf("multipart/form-data")>-1){let O=this.env&&this.env.FormData;return ua($?{"files[]":q}:q,O&&new O,this.formSerializer)}}if(w||z)return K.setContentType("application/json",!1),RuK(q);return q}],transformResponse:[function(q){let K=this.transitional||ba1.transitional,Y=K&&K.forcedJSONParsing,z=this.responseType==="json";if(q8.isResponse(q)||q8.isReadableStream(q))return q;if(q&&q8.isString(q)&&(Y&&!this.responseType||z)){let _=!(K&&K.silentJSONParsing)&&z;try{return JSON.parse(q)}catch($){if(_){if($.name==="SyntaxError")throw X4.from($,X4.ERR_BAD_RESPONSE,this,null,this.response);throw $}}}return q}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cz.classes.FormData,Blob:cz.classes.Blob},validateStatus:function(q){return q>=200&&q<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q8.forEach(["delete","get","head","post","put","patch"],(A)=>{ba1.headers[A]={}});hJ6=ba1});var SuK,GVA=(A)=>{let q={},K,Y,z;return A&&A.split(`
`).forEach(function(_){if(z=_.indexOf(":"),K=_.substring(0,z).trim().toLowerCase(),Y=_.substring(z+1).trim(),!K||q[K]&&SuK[K])return;if(K==="set-cookie")if(q[K])q[K].push(Y);else q[K]=[Y];else q[K]=q[K]?q[K]+", "+Y:Y}),q};var fVA=k(()=>{P_();SuK=q8.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"])});function wh6(A){return A&&String(A).trim().toLowerCase()}function yq1(A){if(A===!1||A==null)return A;return q8.isArray(A)?A.map(yq1):String(A)}function CuK(A){let q=Object.create(null),K=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Y;while(Y=K.exec(A))q[Y[1]]=Y[2];return q}function xa1(A,q,K,Y,z){if(q8.isFunction(Y))return Y.call(this,q,K);if(z)q=K;if(!q8.isString(q))return;if(q8.isString(Y))return q.indexOf(Y)!==-1;if(q8.isRegExp(Y))return Y.test(q)}function IuK(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(q,K,Y)=>{return K.toUpperCase()+Y})}function buK(A,q){let K=q8.toCamelCase(" "+q);["get","set","has"].forEach((Y)=>{Object.defineProperty(A,Y+K,{value:function(z,w,_){return this[Y].call(this,q,z,w,_)},configurable:!0})})}var TVA,huK=(A)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim()),_h6,CH;var eB=k(()=>{P_();fVA();TVA=Symbol("internals");_h6=class _h6{constructor(A){A&&this.set(A)}set(A,q,K){let Y=this;function z(_,$,O){let H=wh6($);if(!H)throw Error("header name must be a non-empty string");let j=q8.findKey(Y,H);if(!j||Y[j]===void 0||O===!0||O===void 0&&Y[j]!==!1)Y[j||$]=yq1(_)}let w=(_,$)=>q8.forEach(_,(O,H)=>z(O,H,$));if(q8.isPlainObject(A)||A instanceof this.constructor)w(A,q);else if(q8.isString(A)&&(A=A.trim())&&!huK(A))w(GVA(A),q);else if(q8.isHeaders(A))for(let[_,$]of A.entries())z($,_,K);else A!=null&&z(q,A,K);return this}get(A,q){if(A=wh6(A),A){let K=q8.findKey(this,A);if(K){let Y=this[K];if(!q)return Y;if(q===!0)return CuK(Y);if(q8.isFunction(q))return q.call(this,Y,K);if(q8.isRegExp(q))return q.exec(Y);throw TypeError("parser must be boolean|regexp|function")}}}has(A,q){if(A=wh6(A),A){let K=q8.findKey(this,A);return!!(K&&this[K]!==void 0&&(!q||xa1(this,this[K],K,q)))}return!1}delete(A,q){let K=this,Y=!1;function z(w){if(w=wh6(w),w){let _=q8.findKey(K,w);if(_&&(!q||xa1(K,K[_],_,q)))delete K[_],Y=!0}}if(q8.isArray(A))A.forEach(z);else z(A);return Y}clear(A){let q=Object.keys(this),K=q.length,Y=!1;while(K--){let z=q[K];if(!A||xa1(this,this[z],z,A,!0))delete this[z],Y=!0}return Y}normalize(A){let q=this,K={};return q8.forEach(this,(Y,z)=>{let w=q8.findKey(K,z);if(w){q[w]=yq1(Y),delete q[z];return}let _=A?IuK(z):String(z).trim();if(_!==z)delete q[z];q[_]=yq1(Y),K[_]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){let q=Object.create(null);return q8.forEach(this,(K,Y)=>{K!=null&&K!==!1&&(q[Y]=A&&q8.isArray(K)?K.join(", "):K)}),q}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([A,q])=>A+": "+q).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...q){let K=new this(A);return q.forEach((Y)=>K.set(Y)),K}static accessor(A){let K=(this[TVA]=this[TVA]={accessors:{}}).accessors,Y=this.prototype;function z(w){let _=wh6(w);if(!K[_])buK(Y,w),K[_]=!0}return q8.isArray(A)?A.forEach(z):z(A),this}};_h6.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q8.reduceDescriptors(_h6.prototype,({value:A},q)=>{let K=q[0].toUpperCase()+q.slice(1);return{get:()=>A,set(Y){this[K]=Y}}});q8.freezeMethods(_h6);CH=_h6});function $h6(A,q){let K=this||hJ6,Y=q||K,z=CH.from(Y.headers),w=Y.data;return q8.forEach(A,function($){w=$.call(K,w,z.normalize(),q?q.status:void 0)}),z.normalize(),w}var VVA=k(()=>{P_();Lq1();eB()});function Oh6(A){return!!(A&&A.__CANCEL__)}function NVA(A,q,K){X4.call(this,A==null?"canceled":A,X4.ERR_CANCELED,q,K),this.name="CanceledError"}var Fk;var yq6=k(()=>{gk();P_();q8.inherits(NVA,X4,{__CANCEL__:!0});Fk=NVA});function Am(A,q,K){let Y=K.config.validateStatus;if(!K.status||!Y||Y(K.status))A(K);else q(new X4("Request failed with status code "+K.status,[X4.ERR_BAD_REQUEST,X4.ERR_BAD_RESPONSE][Math.floor(K.status/100)-4],K.config,K.request,K))}var Rq1=k(()=>{gk()});function ua1(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function Ba1(A,q){return q?A.replace(/\/?\/$/,"")+"/"+q.replace(/^\/+/,""):A}function Rq6(A,q,K){let Y=!ua1(q);if(A&&(Y||K==!1))return Ba1(A,q);return q}var Sq1=()=>{};var vVA=C((FuK)=>{var xuK=g6("url").parse,uuK={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},BuK=String.prototype.endsWith||function(A){return A.length<=this.length&&this.indexOf(A,this.length-A.length)!==-1};function muK(A){var q=typeof A==="string"?xuK(A):A||{},K=q.protocol,Y=q.host,z=q.port;if(typeof Y!=="string"||!Y||typeof K!=="string")return"";if(K=K.split(":",1)[0],Y=Y.replace(/:\d*$/,""),z=parseInt(z)||uuK[K]||0,!guK(Y,z))return"";var w=IJ6("npm_config_"+K+"_proxy")||IJ6(K+"_proxy")||IJ6("npm_config_proxy")||IJ6("all_proxy");if(w&&w.indexOf("://")===-1)w=K+"://"+w;return w}function guK(A,q){var K=(IJ6("npm_config_no_proxy")||IJ6("no_proxy")).toLowerCase();if(!K)return!0;if(K==="*")return!1;return K.split(/[,\s]/).every(function(Y){if(!Y)return!0;var z=Y.match(/^(.+):(\d+)$/),w=z?z[1]:Y,_=z?parseInt(z[2]):0;if(_&&_!==q)return!0;if(!/^[.*]/.test(w))return A!==w;if(w.charAt(0)==="*")w=w.slice(1);return!BuK.call(A,w)})}function IJ6(A){return process.env[A.toLowerCase()]||process.env[A.toUpperCase()]||""}FuK.getProxyForUrl=muK});var EVA=C((_0w,kVA)=>{var Hh6;kVA.exports=function(){if(!Hh6){try{Hh6=Vq6()("follow-redirects")}catch(A){}if(typeof Hh6!=="function")Hh6=function(){}}Hh6.apply(null,arguments)}});var CVA=C(($0w,ra1)=>{var Jh6=g6("url"),jh6=Jh6.URL,UuK=g6("http"),puK=g6("https"),Ua1=g6("stream").Writable,pa1=g6("assert"),LVA=EVA();(function(){var q=typeof process<"u",K=typeof window<"u"&&typeof document<"u",Y=Cq6(Error.captureStackTrace);if(!q&&(K||!Y))console.warn("The follow-redirects package should be excluded from browser builds.")})();var da1=!1;try{pa1(new jh6(""))}catch(A){da1=A.code==="ERR_INVALID_URL"}var duK=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ca1=["abort","aborted","connect","error","socket","timeout"],la1=Object.create(null);ca1.forEach(function(A){la1[A]=function(q,K,Y){this._redirectable.emit(A,q,K,Y)}});var ga1=Mh6("ERR_INVALID_URL","Invalid URL",TypeError),Fa1=Mh6("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),cuK=Mh6("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Fa1),luK=Mh6("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),iuK=Mh6("ERR_STREAM_WRITE_AFTER_END","write after end"),nuK=Ua1.prototype.destroy||RVA;function mV(A,q){if(Ua1.call(this),this._sanitizeOptions(A),this._options=A,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],q)this.on("response",q);var K=this;this._onNativeResponse=function(Y){try{K._processResponse(Y)}catch(z){K.emit("error",z instanceof Fa1?z:new Fa1({cause:z}))}},this._performRequest()}mV.prototype=Object.create(Ua1.prototype);mV.prototype.abort=function(){na1(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};mV.prototype.destroy=function(A){return na1(this._currentRequest,A),nuK.call(this,A),this};mV.prototype.write=function(A,q,K){if(this._ending)throw new iuK;if(!Sq6(A)&&!auK(A))throw TypeError("data should be a string, Buffer or Uint8Array");if(Cq6(q))K=q,q=null;if(A.length===0){if(K)K();return}if(this._requestBodyLength+A.length<=this._options.maxBodyLength)this._requestBodyLength+=A.length,this._requestBodyBuffers.push({data:A,encoding:q}),this._currentRequest.write(A,q,K);else this.emit("error",new luK),this.abort()};mV.prototype.end=function(A,q,K){if(Cq6(A))K=A,A=q=null;else if(Cq6(q))K=q,q=null;if(!A)this._ended=this._ending=!0,this._currentRequest.end(null,null,K);else{var Y=this,z=this._currentRequest;this.write(A,q,function(){Y._ended=!0,z.end(null,null,K)}),this._ending=!0}};mV.prototype.setHeader=function(A,q){this._options.headers[A]=q,this._currentRequest.setHeader(A,q)};mV.prototype.removeHeader=function(A){delete this._options.headers[A],this._currentRequest.removeHeader(A)};mV.prototype.setTimeout=function(A,q){var K=this;function Y(_){_.setTimeout(A),_.removeListener("timeout",_.destroy),_.addListener("timeout",_.destroy)}function z(_){if(K._timeout)clearTimeout(K._timeout);K._timeout=setTimeout(function(){K.emit("timeout"),w()},A),Y(_)}function w(){if(K._timeout)clearTimeout(K._timeout),K._timeout=null;if(K.removeListener("abort",w),K.removeListener("error",w),K.removeListener("response",w),K.removeListener("close",w),q)K.removeListener("timeout",q);if(!K.socket)K._currentRequest.removeListener("socket",z)}if(q)this.on("timeout",q);if(this.socket)z(this.socket);else this._currentRequest.once("socket",z);return this.on("socket",Y),this.on("abort",w),this.on("error",w),this.on("response",w),this.on("close",w),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(A){mV.prototype[A]=function(q,K){return this._currentRequest[A](q,K)}});["aborted","connection","socket"].forEach(function(A){Object.defineProperty(mV.prototype,A,{get:function(){return this._currentRequest[A]}})});mV.prototype._sanitizeOptions=function(A){if(!A.headers)A.headers={};if(A.host){if(!A.hostname)A.hostname=A.host;delete A.host}if(!A.pathname&&A.path){var q=A.path.indexOf("?");if(q<0)A.pathname=A.path;else A.pathname=A.path.substring(0,q),A.search=A.path.substring(q)}};mV.prototype._performRequest=function(){var A=this._options.protocol,q=this._options.nativeProtocols[A];if(!q)throw TypeError("Unsupported protocol "+A);if(this._options.agents){var K=A.slice(0,-1);this._options.agent=this._options.agents[K]}var Y=this._currentRequest=q.request(this._options,this._onNativeResponse);Y._redirectable=this;for(var z of ca1)Y.on(z,la1[z]);if(this._currentUrl=/^\//.test(this._options.path)?Jh6.format(this._options):this._options.path,this._isRedirect){var w=0,_=this,$=this._requestBodyBuffers;(function O(H){if(Y===_._currentRequest){if(H)_.emit("error",H);else if(w<$.length){var j=$[w++];if(!Y.finished)Y.write(j.data,j.encoding,O)}else if(_._ended)Y.end()}})()}};mV.prototype._processResponse=function(A){var q=A.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:A.headers,statusCode:q});var K=A.headers.location;if(!K||this._options.followRedirects===!1||q<300||q>=400){A.responseUrl=this._currentUrl,A.redirects=this._redirects,this.emit("response",A),this._requestBodyBuffers=[];return}if(na1(this._currentRequest),A.destroy(),++this._redirectCount>this._options.maxRedirects)throw new cuK;var Y,z=this._options.beforeRedirect;if(z)Y=Object.assign({Host:A.req.getHeader("host")},this._options.headers);var w=this._options.method;if((q===301||q===302)&&this._options.method==="POST"||q===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],ma1(/^content-/i,this._options.headers);var _=ma1(/^host$/i,this._options.headers),$=ia1(this._currentUrl),O=_||$.host,H=/^\w+:/.test(K)?this._currentUrl:Jh6.format(Object.assign($,{host:O})),j=ruK(K,H);if(LVA("redirecting to",j.href),this._isRedirect=!0,Qa1(j,this._options),j.protocol!==$.protocol&&j.protocol!=="https:"||j.host!==O&&!ouK(j.host,O))ma1(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers);if(Cq6(z)){var J={headers:A.headers,statusCode:q},M={url:H,method:w,headers:Y};z(this._options,J,M),this._sanitizeOptions(this._options)}this._performRequest()};function yVA(A){var q={maxRedirects:21,maxBodyLength:10485760},K={};return Object.keys(A).forEach(function(Y){var z=Y+":",w=K[z]=A[Y],_=q[Y]=Object.create(w);function $(H,j,J){if(suK(H))H=Qa1(H);else if(Sq6(H))H=Qa1(ia1(H));else J=j,j=SVA(H),H={protocol:z};if(Cq6(j))J=j,j=null;if(j=Object.assign({maxRedirects:q.maxRedirects,maxBodyLength:q.maxBodyLength},H,j),j.nativeProtocols=K,!Sq6(j.host)&&!Sq6(j.hostname))j.hostname="::1";return pa1.equal(j.protocol,z,"protocol mismatch"),LVA("options",j),new mV(j,J)}function O(H,j,J){var M=_.request(H,j,J);return M.end(),M}Object.defineProperties(_,{request:{value:$,configurable:!0,enumerable:!0,writable:!0},get:{value:O,configurable:!0,enumerable:!0,writable:!0}})}),q}function RVA(){}function ia1(A){var q;if(da1)q=new jh6(A);else if(q=SVA(Jh6.parse(A)),!Sq6(q.protocol))throw new ga1({input:A});return q}function ruK(A,q){return da1?new jh6(A,q):ia1(Jh6.resolve(q,A))}function SVA(A){if(/^\[/.test(A.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(A.hostname))throw new ga1({input:A.href||A});if(/^\[/.test(A.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(A.host))throw new ga1({input:A.href||A});return A}function Qa1(A,q){var K=q||{};for(var Y of duK)K[Y]=A[Y];if(K.hostname.startsWith("["))K.hostname=K.hostname.slice(1,-1);if(K.port!=="")K.port=Number(K.port);return K.path=K.search?K.pathname+K.search:K.pathname,K}function ma1(A,q){var K;for(var Y in q)if(A.test(Y))K=q[Y],delete q[Y];return K===null||typeof K>"u"?void 0:String(K).trim()}function Mh6(A,q,K){function Y(z){if(Cq6(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,z||{}),this.code=A,this.message=this.cause?q+": "+this.cause.message:q}return Y.prototype=Object.create((K||Error).prototype),Object.defineProperties(Y.prototype,{constructor:{value:Y,enumerable:!1},name:{value:"Error ["+A+"]",enumerable:!1}}),Y}function na1(A,q){for(var K of ca1)A.removeListener(K,la1[K]);A.on("error",RVA),A.destroy(q)}function ouK(A,q){pa1(Sq6(A)&&Sq6(q));var K=A.length-q.length-1;return K>0&&A[K]==="."&&A.endsWith(q)}function Sq6(A){return typeof A==="string"||A instanceof String}function Cq6(A){return typeof A==="function"}function auK(A){return typeof A==="object"&&"length"in A}function suK(A){return jh6&&A instanceof jh6}ra1.exports=yVA({http:UuK,https:puK});ra1.exports.wrap=yVA});var hq6="1.8.4";function Dh6(A){let q=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return q&&q[1]||""}function oa1(A,q,K){let Y=K&&K.Blob||cz.classes.Blob,z=Dh6(A);if(q===void 0&&Y)q=!0;if(z==="data"){A=z.length?A.slice(z.length+1):A;let w=tuK.exec(A);if(!w)throw new X4("Invalid URL",X4.ERR_INVALID_URL);let _=w[1],$=w[2],O=w[3],H=Buffer.from(decodeURIComponent(O),$?"base64":"utf8");if(q){if(!Y)throw new X4("Blob is not supported",X4.ERR_NOT_SUPPORT);return new Y([H],{type:_})}return H}throw new X4("Unsupported protocol "+z,X4.ERR_NOT_SUPPORT)}var tuK;var hVA=k(()=>{gk();VI();tuK=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import euK from"stream";var aa1,IVA,sa1;var bVA=k(()=>{P_();aa1=Symbol("internals");IVA=class IVA extends euK.Transform{constructor(A){A=q8.toFlatObject(A,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(K,Y)=>{return!q8.isUndefined(Y[K])});super({readableHighWaterMark:A.chunkSize});let q=this[aa1]={timeWindow:A.timeWindow,chunkSize:A.chunkSize,maxRate:A.maxRate,minChunkSize:A.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(K)=>{if(K==="progress"){if(!q.isCaptured)q.isCaptured=!0}})}_read(A){let q=this[aa1];if(q.onReadCallback)q.onReadCallback();return super._read(A)}_transform(A,q,K){let Y=this[aa1],z=Y.maxRate,w=this.readableHighWaterMark,_=Y.timeWindow,$=1000/_,O=z/$,H=Y.minChunkSize!==!1?Math.max(Y.minChunkSize,O*0.01):0,j=(M,D)=>{let X=Buffer.byteLength(M);if(Y.bytesSeen+=X,Y.bytes+=X,Y.isCaptured&&this.emit("progress",Y.bytesSeen),this.push(M))process.nextTick(D);else Y.onReadCallback=()=>{Y.onReadCallback=null,process.nextTick(D)}},J=(M,D)=>{let X=Buffer.byteLength(M),P=null,W=w,Z,G=0;if(z){let f=Date.now();if(!Y.ts||(G=f-Y.ts)>=_)Y.ts=f,Z=O-Y.bytes,Y.bytes=Z<0?-Z:0,G=0;Z=O-Y.bytes}if(z){if(Z<=0)return setTimeout(()=>{D(null,M)},_-G);if(Z<W)W=Z}if(W&&X>W&&X-W>H)P=M.subarray(W),M=M.subarray(0,W);j(M,P?()=>{process.nextTick(D,null,P)}:D)};J(A,function M(D,X){if(D)return K(D);if(X)J(X,M);else K(null)})}};sa1=IVA});var xVA,ABK=async function*(A){if(A.stream)yield*A.stream();else if(A.arrayBuffer)yield await A.arrayBuffer();else if(A[xVA])yield*A[xVA]();else yield A},Cq1;var ta1=k(()=>{({asyncIterator:xVA}=Symbol),Cq1=ABK});import qBK from"util";import{Readable as KBK}from"stream";class uVA{constructor(A,q){let{escapeName:K}=this.constructor,Y=q8.isString(q),z=`Content-Disposition: form-data; name="${K(A)}"${!Y&&q.name?`; filename="${K(q.name)}"`:""}${Ba}`;if(Y)q=Xh6.encode(String(q).replace(/\r?\n|\r\n?/g,Ba));else z+=`Content-Type: ${q.type||"application/octet-stream"}${Ba}`;this.headers=Xh6.encode(z+Ba),this.contentLength=Y?q.byteLength:q.size,this.size=this.headers.byteLength+this.contentLength+wBK,this.name=A,this.value=q}async*encode(){yield this.headers;let{value:A}=this;if(q8.isTypedArray(A))yield A;else yield*Cq1(A);yield zBK}static escapeName(A){return String(A).replace(/[\r\n"]/g,(q)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[q])}}var YBK,Xh6,Ba=`\r
`,zBK,wBK=2,_BK=(A,q,K)=>{let{tag:Y="form-data-boundary",size:z=25,boundary:w=Y+"-"+cz.generateString(z,YBK)}=K||{};if(!q8.isFormData(A))throw TypeError("FormData instance required");if(w.length<1||w.length>70)throw Error("boundary must be 10-70 characters long");let _=Xh6.encode("--"+w+Ba),$=Xh6.encode("--"+w+"--"+Ba+Ba),O=$.byteLength,H=Array.from(A.entries()).map(([J,M])=>{let D=new uVA(J,M);return O+=D.size,D});O+=_.byteLength*H.length,O=q8.toFiniteNumber(O);let j={"Content-Type":`multipart/form-data; boundary=${w}`};if(Number.isFinite(O))j["Content-Length"]=O;return q&&q(j),KBK.from(async function*(){for(let J of H)yield _,yield*J.encode();yield $}())},BVA;var mVA=k(()=>{P_();ta1();VI();YBK=cz.ALPHABET.ALPHA_DIGIT+"-_",Xh6=typeof TextEncoder==="function"?new TextEncoder:new qBK.TextEncoder,zBK=Xh6.encode(Ba);BVA=_BK});import $BK from"stream";var gVA,FVA;var QVA=k(()=>{gVA=class gVA extends $BK.Transform{__transform(A,q,K){this.push(A),K()}_transform(A,q,K){if(A.length!==0){if(this._transform=this.__transform,A[0]!==120){let Y=Buffer.alloc(2);Y[0]=120,Y[1]=156,this.push(Y,q)}}this.__transform(A,q,K)}};FVA=gVA});var OBK=(A,q)=>{return q8.isAsyncFn(A)?function(...K){let Y=K.pop();A.apply(this,K).then((z)=>{try{q?Y(null,...q(z)):Y(null,z)}catch(w){Y(w)}},Y)}:A},UVA;var pVA=k(()=>{P_();UVA=OBK});function HBK(A,q){A=A||10;let K=Array(A),Y=Array(A),z=0,w=0,_;return q=q!==void 0?q:1000,function(O){let H=Date.now(),j=Y[w];if(!_)_=H;K[z]=O,Y[z]=H;let J=w,M=0;while(J!==z)M+=K[J++],J=J%A;if(z=(z+1)%A,z===w)w=(w+1)%A;if(H-_<q)return;let D=j&&H-j;return D?Math.round(M*1000/D):void 0}}var dVA;var cVA=k(()=>{dVA=HBK});function jBK(A,q){let K=0,Y=1000/q,z,w,_=(H,j=Date.now())=>{if(K=j,z=null,w)clearTimeout(w),w=null;A.apply(null,H)};return[(...H)=>{let j=Date.now(),J=j-K;if(J>=Y)_(H,j);else if(z=H,!w)w=setTimeout(()=>{w=null,_(z)},Y-J)},()=>z&&_(z)]}var lVA;var iVA=k(()=>{lVA=jBK});var Od=(A,q,K=3)=>{let Y=0,z=dVA(50,250);return lVA((w)=>{let _=w.loaded,$=w.lengthComputable?w.total:void 0,O=_-Y,H=z(O),j=_<=$;Y=_;let J={loaded:_,total:$,progress:$?_/$:void 0,bytes:O,rate:H?H:void 0,estimated:H&&$&&j?($-_)/H:void 0,event:w,lengthComputable:$!=null,[q?"download":"upload"]:!0};A(J)},K)},bJ6=(A,q)=>{let K=A!=null;return[(Y)=>q[0]({lengthComputable:K,total:A,loaded:Y}),q[1]]},xJ6=(A)=>(...q)=>q8.asap(()=>A(...q));var hq1=k(()=>{cVA();iVA();P_()});import JBK from"http";import MBK from"https";import DBK from"util";import ma from"zlib";import uJ6 from"stream";import{EventEmitter as XBK}from"events";function fBK(A,q){if(A.beforeRedirects.proxy)A.beforeRedirects.proxy(A);if(A.beforeRedirects.config)A.beforeRedirects.config(A,q)}function ANA(A,q,K){let Y=q;if(!Y&&Y!==!1){let z=tVA.default.getProxyForUrl(K);if(z)Y=new URL(z)}if(Y){if(Y.username)Y.auth=(Y.username||"")+":"+(Y.password||"");if(Y.auth){if(Y.auth.username||Y.auth.password)Y.auth=(Y.auth.username||"")+":"+(Y.auth.password||"");let w=Buffer.from(Y.auth,"utf8").toString("base64");A.headers["Proxy-Authorization"]="Basic "+w}A.headers.host=A.hostname+(A.port?":"+A.port:"");let z=Y.hostname||Y.host;if(A.hostname=z,A.host=z,A.port=Y.port,A.path=K,Y.protocol)A.protocol=Y.protocol.includes(":")?Y.protocol:`${Y.protocol}:`}A.beforeRedirects.proxy=function(w){ANA(w,q,w.href)}}var tVA,eVA,nVA,PBK,rVA,WBK,ZBK,GBK,oVA,aVA=(A,[q,K])=>{return A.on("end",K).on("error",K),q},TBK,VBK=(A)=>{return new Promise((q,K)=>{let Y,z,w=(O,H)=>{if(z)return;z=!0,Y&&Y(O,H)},_=(O)=>{w(O),q(O)},$=(O)=>{w(O,!0),K(O)};A(_,$,(O)=>Y=O).catch($)})},NBK=({address:A,family:q})=>{if(!q8.isString(A))throw TypeError("address must be a string");return{address:A,family:q||(A.indexOf(".")<0?6:4)}},sVA=(A,q)=>NBK(q8.isObject(A)?A:{address:A,family:q}),qNA;var KNA=k(()=>{P_();Rq1();Sq1();vq1();kq1();gk();yq6();VI();hVA();eB();bVA();mVA();ta1();QVA();pVA();hq1();tVA=e(vVA(),1),eVA=e(CVA(),1),nVA={flush:ma.constants.Z_SYNC_FLUSH,finishFlush:ma.constants.Z_SYNC_FLUSH},PBK={flush:ma.constants.BROTLI_OPERATION_FLUSH,finishFlush:ma.constants.BROTLI_OPERATION_FLUSH},rVA=q8.isFunction(ma.createBrotliDecompress),{http:WBK,https:ZBK}=eVA.default,GBK=/https:?/,oVA=cz.protocols.map((A)=>{return A+":"});TBK=typeof process<"u"&&q8.kindOf(process)==="process",qNA=TBK&&function(q){return VBK(async function(Y,z,w){let{data:_,lookup:$,family:O}=q,{responseType:H,responseEncoding:j}=q,J=q.method.toUpperCase(),M,D=!1,X;if($){let l=UVA($,(t)=>q8.isArray(t)?t:[t]);$=(t,s,H6)=>{l(t,s,(Z6,G6,q6)=>{if(Z6)return H6(Z6);let w6=q8.isArray(G6)?G6.map((j6)=>sVA(j6)):[sVA(G6,q6)];s.all?H6(Z6,w6):H6(Z6,w6[0].address,w6[0].family)})}}let P=new XBK,W=()=>{if(q.cancelToken)q.cancelToken.unsubscribe(Z);if(q.signal)q.signal.removeEventListener("abort",Z);P.removeAllListeners()};w((l,t)=>{if(M=!0,t)D=!0,W()});function Z(l){P.emit("abort",!l||l.type?new Fk(null,q,X):l)}if(P.once("abort",z),q.cancelToken||q.signal){if(q.cancelToken&&q.cancelToken.subscribe(Z),q.signal)q.signal.aborted?Z():q.signal.addEventListener("abort",Z)}let G=Rq6(q.baseURL,q.url,q.allowAbsoluteUrls),f=new URL(G,cz.hasBrowserEnv?cz.origin:void 0),V=f.protocol||oVA[0];if(V==="data:"){let l;if(J!=="GET")return Am(Y,z,{status:405,statusText:"method not allowed",headers:{},config:q});try{l=oa1(q.url,H==="blob",{Blob:q.env&&q.env.Blob})}catch(t){throw X4.from(t,X4.ERR_BAD_REQUEST,q)}if(H==="text"){if(l=l.toString(j),!j||j==="utf8")l=q8.stripBOM(l)}else if(H==="stream")l=uJ6.Readable.from(l);return Am(Y,z,{data:l,status:200,statusText:"OK",headers:new CH,config:q})}if(oVA.indexOf(V)===-1)return z(new X4("Unsupported protocol "+V,X4.ERR_BAD_REQUEST,q));let N=CH.from(q.headers).normalize();N.set("User-Agent","axios/"+hq6,!1);let{onUploadProgress:v,onDownloadProgress:y}=q,R=q.maxRate,h=void 0,B=void 0;if(q8.isSpecCompliantForm(_)){let l=N.getContentType(/boundary=([-_\w\d]{10,70})/i);_=BVA(_,(t)=>{N.set(t)},{tag:`axios-${hq6}-boundary`,boundary:l&&l[1]||void 0})}else if(q8.isFormData(_)&&q8.isFunction(_.getHeaders)){if(N.set(_.getHeaders()),!N.hasContentLength())try{let l=await DBK.promisify(_.getLength).call(_);Number.isFinite(l)&&l>=0&&N.setContentLength(l)}catch(l){}}else if(q8.isBlob(_)||q8.isFile(_))_.size&&N.setContentType(_.type||"application/octet-stream"),N.setContentLength(_.size||0),_=uJ6.Readable.from(Cq1(_));else if(_&&!q8.isStream(_)){if(Buffer.isBuffer(_));else if(q8.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else if(q8.isString(_))_=Buffer.from(_,"utf-8");else return z(new X4("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",X4.ERR_BAD_REQUEST,q));if(N.setContentLength(_.length,!1),q.maxBodyLength>-1&&_.length>q.maxBodyLength)return z(new X4("Request body larger than maxBodyLength limit",X4.ERR_BAD_REQUEST,q))}let x=q8.toFiniteNumber(N.getContentLength());if(q8.isArray(R))h=R[0],B=R[1];else h=B=R;if(_&&(v||h)){if(!q8.isStream(_))_=uJ6.Readable.from(_,{objectMode:!1});_=uJ6.pipeline([_,new sa1({maxRate:q8.toFiniteNumber(h)})],q8.noop),v&&_.on("progress",aVA(_,bJ6(x,Od(xJ6(v),!1,3))))}let F=void 0;if(q.auth){let l=q.auth.username||"",t=q.auth.password||"";F=l+":"+t}if(!F&&f.username){let{username:l,password:t}=f;F=l+":"+t}F&&N.delete("authorization");let g;try{g=Lq6(f.pathname+f.search,q.params,q.paramsSerializer).replace(/^\?/,"")}catch(l){let t=Error(l.message);return t.config=q,t.url=q.url,t.exists=!0,z(t)}N.set("Accept-Encoding","gzip, compress, deflate"+(rVA?", br":""),!1);let b={path:g,method:J,headers:N.toJSON(),agents:{http:q.httpAgent,https:q.httpsAgent},auth:F,protocol:V,family:O,beforeRedirect:fBK,beforeRedirects:{}};if(!q8.isUndefined($)&&(b.lookup=$),q.socketPath)b.socketPath=q.socketPath;else b.hostname=f.hostname.startsWith("[")?f.hostname.slice(1,-1):f.hostname,b.port=f.port,ANA(b,q.proxy,V+"//"+f.hostname+(f.port?":"+f.port:"")+b.path);let U,d=GBK.test(b.protocol);if(b.agent=d?q.httpsAgent:q.httpAgent,q.transport)U=q.transport;else if(q.maxRedirects===0)U=d?MBK:JBK;else{if(q.maxRedirects)b.maxRedirects=q.maxRedirects;if(q.beforeRedirect)b.beforeRedirects.config=q.beforeRedirect;U=d?ZBK:WBK}if(q.maxBodyLength>-1)b.maxBodyLength=q.maxBodyLength;else b.maxBodyLength=1/0;if(q.insecureHTTPParser)b.insecureHTTPParser=q.insecureHTTPParser;if(X=U.request(b,function(t){if(X.destroyed)return;let s=[t],H6=+t.headers["content-length"];if(y||B){let j6=new sa1({maxRate:q8.toFiniteNumber(B)});y&&j6.on("progress",aVA(j6,bJ6(H6,Od(xJ6(y),!0,3)))),s.push(j6)}let Z6=t,G6=t.req||X;if(q.decompress!==!1&&t.headers["content-encoding"]){if(J==="HEAD"||t.statusCode===204)delete t.headers["content-encoding"];switch((t.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":s.push(ma.createUnzip(nVA)),delete t.headers["content-encoding"];break;case"deflate":s.push(new FVA),s.push(ma.createUnzip(nVA)),delete t.headers["content-encoding"];break;case"br":if(rVA)s.push(ma.createBrotliDecompress(PBK)),delete t.headers["content-encoding"]}}Z6=s.length>1?uJ6.pipeline(s,q8.noop):s[0];let q6=uJ6.finished(Z6,()=>{q6(),W()}),w6={status:t.statusCode,statusText:t.statusMessage,headers:new CH(t.headers),config:q,request:G6};if(H==="stream")w6.data=Z6,Am(Y,z,w6);else{let j6=[],_6=0;Z6.on("data",function(P6){if(j6.push(P6),_6+=P6.length,q.maxContentLength>-1&&_6>q.maxContentLength)D=!0,Z6.destroy(),z(new X4("maxContentLength size of "+q.maxContentLength+" exceeded",X4.ERR_BAD_RESPONSE,q,G6))}),Z6.on("aborted",function(){if(D)return;let P6=new X4("stream has been aborted",X4.ERR_BAD_RESPONSE,q,G6);Z6.destroy(P6),z(P6)}),Z6.on("error",function(P6){if(X.destroyed)return;z(X4.from(P6,null,q,G6))}),Z6.on("end",function(){try{let P6=j6.length===1?j6[0]:Buffer.concat(j6);if(H!=="arraybuffer"){if(P6=P6.toString(j),!j||j==="utf8")P6=q8.stripBOM(P6)}w6.data=P6}catch(P6){return z(X4.from(P6,null,q,w6.request,w6))}Am(Y,z,w6)})}P.once("abort",(j6)=>{if(!Z6.destroyed)Z6.emit("error",j6),Z6.destroy()})}),P.once("abort",(l)=>{z(l),X.destroy(l)}),X.on("error",function(t){z(X4.from(t,null,q,X))}),X.on("socket",function(t){t.setKeepAlive(!0,60000)}),q.timeout){let l=parseInt(q.timeout,10);if(Number.isNaN(l)){z(new X4("error trying to parse `config.timeout` to int",X4.ERR_BAD_OPTION_VALUE,q,X));return}X.setTimeout(l,function(){if(M)return;let s=q.timeout?"timeout of "+q.timeout+"ms exceeded":"timeout exceeded",H6=q.transitional||CJ6;if(q.timeoutErrorMessage)s=q.timeoutErrorMessage;z(new X4(s,H6.clarifyTimeoutError?X4.ETIMEDOUT:X4.ECONNABORTED,q,X)),Z()})}if(q8.isStream(_)){let l=!1,t=!1;_.on("end",()=>{l=!0}),_.once("error",(s)=>{t=!0,X.destroy(s)}),_.on("close",()=>{if(!l&&!t)Z(new Fk("Request stream has been aborted",q,X))}),_.pipe(X)}else X.end(_)})}});var YNA;var zNA=k(()=>{VI();YNA=cz.hasStandardBrowserEnv?((A,q)=>(K)=>{return K=new URL(K,cz.origin),A.protocol===K.protocol&&A.host===K.host&&(q||A.port===K.port)})(new URL(cz.origin),cz.navigator&&/(msie|trident)/i.test(cz.navigator.userAgent)):()=>!0});var wNA;var _NA=k(()=>{P_();VI();wNA=cz.hasStandardBrowserEnv?{write(A,q,K,Y,z,w){let _=[A+"="+encodeURIComponent(q)];q8.isNumber(K)&&_.push("expires="+new Date(K).toGMTString()),q8.isString(Y)&&_.push("path="+Y),q8.isString(z)&&_.push("domain="+z),w===!0&&_.push("secure"),document.cookie=_.join("; ")},read(A){let q=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return q?decodeURIComponent(q[3]):null},remove(A){this.write(A,"",Date.now()-86400000)}}:{write(){},read(){return null},remove(){}}});function NI(A,q){q=q||{};let K={};function Y(H,j,J,M){if(q8.isPlainObject(H)&&q8.isPlainObject(j))return q8.merge.call({caseless:M},H,j);else if(q8.isPlainObject(j))return q8.merge({},j);else if(q8.isArray(j))return j.slice();return j}function z(H,j,J,M){if(!q8.isUndefined(j))return Y(H,j,J,M);else if(!q8.isUndefined(H))return Y(void 0,H,J,M)}function w(H,j){if(!q8.isUndefined(j))return Y(void 0,j)}function _(H,j){if(!q8.isUndefined(j))return Y(void 0,j);else if(!q8.isUndefined(H))return Y(void 0,H)}function $(H,j,J){if(J in q)return Y(H,j);else if(J in A)return Y(void 0,H)}let O={url:w,method:w,data:w,baseURL:_,transformRequest:_,transformResponse:_,paramsSerializer:_,timeout:_,timeoutMessage:_,withCredentials:_,withXSRFToken:_,adapter:_,responseType:_,xsrfCookieName:_,xsrfHeaderName:_,onUploadProgress:_,onDownloadProgress:_,decompress:_,maxContentLength:_,maxBodyLength:_,beforeRedirect:_,transport:_,httpAgent:_,httpsAgent:_,cancelToken:_,socketPath:_,responseEncoding:_,validateStatus:$,headers:(H,j,J)=>z($NA(H),$NA(j),J,!0)};return q8.forEach(Object.keys(Object.assign({},A,q)),function(j){let J=O[j]||z,M=J(A[j],q[j],j);q8.isUndefined(M)&&J!==$||(K[j]=M)}),K}var $NA=(A)=>A instanceof CH?{...A}:A;var Iq1=k(()=>{P_();eB()});var bq1=(A)=>{let q=NI({},A),{data:K,withXSRFToken:Y,xsrfHeaderName:z,xsrfCookieName:w,headers:_,auth:$}=q;if(q.headers=_=CH.from(_),q.url=Lq6(Rq6(q.baseURL,q.url,q.allowAbsoluteUrls),A.params,A.paramsSerializer),$)_.set("Authorization","Basic "+btoa(($.username||"")+":"+($.password?unescape(encodeURIComponent($.password)):"")));let O;if(q8.isFormData(K)){if(cz.hasStandardBrowserEnv||cz.hasStandardBrowserWebWorkerEnv)_.setContentType(void 0);else if((O=_.getContentType())!==!1){let[H,...j]=O?O.split(";").map((J)=>J.trim()).filter(Boolean):[];_.setContentType([H||"multipart/form-data",...j].join("; "))}}if(cz.hasStandardBrowserEnv){if(Y&&q8.isFunction(Y)&&(Y=Y(q)),Y||Y!==!1&&YNA(q.url)){let H=z&&w&&wNA.read(w);if(H)_.set(z,H)}}return q};var ea1=k(()=>{VI();P_();zNA();_NA();Sq1();Iq1();eB();vq1()});var vBK,ONA;var HNA=k(()=>{P_();Rq1();kq1();gk();yq6();VI();eB();hq1();ea1();vBK=typeof XMLHttpRequest<"u",ONA=vBK&&function(A){return new Promise(function(K,Y){let z=bq1(A),w=z.data,_=CH.from(z.headers).normalize(),{responseType:$,onUploadProgress:O,onDownloadProgress:H}=z,j,J,M,D,X;function P(){D&&D(),X&&X(),z.cancelToken&&z.cancelToken.unsubscribe(j),z.signal&&z.signal.removeEventListener("abort",j)}let W=new XMLHttpRequest;W.open(z.method.toUpperCase(),z.url,!0),W.timeout=z.timeout;function Z(){if(!W)return;let f=CH.from("getAllResponseHeaders"in W&&W.getAllResponseHeaders()),N={data:!$||$==="text"||$==="json"?W.responseText:W.response,status:W.status,statusText:W.statusText,headers:f,config:A,request:W};Am(function(y){K(y),P()},function(y){Y(y),P()},N),W=null}if("onloadend"in W)W.onloadend=Z;else W.onreadystatechange=function(){if(!W||W.readyState!==4)return;if(W.status===0&&!(W.responseURL&&W.responseURL.indexOf("file:")===0))return;setTimeout(Z)};if(W.onabort=function(){if(!W)return;Y(new X4("Request aborted",X4.ECONNABORTED,A,W)),W=null},W.onerror=function(){Y(new X4("Network Error",X4.ERR_NETWORK,A,W)),W=null},W.ontimeout=function(){let V=z.timeout?"timeout of "+z.timeout+"ms exceeded":"timeout exceeded",N=z.transitional||CJ6;if(z.timeoutErrorMessage)V=z.timeoutErrorMessage;Y(new X4(V,N.clarifyTimeoutError?X4.ETIMEDOUT:X4.ECONNABORTED,A,W)),W=null},w===void 0&&_.setContentType(null),"setRequestHeader"in W)q8.forEach(_.toJSON(),function(V,N){W.setRequestHeader(N,V)});if(!q8.isUndefined(z.withCredentials))W.withCredentials=!!z.withCredentials;if($&&$!=="json")W.responseType=z.responseType;if(H)[M,X]=Od(H,!0),W.addEventListener("progress",M);if(O&&W.upload)[J,D]=Od(O),W.upload.addEventListener("progress",J),W.upload.addEventListener("loadend",D);if(z.cancelToken||z.signal){if(j=(f)=>{if(!W)return;Y(!f||f.type?new Fk(null,A,W):f),W.abort(),W=null},z.cancelToken&&z.cancelToken.subscribe(j),z.signal)z.signal.aborted?j():z.signal.addEventListener("abort",j)}let G=Dh6(z.url);if(G&&cz.protocols.indexOf(G)===-1){Y(new X4("Unsupported protocol "+G+":",X4.ERR_BAD_REQUEST,A));return}W.send(w||null)})}});var kBK=(A,q)=>{let{length:K}=A=A?A.filter(Boolean):[];if(q||K){let Y=new AbortController,z,w=function(H){if(!z){z=!0,$();let j=H instanceof Error?H:this.reason;Y.abort(j instanceof X4?j:new Fk(j instanceof Error?j.message:j))}},_=q&&setTimeout(()=>{_=null,w(new X4(`timeout ${q} of ms exceeded`,X4.ETIMEDOUT))},q),$=()=>{if(A)_&&clearTimeout(_),_=null,A.forEach((H)=>{H.unsubscribe?H.unsubscribe(w):H.removeEventListener("abort",w)}),A=null};A.forEach((H)=>H.addEventListener("abort",w));let{signal:O}=Y;return O.unsubscribe=()=>q8.asap($),O}},jNA;var JNA=k(()=>{yq6();gk();P_();jNA=kBK});var EBK=function*(A,q){let K=A.byteLength;if(!q||K<q){yield A;return}let Y=0,z;while(Y<K)z=Y+q,yield A.slice(Y,z),Y=z},LBK=async function*(A,q){for await(let K of yBK(A))yield*EBK(K,q)},yBK=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}let q=A.getReader();try{for(;;){let{done:K,value:Y}=await q.read();if(K)break;yield Y}}finally{await q.cancel()}},As1=(A,q,K,Y)=>{let z=LBK(A,q),w=0,_,$=(O)=>{if(!_)_=!0,Y&&Y(O)};return new ReadableStream({async pull(O){try{let{done:H,value:j}=await z.next();if(H){$(),O.close();return}let J=j.byteLength;if(K){let M=w+=J;K(M)}O.enqueue(new Uint8Array(j))}catch(H){throw $(H),H}},cancel(O){return $(O),z.return()}},{highWaterMark:2})};var uq1,DNA,RBK,XNA=(A,...q)=>{try{return!!A(...q)}catch(K){return!1}},SBK,MNA=65536,qs1,xq1,CBK=async(A)=>{if(A==null)return 0;if(q8.isBlob(A))return A.size;if(q8.isSpecCompliantForm(A))return(await new Request(cz.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(q8.isArrayBufferView(A)||q8.isArrayBuffer(A))return A.byteLength;if(q8.isURLSearchParams(A))A=A+"";if(q8.isString(A))return(await RBK(A)).byteLength},hBK=async(A,q)=>{let K=q8.toFiniteNumber(A.getContentLength());return K==null?CBK(q):K},PNA;var WNA=k(()=>{VI();P_();gk();JNA();eB();hq1();ea1();Rq1();uq1=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function",DNA=uq1&&typeof ReadableStream==="function",RBK=uq1&&(typeof TextEncoder==="function"?((A)=>(q)=>A.encode(q))(new TextEncoder):async(A)=>new Uint8Array(await new Response(A).arrayBuffer())),SBK=DNA&&XNA(()=>{let A=!1,q=new Request(cz.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!q}),qs1=DNA&&XNA(()=>q8.isReadableStream(new Response("").body)),xq1={stream:qs1&&((A)=>A.body)};uq1&&((A)=>{["text","arrayBuffer","blob","formData","stream"].forEach((q)=>{!xq1[q]&&(xq1[q]=q8.isFunction(A[q])?(K)=>K[q]():(K,Y)=>{throw new X4(`Response type '${q}' is not supported`,X4.ERR_NOT_SUPPORT,Y)})})})(new Response);PNA=uq1&&(async(A)=>{let{url:q,method:K,data:Y,signal:z,cancelToken:w,timeout:_,onDownloadProgress:$,onUploadProgress:O,responseType:H,headers:j,withCredentials:J="same-origin",fetchOptions:M}=bq1(A);H=H?(H+"").toLowerCase():"text";let D=jNA([z,w&&w.toAbortSignal()],_),X,P=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),W;try{if(O&&SBK&&K!=="get"&&K!=="head"&&(W=await hBK(j,Y))!==0){let N=new Request(q,{method:"POST",body:Y,duplex:"half"}),v;if(q8.isFormData(Y)&&(v=N.headers.get("content-type")))j.setContentType(v);if(N.body){let[y,R]=bJ6(W,Od(xJ6(O)));Y=As1(N.body,MNA,y,R)}}if(!q8.isString(J))J=J?"include":"omit";let Z="credentials"in Request.prototype;X=new Request(q,{...M,signal:D,method:K.toUpperCase(),headers:j.normalize().toJSON(),body:Y,duplex:"half",credentials:Z?J:void 0});let G=await fetch(X),f=qs1&&(H==="stream"||H==="response");if(qs1&&($||f&&P)){let N={};["status","statusText","headers"].forEach((h)=>{N[h]=G[h]});let v=q8.toFiniteNumber(G.headers.get("content-length")),[y,R]=$&&bJ6(v,Od(xJ6($),!0))||[];G=new Response(As1(G.body,MNA,y,()=>{R&&R(),P&&P()}),N)}H=H||"text";let V=await xq1[q8.findKey(xq1,H)||"text"](G,A);return!f&&P&&P(),await new Promise((N,v)=>{Am(N,v,{data:V,headers:CH.from(G.headers),status:G.status,statusText:G.statusText,config:A,request:X})})}catch(Z){if(P&&P(),Z&&Z.name==="TypeError"&&/fetch/i.test(Z.message))throw Object.assign(new X4("Network Error",X4.ERR_NETWORK,A,X),{cause:Z.cause||Z});throw X4.from(Z,Z&&Z.code,A,X)}})});var Ks1,ZNA=(A)=>`- ${A}`,IBK=(A)=>q8.isFunction(A)||A===null||A===!1,Bq1;var Ys1=k(()=>{P_();KNA();HNA();WNA();gk();Ks1={http:qNA,xhr:ONA,fetch:PNA};q8.forEach(Ks1,(A,q)=>{if(A){try{Object.defineProperty(A,"name",{value:q})}catch(K){}Object.defineProperty(A,"adapterName",{value:q})}});Bq1={getAdapter:(A)=>{A=q8.isArray(A)?A:[A];let{length:q}=A,K,Y,z={};for(let w=0;w<q;w++){K=A[w];let _;if(Y=K,!IBK(K)){if(Y=Ks1[(_=String(K)).toLowerCase()],Y===void 0)throw new X4(`Unknown adapter '${_}'`)}if(Y)break;z[_||"#"+w]=Y}if(!Y){let w=Object.entries(z).map(([$,O])=>`adapter ${$} `+(O===!1?"is not supported by the environment":"is not available in the build")),_=q?w.length>1?`since :
`+w.map(ZNA).join(`
`):" "+ZNA(w[0]):"as no adapter specified";throw new X4("There is no suitable adapter to dispatch the request "+_,"ERR_NOT_SUPPORT")}return Y},adapters:Ks1}});function zs1(A){if(A.cancelToken)A.cancelToken.throwIfRequested();if(A.signal&&A.signal.aborted)throw new Fk(null,A)}function mq1(A){if(zs1(A),A.headers=CH.from(A.headers),A.data=$h6.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1)A.headers.setContentType("application/x-www-form-urlencoded",!1);return Bq1.getAdapter(A.adapter||hJ6.adapter)(A).then(function(Y){return zs1(A),Y.data=$h6.call(A,A.transformResponse,Y),Y.headers=CH.from(Y.headers),Y},function(Y){if(!Oh6(Y)){if(zs1(A),Y&&Y.response)Y.response.data=$h6.call(A,A.transformResponse,Y.response),Y.response.headers=CH.from(Y.response.headers)}return Promise.reject(Y)})}var GNA=k(()=>{VVA();Lq1();yq6();eB();Ys1()});function bBK(A,q,K){if(typeof A!=="object")throw new X4("options must be an object",X4.ERR_BAD_OPTION_VALUE);let Y=Object.keys(A),z=Y.length;while(z-- >0){let w=Y[z],_=q[w];if(_){let $=A[w],O=$===void 0||_($,w,A);if(O!==!0)throw new X4("option "+w+" must be "+O,X4.ERR_BAD_OPTION_VALUE);continue}if(K!==!0)throw new X4("Unknown option "+w,X4.ERR_BAD_OPTION)}}var gq1,fNA,Ph6;var TNA=k(()=>{gk();gq1={};["object","boolean","number","function","string","symbol"].forEach((A,q)=>{gq1[A]=function(Y){return typeof Y===A||"a"+(q<1?"n ":" ")+A}});fNA={};gq1.transitional=function(q,K,Y){function z(w,_){return"[Axios v"+hq6+"] Transitional option '"+w+"'"+_+(Y?". "+Y:"")}return(w,_,$)=>{if(q===!1)throw new X4(z(_," has been removed"+(K?" in "+K:"")),X4.ERR_DEPRECATED);if(K&&!fNA[_])fNA[_]=!0,console.warn(z(_," has been deprecated since v"+K+" and will be removed in the near future"));return q?q(w,_,$):!0}};gq1.spelling=function(q){return(K,Y)=>{return console.warn(`${Y} is likely a misspelling of ${q}`),!0}};Ph6={assertOptions:bBK,validators:gq1}});class Wh6{constructor(A){this.defaults=A,this.interceptors={request:new La1,response:new La1}}async request(A,q){try{return await this._request(A,q)}catch(K){if(K instanceof Error){let Y={};Error.captureStackTrace?Error.captureStackTrace(Y):Y=Error();let z=Y.stack?Y.stack.replace(/^.+\n/,""):"";try{if(!K.stack)K.stack=z;else if(z&&!String(K.stack).endsWith(z.replace(/^.+\n.+\n/,"")))K.stack+=`
`+z}catch(w){}}throw K}}_request(A,q){if(typeof A==="string")q=q||{},q.url=A;else q=A||{};q=NI(this.defaults,q);let{transitional:K,paramsSerializer:Y,headers:z}=q;if(K!==void 0)Ph6.assertOptions(K,{silentJSONParsing:qm.transitional(qm.boolean),forcedJSONParsing:qm.transitional(qm.boolean),clarifyTimeoutError:qm.transitional(qm.boolean)},!1);if(Y!=null)if(q8.isFunction(Y))q.paramsSerializer={serialize:Y};else Ph6.assertOptions(Y,{encode:qm.function,serialize:qm.function},!0);if(q.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else q.allowAbsoluteUrls=!0;Ph6.assertOptions(q,{baseUrl:qm.spelling("baseURL"),withXsrfToken:qm.spelling("withXSRFToken")},!0),q.method=(q.method||this.defaults.method||"get").toLowerCase();let w=z&&q8.merge(z.common,z[q.method]);z&&q8.forEach(["delete","get","head","post","put","patch","common"],(D)=>{delete z[D]}),q.headers=CH.concat(w,z);let _=[],$=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen==="function"&&X.runWhen(q)===!1)return;$=$&&X.synchronous,_.unshift(X.fulfilled,X.rejected)});let O=[];this.interceptors.response.forEach(function(X){O.push(X.fulfilled,X.rejected)});let H,j=0,J;if(!$){let D=[mq1.bind(this),void 0];D.unshift.apply(D,_),D.push.apply(D,O),J=D.length,H=Promise.resolve(q);while(j<J)H=H.then(D[j++],D[j++]);return H}J=_.length;let M=q;j=0;while(j<J){let D=_[j++],X=_[j++];try{M=D(M)}catch(P){X.call(this,P);break}}try{H=mq1.call(this,M)}catch(D){return Promise.reject(D)}j=0,J=O.length;while(j<J)H=H.then(O[j++],O[j++]);return H}getUri(A){A=NI(this.defaults,A);let q=Rq6(A.baseURL,A.url,A.allowAbsoluteUrls);return Lq6(q,A.params,A.paramsSerializer)}}var qm,Zh6;var VNA=k(()=>{P_();vq1();HVA();GNA();Iq1();Sq1();TNA();eB();qm=Ph6.validators;q8.forEach(["delete","get","head","options"],function(q){Wh6.prototype[q]=function(K,Y){return this.request(NI(Y||{},{method:q,url:K,data:(Y||{}).data}))}});q8.forEach(["post","put","patch"],function(q){function K(Y){return function(w,_,$){return this.request(NI($||{},{method:q,headers:Y?{"Content-Type":"multipart/form-data"}:{},url:w,data:_}))}}Wh6.prototype[q]=K(),Wh6.prototype[q+"Form"]=K(!0)});Zh6=Wh6});class ws1{constructor(A){if(typeof A!=="function")throw TypeError("executor must be a function.");let q;this.promise=new Promise(function(z){q=z});let K=this;this.promise.then((Y)=>{if(!K._listeners)return;let z=K._listeners.length;while(z-- >0)K._listeners[z](Y);K._listeners=null}),this.promise.then=(Y)=>{let z,w=new Promise((_)=>{K.subscribe(_),z=_}).then(Y);return w.cancel=function(){K.unsubscribe(z)},w},A(function(z,w,_){if(K.reason)return;K.reason=new Fk(z,w,_),q(K.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}if(this._listeners)this._listeners.push(A);else this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;let q=this._listeners.indexOf(A);if(q!==-1)this._listeners.splice(q,1)}toAbortSignal(){let A=new AbortController,q=(K)=>{A.abort(K)};return this.subscribe(q),A.signal.unsubscribe=()=>this.unsubscribe(q),A.signal}static source(){let A;return{token:new ws1(function(Y){A=Y}),cancel:A}}}var NNA;var vNA=k(()=>{yq6();NNA=ws1});function _s1(A){return function(K){return A.apply(null,K)}}function $s1(A){return q8.isObject(A)&&A.isAxiosError===!0}var kNA=k(()=>{P_()});var Os1,ENA;var LNA=k(()=>{Os1={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(Os1).forEach(([A,q])=>{Os1[q]=A});ENA=Os1});function yNA(A){let q=new Zh6(A),K=aC6(Zh6.prototype.request,q);return q8.extend(K,Zh6.prototype,q,{allOwnKeys:!0}),q8.extend(K,q,null,{allOwnKeys:!0}),K.create=function(z){return yNA(NI(A,z))},K}var DM,I8;var RNA=k(()=>{P_();VNA();Iq1();Lq1();Ia1();yq6();vNA();zh6();gk();kNA();eB();Ys1();LNA();DM=yNA(hJ6);DM.Axios=Zh6;DM.CanceledError=Fk;DM.CancelToken=NNA;DM.isCancel=Oh6;DM.VERSION=hq6;DM.toFormData=ua;DM.AxiosError=X4;DM.Cancel=DM.CanceledError;DM.all=function(q){return Promise.all(q)};DM.spread=_s1;DM.isAxiosError=$s1;DM.mergeConfig=NI;DM.AxiosHeaders=CH;DM.formToJSON=(A)=>Eq1(q8.isHTMLForm(A)?new FormData(A):A);DM.getAdapter=Bq1.getAdapter;DM.HttpStatusCode=ENA;DM.default=DM;I8=DM});var BJ6={};m1(BJ6,{toFormData:()=>cBK,spread:()=>dBK,mergeConfig:()=>oBK,isCancel:()=>mBK,isAxiosError:()=>pBK,getAdapter:()=>rBK,formToJSON:()=>nBK,default:()=>I8,all:()=>QBK,VERSION:()=>FBK,HttpStatusCode:()=>iBK,CanceledError:()=>BBK,CancelToken:()=>gBK,Cancel:()=>UBK,AxiosHeaders:()=>lBK,AxiosError:()=>uBK,Axios:()=>xBK});var xBK,uBK,BBK,mBK,gBK,FBK,QBK,UBK,pBK,dBK,cBK,lBK,iBK,nBK,rBK,oBK;var A3=k(()=>{RNA();({Axios:xBK,AxiosError:uBK,CanceledError:BBK,isCancel:mBK,CancelToken:gBK,VERSION:FBK,all:QBK,Cancel:UBK,isAxiosError:pBK,spread:dBK,toFormData:cBK,AxiosHeaders:lBK,HttpStatusCode:iBK,formToJSON:nBK,getAdapter:rBK,mergeConfig:oBK}=I8)});import{join as Hs1}from"path";import{homedir as aBK}from"os";async function mJ6(A){try{return!!await f0(A)}catch{return!1}}function KmK(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let A=process.env.__CFBundleIdentifier?.toLowerCase();if(A?.includes("vscodium"))return"codium";if(A?.includes("windsurf"))return"windsurf";if(A?.includes("com.google.android.studio"))return"androidstudio";if(A){for(let q of js1)if(A.includes(q))return q}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(hNA())return"ssh-session";if(process.env.TERM){let q=process.env.TERM;if(q.includes("alacritty"))return"alacritty";if(q.includes("rxvt"))return"rxvt";if(q.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function hNA(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function gJ6(){let A=process.env.CLAUDE_CODE_HOST_PLATFORM;if(A==="win32"||A==="darwin"||A==="linux")return A;return YA.platform}var SNA,QX,sBK,tBK,eBK,CNA,AmK,qmK=()=>{return process.env.__CFBundleIdentifier==="com.conductor.app"},js1,YmK,YA;var K9=k(()=>{Eq();Y7();Z8();L5();tB();SNA=e(Wo1(),1),QX=T8(()=>{if(P1().existsSync(Hs1(OA(),".config.json")))return Hs1(OA(),".config.json");let A=`.claude${Zo1()}.json`;return Hs1(process.env.CLAUDE_CONFIG_DIR||aBK(),A)}),sBK=T8(async()=>{try{let{default:A}=await Promise.resolve().then(() => (A3(),BJ6));return await A.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});tBK=T8(async()=>{let A=[];if(await mJ6("npm"))A.push("npm");if(await mJ6("yarn"))A.push("yarn");if(await mJ6("pnpm"))A.push("pnpm");return A}),eBK=T8(async()=>{let A=[];if(await mJ6("bun"))A.push("bun");if(await mJ6("deno"))A.push("deno");if(await mJ6("node"))A.push("node");return A}),CNA=T8(()=>{try{return P1().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(A){return!1}}),AmK=T8(()=>{try{if(!CNA())return!1;let{cmd:A}=SNA.findActualExecutable("npm",[]);return A.startsWith("/mnt/c/")}catch(A){return!1}}),js1=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];YmK=T8(()=>{if($1(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if($1(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if($1(process.env.RENDER))return"render";if($1(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if($1(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(P1().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if($1(process.env.GITHUB_ACTIONS))return"github-actions";if($1(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if($1(!1))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(P1().existsSync("/.dockerenv"))return"docker"}catch{}if(YA.platform==="darwin")return"unknown-darwin";if(YA.platform==="linux")return"unknown-linux";if(YA.platform==="win32")return"unknown-win32";return"unknown"});YA={hasInternetAccess:sBK,isCI:$1(!1),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:KmK(),isSSH:hNA,getPackageManagers:tBK,getRuntimes:eBK,isRunningWithBun:T8(fJ6),isWslEnvironment:CNA,isNpmFromWindowsPath:AmK,isConductor:qmK,detectDeploymentEnvironment:YmK}});import{AsyncLocalStorage as zmK}from"async_hooks";function bNA(A,q){return INA.run(A,q)}function Fq1(){return INA.getStore()??ah()}function I1(){try{return Fq1()}catch{return DA()}}var INA;var W7=k(()=>{Q1();INA=new zmK});function FJ6(A){return A.sort((q,K)=>{let Y=K.modified.getTime()-q.modified.getTime();if(Y!==0)return Y;return K.created.getTime()-q.created.getTime()})}import hH from"node:path";import xNA from"node:os";import Js1 from"node:process";function Ds1(A,{suffix:q="nodejs"}={}){if(typeof A!=="string")throw TypeError(`Expected a string, got ${typeof A}`);if(q)A+=`-${q}`;if(Js1.platform==="darwin")return wmK(A);if(Js1.platform==="win32")return _mK(A);return $mK(A)}var ga,Ms1,QJ6,wmK=(A)=>{let q=hH.join(ga,"Library");return{data:hH.join(q,"Application Support",A),config:hH.join(q,"Preferences",A),cache:hH.join(q,"Caches",A),log:hH.join(q,"Logs",A),temp:hH.join(Ms1,A)}},_mK=(A)=>{let q=QJ6.APPDATA||hH.join(ga,"AppData","Roaming"),K=QJ6.LOCALAPPDATA||hH.join(ga,"AppData","Local");return{data:hH.join(K,A,"Data"),config:hH.join(q,A,"Config"),cache:hH.join(K,A,"Cache"),log:hH.join(K,A,"Log"),temp:hH.join(Ms1,A)}},$mK=(A)=>{let q=hH.basename(ga);return{data:hH.join(QJ6.XDG_DATA_HOME||hH.join(ga,".local","share"),A),config:hH.join(QJ6.XDG_CONFIG_HOME||hH.join(ga,".config"),A),cache:hH.join(QJ6.XDG_CACHE_HOME||hH.join(ga,".cache"),A),log:hH.join(QJ6.XDG_STATE_HOME||hH.join(ga,".local","state"),A),temp:hH.join(Ms1,q,A)}};var uNA=k(()=>{ga=xNA.homedir(),Ms1=xNA.tmpdir(),{env:QJ6}=Js1});import{join as Qq1}from"path";function mNA(A){let q=A.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=BNA)return q;let K=0;for(let Y=0;Y<A.length;Y++)K=(K<<5)-K+A.charCodeAt(Y),K|=0;return`${q.slice(0,BNA)}-${Math.abs(K).toString(36)}`}function pq1(A){return mNA(A)}var Uq1,BNA=200,Iq6;var dq1=k(()=>{uNA();Y7();Uq1=Ds1("claude-cli");Iq6={baseLogs:()=>Qq1(Uq1.cache,pq1(P1().cwd())),errors:()=>Qq1(Uq1.cache,pq1(P1().cwd()),"errors"),messages:()=>Qq1(Uq1.cache,pq1(P1().cwd()),"messages"),mcpLogs:(A)=>Qq1(Uq1.cache,pq1(P1().cwd()),`mcp-logs-${mNA(A)}`)}});var SZ="command-name",T0="command-message",Xs1="command-args",gNA="bash-stdout",FNA="bash-stderr",gV="local-command-stdout",bq6="local-command-stderr",Gh6="local-command-caveat",cq1,Qk="tick",yj="task-notification",Lf="task-id",Uk="tool-use-id",UJ6="task-type",pk="output-file",UX="status",pX="summary",QNA="ultraplan",WJ="teammate-message",pJ6,dJ6;var Ez=k(()=>{cq1=["bash-input","bash-stdout","bash-stderr","local-command-stdout","local-command-stderr","local-command-caveat"],pJ6=["help","-h","--help"],dJ6=["list","show","display","current","view","get","check","describe","print","version","about","status","?"]});function lq1(A){return A.replace(UNA,"").trim()||A}function iq1(A){return A.replace(UNA,"").trim()}var OmK,UNA;var nq1=k(()=>{Ez();OmK=["ide_opened_file","ide_selection","command-name","command-message","command-args","session-start-hook",Qk,"goal",...cq1],UNA=new RegExp(OmK.map((A)=>`<${A}(?:\\s[^>]*)?>([\\s\\S]*?)<\\/${A}>\\n?`).join("|"),"g")});function Fa(A,q){let K=A.firstPrompt?.startsWith(`<${Qk}>`),Y=A.firstPrompt?iq1(A.firstPrompt):"",z=Y&&!K,w=A.agentName||A.customTitle||A.summary||(z?Y:void 0)||q||(K?"Autonomous session":void 0)||(A.sessionId?A.sessionId.slice(0,8):"")||"";return lq1(w).trim()}function pNA(A){return A.toISOString().replace(/[:.]/g,"-")}function jmK(A){if(rq1.length>=HmK)rq1.shift();rq1.push(A)}function dNA(A){if(vI!==null)return;if(vI=A,cJ6.length>0){let q=[...cJ6];cJ6.length=0;for(let K of q)switch(K.type){case"error":vI.logError(K.error);break;case"mcpError":vI.logMCPError(K.serverName,K.error);break;case"mcpDebug":vI.logMCPDebug(K.serverName,K.message);break}}}function $6(A){let q=A instanceof Error?A:Error(String(A));try{if($1(process.env.CLAUDE_CODE_USE_BEDROCK)||$1(process.env.CLAUDE_CODE_USE_VERTEX)||$1(process.env.CLAUDE_CODE_USE_FOUNDRY)||process.env.DISABLE_ERROR_REPORTING||process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return;let Y={error:q.stack||q.message,timestamp:new Date().toISOString()};if(jmK(Y),vI===null){cJ6.push({type:"error",error:q});return}vI.logError(q)}catch{}}function lJ6(){return[...rq1]}function qz(A,q){try{if(vI===null){cJ6.push({type:"mcpError",serverName:A,error:q});return}vI.logMCPError(A,q)}catch{}}function w8(A,q){try{if(vI===null){cJ6.push({type:"mcpDebug",serverName:A,message:q});return}vI.logMCPDebug(A,q)}catch{}}function oq1(A,q){if(!q||q!=="repl_main_thread")return;let{messages:K,...Y}=A;eg1(Y)}var HmK=100,rq1,cJ6,vI=null,NGw;var x1=k(()=>{Q1();dq1();Eq();Z8();a1();Ez();nq1();rq1=[];cJ6=[];NGw=T8(()=>{return process.argv.includes("--hard-fail")})});function Th6(A,q=!1){let K=A.length,Y=0,z="",w=0,_=16,$=0,O=0,H=0,j=0,J=0;function M(f,V){let N=0,v=0;while(N<f||!V){let y=A.charCodeAt(Y);if(y>=48&&y<=57)v=v*16+y-48;else if(y>=65&&y<=70)v=v*16+y-65+10;else if(y>=97&&y<=102)v=v*16+y-97+10;else break;Y++,N++}if(N<f)v=-1;return v}function D(f){Y=f,z="",w=0,_=16,J=0}function X(){let f=Y;if(A.charCodeAt(Y)===48)Y++;else{Y++;while(Y<A.length&&iJ6(A.charCodeAt(Y)))Y++}if(Y<A.length&&A.charCodeAt(Y)===46)if(Y++,Y<A.length&&iJ6(A.charCodeAt(Y))){Y++;while(Y<A.length&&iJ6(A.charCodeAt(Y)))Y++}else return J=3,A.substring(f,Y);let V=Y;if(Y<A.length&&(A.charCodeAt(Y)===69||A.charCodeAt(Y)===101)){if(Y++,Y<A.length&&A.charCodeAt(Y)===43||A.charCodeAt(Y)===45)Y++;if(Y<A.length&&iJ6(A.charCodeAt(Y))){Y++;while(Y<A.length&&iJ6(A.charCodeAt(Y)))Y++;V=Y}else J=3}return A.substring(f,V)}function P(){let f="",V=Y;while(!0){if(Y>=K){f+=A.substring(V,Y),J=2;break}let N=A.charCodeAt(Y);if(N===34){f+=A.substring(V,Y),Y++;break}if(N===92){if(f+=A.substring(V,Y),Y++,Y>=K){J=2;break}switch(A.charCodeAt(Y++)){case 34:f+='"';break;case 92:f+="\\";break;case 47:f+="/";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+=`
`;break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:let y=M(4,!0);if(y>=0)f+=String.fromCharCode(y);else J=4;break;default:J=5}V=Y;continue}if(N>=0&&N<=31)if(fh6(N)){f+=A.substring(V,Y),J=2;break}else J=6;Y++}return f}function W(){if(z="",J=0,w=Y,O=$,j=H,Y>=K)return w=K,_=17;let f=A.charCodeAt(Y);if(Ps1(f)){do Y++,z+=String.fromCharCode(f),f=A.charCodeAt(Y);while(Ps1(f));return _=15}if(fh6(f)){if(Y++,z+=String.fromCharCode(f),f===13&&A.charCodeAt(Y)===10)Y++,z+=`
`;return $++,H=Y,_=14}switch(f){case 123:return Y++,_=1;case 125:return Y++,_=2;case 91:return Y++,_=3;case 93:return Y++,_=4;case 58:return Y++,_=6;case 44:return Y++,_=5;case 34:return Y++,z=P(),_=10;case 47:let V=Y-1;if(A.charCodeAt(Y+1)===47){Y+=2;while(Y<K){if(fh6(A.charCodeAt(Y)))break;Y++}return z=A.substring(V,Y),_=12}if(A.charCodeAt(Y+1)===42){Y+=2;let N=K-1,v=!1;while(Y<N){let y=A.charCodeAt(Y);if(y===42&&A.charCodeAt(Y+1)===47){Y+=2,v=!0;break}if(Y++,fh6(y)){if(y===13&&A.charCodeAt(Y)===10)Y++;$++,H=Y}}if(!v)Y++,J=1;return z=A.substring(V,Y),_=13}return z+=String.fromCharCode(f),Y++,_=16;case 45:if(z+=String.fromCharCode(f),Y++,Y===K||!iJ6(A.charCodeAt(Y)))return _=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return z+=X(),_=11;default:while(Y<K&&Z(f))Y++,f=A.charCodeAt(Y);if(w!==Y){switch(z=A.substring(w,Y),z){case"true":return _=8;case"false":return _=9;case"null":return _=7}return _=16}return z+=String.fromCharCode(f),Y++,_=16}}function Z(f){if(Ps1(f)||fh6(f))return!1;switch(f){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function G(){let f;do f=W();while(f>=12&&f<=15);return f}return{setPosition:D,getPosition:()=>Y,scan:q?G:W,getToken:()=>_,getTokenValue:()=>z,getTokenOffset:()=>w,getTokenLength:()=>Y-w,getTokenStartLine:()=>O,getTokenStartCharacter:()=>w-j,getTokenError:()=>J}}function Ps1(A){return A===32||A===9}function fh6(A){return A===10||A===13}function iJ6(A){return A>=48&&A<=57}var cNA;var aq1=k(()=>{(function(A){A[A.lineFeed=10]="lineFeed",A[A.carriageReturn=13]="carriageReturn",A[A.space=32]="space",A[A._0=48]="_0",A[A._1=49]="_1",A[A._2=50]="_2",A[A._3=51]="_3",A[A._4=52]="_4",A[A._5=53]="_5",A[A._6=54]="_6",A[A._7=55]="_7",A[A._8=56]="_8",A[A._9=57]="_9",A[A.a=97]="a",A[A.b=98]="b",A[A.c=99]="c",A[A.d=100]="d",A[A.e=101]="e",A[A.f=102]="f",A[A.g=103]="g",A[A.h=104]="h",A[A.i=105]="i",A[A.j=106]="j",A[A.k=107]="k",A[A.l=108]="l",A[A.m=109]="m",A[A.n=110]="n",A[A.o=111]="o",A[A.p=112]="p",A[A.q=113]="q",A[A.r=114]="r",A[A.s=115]="s",A[A.t=116]="t",A[A.u=117]="u",A[A.v=118]="v",A[A.w=119]="w",A[A.x=120]="x",A[A.y=121]="y",A[A.z=122]="z",A[A.A=65]="A",A[A.B=66]="B",A[A.C=67]="C",A[A.D=68]="D",A[A.E=69]="E",A[A.F=70]="F",A[A.G=71]="G",A[A.H=72]="H",A[A.I=73]="I",A[A.J=74]="J",A[A.K=75]="K",A[A.L=76]="L",A[A.M=77]="M",A[A.N=78]="N",A[A.O=79]="O",A[A.P=80]="P",A[A.Q=81]="Q",A[A.R=82]="R",A[A.S=83]="S",A[A.T=84]="T",A[A.U=85]="U",A[A.V=86]="V",A[A.W=87]="W",A[A.X=88]="X",A[A.Y=89]="Y",A[A.Z=90]="Z",A[A.asterisk=42]="asterisk",A[A.backslash=92]="backslash",A[A.closeBrace=125]="closeBrace",A[A.closeBracket=93]="closeBracket",A[A.colon=58]="colon",A[A.comma=44]="comma",A[A.dot=46]="dot",A[A.doubleQuote=34]="doubleQuote",A[A.minus=45]="minus",A[A.openBrace=123]="openBrace",A[A.openBracket=91]="openBracket",A[A.plus=43]="plus",A[A.slash=47]="slash",A[A.formFeed=12]="formFeed",A[A.tab=9]="tab"})(cNA||(cNA={}))});var dk,Ws1,lNA;var iNA=k(()=>{dk=Array(20).fill(0).map((A,q)=>{return" ".repeat(q)}),Ws1={" ":{"\n":Array(200).fill(0).map((A,q)=>{return`
`+" ".repeat(q)}),"\r":Array(200).fill(0).map((A,q)=>{return"\r"+" ".repeat(q)}),"\r\n":Array(200).fill(0).map((A,q)=>{return`\r
`+" ".repeat(q)})},"\t":{"\n":Array(200).fill(0).map((A,q)=>{return`
`+"\t".repeat(q)}),"\r":Array(200).fill(0).map((A,q)=>{return"\r"+"\t".repeat(q)}),"\r\n":Array(200).fill(0).map((A,q)=>{return`\r
`+"\t".repeat(q)})}},lNA=[`
`,"\r",`\r
`]});function Zs1(A,q,K){let Y,z,w,_,$;if(q){_=q.offset,$=_+q.length,w=_;while(w>0&&!Vh6(A,w-1))w--;let N=$;while(N<A.length&&!Vh6(A,N))N++;z=A.substring(w,N),Y=MmK(z,K)}else z=A,Y=0,w=0,_=0,$=A.length;let O=DmK(K,A),H=lNA.includes(O),j=0,J=0,M;if(K.insertSpaces)M=dk[K.tabSize||4]??nJ6(dk[1],K.tabSize||4);else M="\t";let D=M==="\t"?"\t":" ",X=Th6(z,!1),P=!1;function W(){if(j>1)return nJ6(O,j)+nJ6(M,Y+J);let N=M.length*(Y+J);if(!H||N>Ws1[D][O].length)return O+nJ6(M,Y+J);if(N<=0)return O;return Ws1[D][O][N]}function Z(){let N=X.scan();j=0;while(N===15||N===14){if(N===14&&K.keepLines)j+=1;else if(N===14)j=1;N=X.scan()}return P=N===16||X.getTokenError()!==0,N}let G=[];function f(N,v,y){if(!P&&(!q||v<$&&y>_)&&A.substring(v,y)!==N)G.push({offset:v,length:y-v,content:N})}let V=Z();if(K.keepLines&&j>0)f(nJ6(O,j),0,0);if(V!==17){let N=X.getTokenOffset()+w,v=M.length*Y<20&&K.insertSpaces?dk[M.length*Y]:nJ6(M,Y);f(v,w,N)}while(V!==17){let N=X.getTokenOffset()+X.getTokenLength()+w,v=Z(),y="",R=!1;while(j===0&&(v===12||v===13)){let B=X.getTokenOffset()+w;f(dk[1],N,B),N=X.getTokenOffset()+X.getTokenLength()+w,R=v===12,y=R?W():"",v=Z()}if(v===2){if(V!==1)J--;if(K.keepLines&&j>0||!K.keepLines&&V!==1)y=W();else if(K.keepLines)y=dk[1]}else if(v===4){if(V!==3)J--;if(K.keepLines&&j>0||!K.keepLines&&V!==3)y=W();else if(K.keepLines)y=dk[1]}else{switch(V){case 3:case 1:if(J++,K.keepLines&&j>0||!K.keepLines)y=W();else y=dk[1];break;case 5:if(K.keepLines&&j>0||!K.keepLines)y=W();else y=dk[1];break;case 12:y=W();break;case 13:if(j>0)y=W();else if(!R)y=dk[1];break;case 6:if(K.keepLines&&j>0)y=W();else if(!R)y=dk[1];break;case 10:if(K.keepLines&&j>0)y=W();else if(v===6&&!R)y="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(K.keepLines&&j>0)y=W();else if((v===12||v===13)&&!R)y=dk[1];else if(v!==5&&v!==17)P=!0;break;case 16:P=!0;break}if(j>0&&(v===12||v===13))y=W()}if(v===17)if(K.keepLines&&j>0)y=W();else y=K.insertFinalNewline?O:"";let h=X.getTokenOffset()+w;f(y,N,h),V=v}return G}function nJ6(A,q){let K="";for(let Y=0;Y<q;Y++)K+=A;return K}function MmK(A,q){let K=0,Y=0,z=q.tabSize||4;while(K<A.length){let w=A.charAt(K);if(w===dk[1])Y++;else if(w==="\t")Y+=z;else break;K++}return Math.floor(Y/z)}function DmK(A,q){for(let K=0;K<q.length;K++){let Y=q.charAt(K);if(Y==="\r"){if(K+1<q.length&&q.charAt(K+1)===`
`)return`\r
`;return"\r"}else if(Y===`
`)return`
`}return A&&A.eol||`
`}function Vh6(A,q){return`\r
`.indexOf(A.charAt(q))!==-1}var Gs1=k(()=>{aq1();iNA()});function nNA(A,q=[],K=Nh6.DEFAULT){let Y=null,z=[],w=[];function _(O){if(Array.isArray(z))z.push(O);else if(Y!==null)z[Y]=O}return Ts1(A,{onObjectBegin:()=>{let O={};_(O),w.push(z),z=O,Y=null},onObjectProperty:(O)=>{Y=O},onObjectEnd:()=>{z=w.pop()},onArrayBegin:()=>{let O=[];_(O),w.push(z),z=O,Y=null},onArrayEnd:()=>{z=w.pop()},onLiteralValue:_,onError:(O,H,j)=>{q.push({error:O,offset:H,length:j})}},K),z[0]}function fs1(A,q=[],K=Nh6.DEFAULT){let Y={type:"array",offset:-1,length:-1,children:[],parent:void 0};function z(O){if(Y.type==="property")Y.length=O-Y.offset,Y=Y.parent}function w(O){return Y.children.push(O),O}Ts1(A,{onObjectBegin:(O)=>{Y=w({type:"object",offset:O,length:-1,parent:Y,children:[]})},onObjectProperty:(O,H,j)=>{Y=w({type:"property",offset:H,length:-1,parent:Y,children:[]}),Y.children.push({type:"string",value:O,offset:H,length:j,parent:Y})},onObjectEnd:(O,H)=>{z(O+H),Y.length=O+H-Y.offset,Y=Y.parent,z(O+H)},onArrayBegin:(O,H)=>{Y=w({type:"array",offset:O,length:-1,parent:Y,children:[]})},onArrayEnd:(O,H)=>{Y.length=O+H-Y.offset,Y=Y.parent,z(O+H)},onLiteralValue:(O,H,j)=>{w({type:PmK(O),offset:H,length:j,parent:Y,value:O}),z(H+j)},onSeparator:(O,H,j)=>{if(Y.type==="property"){if(O===":")Y.colonOffset=H;else if(O===",")z(H)}},onError:(O,H,j)=>{q.push({error:O,offset:H,length:j})}},K);let $=Y.children[0];if($)delete $.parent;return $}function sq1(A,q){if(!A)return;let K=A;for(let Y of q)if(typeof Y==="string"){if(K.type!=="object"||!Array.isArray(K.children))return;let z=!1;for(let w of K.children)if(Array.isArray(w.children)&&w.children[0].value===Y&&w.children.length===2){K=w.children[1],z=!0;break}if(!z)return}else{let z=Y;if(K.type!=="array"||z<0||!Array.isArray(K.children)||z>=K.children.length)return;K=K.children[z]}return K}function Ts1(A,q,K=Nh6.DEFAULT){let Y=Th6(A,!1),z=[];function w(F){return F?()=>F(Y.getTokenOffset(),Y.getTokenLength(),Y.getTokenStartLine(),Y.getTokenStartCharacter()):()=>!0}function _(F){return F?()=>F(Y.getTokenOffset(),Y.getTokenLength(),Y.getTokenStartLine(),Y.getTokenStartCharacter(),()=>z.slice()):()=>!0}function $(F){return F?(g)=>F(g,Y.getTokenOffset(),Y.getTokenLength(),Y.getTokenStartLine(),Y.getTokenStartCharacter()):()=>!0}function O(F){return F?(g)=>F(g,Y.getTokenOffset(),Y.getTokenLength(),Y.getTokenStartLine(),Y.getTokenStartCharacter(),()=>z.slice()):()=>!0}let H=_(q.onObjectBegin),j=O(q.onObjectProperty),J=w(q.onObjectEnd),M=_(q.onArrayBegin),D=w(q.onArrayEnd),X=O(q.onLiteralValue),P=$(q.onSeparator),W=w(q.onComment),Z=$(q.onError),G=K&&K.disallowComments,f=K&&K.allowTrailingComma;function V(){while(!0){let F=Y.scan();switch(Y.getTokenError()){case 4:N(14);break;case 5:N(15);break;case 3:N(13);break;case 1:if(!G)N(11);break;case 2:N(12);break;case 6:N(16);break}switch(F){case 12:case 13:if(G)N(10);else W();break;case 16:N(1);break;case 15:case 14:break;default:return F}}}function N(F,g=[],b=[]){if(Z(F),g.length+b.length>0){let U=Y.getToken();while(U!==17){if(g.indexOf(U)!==-1){V();break}else if(b.indexOf(U)!==-1)break;U=V()}}}function v(F){let g=Y.getTokenValue();if(F)X(g);else j(g),z.push(g);return V(),!0}function y(){switch(Y.getToken()){case 11:let F=Y.getTokenValue(),g=Number(F);if(isNaN(g))N(2),g=0;X(g);break;case 7:X(null);break;case 8:X(!0);break;case 9:X(!1);break;default:return!1}return V(),!0}function R(){if(Y.getToken()!==10)return N(3,[],[2,5]),!1;if(v(!1),Y.getToken()===6){if(P(":"),V(),!x())N(4,[],[2,5])}else N(5,[],[2,5]);return z.pop(),!0}function h(){H(),V();let F=!1;while(Y.getToken()!==2&&Y.getToken()!==17){if(Y.getToken()===5){if(!F)N(4,[],[]);if(P(","),V(),Y.getToken()===2&&f)break}else if(F)N(6,[],[]);if(!R())N(4,[],[2,5]);F=!0}if(J(),Y.getToken()!==2)N(7,[2],[]);else V();return!0}function B(){M(),V();let F=!0,g=!1;while(Y.getToken()!==4&&Y.getToken()!==17){if(Y.getToken()===5){if(!g)N(4,[],[]);if(P(","),V(),Y.getToken()===4&&f)break}else if(g)N(6,[],[]);if(F)z.push(0),F=!1;else z[z.length-1]++;if(!x())N(4,[],[4,5]);g=!0}if(D(),!F)z.pop();if(Y.getToken()!==4)N(8,[4],[]);else V();return!0}function x(){switch(Y.getToken()){case 3:return B();case 1:return h();case 10:return v(!0);default:return y()}}if(V(),Y.getToken()===17){if(K.allowEmptyContent)return!0;return N(4,[],[]),!1}if(!x())return N(4,[],[]),!1;if(Y.getToken()!==17)N(9,[],[]);return!0}function PmK(A){switch(typeof A){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!A)return"null";else if(Array.isArray(A))return"array";return"object"}default:return"null"}}var Nh6;var Vs1=k(()=>{aq1();(function(A){A.DEFAULT={allowTrailingComma:!1}})(Nh6||(Nh6={}))});function rNA(A,q,K,Y){let z=q.slice(),_=fs1(A,[]),$=void 0,O=void 0;while(z.length>0)if(O=z.pop(),$=sq1(_,z),$===void 0&&K!==void 0)if(typeof O==="string")K={[O]:K};else K=[K];else break;if(!$){if(K===void 0)throw Error("Can not delete in empty document");return xq6(A,{offset:_?_.offset:0,length:_?_.length:0,content:JSON.stringify(K)},Y)}else if($.type==="object"&&typeof O==="string"&&Array.isArray($.children)){let H=sq1($,[O]);if(H!==void 0)if(K===void 0){if(!H.parent)throw Error("Malformed AST");let j=$.children.indexOf(H.parent),J,M=H.parent.offset+H.parent.length;if(j>0){let D=$.children[j-1];J=D.offset+D.length}else if(J=$.offset+1,$.children.length>1)M=$.children[1].offset;return xq6(A,{offset:J,length:M-J,content:""},Y)}else return xq6(A,{offset:H.offset,length:H.length,content:JSON.stringify(K)},Y);else{if(K===void 0)return[];let j=`${JSON.stringify(O)}: ${JSON.stringify(K)}`,J=Y.getInsertionIndex?Y.getInsertionIndex($.children.map((D)=>D.children[0].value)):$.children.length,M;if(J>0){let D=$.children[J-1];M={offset:D.offset+D.length,length:0,content:","+j}}else if($.children.length===0)M={offset:$.offset+1,length:0,content:j};else M={offset:$.offset+1,length:0,content:j+","};return xq6(A,M,Y)}}else if($.type==="array"&&typeof O==="number"&&Array.isArray($.children)){let H=O;if(H===-1){let j=`${JSON.stringify(K)}`,J;if($.children.length===0)J={offset:$.offset+1,length:0,content:j};else{let M=$.children[$.children.length-1];J={offset:M.offset+M.length,length:0,content:","+j}}return xq6(A,J,Y)}else if(K===void 0&&$.children.length>=0){let j=O,J=$.children[j],M;if($.children.length===1)M={offset:$.offset+1,length:$.length-2,content:""};else if($.children.length-1===j){let D=$.children[j-1],X=D.offset+D.length,P=$.offset+$.length;M={offset:X,length:P-2-X,content:""}}else M={offset:J.offset,length:$.children[j+1].offset-J.offset,content:""};return xq6(A,M,Y)}else if(K!==void 0){let j,J=`${JSON.stringify(K)}`;if(!Y.isArrayInsertion&&$.children.length>O){let M=$.children[O];j={offset:M.offset,length:M.length,content:J}}else if($.children.length===0||O===0)j={offset:$.offset+1,length:0,content:$.children.length===0?J:J+","};else{let M=O>$.children.length?$.children.length:O,D=$.children[M-1];j={offset:D.offset+D.length,length:0,content:","+J}}return xq6(A,j,Y)}else throw Error(`Can not ${K===void 0?"remove":Y.isArrayInsertion?"insert":"modify"} Array index ${H} as length is not sufficient`)}else throw Error(`Can not add ${typeof O!=="number"?"index":"property"} to parent of type ${$.type}`)}function xq6(A,q,K){if(!K.formattingOptions)return[q];let Y=tq1(A,q),z=q.offset,w=q.offset+q.content.length;if(q.length===0||q.content.length===0){while(z>0&&!Vh6(Y,z-1))z--;while(w<Y.length&&!Vh6(Y,w))w++}let _=Zs1(Y,{offset:z,length:w-z},{...K.formattingOptions,keepLines:!1});for(let O=_.length-1;O>=0;O--){let H=_[O];Y=tq1(Y,H),z=Math.min(z,H.offset),w=Math.max(w,H.offset+H.length),w+=H.content.length-H.length}let $=A.length-(Y.length-w)-z;return[{offset:z,length:$,content:Y.substring(z,w)}]}function tq1(A,q){return A.substring(0,q.offset)+q.content+A.substring(q.offset+q.length)}var oNA=k(()=>{Gs1();Vs1()});function eNA(A,q,K,Y){return rNA(A,q,K,Y)}function AvA(A,q){let K=q.slice(0).sort((z,w)=>{let _=z.offset-w.offset;if(_===0)return z.length-w.length;return _}),Y=A.length;for(let z=K.length-1;z>=0;z--){let w=K[z];if(w.offset+w.length<=Y)A=tq1(A,w);else throw Error("Overlapping edit");Y=w.offset}return A}var aNA,sNA,Ns1,tNA;var qvA=k(()=>{Gs1();oNA();aq1();Vs1();(function(A){A[A.None=0]="None",A[A.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",A[A.UnexpectedEndOfString=2]="UnexpectedEndOfString",A[A.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",A[A.InvalidUnicode=4]="InvalidUnicode",A[A.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",A[A.InvalidCharacter=6]="InvalidCharacter"})(aNA||(aNA={}));(function(A){A[A.OpenBraceToken=1]="OpenBraceToken",A[A.CloseBraceToken=2]="CloseBraceToken",A[A.OpenBracketToken=3]="OpenBracketToken",A[A.CloseBracketToken=4]="CloseBracketToken",A[A.CommaToken=5]="CommaToken",A[A.ColonToken=6]="ColonToken",A[A.NullKeyword=7]="NullKeyword",A[A.TrueKeyword=8]="TrueKeyword",A[A.FalseKeyword=9]="FalseKeyword",A[A.StringLiteral=10]="StringLiteral",A[A.NumericLiteral=11]="NumericLiteral",A[A.LineCommentTrivia=12]="LineCommentTrivia",A[A.BlockCommentTrivia=13]="BlockCommentTrivia",A[A.LineBreakTrivia=14]="LineBreakTrivia",A[A.Trivia=15]="Trivia",A[A.Unknown=16]="Unknown",A[A.EOF=17]="EOF"})(sNA||(sNA={}));Ns1=nNA;(function(A){A[A.InvalidSymbol=1]="InvalidSymbol",A[A.InvalidNumberFormat=2]="InvalidNumberFormat",A[A.PropertyNameExpected=3]="PropertyNameExpected",A[A.ValueExpected=4]="ValueExpected",A[A.ColonExpected=5]="ColonExpected",A[A.CommaExpected=6]="CommaExpected",A[A.CloseBraceExpected=7]="CloseBraceExpected",A[A.CloseBracketExpected=8]="CloseBracketExpected",A[A.EndOfFileExpected=9]="EndOfFileExpected",A[A.InvalidCommentToken=10]="InvalidCommentToken",A[A.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",A[A.UnexpectedEndOfString=12]="UnexpectedEndOfString",A[A.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",A[A.InvalidUnicode=14]="InvalidUnicode",A[A.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",A[A.InvalidCharacter=16]="InvalidCharacter"})(tNA||(tNA={}))});class oJ6{heap;length;static#A=!1;static create(A){let q=wvA(A);if(!q)return[];oJ6.#A=!0;let K=new oJ6(A,q);return oJ6.#A=!1,K}constructor(A,q){if(!oJ6.#A)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new q(A),this.length=0}push(A){this.heap[this.length++]=A}pop(){return this.heap[--this.length]}}var rJ6,YvA,vs1,zvA=(A,q,K,Y)=>{typeof vs1.emitWarning==="function"?vs1.emitWarning(A,q,K,Y):console.error(`[${K}] ${q}: ${A}`)},eq1,KvA,GmK=(A)=>!YvA.has(A),BGw,Qa=(A)=>A&&A===Math.floor(A)&&A>0&&isFinite(A),wvA=(A)=>!Qa(A)?null:A<=Math.pow(2,8)?Uint8Array:A<=Math.pow(2,16)?Uint16Array:A<=Math.pow(2,32)?Uint32Array:A<=Number.MAX_SAFE_INTEGER?vh6:null,vh6,ck;var aJ6=k(()=>{rJ6=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,YvA=new Set,vs1=typeof process==="object"&&!!process?process:{},eq1=globalThis.AbortController,KvA=globalThis.AbortSignal;if(typeof eq1>"u"){KvA=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(Y,z){this._onabort.push(z)}},eq1=class{constructor(){q()}signal=new KvA;abort(Y){if(this.signal.aborted)return;this.signal.reason=Y,this.signal.aborted=!0;for(let z of this.signal._onabort)z(Y);this.signal.onabort?.(Y)}};let A=vs1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",q=()=>{if(!A)return;A=!1,zvA("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",q)}}BGw=Symbol("type");vh6=class vh6 extends Array{constructor(A){super(A);this.fill(0)}};ck=class ck{#A;#q;#K;#z;#Y;#_;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#w;#O;#H;#j;#$;#J;#M;#W;#X;#G;#P;#Z;#f;#T;#N;#k;#V;static unsafeExposeInternals(A){return{starts:A.#f,ttls:A.#T,sizes:A.#Z,keyMap:A.#H,keyList:A.#j,valList:A.#$,next:A.#J,prev:A.#M,get head(){return A.#W},get tail(){return A.#X},free:A.#G,isBackgroundFetch:(q)=>A.#D(q),backgroundFetch:(q,K,Y,z)=>A.#x(q,K,Y,z),moveToTail:(q)=>A.#h(q),indexes:(q)=>A.#E(q),rindexes:(q)=>A.#L(q),isStale:(q)=>A.#v(q)}}get max(){return this.#A}get maxSize(){return this.#q}get calculatedSize(){return this.#O}get size(){return this.#w}get fetchMethod(){return this.#Y}get memoMethod(){return this.#_}get dispose(){return this.#K}get disposeAfter(){return this.#z}constructor(A){let{max:q=0,ttl:K,ttlResolution:Y=1,ttlAutopurge:z,updateAgeOnGet:w,updateAgeOnHas:_,allowStale:$,dispose:O,disposeAfter:H,noDisposeOnSet:j,noUpdateTTL:J,maxSize:M=0,maxEntrySize:D=0,sizeCalculation:X,fetchMethod:P,memoMethod:W,noDeleteOnFetchRejection:Z,noDeleteOnStaleGet:G,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:V,ignoreFetchAbort:N}=A;if(q!==0&&!Qa(q))throw TypeError("max option must be a nonnegative integer");let v=q?wvA(q):Array;if(!v)throw Error("invalid max value: "+q);if(this.#A=q,this.#q=M,this.maxEntrySize=D||this.#q,this.sizeCalculation=X,this.sizeCalculation){if(!this.#q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!=="function")throw TypeError("sizeCalculation set to non-function")}if(W!==void 0&&typeof W!=="function")throw TypeError("memoMethod must be a function if defined");if(this.#_=W,P!==void 0&&typeof P!=="function")throw TypeError("fetchMethod must be a function if specified");if(this.#Y=P,this.#k=!!P,this.#H=new Map,this.#j=Array(q).fill(void 0),this.#$=Array(q).fill(void 0),this.#J=new v(q),this.#M=new v(q),this.#W=0,this.#X=0,this.#G=oJ6.create(q),this.#w=0,this.#O=0,typeof O==="function")this.#K=O;if(typeof H==="function")this.#z=H,this.#P=[];else this.#z=void 0,this.#P=void 0;if(this.#N=!!this.#K,this.#V=!!this.#z,this.noDisposeOnSet=!!j,this.noUpdateTTL=!!J,this.noDeleteOnFetchRejection=!!Z,this.allowStaleOnFetchRejection=!!f,this.allowStaleOnFetchAbort=!!V,this.ignoreFetchAbort=!!N,this.maxEntrySize!==0){if(this.#q!==0){if(!Qa(this.#q))throw TypeError("maxSize must be a positive integer if specified")}if(!Qa(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!$,this.noDeleteOnStaleGet=!!G,this.updateAgeOnGet=!!w,this.updateAgeOnHas=!!_,this.ttlResolution=Qa(Y)||Y===0?Y:1,this.ttlAutopurge=!!z,this.ttl=K||0,this.ttl){if(!Qa(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#A===0&&this.ttl===0&&this.#q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#A&&!this.#q){if(GmK("LRU_CACHE_UNBOUNDED"))YvA.add("LRU_CACHE_UNBOUNDED"),zvA("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",ck)}}getRemainingTTL(A){return this.#H.has(A)?1/0:0}#u(){let A=new vh6(this.#A),q=new vh6(this.#A);this.#T=A,this.#f=q,this.#B=(z,w,_=rJ6.now())=>{if(q[z]=w!==0?_:0,A[z]=w,w!==0&&this.ttlAutopurge){let $=setTimeout(()=>{if(this.#v(z))this.#y(this.#j[z],"expire")},w+1);if($.unref)$.unref()}},this.#S=(z)=>{q[z]=A[z]!==0?rJ6.now():0},this.#R=(z,w)=>{if(A[w]){let _=A[w],$=q[w];if(!_||!$)return;z.ttl=_,z.start=$,z.now=K||Y();let O=z.now-$;z.remainingTTL=_-O}};let K=0,Y=()=>{let z=rJ6.now();if(this.ttlResolution>0){K=z;let w=setTimeout(()=>K=0,this.ttlResolution);if(w.unref)w.unref()}return z};this.getRemainingTTL=(z)=>{let w=this.#H.get(z);if(w===void 0)return 0;let _=A[w],$=q[w];if(!_||!$)return 1/0;let O=(K||Y())-$;return _-O},this.#v=(z)=>{let w=q[z],_=A[z];return!!_&&!!w&&(K||Y())-w>_}}#S=()=>{};#R=()=>{};#B=()=>{};#v=()=>!1;#U(){let A=new vh6(this.#A);this.#O=0,this.#Z=A,this.#C=(q)=>{this.#O-=A[q],A[q]=0},this.#m=(q,K,Y,z)=>{if(this.#D(K))return 0;if(!Qa(Y))if(z){if(typeof z!=="function")throw TypeError("sizeCalculation must be a function");if(Y=z(K,q),!Qa(Y))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return Y},this.#I=(q,K,Y)=>{if(A[q]=K,this.#q){let z=this.#q-A[q];while(this.#O>z)this.#b(!0)}if(this.#O+=A[q],Y)Y.entrySize=K,Y.totalCalculatedSize=this.#O}}#C=(A)=>{};#I=(A,q,K)=>{};#m=(A,q,K,Y)=>{if(K||Y)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:A=this.allowStale}={}){if(this.#w)for(let q=this.#X;;){if(!this.#g(q))break;if(A||!this.#v(q))yield q;if(q===this.#W)break;else q=this.#M[q]}}*#L({allowStale:A=this.allowStale}={}){if(this.#w)for(let q=this.#W;;){if(!this.#g(q))break;if(A||!this.#v(q))yield q;if(q===this.#X)break;else q=this.#J[q]}}#g(A){return A!==void 0&&this.#H.get(this.#j[A])===A}*entries(){for(let A of this.#E())if(this.#$[A]!==void 0&&this.#j[A]!==void 0&&!this.#D(this.#$[A]))yield[this.#j[A],this.#$[A]]}*rentries(){for(let A of this.#L())if(this.#$[A]!==void 0&&this.#j[A]!==void 0&&!this.#D(this.#$[A]))yield[this.#j[A],this.#$[A]]}*keys(){for(let A of this.#E()){let q=this.#j[A];if(q!==void 0&&!this.#D(this.#$[A]))yield q}}*rkeys(){for(let A of this.#L()){let q=this.#j[A];if(q!==void 0&&!this.#D(this.#$[A]))yield q}}*values(){for(let A of this.#E())if(this.#$[A]!==void 0&&!this.#D(this.#$[A]))yield this.#$[A]}*rvalues(){for(let A of this.#L())if(this.#$[A]!==void 0&&!this.#D(this.#$[A]))yield this.#$[A]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(A,q={}){for(let K of this.#E()){let Y=this.#$[K],z=this.#D(Y)?Y.__staleWhileFetching:Y;if(z===void 0)continue;if(A(z,this.#j[K],this))return this.get(this.#j[K],q)}}forEach(A,q=this){for(let K of this.#E()){let Y=this.#$[K],z=this.#D(Y)?Y.__staleWhileFetching:Y;if(z===void 0)continue;A.call(q,z,this.#j[K],this)}}rforEach(A,q=this){for(let K of this.#L()){let Y=this.#$[K],z=this.#D(Y)?Y.__staleWhileFetching:Y;if(z===void 0)continue;A.call(q,z,this.#j[K],this)}}purgeStale(){let A=!1;for(let q of this.#L({allowStale:!0}))if(this.#v(q))this.#y(this.#j[q],"expire"),A=!0;return A}info(A){let q=this.#H.get(A);if(q===void 0)return;let K=this.#$[q],Y=this.#D(K)?K.__staleWhileFetching:K;if(Y===void 0)return;let z={value:Y};if(this.#T&&this.#f){let w=this.#T[q],_=this.#f[q];if(w&&_){let $=w-(rJ6.now()-_);z.ttl=$,z.start=Date.now()}}if(this.#Z)z.size=this.#Z[q];return z}dump(){let A=[];for(let q of this.#E({allowStale:!0})){let K=this.#j[q],Y=this.#$[q],z=this.#D(Y)?Y.__staleWhileFetching:Y;if(z===void 0||K===void 0)continue;let w={value:z};if(this.#T&&this.#f){w.ttl=this.#T[q];let _=rJ6.now()-this.#f[q];w.start=Math.floor(Date.now()-_)}if(this.#Z)w.size=this.#Z[q];A.unshift([K,w])}return A}load(A){this.clear();for(let[q,K]of A){if(K.start){let Y=Date.now()-K.start;K.start=rJ6.now()-Y}this.set(q,K.value,K)}}set(A,q,K={}){if(q===void 0)return this.delete(A),this;let{ttl:Y=this.ttl,start:z,noDisposeOnSet:w=this.noDisposeOnSet,sizeCalculation:_=this.sizeCalculation,status:$}=K,{noUpdateTTL:O=this.noUpdateTTL}=K,H=this.#m(A,q,K.size||0,_);if(this.maxEntrySize&&H>this.maxEntrySize){if($)$.set="miss",$.maxEntrySizeExceeded=!0;return this.#y(A,"set"),this}let j=this.#w===0?void 0:this.#H.get(A);if(j===void 0){if(j=this.#w===0?this.#X:this.#G.length!==0?this.#G.pop():this.#w===this.#A?this.#b(!1):this.#w,this.#j[j]=A,this.#$[j]=q,this.#H.set(A,j),this.#J[this.#X]=j,this.#M[j]=this.#X,this.#X=j,this.#w++,this.#I(j,H,$),$)$.set="add";O=!1}else{this.#h(j);let J=this.#$[j];if(q!==J){if(this.#k&&this.#D(J)){J.__abortController.abort(Error("replaced"));let{__staleWhileFetching:M}=J;if(M!==void 0&&!w){if(this.#N)this.#K?.(M,A,"set");if(this.#V)this.#P?.push([M,A,"set"])}}else if(!w){if(this.#N)this.#K?.(J,A,"set");if(this.#V)this.#P?.push([J,A,"set"])}if(this.#C(j),this.#I(j,H,$),this.#$[j]=q,$){$.set="replace";let M=J&&this.#D(J)?J.__staleWhileFetching:J;if(M!==void 0)$.oldValue=M}}else if($)$.set="update"}if(Y!==0&&!this.#T)this.#u();if(this.#T){if(!O)this.#B(j,Y,z);if($)this.#R($,j)}if(!w&&this.#V&&this.#P){let J=this.#P,M;while(M=J?.shift())this.#z?.(...M)}return this}pop(){try{while(this.#w){let A=this.#$[this.#W];if(this.#b(!0),this.#D(A)){if(A.__staleWhileFetching)return A.__staleWhileFetching}else if(A!==void 0)return A}}finally{if(this.#V&&this.#P){let A=this.#P,q;while(q=A?.shift())this.#z?.(...q)}}}#b(A){let q=this.#W,K=this.#j[q],Y=this.#$[q];if(this.#k&&this.#D(Y))Y.__abortController.abort(Error("evicted"));else if(this.#N||this.#V){if(this.#N)this.#K?.(Y,K,"evict");if(this.#V)this.#P?.push([Y,K,"evict"])}if(this.#C(q),A)this.#j[q]=void 0,this.#$[q]=void 0,this.#G.push(q);if(this.#w===1)this.#W=this.#X=0,this.#G.length=0;else this.#W=this.#J[q];return this.#H.delete(K),this.#w--,q}has(A,q={}){let{updateAgeOnHas:K=this.updateAgeOnHas,status:Y}=q,z=this.#H.get(A);if(z!==void 0){let w=this.#$[z];if(this.#D(w)&&w.__staleWhileFetching===void 0)return!1;if(!this.#v(z)){if(K)this.#S(z);if(Y)Y.has="hit",this.#R(Y,z);return!0}else if(Y)Y.has="stale",this.#R(Y,z)}else if(Y)Y.has="miss";return!1}peek(A,q={}){let{allowStale:K=this.allowStale}=q,Y=this.#H.get(A);if(Y===void 0||!K&&this.#v(Y))return;let z=this.#$[Y];return this.#D(z)?z.__staleWhileFetching:z}#x(A,q,K,Y){let z=q===void 0?void 0:this.#$[q];if(this.#D(z))return z;let w=new eq1,{signal:_}=K;_?.addEventListener("abort",()=>w.abort(_.reason),{signal:w.signal});let $={signal:w.signal,options:K,context:Y},O=(X,P=!1)=>{let{aborted:W}=w.signal,Z=K.ignoreFetchAbort&&X!==void 0;if(K.status)if(W&&!P){if(K.status.fetchAborted=!0,K.status.fetchError=w.signal.reason,Z)K.status.fetchAbortIgnored=!0}else K.status.fetchResolved=!0;if(W&&!Z&&!P)return j(w.signal.reason);let G=M;if(this.#$[q]===M)if(X===void 0)if(G.__staleWhileFetching)this.#$[q]=G.__staleWhileFetching;else this.#y(A,"fetch");else{if(K.status)K.status.fetchUpdated=!0;this.set(A,X,$.options)}return X},H=(X)=>{if(K.status)K.status.fetchRejected=!0,K.status.fetchError=X;return j(X)},j=(X)=>{let{aborted:P}=w.signal,W=P&&K.allowStaleOnFetchAbort,Z=W||K.allowStaleOnFetchRejection,G=Z||K.noDeleteOnFetchRejection,f=M;if(this.#$[q]===M){if(!G||f.__staleWhileFetching===void 0)this.#y(A,"fetch");else if(!W)this.#$[q]=f.__staleWhileFetching}if(Z){if(K.status&&f.__staleWhileFetching!==void 0)K.status.returnedStale=!0;return f.__staleWhileFetching}else if(f.__returned===f)throw X},J=(X,P)=>{let W=this.#Y?.(A,z,$);if(W&&W instanceof Promise)W.then((Z)=>X(Z===void 0?void 0:Z),P);w.signal.addEventListener("abort",()=>{if(!K.ignoreFetchAbort||K.allowStaleOnFetchAbort){if(X(void 0),K.allowStaleOnFetchAbort)X=(Z)=>O(Z,!0)}})};if(K.status)K.status.fetchDispatched=!0;let M=new Promise(J).then(O,H),D=Object.assign(M,{__abortController:w,__staleWhileFetching:z,__returned:void 0});if(q===void 0)this.set(A,D,{...$.options,status:void 0}),q=this.#H.get(A);else this.#$[q]=D;return D}#D(A){if(!this.#k)return!1;let q=A;return!!q&&q instanceof Promise&&q.hasOwnProperty("__staleWhileFetching")&&q.__abortController instanceof eq1}async fetch(A,q={}){let{allowStale:K=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:z=this.noDeleteOnStaleGet,ttl:w=this.ttl,noDisposeOnSet:_=this.noDisposeOnSet,size:$=0,sizeCalculation:O=this.sizeCalculation,noUpdateTTL:H=this.noUpdateTTL,noDeleteOnFetchRejection:j=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:J=this.allowStaleOnFetchRejection,ignoreFetchAbort:M=this.ignoreFetchAbort,allowStaleOnFetchAbort:D=this.allowStaleOnFetchAbort,context:X,forceRefresh:P=!1,status:W,signal:Z}=q;if(!this.#k){if(W)W.fetch="get";return this.get(A,{allowStale:K,updateAgeOnGet:Y,noDeleteOnStaleGet:z,status:W})}let G={allowStale:K,updateAgeOnGet:Y,noDeleteOnStaleGet:z,ttl:w,noDisposeOnSet:_,size:$,sizeCalculation:O,noUpdateTTL:H,noDeleteOnFetchRejection:j,allowStaleOnFetchRejection:J,allowStaleOnFetchAbort:D,ignoreFetchAbort:M,status:W,signal:Z},f=this.#H.get(A);if(f===void 0){if(W)W.fetch="miss";let V=this.#x(A,f,G,X);return V.__returned=V}else{let V=this.#$[f];if(this.#D(V)){let h=K&&V.__staleWhileFetching!==void 0;if(W){if(W.fetch="inflight",h)W.returnedStale=!0}return h?V.__staleWhileFetching:V.__returned=V}let N=this.#v(f);if(!P&&!N){if(W)W.fetch="hit";if(this.#h(f),Y)this.#S(f);if(W)this.#R(W,f);return V}let v=this.#x(A,f,G,X),R=v.__staleWhileFetching!==void 0&&K;if(W){if(W.fetch=N?"stale":"refresh",R&&N)W.returnedStale=!0}return R?v.__staleWhileFetching:v.__returned=v}}async forceFetch(A,q={}){let K=await this.fetch(A,q);if(K===void 0)throw Error("fetch() returned undefined");return K}memo(A,q={}){let K=this.#_;if(!K)throw Error("no memoMethod provided to constructor");let{context:Y,forceRefresh:z,...w}=q,_=this.get(A,w);if(!z&&_!==void 0)return _;let $=K(A,_,{options:w,context:Y});return this.set(A,$,w),$}get(A,q={}){let{allowStale:K=this.allowStale,updateAgeOnGet:Y=this.updateAgeOnGet,noDeleteOnStaleGet:z=this.noDeleteOnStaleGet,status:w}=q,_=this.#H.get(A);if(_!==void 0){let $=this.#$[_],O=this.#D($);if(w)this.#R(w,_);if(this.#v(_)){if(w)w.get="stale";if(!O){if(!z)this.#y(A,"expire");if(w&&K)w.returnedStale=!0;return K?$:void 0}else{if(w&&K&&$.__staleWhileFetching!==void 0)w.returnedStale=!0;return K?$.__staleWhileFetching:void 0}}else{if(w)w.get="hit";if(O)return $.__staleWhileFetching;if(this.#h(_),Y)this.#S(_);return $}}else if(w)w.get="miss"}#F(A,q){this.#M[q]=A,this.#J[A]=q}#h(A){if(A!==this.#X){if(A===this.#W)this.#W=this.#J[A];else this.#F(this.#M[A],this.#J[A]);this.#F(this.#X,A),this.#X=A}}delete(A){return this.#y(A,"delete")}#y(A,q){let K=!1;if(this.#w!==0){let Y=this.#H.get(A);if(Y!==void 0)if(K=!0,this.#w===1)this.#Q(q);else{this.#C(Y);let z=this.#$[Y];if(this.#D(z))z.__abortController.abort(Error("deleted"));else if(this.#N||this.#V){if(this.#N)this.#K?.(z,A,q);if(this.#V)this.#P?.push([z,A,q])}if(this.#H.delete(A),this.#j[Y]=void 0,this.#$[Y]=void 0,Y===this.#X)this.#X=this.#M[Y];else if(Y===this.#W)this.#W=this.#J[Y];else{let w=this.#M[Y];this.#J[w]=this.#J[Y];let _=this.#J[Y];this.#M[_]=this.#M[Y]}this.#w--,this.#G.push(Y)}}if(this.#V&&this.#P?.length){let Y=this.#P,z;while(z=Y?.shift())this.#z?.(...z)}return K}clear(){return this.#Q("delete")}#Q(A){for(let q of this.#L({allowStale:!0})){let K=this.#$[q];if(this.#D(K))K.__abortController.abort(Error("deleted"));else{let Y=this.#j[q];if(this.#N)this.#K?.(K,Y,A);if(this.#V)this.#P?.push([K,Y,A])}}if(this.#H.clear(),this.#$.fill(void 0),this.#j.fill(void 0),this.#T&&this.#f)this.#T.fill(0),this.#f.fill(0);if(this.#Z)this.#Z.fill(0);if(this.#W=0,this.#X=0,this.#G.length=0,this.#O=0,this.#w=0,this.#V&&this.#P){let q=this.#P,K;while(K=q?.shift())this.#z?.(...K)}}}});function ks1(A,q=300000){let K=new Map,Y=(...z)=>{let w=U6(z),_=K.get(w),$=Date.now();if(!_){let O=A(...z);return K.set(w,{value:O,timestamp:$,refreshing:!1}),O}if(_&&$-_.timestamp>q&&!_.refreshing)return _.refreshing=!0,Promise.resolve().then(()=>{let O=A(...z);K.set(w,{value:O,timestamp:Date.now(),refreshing:!1})}).catch((O)=>{$6(O),K.delete(w)}),_.value;return K.get(w).value};return Y.cache={clear:()=>K.clear()},Y}function _vA(A,q=300000){let K=new Map,Y=async(...z)=>{let w=U6(z),_=K.get(w),$=Date.now();if(!_){let O=await A(...z);return K.set(w,{value:O,timestamp:$,refreshing:!1}),O}if(_&&$-_.timestamp>q&&!_.refreshing)return _.refreshing=!0,A(...z).then((O)=>{K.set(w,{value:O,timestamp:Date.now(),refreshing:!1})}).catch((O)=>{$6(O),K.delete(w)}),_.value;return K.get(w).value};return Y.cache={clear:()=>K.clear()},Y}function V0(A,q,K=100){let Y=new ck({max:K}),z=(...w)=>{let _=q(...w),$=Y.get(_);if($!==void 0)return $;let O=A(...w);return Y.set(_,O),O};return z.cache={clear:()=>Y.clear(),size:()=>Y.size,delete:(w)=>Y.delete(w),get:(w)=>Y.peek(w),has:(w)=>Y.has(w)},z}var Hd=k(()=>{aJ6();x1();a1()});import{readFile as fmK,stat as TmK,open as VmK}from"fs/promises";function sJ6(A){return A.startsWith(NmK)?A.slice(1):A}function OvA(A){if(!A)return null;try{return Ns1(sJ6(A))}catch(q){return $6(q),null}}function vmK(A){let q=HvA,K=A.length,Y=q(A);if(!Y.error||Y.done||Y.read>=K)return Y.values;let{values:z,read:w}=Y;while(w<K){let _=typeof A==="string"?A.indexOf(`
`,w):A.indexOf(10,w);if(_===-1)break;w=_+1;let $=q(A,w);if($.values.length>0)z=z.concat($.values);if(!$.error||$.done||$.read>=K)break;w=$.read}return z}function kmK(A){let q=A.length,K=0;if(A[0]===239&&A[1]===187&&A[2]===191)K=3;let Y=[];while(K<q){let z=A.indexOf(10,K);if(z===-1)z=q;let w=A.toString("utf8",K,z).trim();if(K=z+1,!w)continue;try{Y.push(JSON.parse(w))}catch{}}return Y}function EmK(A){let q=sJ6(A),K=q.length,Y=0,z=[];while(Y<K){let w=q.indexOf(`
`,Y);if(w===-1)w=K;let _=q.substring(Y,w).trim();if(Y=w+1,!_)continue;try{z.push(JSON.parse(_))}catch{}}return z}function Km(A){if(HvA)return vmK(A);if(typeof A==="string")return EmK(A);return kmK(A)}async function tJ6(A){let $=[];try{let{size:q}=await TmK(A);if(q<=kh6)return Km(await fmK(A));const K=oY($,await VmK(A,"r"),1);let Y=Buffer.allocUnsafe(kh6);let z=0;let w=q-kh6;while(z<kh6){let{bytesRead:M}=await K.read(Y,z,kh6-z,w+z);if(M===0)break;z+=M}let _=Y.indexOf(10);if(_!==-1&&_<z-1)return Km(Y.subarray(_+1,z));return Km(Y.subarray(0,z))}catch(O){var H=O,j=1}finally{var J=aY($,H,j);J&&await J}}function jvA(A,q){try{if(!A||A.trim()==="")return U6([q],null,4);let K=sJ6(A),Y=Ns1(K);if(Array.isArray(Y)){let z=Y.length,$=eNA(K,z===0?[0]:[z],q,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!$||$.length===0){let O=[...Y,q];return U6(O,null,4)}return AvA(K,$)}else return U6([q],null,4)}catch(K){return $6(K),U6([q],null,4)}}var NmK="\uFEFF",$vA,q3,HvA,kh6=104857600;var J2=k(()=>{x1();qvA();Hd();a1();$vA=V0((A,q)=>{try{return{ok:!0,value:JSON.parse(sJ6(A))}}catch(K){if(q)$6(K);return{ok:!1}}},(A)=>A,50),q3=Object.assign(function(q,K=!0){if(!q)return null;let Y=$vA(q,K);return Y.ok?Y.value:null},{cache:$vA.cache});HvA=(()=>{if(typeof Bun>"u")return!1;let q=Bun.JSONL;if(!q?.parseChunk)return!1;return q.parseChunk})()});import{release as LmK}from"os";import{readFile as ymK,readdir as RmK}from"fs/promises";async function MvA(A){let q=new Set;if(process.env.P4PORT)q.add("perforce");try{let K=A??P1().cwd(),Y=new Set(await RmK(K));for(let[z,w]of SmK)if(Y.has(z))q.add(w)}catch{}return[...q]}var Es1,c8,uq6,JvA,SmK;var uK=k(()=>{Eq();x1();Y7();Es1=["macos","wsl"],c8=T8(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let A=P1().readFileSync("/proc/version",{encoding:"utf8"});if(A.toLowerCase().includes("microsoft")||A.toLowerCase().includes("wsl"))return"wsl"}catch(A){$6(A)}return"linux"}return"unknown"}catch(A){return $6(A),"unknown"}}),uq6=T8(()=>{if(process.platform!=="linux")return;try{let A=P1().readFileSync("/proc/version",{encoding:"utf8"}),q=A.match(/WSL(\d+)/i);if(q&&q[1])return q[1];if(A.toLowerCase().includes("microsoft"))return"1";return}catch(A){$6(A);return}}),JvA=T8(async()=>{if(process.platform!=="linux")return;let A={linuxKernel:LmK()};try{let q=await ymK("/etc/os-release","utf8");for(let K of q.split(`
`)){let Y=K.match(/^(ID|VERSION_ID)=(.*)$/);if(Y&&Y[1]&&Y[2]){let z=Y[2].replace(/^"|"$/g,"");if(Y[1]==="ID")A.linuxDistroId=z;else A.linuxDistroVersion=z}}}catch{}return A}),SmK=[[".git","git"],[".hg","mercurial"],[".svn","svn"],[".p4config","perforce"],["$tf","tfs"],[".tfvc","tfs"]]});import*as DvA from"node:path/win32";import*as eJ6 from"node:path";function Ls1(A){try{return xa(`dir "${A}"`,{stdio:"pipe"}),!0}catch{return!1}}function CmK(A){if(A==="git"){let q=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let K of q)if(Ls1(K))return K}try{let K=xa(`where.exe ${A}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
`).filter(Boolean),Y=I1().toLowerCase();for(let z of K){let w=eJ6.resolve(z).toLowerCase();if(eJ6.dirname(w).toLowerCase()===Y||w.startsWith(Y+eJ6.sep)){L(`Skipping potentially malicious executable in current directory: ${z}`);continue}return z}return null}catch{return null}}var XvA=()=>{if(c8()==="windows"){let A=ys1();process.env.SHELL=A,L(`Using bash path: "${A}"`)}},ys1,yf,Eh6;var jd=k(()=>{Oq1();Eq();Hd();uK();G1();W7();ys1=T8(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(Ls1(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let A=CmK("git");if(A){let q=DvA.join(A,"..","..","bin","bash.exe");if(Ls1(q))return q}console.error("Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),yf=V0((A)=>{if(A.startsWith("\\\\"))return A.replace(/\\/g,"/");let q=A.match(/^([A-Za-z]):[/\\]/);if(q)return"/"+q[1].toLowerCase()+A.slice(2).replace(/\\/g,"/");return A.replace(/\\/g,"/")},(A)=>A,500),Eh6=V0((A)=>{if(A.startsWith("//"))return A.replace(/\//g,"\\");let q=A.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(q){let Y=q[1].toUpperCase(),z=A.slice(("/cygdrive/"+q[1]).length);return Y+":"+(z||"\\").replace(/\//g,"\\")}let K=A.match(/^\/([A-Za-z])(\/|$)/);if(K){let Y=K[1].toUpperCase(),z=A.slice(2);return Y+":"+(z||"\\").replace(/\//g,"\\")}return A.replace(/\//g,"\\")},(A)=>A,500)});import{open as ZvA,readdir as Hfw,readFile as hmK,realpath as jfw}from"fs/promises";import{join as ImK}from"path";function GvA(A){if(!A.includes("\\"))return A;try{return JSON.parse(`"${A}"`)}catch{return A}}function Lh6(A,q){let K=[`"${q}":"`,`"${q}": "`];for(let Y of K){let z=A.indexOf(Y);if(z<0)continue;let w=z+Y.length,_=w;while(_<A.length){if(A[_]==="\\"){_+=2;continue}if(A[_]==='"')return GvA(A.slice(w,_));_++}}return}function Jd(A,q){let K=[`"${q}":"`,`"${q}": "`],Y;for(let z of K){let w=0;while(!0){let _=A.indexOf(z,w);if(_<0)break;let $=_+z.length,O=$;while(O<A.length){if(A[O]==="\\"){O+=2;continue}if(A[O]==='"'){Y=GvA(A.slice($,O));break}O++}w=O+1}}return Y}async function fvA(A,q,K){try{let Y=await ZvA(A,"r");try{let z=await Y.read(K,0,AM6,0);if(z.bytesRead===0)return{head:"",tail:""};let w=K.toString("utf8",0,z.bytesRead),_=Math.max(0,q-AM6),$=_===0?w:await(async()=>{let O=await Y.read(K,0,AM6,_);return K.toString("utf8",0,O.bytesRead)})();return{head:w,tail:$}}finally{await Y.close()}}catch{return{head:"",tail:""}}}function bmK(A){let q=0;for(let K=0;K<A.length;K++){let Y=A.charCodeAt(K);q=(q<<5)-q+Y,q|=0}return Math.abs(q).toString(36)}function ID(A){let q=A.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=PvA)return q;let K=typeof Bun<"u"?Bun.hash(A).toString(36):bmK(A);return`${q.slice(0,PvA)}-${K}`}function TvA(){return ImK(OA(),"projects")}function umK(A){let q=Buffer.from('"compact_boundary"'),K=10,Y=A.lastIndexOf(q);while(Y>=0){let z=A.lastIndexOf(10,Y)+1,w=A.indexOf(10,Y);if(w===-1)w=A.length;let _=A.toString("utf-8",z,w);try{let $=JSON.parse(_);if($.type==="system"&&$.subtype==="compact_boundary")return w+1}catch{}Y=Y>0?A.lastIndexOf(q,Y-1):-1}return-1}async function AK1(A,q){if(q<=WvA){let J=await hmK(A),M=umK(J);if(M<0)return{boundaryEndOffset:0,postBoundaryBuf:J};return{boundaryEndOffset:M,postBoundaryBuf:Buffer.from(J.subarray(M))}}let K=Buffer.from('"compact_boundary"'),Y=10,z=1024,w=WvA,_=Buffer.allocUnsafe(w),$=w,O=q,H=w,j=await ZvA(A,"r");try{while($>0){let J=Math.min(xmK,$),M=$-J,D=O-J,X=M,P=J,W=D;while(P>0){let{bytesRead:N}=await j.read(_,X,P,W);if(N===0)break;X+=N,P-=N,W+=N}$=M,O=D;let Z=_.subarray($),G=Math.min(H+z-$,Z.length),f=Z.subarray(0,G);H=$;let V=f.lastIndexOf(K);while(V>=0){let N=Z.lastIndexOf(Y,V)+1;if(N===0&&O>0)break;let v=Z.indexOf(Y,V);if(v===-1)v=Z.length;let y=Z.toString("utf-8",N,v);try{let R=JSON.parse(y);if(R.type==="system"&&R.subtype==="compact_boundary")return{boundaryEndOffset:O+v+1,postBoundaryBuf:Buffer.from(Z.subarray(v+1))}}catch{}V=V>0?f.lastIndexOf(K,V-1):-1}}return null}finally{await j.close()}}var AM6=65536,PvA=200,xmK=1048576,WvA=67108864,VvA=5242880;var yh6=k(()=>{Z8()});import{homedir as NvA}from"os";import{isAbsolute as BmK,join as mmK,resolve as gmK,normalize as Rs1,dirname as vvA}from"path";function t4(A,q){let K=q??I1()??P1().cwd();if(typeof A!=="string")throw TypeError(`Path must be a string, received ${typeof A}`);if(typeof K!=="string")throw TypeError(`Base directory must be a string, received ${typeof K}`);if(A.includes("\x00")||K.includes("\x00"))throw Error("Path contains null bytes");let Y=A.trim();if(!Y)return Rs1(K).normalize("NFC");if(Y==="~")return NvA().normalize("NFC");if(Y.startsWith("~/"))return mmK(NvA(),Y.slice(2)).normalize("NFC");let z=Y;if(c8()==="windows"&&Y.match(/^\/[a-z]\//i))try{z=Eh6(Y)}catch{z=Y}if(BmK(z))return Rs1(z).normalize("NFC");return gmK(K,z).normalize("NFC")}function Md(A){let q=t4(A);if(q.startsWith("\\\\")||q.startsWith("//"))return vvA(q);try{if(P1().statSync(q).isDirectory())return q}catch{}return vvA(q)}function Ua(A){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(A)}function Rh6(A){return Rs1(A).replace(/\\/g,"/")}var Kz=k(()=>{W7();Y7();uK();jd();yh6()});function pa(A,q){return A instanceof Error&&A.message===q}function D1(A){return A instanceof Error?A.message:String(A)}var Sh6,Ym,Lz,Rf,kI,bD,cy;var MA=k(()=>{Sh6=class Sh6 extends Error{constructor(A){super(A);this.name=this.constructor.name}};Ym=class Ym extends Error{};Lz=class Lz extends Error{constructor(A){super(A);this.name="AbortError"}};Rf=class Rf extends Error{filePath;defaultConfig;constructor(A,q,K){super(A);this.name="ConfigParseError",this.filePath=q,this.defaultConfig=K}};kI=class kI extends Error{stdout;stderr;code;interrupted;constructor(A,q,K,Y){super("Shell command failed");this.stdout=A;this.stderr=q;this.code=K;this.interrupted=Y;this.name="ShellError"}};bD=class bD extends Error{formattedMessage;constructor(A,q){super(A);this.formattedMessage=q;this.name="TeleportOperationError"}};cy=class cy extends Error{telemetryMessage;constructor(A,q){super(A);this.name="TelemetrySafeError",this.telemetryMessage=q??A}}});var EvA=C((vfw,kvA)=>{var da=g6("constants"),FmK=process.cwd,qK1=null,QmK=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!qK1)qK1=FmK.call(process);return qK1};try{process.cwd()}catch(A){}if(typeof process.chdir==="function"){if(KK1=process.chdir,process.chdir=function(A){qK1=null,KK1.call(process,A)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,KK1)}var KK1;kvA.exports=UmK;function UmK(A){if(da.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))q(A);if(!A.lutimes)K(A);if(A.chown=w(A.chown),A.fchown=w(A.fchown),A.lchown=w(A.lchown),A.chmod=Y(A.chmod),A.fchmod=Y(A.fchmod),A.lchmod=Y(A.lchmod),A.chownSync=_(A.chownSync),A.fchownSync=_(A.fchownSync),A.lchownSync=_(A.lchownSync),A.chmodSync=z(A.chmodSync),A.fchmodSync=z(A.fchmodSync),A.lchmodSync=z(A.lchmodSync),A.stat=$(A.stat),A.fstat=$(A.fstat),A.lstat=$(A.lstat),A.statSync=O(A.statSync),A.fstatSync=O(A.fstatSync),A.lstatSync=O(A.lstatSync),A.chmod&&!A.lchmod)A.lchmod=function(j,J,M){if(M)process.nextTick(M)},A.lchmodSync=function(){};if(A.chown&&!A.lchown)A.lchown=function(j,J,M,D){if(D)process.nextTick(D)},A.lchownSync=function(){};if(QmK==="win32")A.rename=typeof A.rename!=="function"?A.rename:function(j){function J(M,D,X){var P=Date.now(),W=0;j(M,D,function Z(G){if(G&&(G.code==="EACCES"||G.code==="EPERM"||G.code==="EBUSY")&&Date.now()-P<60000){if(setTimeout(function(){A.stat(D,function(f,V){if(f&&f.code==="ENOENT")j(M,D,Z);else X(G)})},W),W<100)W+=10;return}if(X)X(G)})}if(Object.setPrototypeOf)Object.setPrototypeOf(J,j);return J}(A.rename);A.read=typeof A.read!=="function"?A.read:function(j){function J(M,D,X,P,W,Z){var G;if(Z&&typeof Z==="function"){var f=0;G=function(V,N,v){if(V&&V.code==="EAGAIN"&&f<10)return f++,j.call(A,M,D,X,P,W,G);Z.apply(this,arguments)}}return j.call(A,M,D,X,P,W,G)}if(Object.setPrototypeOf)Object.setPrototypeOf(J,j);return J}(A.read),A.readSync=typeof A.readSync!=="function"?A.readSync:function(j){return function(J,M,D,X,P){var W=0;while(!0)try{return j.call(A,J,M,D,X,P)}catch(Z){if(Z.code==="EAGAIN"&&W<10){W++;continue}throw Z}}}(A.readSync);function q(j){j.lchmod=function(J,M,D){j.open(J,da.O_WRONLY|da.O_SYMLINK,M,function(X,P){if(X){if(D)D(X);return}j.fchmod(P,M,function(W){j.close(P,function(Z){if(D)D(W||Z)})})})},j.lchmodSync=function(J,M){var D=j.openSync(J,da.O_WRONLY|da.O_SYMLINK,M),X=!0,P;try{P=j.fchmodSync(D,M),X=!1}finally{if(X)try{j.closeSync(D)}catch(W){}else j.closeSync(D)}return P}}function K(j){if(da.hasOwnProperty("O_SYMLINK")&&j.futimes)j.lutimes=function(J,M,D,X){j.open(J,da.O_SYMLINK,function(P,W){if(P){if(X)X(P);return}j.futimes(W,M,D,function(Z){j.close(W,function(G){if(X)X(Z||G)})})})},j.lutimesSync=function(J,M,D){var X=j.openSync(J,da.O_SYMLINK),P,W=!0;try{P=j.futimesSync(X,M,D),W=!1}finally{if(W)try{j.closeSync(X)}catch(Z){}else j.closeSync(X)}return P};else if(j.futimes)j.lutimes=function(J,M,D,X){if(X)process.nextTick(X)},j.lutimesSync=function(){}}function Y(j){if(!j)return j;return function(J,M,D){return j.call(A,J,M,function(X){if(H(X))X=null;if(D)D.apply(this,arguments)})}}function z(j){if(!j)return j;return function(J,M){try{return j.call(A,J,M)}catch(D){if(!H(D))throw D}}}function w(j){if(!j)return j;return function(J,M,D,X){return j.call(A,J,M,D,function(P){if(H(P))P=null;if(X)X.apply(this,arguments)})}}function _(j){if(!j)return j;return function(J,M,D){try{return j.call(A,J,M,D)}catch(X){if(!H(X))throw X}}}function $(j){if(!j)return j;return function(J,M,D){if(typeof M==="function")D=M,M=null;function X(P,W){if(W){if(W.uid<0)W.uid+=4294967296;if(W.gid<0)W.gid+=4294967296}if(D)D.apply(this,arguments)}return M?j.call(A,J,M,X):j.call(A,J,X)}}function O(j){if(!j)return j;return function(J,M){var D=M?j.call(A,J,M):j.call(A,J);if(D){if(D.uid<0)D.uid+=4294967296;if(D.gid<0)D.gid+=4294967296}return D}}function H(j){if(!j)return!0;if(j.code==="ENOSYS")return!0;var J=!process.getuid||process.getuid()!==0;if(J){if(j.code==="EINVAL"||j.code==="EPERM")return!0}return!1}}});var RvA=C((kfw,yvA)=>{var LvA=g6("stream").Stream;yvA.exports=pmK;function pmK(A){return{ReadStream:q,WriteStream:K};function q(Y,z){if(!(this instanceof q))return new q(Y,z);LvA.call(this);var w=this;this.path=Y,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,z=z||{};var _=Object.keys(z);for(var $=0,O=_.length;$<O;$++){var H=_[$];this[H]=z[H]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){w._read()});return}A.open(this.path,this.flags,this.mode,function(j,J){if(j){w.emit("error",j),w.readable=!1;return}w.fd=J,w.emit("open",J),w._read()})}function K(Y,z){if(!(this instanceof K))return new K(Y,z);LvA.call(this),this.path=Y,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,z=z||{};var w=Object.keys(z);for(var _=0,$=w.length;_<$;_++){var O=w[_];this[O]=z[O]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=A.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var CvA=C((Efw,SvA)=>{SvA.exports=cmK;var dmK=Object.getPrototypeOf||function(A){return A.__proto__};function cmK(A){if(A===null||typeof A!=="object")return A;if(A instanceof Object)var q={__proto__:dmK(A)};else var q=Object.create(null);return Object.getOwnPropertyNames(A).forEach(function(K){Object.defineProperty(q,K,Object.getOwnPropertyDescriptor(A,K))}),q}});var gw=C((Lfw,Is1)=>{var IH=g6("fs"),lmK=EvA(),imK=RvA(),nmK=CvA(),YK1=g6("util"),N0,wK1;if(typeof Symbol==="function"&&typeof Symbol.for==="function")N0=Symbol.for("graceful-fs.queue"),wK1=Symbol.for("graceful-fs.previous");else N0="___graceful-fs.queue",wK1="___graceful-fs.previous";function rmK(){}function IvA(A,q){Object.defineProperty(A,N0,{get:function(){return q}})}var Bq6=rmK;if(YK1.debuglog)Bq6=YK1.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))Bq6=function(){var A=YK1.format.apply(YK1,arguments);A="GFS4: "+A.split(/\n/).join(`
GFS4: `),console.error(A)};if(!IH[N0]){if(Ss1=global[N0]||[],IvA(IH,Ss1),IH.close=function(A){function q(K,Y){return A.call(IH,K,function(z){if(!z)hvA();if(typeof Y==="function")Y.apply(this,arguments)})}return Object.defineProperty(q,wK1,{value:A}),q}(IH.close),IH.closeSync=function(A){function q(K){A.apply(IH,arguments),hvA()}return Object.defineProperty(q,wK1,{value:A}),q}(IH.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){Bq6(IH[N0]),g6("assert").equal(IH[N0].length,0)})}var Ss1;if(!global[N0])IvA(global,IH[N0]);Is1.exports=Cs1(nmK(IH));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!IH.__patched)Is1.exports=Cs1(IH),IH.__patched=!0;function Cs1(A){lmK(A),A.gracefulify=Cs1,A.createReadStream=N,A.createWriteStream=v;var q=A.readFile;A.readFile=K;function K(h,B,x){if(typeof B==="function")x=B,B=null;return F(h,B,x);function F(g,b,U,d){return q(g,b,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))qM6([F,[g,b,U],l,d||Date.now(),Date.now()]);else if(typeof U==="function")U.apply(this,arguments)})}}var Y=A.writeFile;A.writeFile=z;function z(h,B,x,F){if(typeof x==="function")F=x,x=null;return g(h,B,x,F);function g(b,U,d,l,t){return Y(b,U,d,function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))qM6([g,[b,U,d,l],s,t||Date.now(),Date.now()]);else if(typeof l==="function")l.apply(this,arguments)})}}var w=A.appendFile;if(w)A.appendFile=_;function _(h,B,x,F){if(typeof x==="function")F=x,x=null;return g(h,B,x,F);function g(b,U,d,l,t){return w(b,U,d,function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))qM6([g,[b,U,d,l],s,t||Date.now(),Date.now()]);else if(typeof l==="function")l.apply(this,arguments)})}}var $=A.copyFile;if($)A.copyFile=O;function O(h,B,x,F){if(typeof x==="function")F=x,x=0;return g(h,B,x,F);function g(b,U,d,l,t){return $(b,U,d,function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))qM6([g,[b,U,d,l],s,t||Date.now(),Date.now()]);else if(typeof l==="function")l.apply(this,arguments)})}}var H=A.readdir;A.readdir=J;var j=/^v[0-5]\./;function J(h,B,x){if(typeof B==="function")x=B,B=null;var F=j.test(process.version)?function(U,d,l,t){return H(U,g(U,d,l,t))}:function(U,d,l,t){return H(U,d,g(U,d,l,t))};return F(h,B,x);function g(b,U,d,l){return function(t,s){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))qM6([F,[b,U,d],t,l||Date.now(),Date.now()]);else{if(s&&s.sort)s.sort();if(typeof d==="function")d.call(this,t,s)}}}}if(process.version.substr(0,4)==="v0.8"){var M=imK(A);Z=M.ReadStream,f=M.WriteStream}var D=A.ReadStream;if(D)Z.prototype=Object.create(D.prototype),Z.prototype.open=G;var X=A.WriteStream;if(X)f.prototype=Object.create(X.prototype),f.prototype.open=V;Object.defineProperty(A,"ReadStream",{get:function(){return Z},set:function(h){Z=h},enumerable:!0,configurable:!0}),Object.defineProperty(A,"WriteStream",{get:function(){return f},set:function(h){f=h},enumerable:!0,configurable:!0});var P=Z;Object.defineProperty(A,"FileReadStream",{get:function(){return P},set:function(h){P=h},enumerable:!0,configurable:!0});var W=f;Object.defineProperty(A,"FileWriteStream",{get:function(){return W},set:function(h){W=h},enumerable:!0,configurable:!0});function Z(h,B){if(this instanceof Z)return D.apply(this,arguments),this;else return Z.apply(Object.create(Z.prototype),arguments)}function G(){var h=this;R(h.path,h.flags,h.mode,function(B,x){if(B){if(h.autoClose)h.destroy();h.emit("error",B)}else h.fd=x,h.emit("open",x),h.read()})}function f(h,B){if(this instanceof f)return X.apply(this,arguments),this;else return f.apply(Object.create(f.prototype),arguments)}function V(){var h=this;R(h.path,h.flags,h.mode,function(B,x){if(B)h.destroy(),h.emit("error",B);else h.fd=x,h.emit("open",x)})}function N(h,B){return new A.ReadStream(h,B)}function v(h,B){return new A.WriteStream(h,B)}var y=A.open;A.open=R;function R(h,B,x,F){if(typeof x==="function")F=x,x=null;return g(h,B,x,F);function g(b,U,d,l,t){return y(b,U,d,function(s,H6){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))qM6([g,[b,U,d,l],s,t||Date.now(),Date.now()]);else if(typeof l==="function")l.apply(this,arguments)})}}return A}function qM6(A){Bq6("ENQUEUE",A[0].name,A[1]),IH[N0].push(A),hs1()}var zK1;function hvA(){var A=Date.now();for(var q=0;q<IH[N0].length;++q)if(IH[N0][q].length>2)IH[N0][q][3]=A,IH[N0][q][4]=A;hs1()}function hs1(){if(clearTimeout(zK1),zK1=void 0,IH[N0].length===0)return;var A=IH[N0].shift(),q=A[0],K=A[1],Y=A[2],z=A[3],w=A[4];if(z===void 0)Bq6("RETRY",q.name,K),q.apply(null,K);else if(Date.now()-z>=60000){Bq6("TIMEOUT",q.name,K);var _=K.pop();if(typeof _==="function")_.call(null,Y)}else{var $=Date.now()-w,O=Math.max(w-z,1),H=Math.min(O*1.2,100);if($>=H)Bq6("RETRY",q.name,K),q.apply(null,K.concat([z]));else IH[N0].push(A)}if(zK1===void 0)zK1=setTimeout(hs1,0)}});var xvA=C((yfw,bvA)=>{function ly(A,q){if(typeof q==="boolean")q={forever:q};if(this._originalTimeouts=JSON.parse(JSON.stringify(A)),this._timeouts=A,this._options=q||{},this._maxRetryTime=q&&q.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}bvA.exports=ly;ly.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};ly.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};ly.prototype.retry=function(A){if(this._timeout)clearTimeout(this._timeout);if(!A)return!1;var q=new Date().getTime();if(A&&q-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(A);var K=this._timeouts.shift();if(K===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),K=this._timeouts.shift();else return!1;var Y=this,z=setTimeout(function(){if(Y._attempts++,Y._operationTimeoutCb){if(Y._timeout=setTimeout(function(){Y._operationTimeoutCb(Y._attempts)},Y._operationTimeout),Y._options.unref)Y._timeout.unref()}Y._fn(Y._attempts)},K);if(this._options.unref)z.unref();return!0};ly.prototype.attempt=function(A,q){if(this._fn=A,q){if(q.timeout)this._operationTimeout=q.timeout;if(q.cb)this._operationTimeoutCb=q.cb}var K=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){K._operationTimeoutCb()},K._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};ly.prototype.try=function(A){console.log("Using RetryOperation.try() is deprecated"),this.attempt(A)};ly.prototype.start=function(A){console.log("Using RetryOperation.start() is deprecated"),this.attempt(A)};ly.prototype.start=ly.prototype.try;ly.prototype.errors=function(){return this._errors};ly.prototype.attempts=function(){return this._attempts};ly.prototype.mainError=function(){if(this._errors.length===0)return null;var A={},q=null,K=0;for(var Y=0;Y<this._errors.length;Y++){var z=this._errors[Y],w=z.message,_=(A[w]||0)+1;if(A[w]=_,_>=K)q=z,K=_}return q}});var BvA=C((amK)=>{var omK=xvA();amK.operation=function(A){var q=amK.timeouts(A);return new omK(q,{forever:A&&A.forever,unref:A&&A.unref,maxRetryTime:A&&A.maxRetryTime})};amK.timeouts=function(A){if(A instanceof Array)return[].concat(A);var q={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var K in A)q[K]=A[K];if(q.minTimeout>q.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var Y=[];for(var z=0;z<q.retries;z++)Y.push(this.createTimeout(z,q));if(A&&A.forever&&!Y.length)Y.push(this.createTimeout(z,q));return Y.sort(function(w,_){return w-_}),Y};amK.createTimeout=function(A,q){var K=q.randomize?Math.random()+1:1,Y=Math.round(K*q.minTimeout*Math.pow(q.factor,A));return Y=Math.min(Y,q.maxTimeout),Y};amK.wrap=function(A,q,K){if(q instanceof Array)K=q,q=null;if(!K){K=[];for(var Y in A)if(typeof A[Y]==="function")K.push(Y)}for(var z=0;z<K.length;z++){var w=K[z],_=A[w];A[w]=function(O){var H=amK.operation(q),j=Array.prototype.slice.call(arguments,1),J=j.pop();j.push(function(M){if(H.retry(M))return;if(M)arguments[0]=H.mainError();J.apply(this,arguments)}),H.attempt(function(){O.apply(A,j)})}.bind(A,_),A[w].options=q}}});var mvA=C((Sfw,_K1)=>{_K1.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")_K1.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")_K1.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var gvA=C((Cfw,YM6)=>{var uO=global.process,mq6=function(A){return A&&typeof A==="object"&&typeof A.removeListener==="function"&&typeof A.emit==="function"&&typeof A.reallyExit==="function"&&typeof A.listeners==="function"&&typeof A.kill==="function"&&typeof A.pid==="number"&&typeof A.on==="function"};if(!mq6(uO))YM6.exports=function(){return function(){}};else{if(bs1=g6("assert"),gq6=mvA(),xs1=/^win/i.test(uO.platform),KM6=g6("events"),typeof KM6!=="function")KM6=KM6.EventEmitter;if(uO.__signal_exit_emitter__)xD=uO.__signal_exit_emitter__;else xD=uO.__signal_exit_emitter__=new KM6,xD.count=0,xD.emitted={};if(!xD.infinite)xD.setMaxListeners(1/0),xD.infinite=!0;YM6.exports=function(A,q){if(!mq6(global.process))return function(){};if(bs1.equal(typeof A,"function","a callback must be provided for exit handler"),Fq6===!1)$K1();var K="exit";if(q&&q.alwaysLast)K="afterexit";var Y=function(){if(xD.removeListener(K,A),xD.listeners("exit").length===0&&xD.listeners("afterexit").length===0)Ch6()};return xD.on(K,A),Y},Ch6=function(){if(!Fq6||!mq6(global.process))return;Fq6=!1,gq6.forEach(function(q){try{uO.removeListener(q,hh6[q])}catch(K){}}),uO.emit=Ih6,uO.reallyExit=OK1,xD.count-=1},YM6.exports.unload=Ch6,ca=function(q,K,Y){if(xD.emitted[q])return;xD.emitted[q]=!0,xD.emit(q,K,Y)},hh6={},gq6.forEach(function(A){hh6[A]=function(){if(!mq6(global.process))return;var K=uO.listeners(A);if(K.length===xD.count){if(Ch6(),ca("exit",null,A),ca("afterexit",null,A),xs1&&A==="SIGHUP")A="SIGINT";uO.kill(uO.pid,A)}}}),YM6.exports.signals=function(){return gq6},Fq6=!1,$K1=function(){if(Fq6||!mq6(global.process))return;Fq6=!0,xD.count+=1,gq6=gq6.filter(function(q){try{return uO.on(q,hh6[q]),!0}catch(K){return!1}}),uO.emit=Bs1,uO.reallyExit=us1},YM6.exports.load=$K1,OK1=uO.reallyExit,us1=function(q){if(!mq6(global.process))return;uO.exitCode=q||0,ca("exit",uO.exitCode,null),ca("afterexit",uO.exitCode,null),OK1.call(uO,uO.exitCode)},Ih6=uO.emit,Bs1=function(q,K){if(q==="exit"&&mq6(global.process)){if(K!==void 0)uO.exitCode=K;var Y=Ih6.apply(this,arguments);return ca("exit",uO.exitCode,null),ca("afterexit",uO.exitCode,null),Y}else return Ih6.apply(this,arguments)}}var bs1,gq6,xs1,KM6,xD,Ch6,ca,hh6,Fq6,$K1,OK1,us1,Ih6,Bs1});var QvA=C((KgK,ms1)=>{var FvA=Symbol();function AgK(A,q,K){let Y=q[FvA];if(Y)return q.stat(A,(w,_)=>{if(w)return K(w);K(null,_.mtime,Y)});let z=new Date(Math.ceil(Date.now()/1000)*1000+5);q.utimes(A,z,z,(w)=>{if(w)return K(w);q.stat(A,(_,$)=>{if(_)return K(_);let O=$.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(q,FvA,{value:O}),K(null,$.mtime,O)})})}function qgK(A){let q=Date.now();if(A==="s")q=Math.ceil(q/1000)*1000;return new Date(q)}KgK.probe=AgK;KgK.getMtime=qgK});var lvA=C((JgK,xh6)=>{var wgK=g6("path"),Qs1=gw(),_gK=BvA(),$gK=gvA(),UvA=QvA(),Dd={};function bh6(A,q){return q.lockfilePath||`${A}.lock`}function Us1(A,q,K){if(!q.realpath)return K(null,wgK.resolve(A));q.fs.realpath(A,K)}function Fs1(A,q,K){let Y=bh6(A,q);q.fs.mkdir(Y,(z)=>{if(!z)return UvA.probe(Y,q.fs,(w,_,$)=>{if(w)return q.fs.rmdir(Y,()=>{}),K(w);K(null,_,$)});if(z.code!=="EEXIST")return K(z);if(q.stale<=0)return K(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:A}));q.fs.stat(Y,(w,_)=>{if(w){if(w.code==="ENOENT")return Fs1(A,{...q,stale:0},K);return K(w)}if(!pvA(_,q))return K(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:A}));dvA(A,q,($)=>{if($)return K($);Fs1(A,{...q,stale:0},K)})})})}function pvA(A,q){return A.mtime.getTime()<Date.now()-q.stale}function dvA(A,q,K){q.fs.rmdir(bh6(A,q),(Y)=>{if(Y&&Y.code!=="ENOENT")return K(Y);K()})}function HK1(A,q){let K=Dd[A];if(K.updateTimeout)return;if(K.updateDelay=K.updateDelay||q.update,K.updateTimeout=setTimeout(()=>{K.updateTimeout=null,q.fs.stat(K.lockfilePath,(Y,z)=>{let w=K.lastUpdate+q.stale<Date.now();if(Y){if(Y.code==="ENOENT"||w)return gs1(A,K,Object.assign(Y,{code:"ECOMPROMISED"}));return K.updateDelay=1000,HK1(A,q)}if(K.mtime.getTime()!==z.mtime.getTime())return gs1(A,K,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let $=UvA.getMtime(K.mtimePrecision);q.fs.utimes(K.lockfilePath,$,$,(O)=>{let H=K.lastUpdate+q.stale<Date.now();if(K.released)return;if(O){if(O.code==="ENOENT"||H)return gs1(A,K,Object.assign(O,{code:"ECOMPROMISED"}));return K.updateDelay=1000,HK1(A,q)}K.mtime=$,K.lastUpdate=Date.now(),K.updateDelay=null,HK1(A,q)})})},K.updateDelay),K.updateTimeout.unref)K.updateTimeout.unref()}function gs1(A,q,K){if(q.released=!0,q.updateTimeout)clearTimeout(q.updateTimeout);if(Dd[A]===q)delete Dd[A];q.options.onCompromised(K)}function OgK(A,q,K){q={stale:1e4,update:null,realpath:!0,retries:0,fs:Qs1,onCompromised:(Y)=>{throw Y},...q},q.retries=q.retries||0,q.retries=typeof q.retries==="number"?{retries:q.retries}:q.retries,q.stale=Math.max(q.stale||0,2000),q.update=q.update==null?q.stale/2:q.update||0,q.update=Math.max(Math.min(q.update,q.stale/2),1000),Us1(A,q,(Y,z)=>{if(Y)return K(Y);let w=_gK.operation(q.retries);w.attempt(()=>{Fs1(z,q,(_,$,O)=>{if(w.retry(_))return;if(_)return K(w.mainError());let H=Dd[z]={lockfilePath:bh6(z,q),mtime:$,mtimePrecision:O,options:q,lastUpdate:Date.now()};HK1(z,q),K(null,(j)=>{if(H.released)return j&&j(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));cvA(z,{...q,realpath:!1},j)})})})})}function cvA(A,q,K){q={fs:Qs1,realpath:!0,...q},Us1(A,q,(Y,z)=>{if(Y)return K(Y);let w=Dd[z];if(!w)return K(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));w.updateTimeout&&clearTimeout(w.updateTimeout),w.released=!0,delete Dd[z],dvA(z,q,K)})}function HgK(A,q,K){q={stale:1e4,realpath:!0,fs:Qs1,...q},q.stale=Math.max(q.stale||0,2000),Us1(A,q,(Y,z)=>{if(Y)return K(Y);q.fs.stat(bh6(z,q),(w,_)=>{if(w)return w.code==="ENOENT"?K(null,!1):K(w);return K(null,!pvA(_,q))})})}function jgK(){return Dd}$gK(()=>{for(let A in Dd){let q=Dd[A].options;try{q.fs.rmdirSync(bh6(A,q))}catch(K){}}});JgK.lock=OgK;JgK.unlock=cvA;JgK.check=HgK;JgK.getLocks=jgK});var nvA=C((hfw,ivA)=>{var WgK=gw();function ZgK(A){let q=["mkdir","realpath","stat","rmdir","utimes"],K={...A};return q.forEach((Y)=>{K[Y]=(...z)=>{let w=z.pop(),_;try{_=A[`${Y}Sync`](...z)}catch($){return w($)}w(null,_)}}),K}function GgK(A){return(...q)=>new Promise((K,Y)=>{q.push((z,w)=>{if(z)Y(z);else K(w)}),A(...q)})}function fgK(A){return(...q)=>{let K,Y;if(q.push((z,w)=>{K=z,Y=w}),A(...q),K)throw K;return Y}}function TgK(A){if(A={...A},A.fs=ZgK(A.fs||WgK),typeof A.retries==="number"&&A.retries>0||A.retries&&typeof A.retries.retries==="number"&&A.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return A}ivA.exports={toPromise:GgK,toSync:fgK,toSyncOptions:TgK}});var zm=C((Ifw,la)=>{var zM6=lvA(),{toPromise:jK1,toSync:JK1,toSyncOptions:ps1}=nvA();async function rvA(A,q){let K=await jK1(zM6.lock)(A,q);return jK1(K)}function VgK(A,q){let K=JK1(zM6.lock)(A,ps1(q));return JK1(K)}function NgK(A,q){return jK1(zM6.unlock)(A,q)}function vgK(A,q){return JK1(zM6.unlock)(A,ps1(q))}function kgK(A,q){return jK1(zM6.check)(A,q)}function EgK(A,q){return JK1(zM6.check)(A,ps1(q))}la.exports=rvA;la.exports.lock=rvA;la.exports.unlock=NgK;la.exports.lockSync=VgK;la.exports.unlockSync=vgK;la.exports.check=kgK;la.exports.checkSync=EgK});function FV(A,q,K=10*avA*ovA){let H=[];try{let Y;if(q===void 0)Y={};else if(q instanceof AbortSignal)Y={abortSignal:q,timeout:K};else Y=q;let{abortSignal:z,timeout:w=10*avA*ovA,input:_,stdio:$=["ignore","pipe","pipe"]}=Y;z?.throwIfAborted();const O=oY(H,$2`exec: ${A.slice(0,200)}`,0);try{let D=vq6(A,{env:process.env,maxBuffer:1e6,timeout:w,cwd:I1(),stdio:$,shell:!0,reject:!1,input:_});if(!D.stdout)return null;return D.stdout.trim()||null}catch{return null}}catch(j){var J=j,M=1}finally{aY(H,J,M)}}var ovA=1000,avA=60;var ds1=k(()=>{Ef();W7();a1()});function W8(A,q,K={timeout:10*ls1*cs1,preserveOutputOnError:!0,useCwd:!0}){return z7(A,q,{abortSignal:K.abortSignal,timeout:K.timeout,preserveOutputOnError:K.preserveOutputOnError,cwd:K.useCwd?I1():void 0,env:K.env,stdin:K.stdin})}function LgK(A,q){if(A.shortMessage)return A.shortMessage;if(typeof A.signal==="string")return A.signal;return String(q)}function z7(A,q,{abortSignal:K,timeout:Y=10*ls1*cs1,preserveOutputOnError:z=!0,cwd:w,env:_,maxBuffer:$,shell:O,stdin:H}={timeout:10*ls1*cs1,preserveOutputOnError:!0,maxBuffer:1e6}){return new Promise((j)=>{GY(A,q,{maxBuffer:$,signal:K,timeout:Y,cwd:w,env:_,shell:O,stdin:H,reject:!1}).then((J)=>{if(J.failed)if(z){let M=J.exitCode??1;j({stdout:J.stdout||"",stderr:J.stderr||"",code:M,error:LgK(J,M)})}else j({stdout:"",stderr:"",code:J.exitCode??1});else j({stdout:J.stdout,stderr:J.stderr,code:0})}).catch((J)=>{$6(J),j({stdout:"",stderr:"",code:1})})})}var cs1=1000,ls1=60;var aq=k(()=>{Ef();W7();x1();ds1()});import{fileURLToPath as ygK}from"node:url";import*as ia from"node:path";import{homedir as RgK}from"node:os";import{execFile as SgK,spawn as CgK}from"child_process";function wM6(){let A=DK1();return{rgPath:A.command,rgArgs:A.args,argv0:A.argv0}}function bgK(A){return A.includes("os error 11")||A.includes("Resource temporarily unavailable")}function svA(A,q,K,Y,z=!1){let{rgPath:w,rgArgs:_,argv0:$}=wM6(),O=z?["-j","1"]:[],H=[..._,...O,...A,q],j=c8()==="wsl"?60000:20000,J=parseInt(process.env.CLAUDE_CODE_GLOB_TIMEOUT_SECONDS||"",10)||0,M=J>0?J*1000:j;if($){let D=CgK(w,H,{argv0:$,signal:K,windowsHide:!0}),X="",P="",W=!1,Z=!1;D.stdout?.on("data",(V)=>{if(!W){if(X+=V.toString(),X.length>uh6)X=X.slice(0,uh6),W=!0}}),D.stderr?.on("data",(V)=>{if(!Z){if(P+=V.toString(),P.length>uh6)P=P.slice(0,uh6),Z=!0}});let G,f=setTimeout(()=>{if(process.platform==="win32")D.kill();else D.kill("SIGTERM"),G=setTimeout(()=>{D.kill("SIGKILL")},5000)},M);return D.on("close",(V,N)=>{if(clearTimeout(f),clearTimeout(G),V===0||V===1)Y(null,X,P);else{let v=Error(`ripgrep exited with code ${V}`);v.code=V??void 0,v.signal=N??void 0,Y(v,X,P)}}),D.on("error",(V)=>{clearTimeout(f),clearTimeout(G),Y(V,X,P)}),D}return SgK(w,H,{maxBuffer:uh6,signal:K,timeout:M,killSignal:process.platform==="win32"?void 0:"SIGKILL"},Y)}async function iy(A,q,K){return await ugK(),xgK().catch((Y)=>{$6(Y)}),new Promise((Y,z)=>{let w=(_,$,O,H)=>{if(!_){Y($.trim().split(`
`).map((P)=>P.replace(/\r$/,"")).filter(Boolean));return}if(_.code===1){Y([]);return}if(["ENOENT","EACCES","EPERM"].includes(_.code)){z(_);return}if(!H&&bgK(O)){L("rg EAGAIN error detected, retrying with single-threaded mode (-j 1)"),c("tengu_ripgrep_eagain_retry",{}),svA(A,q,K,(P,W,Z)=>{w(P,W,Z,!0)},!0);return}let J=$&&$.trim().length>0,M=_.signal==="SIGTERM"||_.signal==="SIGKILL"||_.code==="ABORT_ERR",D=_.code==="ERR_CHILD_PROCESS_STDIO_MAXBUFFER",X=[];if(J){if(X=$.trim().split(`
`).map((P)=>P.replace(/\r$/,"")).filter(Boolean),X.length>0&&(M||D))X=X.slice(0,-1)}if(L(`rg error (signal=${_.signal}, code=${_.code}, stderr: ${O}), ${X.length} results`),_.code!==2)$6(_);if(M&&X.length===0){z(new AkA(`Ripgrep search timed out after ${c8()==="wsl"?60:20} seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.`,X));return}Y(X)};svA(A,q,K,(_,$,O)=>{w(_,$,O,!1)})})}async function qkA(A,q,K){try{return(await iy(["-l","."],A,q)).slice(0,K)}catch{return[]}}function KkA(){let A=DK1();return{mode:A.mode,path:A.command,working:MK1?.working??null}}async function ugK(){if(process.platform!=="darwin"||tvA)return;tvA=!0;let A=DK1();if(A.mode!=="builtin")return;let q=A.command;if(!(await W8("codesign",["-vv","-d",q],{preserveOutputOnError:!1})).stdout.split(`
`).find((z)=>z.includes("linker-signed")))return;try{let z=await W8("codesign",["--sign","-","--force","--preserve-metadata=entitlements,requirements,flags,runtime",q]);if(z.code!==0)$6(Error(`Failed to sign ripgrep: ${z.stdout} ${z.stderr}`));let w=await W8("xattr",["-d","com.apple.quarantine",q]);if(w.code!==0)$6(Error(`Failed to remove quarantine: ${w.stdout} ${w.stderr}`))}catch(z){$6(z)}}var evA,hgK,IgK,DK1,uh6=20000000,AkA,XK1,MK1=null,xgK,tvA=!1;var EI=k(()=>{Eq();x1();aq();G1();Z8();B1();uK();evA=e(Wo1(),1),hgK=ygK(import.meta.url),IgK=ia.join(hgK,"../"),DK1=T8(()=>{if(dz(process.env.USE_BUILTIN_RIPGREP)){let{cmd:Y}=evA.findActualExecutable("rg",[]);if(Y!=="rg")return{mode:"system",command:"rg",args:[]}}if(ZY())return{mode:"embedded",command:process.execPath,args:["--no-config"],argv0:"rg"};let q=ia.resolve(IgK,"vendor","ripgrep");return{mode:"builtin",command:process.platform==="win32"?ia.resolve(q,`${process.arch}-win32`,"rg.exe"):ia.resolve(q,`${process.arch}-${process.platform}`,"rg"),args:[]}});AkA=class AkA extends Error{partialResults;constructor(A,q){super(A);this.partialResults=q;this.name="RipgrepTimeoutError"}};XK1=T8(async(A,q,K=[])=>{if(ia.resolve(A)===ia.resolve(RgK()))return;try{let Y=["--files","--hidden"];K.forEach((O)=>{Y.push("--glob",`!${O}`)});let w=(await iy(Y,A,q)).length;if(w===0)return 0;let _=Math.floor(Math.log10(w)),$=Math.pow(10,_);return Math.round(w/$)*$}catch(Y){$6(Y)}},(A,q,K=[])=>`${A}|${K.join(",")}`);xgK=T8(async()=>{if(MK1!==null)return;let A=DK1();try{let q;if(A.argv0){let Y=Bun.spawn([A.command,"--version"],{argv0:A.argv0,stderr:"ignore",stdout:"pipe"}),[z,w]=await Promise.all([Y.stdout.text(),Y.exited]);q={code:w,stdout:z}}else q=await W8(A.command,[...A.args,"--version"],{timeout:5000});let K=q.code===0&&!!q.stdout&&q.stdout.startsWith("ripgrep ");MK1={working:K,lastTested:Date.now(),config:A},L(`Ripgrep first use test: ${K?"PASSED":"FAILED"} (mode=${A.mode}, path=${A.command})`),c("tengu_ripgrep_availability",{working:K?1:0,using_system:A.mode==="system"?1:0})}catch(q){MK1={working:!1,lastTested:Date.now(),config:A},$6(q)}})});import{join as BgK}from"path";function ggK(){if(DR6())return YkA;if($1(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return YkA;return mgK}function Rj(){if(process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR)return process.env.CLAUDE_CODE_PLUGIN_CACHE_DIR;return BgK(OA(),ggK())}function wm(){return process.env.CLAUDE_CODE_PLUGIN_SEED_DIR||void 0}var mgK="plugins",YkA="cowork_plugins";var na=k(()=>{Z8();Q1()});import{dirname as FgK,isAbsolute as QgK,join as UgK,normalize as wkA,relative as pgK,sep as PK1}from"path";async function Uq6(A){let q=wkA(UgK(Rj(),"cache"));if(A&&!cgK(A,q))return[];if(Qq6!==null)return Qq6;try{return Qq6=(await iy(["--files","--hidden","--no-ignore","--max-depth","4","--glob",dgK],q,new AbortController().signal)).map((Y)=>{let z=FgK(Y);return`!**/${(QgK(z)?pgK(q,z):z).replace(/\\/g,"/")}/**`}),Qq6}catch{return Qq6=[],Qq6}}function _kA(){Qq6=null}function cgK(A,q){let K=zkA(A),Y=zkA(q);return K===Y||K===PK1||Y===PK1||K.startsWith(Y+PK1)||Y.startsWith(K+PK1)}function zkA(A){let q=wkA(A);return process.platform==="win32"?q.toLowerCase():q}var dgK=".orphaned_at",Qq6=null;var Bh6=k(()=>{EI();na()});class $kA{cache=new Map;maxCacheSize=1000;readFile(A){let q=P1(),K;try{K=q.statSync(A)}catch($){throw this.cache.delete(A),$}let Y=A,z=this.cache.get(Y);if(z&&z.mtime===K.mtimeMs)return{content:z.content,encoding:z.encoding};let w=v0(A),_=q.readFileSync(A,{encoding:w}).replaceAll(`\r
`,`
`);if(this.cache.set(Y,{content:_,encoding:w,mtime:K.mtimeMs}),this.cache.size>this.maxCacheSize){let $=this.cache.keys().next().value;if($)this.cache.delete($)}return{content:_,encoding:w}}clear(){this.cache.clear()}invalidate(A){this.cache.delete(A)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}}var OkA;var HkA=k(()=>{Y7();p7();OkA=new $kA});function lgK(A,q){return OH6(A,q)}var QV;var _M6=k(()=>{U11();QV=lgK});var WK1=k(()=>{_M6();Eq()});var VkA=C((TkA)=>{Object.defineProperty(TkA,"__esModule",{value:!0});var DkA=/^[a-zA-Z:_][a-zA-Z0-9:_.-]*$/,rs1={revert:function(){}},TK1=new Map,ns1=new Set;function VK1(A){var q=TK1.get(A);return q||TK1.set(A,q={element:A,attributes:{}}),q}function NK1(A,q,K,Y,z){var w=K(A),_={isDirty:!1,originalValue:w,virtualValue:w,mutations:[],el:A,_positionTimeout:null,observer:new MutationObserver(function(){if(q!=="position"||!_._positionTimeout){q==="position"&&(_._positionTimeout=setTimeout(function(){_._positionTimeout=null},1000));var $=K(A);q==="position"&&$.parentNode===_.virtualValue.parentNode&&$.insertBeforeNode===_.virtualValue.insertBeforeNode||$!==_.virtualValue&&(_.originalValue=$,z(_))}}),mutationRunner:z,setValue:Y,getCurrentValue:K};return q==="position"&&A.parentNode?_.observer.observe(A.parentNode,{childList:!0,subtree:!0,attributes:!1,characterData:!1}):_.observer.observe(A,function($){return $==="html"?{childList:!0,subtree:!0,attributes:!0,characterData:!0}:{childList:!1,subtree:!1,attributes:!0,attributeFilter:[$]}}(q)),_}function vK1(A,q){var K=q.getCurrentValue(q.el);q.virtualValue=A,A&&typeof A!="string"?K&&A.parentNode===K.parentNode&&A.insertBeforeNode===K.insertBeforeNode||(q.isDirty=!0,jkA()):A!==K&&(q.isDirty=!0,jkA())}function igK(A){var q=A.originalValue;A.mutations.forEach(function(K){return q=K.mutate(q)}),vK1(function(K){return ZK1||(ZK1=document.createElement("div")),ZK1.innerHTML=K,ZK1.innerHTML}(q),A)}function ngK(A){var q=new Set(A.originalValue.split(/\s+/).filter(Boolean));A.mutations.forEach(function(K){return K.mutate(q)}),vK1(Array.from(q).filter(Boolean).join(" "),A)}function rgK(A){var q=A.originalValue;A.mutations.forEach(function(K){return q=K.mutate(q)}),vK1(q,A)}function ogK(A){var q=A.originalValue;A.mutations.forEach(function(K){var Y=function(z){var w=z.insertBeforeSelector,_=document.querySelector(z.parentSelector);if(!_)return null;var $=w?document.querySelector(w):null;return w&&!$?null:{parentNode:_,insertBeforeNode:$}}(K.mutate());q=Y||q}),vK1(q,A)}var agK=function(A){return A.innerHTML},sgK=function(A,q){return A.innerHTML=q};function XkA(A){var q=VK1(A);return q.html||(q.html=NK1(A,"html",agK,sgK,igK)),q.html}var tgK=function(A){return{parentNode:A.parentElement,insertBeforeNode:A.nextElementSibling}},egK=function(A,q){q.insertBeforeNode&&!q.parentNode.contains(q.insertBeforeNode)||q.parentNode.insertBefore(A,q.insertBeforeNode)};function PkA(A){var q=VK1(A);return q.position||(q.position=NK1(A,"position",tgK,egK,ogK)),q.position}var ZK1,gh6,AFK=function(A,q){return q?A.className=q:A.removeAttribute("class")},qFK=function(A){return A.className};function WkA(A){var q=VK1(A);return q.classes||(q.classes=NK1(A,"class",qFK,AFK,ngK)),q.classes}function ZkA(A,q){var K,Y=VK1(A);return Y.attributes[q]||(Y.attributes[q]=NK1(A,q,(K=q,function(z){var w;return(w=z.getAttribute(K))!=null?w:null}),function(z){return function(w,_){return _!==null?w.setAttribute(z,_):w.removeAttribute(z)}}(q),rgK)),Y.attributes[q]}function GK1(A,q,K){if(K.isDirty){K.isDirty=!1;var Y=K.virtualValue;K.mutations.length||function(z,w){var _,$,O=TK1.get(z);if(O)if(w==="html")(_=O.html)==null||($=_.observer)==null||$.disconnect(),delete O.html;else if(w==="class"){var H,j;(H=O.classes)==null||(j=H.observer)==null||j.disconnect(),delete O.classes}else if(w==="position"){var J,M;(J=O.position)==null||(M=J.observer)==null||M.disconnect(),delete O.position}else{var D,X,P;(D=O.attributes)==null||(X=D[w])==null||(P=X.observer)==null||P.disconnect(),delete O.attributes[w]}}(A,q),K.setValue(A,Y)}}function KFK(A,q){A.html&&GK1(q,"html",A.html),A.classes&&GK1(q,"class",A.classes),A.position&&GK1(q,"position",A.position),Object.keys(A.attributes).forEach(function(K){GK1(q,K,A.attributes[K])})}function jkA(){TK1.forEach(KFK)}function GkA(A){if(A.kind!=="position"||A.elements.size!==1){var q=new Set(A.elements);document.querySelectorAll(A.selector).forEach(function(K){q.has(K)||(A.elements.add(K),function(Y,z){var w=null;Y.kind==="html"?w=XkA(z):Y.kind==="class"?w=WkA(z):Y.kind==="attribute"?w=ZkA(z,Y.attribute):Y.kind==="position"&&(w=PkA(z)),w&&(w.mutations.push(Y),w.mutationRunner(w))}(A,K))})}}function JkA(){ns1.forEach(GkA)}function fkA(){typeof document<"u"&&(gh6||(gh6=new MutationObserver(function(){JkA()})),JkA(),gh6.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))}function kK1(A){return typeof document>"u"?rs1:(ns1.add(A),GkA(A),{revert:function(){var q;(q=A).elements.forEach(function(K){return function(Y,z){var w=null;if(Y.kind==="html"?w=XkA(z):Y.kind==="class"?w=WkA(z):Y.kind==="attribute"?w=ZkA(z,Y.attribute):Y.kind==="position"&&(w=PkA(z)),w){var _=w.mutations.indexOf(Y);_!==-1&&w.mutations.splice(_,1),w.mutationRunner(w)}}(q,K)}),q.elements.clear(),ns1.delete(q)}})}function is1(A,q){return kK1({kind:"html",elements:new Set,mutate:q,selector:A})}function MkA(A,q){return kK1({kind:"position",elements:new Set,mutate:q,selector:A})}function mh6(A,q){return kK1({kind:"class",elements:new Set,mutate:q,selector:A})}function fK1(A,q,K){return DkA.test(q)?q==="class"||q==="className"?mh6(A,function(Y){var z=K(Array.from(Y).join(" "));Y.clear(),z&&z.split(/\s+/g).filter(Boolean).forEach(function(w){return Y.add(w)})}):kK1({kind:"attribute",attribute:q,elements:new Set,mutate:K,selector:A}):rs1}fkA();var YFK={html:is1,classes:mh6,attribute:fK1,position:MkA,declarative:function(A){var{selector:q,action:K,value:Y,attribute:z,parentSelector:w,insertBeforeSelector:_}=A;if(z==="html"){if(K==="append")return is1(q,function($){return $+(Y!=null?Y:"")});if(K==="set")return is1(q,function(){return Y!=null?Y:""})}else if(z==="class"){if(K==="append")return mh6(q,function($){Y&&$.add(Y)});if(K==="remove")return mh6(q,function($){Y&&$.delete(Y)});if(K==="set")return mh6(q,function($){$.clear(),Y&&$.add(Y)})}else if(z==="position"){if(K==="set"&&w)return MkA(q,function(){return{insertBeforeSelector:_,parentSelector:w}})}else{if(K==="append")return fK1(q,z,function($){return $!==null?$+(Y!=null?Y:""):Y!=null?Y:""});if(K==="set")return fK1(q,z,function(){return Y!=null?Y:""});if(K==="remove")return fK1(q,z,function(){return null})}return rs1}};TkA.connectGlobalObserver=fkA,TkA.default=YFK,TkA.disconnectGlobalObserver=function(){gh6&&gh6.disconnect()},TkA.validAttributeName=DkA});function kkA(){return vkA}function os1(A){let q=2166136261,K=A.length;for(let Y=0;Y<K;Y++)q^=A.charCodeAt(Y),q+=(q<<1)+(q<<4)+(q<<7)+(q<<8)+(q<<24);return q>>>0}function Fh6(A,q,K){if(K===2)return os1(os1(A+q)+"")%1e4/1e4;if(K===1)return os1(q+A)%1000/1000;return null}function zFK(A){if(A<=0)return[];return Array(A).fill(1/A)}function EK1(A,q){return A>=q[0]&&A<q[1]}function EkA(A,q){let K=Fh6("__"+q[0],A,1);if(K===null)return!1;return K>=q[1]&&K<q[2]}function LkA(A,q){for(let K=0;K<q.length;K++)if(EK1(A,q[K]))return K;return-1}function ss1(A){try{let q=A.replace(/([^\\])\//g,"$1\\/");return new RegExp(q)}catch(q){console.error(q);return}}function LK1(A,q){if(!q.length)return!1;let K=!1,Y=!1;for(let z=0;z<q.length;z++){let w=$FK(A,q[z].type,q[z].pattern);if(q[z].include===!1){if(w)return!1}else if(K=!0,w)Y=!0}return Y||!K}function wFK(A,q,K){try{let Y=q.replace(/[*.+?^${}()|[\]\\]/g,"\\$&").replace(/_____/g,".*");if(K)Y="\\/?"+Y.replace(/(^\/|\/$)/g,"")+"\\/?";return new RegExp("^"+Y+"$","i").test(A)}catch(Y){return!1}}function _FK(A,q){try{let K=new URL(q.replace(/^([^:/?]*)\./i,"https://$1.").replace(/\*/g,"_____"),"https://_____"),Y=[[A.host,K.host,!1],[A.pathname,K.pathname,!0]];if(K.hash)Y.push([A.hash,K.hash,!1]);return K.searchParams.forEach((z,w)=>{Y.push([A.searchParams.get(w)||"",z,!1])}),!Y.some((z)=>!wFK(z[0],z[1],z[2]))}catch(K){return!1}}function $FK(A,q,K){try{let Y=new URL(A,"https://_");if(q==="regex"){let z=ss1(K);if(!z)return!1;return z.test(Y.href)||z.test(Y.href.substring(Y.origin.length))}else if(q==="simple")return _FK(Y,K);return!1}catch(Y){return!1}}function ykA(A,q,K){if(q=q===void 0?1:q,q<0)q=0;else if(q>1)q=1;let Y=zFK(A);if(K=K||Y,K.length!==A)K=Y;let z=K.reduce((_,$)=>$+_,0);if(z<0.99||z>1.01)K=Y;let w=0;return K.map((_)=>{let $=w;return w+=_,[$,$+q*_]})}function RkA(A,q,K){if(!q)return null;let Y=q.split("?")[1];if(!Y)return null;let z=Y.replace(/#.*/,"").split("&").map((w)=>w.split("=",2)).filter((w)=>{let[_]=w;return _===A}).map((w)=>{let[,_]=w;return parseInt(_)});if(z.length>0&&z[0]>=0&&z[0]<K)return z[0];return null}function SkA(A){try{return A()}catch(q){return console.error(q),!1}}async function pq6(A,q,K){if(q=q||"",K=K||globalThis.crypto&&globalThis.crypto.subtle||vkA.SubtleCrypto,!K)throw Error("No SubtleCrypto implementation found");try{let Y=await K.importKey("raw",as1(q),{name:"AES-CBC",length:128},!0,["encrypt","decrypt"]),[z,w]=A.split("."),_=await K.decrypt({name:"AES-CBC",iv:as1(z)},Y,as1(w));return new TextDecoder().decode(_)}catch(Y){throw Error("Failed to decrypt")}}function Qh6(A){if(typeof A==="string")return A;return JSON.stringify(A)}function lk(A){if(typeof A==="number")A=A+"";if(!A||typeof A!=="string")A="0";let q=A.replace(/(^v|\+.*$)/g,"").split(/[-.]/);if(q.length===3)q.push("~");return q.map((K)=>K.match(/^[0-9]+$/)?K.padStart(5," "):K).join("-")}function CkA(){let A;try{A="1.6.1"}catch(q){A=""}return A}function hkA(A,q){let K,Y;try{K=new URL(A),Y=new URL(q)}catch(z){return console.error(`Unable to merge query strings: ${z}`),q}return K.searchParams.forEach((z,w)=>{if(Y.searchParams.has(w))return;Y.searchParams.set(w,z)}),Y.toString()}function NkA(A){return typeof A==="object"&&A!==null}function yK1(A){if(A.urlPatterns&&A.variations.some((q)=>NkA(q)&&("urlRedirect"in q)))return"redirect";else if(A.variations.some((q)=>NkA(q)&&(q.domMutations||("js"in q)||("css"in q))))return"visual";return"unknown"}async function RK1(A,q){return new Promise((K)=>{let Y=!1,z,w=(_)=>{if(Y)return;Y=!0,z&&clearTimeout(z),K(_||null)};if(q)z=setTimeout(()=>w(),q);A.then((_)=>w(_)).catch(()=>w())})}var vkA,as1=(A)=>Uint8Array.from(atob(A),(q)=>q.charCodeAt(0));var Uh6=k(()=>{vkA={fetch:globalThis.fetch?globalThis.fetch.bind(globalThis):void 0,SubtleCrypto:globalThis.crypto?globalThis.crypto.subtle:void 0,EventSource:globalThis.EventSource}});function xkA(A){if(Object.assign(CZ,A),!CZ.backgroundSync)PFK()}async function ukA(A){let{instance:q,timeout:K,skipCache:Y,allowStale:z,backgroundSync:w}=A;if(!w)CZ.backgroundSync=!1;return JFK({instance:q,allowStale:z,timeout:K,skipCache:Y})}function OFK(A){let q=ph6(A),K=OM6.get(q)||new Set;K.add(A),OM6.set(q,K)}function BkA(A){OM6.forEach((q)=>q.delete(A))}function HFK(){HM6.forEach((A)=>{if(!A)return;A.state="idle",qt1(A)})}function jFK(){HM6.forEach((A)=>{if(!A)return;if(A.state!=="idle")return;Kt1(A)})}async function bkA(){try{if(!_m.localStorage)return;await _m.localStorage.setItem(CZ.cacheKey,JSON.stringify(Array.from(Xd.entries())))}catch(A){}}async function JFK(A){let{instance:q,allowStale:K,timeout:Y,skipCache:z}=A,w=ph6(q),_=es1(q),$=new Date,O=new Date($.getTime()-CZ.maxAge+CZ.staleTTL);await MFK();let H=!CZ.disableCache&&!z?Xd.get(_):void 0;if(H&&(K||H.staleAt>$)&&H.staleAt>O){if(H.sse)jM6.add(w);if(H.staleAt<$)ts1(q);else At1(q);return{data:H.data,success:!0,source:"cache"}}else return await RK1(ts1(q),Y)||{data:null,success:!1,source:"timeout",error:Error("Timeout")}}function ph6(A){let[q,K]=A.getApiInfo();return`${q}||${K}`}function es1(A){let q=ph6(A);if(!("isRemoteEval"in A)||!A.isRemoteEval())return q;let K=A.getAttributes(),Y=A.getCacheKeyAttributes()||Object.keys(A.getAttributes()),z={};Y.forEach(($)=>{z[$]=K[$]});let w=A.getForcedVariations(),_=A.getUrl();return`${q}||${JSON.stringify({ca:z,fv:w,url:_})}`}async function MFK(){if(IkA)return;IkA=!0;try{if(_m.localStorage){let A=await _m.localStorage.getItem(CZ.cacheKey);if(!CZ.disableCache&&A){let q=JSON.parse(A);if(q&&Array.isArray(q))q.forEach((K)=>{let[Y,z]=K;Xd.set(Y,{...z,staleAt:new Date(z.staleAt)})});mkA()}}}catch(A){}if(!CZ.disableIdleStreams){let A=$M6.startIdleListener();if(A)$M6.stopIdleListener=A}}function mkA(){let A=Array.from(Xd.entries()).map((K)=>{let[Y,z]=K;return{key:Y,staleAt:z.staleAt.getTime()}}).sort((K,Y)=>K.staleAt-Y.staleAt),q=Math.min(Math.max(0,Xd.size-CZ.maxEntries),Xd.size);for(let K=0;K<q;K++)Xd.delete(A[K].key)}function gkA(A,q,K){let Y=K.dateUpdated||"",z=new Date(Date.now()+CZ.staleTTL),w=!CZ.disableCache?Xd.get(q):void 0;if(w&&Y&&w.version===Y){w.staleAt=z,bkA();return}if(!CZ.disableCache)Xd.set(q,{data:K,version:Y,staleAt:z,sse:jM6.has(A)}),mkA();bkA();let _=OM6.get(A);_&&_.forEach(($)=>DFK($,K))}async function DFK(A,q){await A.setPayload(q||A.getPayload())}async function ts1(A){let{apiHost:q,apiRequestHeaders:K}=A.getApiHosts(),Y=A.getClientKey(),z="isRemoteEval"in A&&A.isRemoteEval(),w=ph6(A),_=es1(A),$=SK1.get(_);if(!$)$=(z?$M6.fetchRemoteEvalCall({host:q,clientKey:Y,payload:{attributes:A.getAttributes(),forcedVariations:A.getForcedVariations(),forcedFeatures:Array.from(A.getForcedFeatures().entries()),url:A.getUrl()},headers:K}):$M6.fetchFeaturesCall({host:q,clientKey:Y,headers:K})).then((H)=>{if(!H.ok)throw Error(`HTTP error: ${H.status}`);if(H.headers.get("x-sse-support")==="enabled")jM6.add(w);return H.json()}).then((H)=>{return gkA(w,_,H),At1(A),SK1.delete(_),{data:H,success:!0,source:"network"}}).catch((H)=>{return SK1.delete(_),{data:null,source:"error",success:!1,error:H}}),SK1.set(_,$);return $}function At1(A){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K=ph6(A),Y=es1(A),{streamingHost:z,streamingHostRequestHeaders:w}=A.getApiHosts(),_=A.getClientKey();if(q)jM6.add(K);if(CZ.backgroundSync&&jM6.has(K)&&_m.EventSource){if(HM6.has(K))return;let $={src:null,host:z,clientKey:_,headers:w,cb:(O)=>{try{if(O.type==="features-updated"){let H=OM6.get(K);H&&H.forEach((j)=>{ts1(j)})}else if(O.type==="features"){let H=JSON.parse(O.data);gkA(K,Y,H)}$.errors=0}catch(H){FkA($)}},errors:0,state:"active"};HM6.set(K,$),Kt1($)}}function FkA(A){if(A.state==="idle")return;if(A.errors++,A.errors>3||A.src&&A.src.readyState===2){let q=Math.pow(3,A.errors-3)*(1000+Math.random()*1000);qt1(A),setTimeout(()=>{if(["idle","active"].includes(A.state))return;Kt1(A)},Math.min(q,300000))}}function qt1(A){if(!A.src)return;if(A.src.onopen=null,A.src.onerror=null,A.src.close(),A.src=null,A.state==="active")A.state="disabled"}function Kt1(A){A.src=$M6.eventSourceCall({host:A.host,clientKey:A.clientKey,headers:A.headers}),A.state="active",A.src.addEventListener("features",A.cb),A.src.addEventListener("features-updated",A.cb),A.src.onerror=()=>FkA(A),A.src.onopen=()=>{A.errors=0}}function XFK(A,q){qt1(A),HM6.delete(q)}function PFK(){jM6.clear(),HM6.forEach(XFK),OM6.clear(),$M6.stopIdleListener()}function CK1(A,q){if(q.streaming){if(!A.getClientKey())throw Error("Must specify clientKey to enable streaming");if(q.payload)At1(A,!0);OFK(A)}}var CZ,_m,$M6,OM6,IkA=!1,Xd,SK1,HM6,jM6;var QkA=k(()=>{Uh6();CZ={staleTTL:60000,maxAge:14400000,cacheKey:"gbFeaturesCache",backgroundSync:!0,maxEntries:10,disableIdleStreams:!1,idleStreamInterval:20000,disableCache:!1},_m=kkA(),$M6={fetchFeaturesCall:(A)=>{let{host:q,clientKey:K,headers:Y}=A;return _m.fetch(`${q}/api/features/${K}`,{headers:Y})},fetchRemoteEvalCall:(A)=>{let{host:q,clientKey:K,payload:Y,headers:z}=A,w={method:"POST",headers:{"Content-Type":"application/json",...z},body:JSON.stringify(Y)};return _m.fetch(`${q}/api/eval/${K}`,w)},eventSourceCall:(A)=>{let{host:q,clientKey:K,headers:Y}=A;if(Y)return new _m.EventSource(`${q}/sub/${K}`,{headers:Y});return new _m.EventSource(`${q}/sub/${K}`)},startIdleListener:()=>{let A;if(!(typeof window<"u"&&typeof document<"u"))return;let K=()=>{if(document.visibilityState==="visible")window.clearTimeout(A),jFK();else if(document.visibilityState==="hidden")A=window.setTimeout(HFK,CZ.idleStreamInterval)};return document.addEventListener("visibilitychange",K),()=>document.removeEventListener("visibilitychange",K)},stopIdleListener:()=>{}};try{if(globalThis.localStorage)_m.localStorage=globalThis.localStorage}catch(A){}OM6=new Map,Xd=new Map,SK1=new Map,HM6=new Map,jM6=new Set});function ra(A,q,K){K=K||{};for(let[Y,z]of Object.entries(q))switch(Y){case"$or":if(!UkA(A,z,K))return!1;break;case"$nor":if(UkA(A,z,K))return!1;break;case"$and":if(!VFK(A,z,K))return!1;break;case"$not":if(ra(A,z,K))return!1;break;default:if(!dh6(z,WFK(A,Y),K))return!1}return!0}function WFK(A,q){let K=q.split("."),Y=A;for(let z=0;z<K.length;z++)if(Y&&typeof Y==="object"&&K[z]in Y)Y=Y[K[z]];else return null;return Y}function ZFK(A){if(!Yt1[A])Yt1[A]=new RegExp(A.replace(/([^\\])\//g,"$1\\/"));return Yt1[A]}function dh6(A,q,K){if(typeof A==="string")return q+""===A;if(typeof A==="number")return q*1===A;if(typeof A==="boolean")return q!==null&&!!q===A;if(A===null)return q===null;if(Array.isArray(A)||!pkA(A))return JSON.stringify(q)===JSON.stringify(A);for(let Y in A)if(!TFK(Y,q,A[Y],K))return!1;return!0}function pkA(A){let q=Object.keys(A);return q.length>0&&q.filter((K)=>K[0]==="$").length===q.length}function GFK(A){if(A===null)return"null";if(Array.isArray(A))return"array";let q=typeof A;if(["string","number","boolean","object","undefined"].includes(q))return q;return"unknown"}function fFK(A,q,K){if(!Array.isArray(A))return!1;let Y=pkA(q)?(z)=>dh6(q,z,K):(z)=>ra(z,q,K);for(let z=0;z<A.length;z++)if(A[z]&&Y(A[z]))return!0;return!1}function hK1(A,q){if(Array.isArray(A))return A.some((K)=>q.includes(K));return q.includes(A)}function TFK(A,q,K,Y){switch(A){case"$veq":return lk(q)===lk(K);case"$vne":return lk(q)!==lk(K);case"$vgt":return lk(q)>lk(K);case"$vgte":return lk(q)>=lk(K);case"$vlt":return lk(q)<lk(K);case"$vlte":return lk(q)<=lk(K);case"$eq":return q===K;case"$ne":return q!==K;case"$lt":return q<K;case"$lte":return q<=K;case"$gt":return q>K;case"$gte":return q>=K;case"$exists":return K?q!=null:q==null;case"$in":if(!Array.isArray(K))return!1;return hK1(q,K);case"$inGroup":return hK1(q,Y[K]||[]);case"$notInGroup":return!hK1(q,Y[K]||[]);case"$nin":if(!Array.isArray(K))return!1;return!hK1(q,K);case"$not":return!dh6(K,q,Y);case"$size":if(!Array.isArray(q))return!1;return dh6(K,q.length,Y);case"$elemMatch":return fFK(q,K,Y);case"$all":if(!Array.isArray(q))return!1;for(let z=0;z<K.length;z++){let w=!1;for(let _=0;_<q.length;_++)if(dh6(K[z],q[_],Y)){w=!0;break}if(!w)return!1}return!0;case"$regex":try{return ZFK(K).test(q)}catch(z){return!1}case"$type":return GFK(q)===K;default:return console.error("Unknown operator: "+A),!1}}function UkA(A,q,K){if(!q.length)return!0;for(let Y=0;Y<q.length;Y++)if(ra(A,q[Y],K))return!0;return!1}function VFK(A,q,K){for(let Y=0;Y<q.length;Y++)if(!ra(A,q[Y],K))return!1;return!0}var Yt1;var dkA=k(()=>{Uh6();Yt1={}});function kFK(A){let q=new Map;if(A.global.forcedFeatureValues)A.global.forcedFeatureValues.forEach((K,Y)=>q.set(Y,K));if(A.user.forcedFeatureValues)A.user.forcedFeatureValues.forEach((K,Y)=>q.set(Y,K));return q}function EFK(A){if(A.global.forcedVariations&&A.user.forcedVariations)return{...A.global.forcedVariations,...A.user.forcedVariations};else if(A.global.forcedVariations)return A.global.forcedVariations;else if(A.user.forcedVariations)return A.user.forcedVariations;else return{}}async function JM6(A){try{await A()}catch(q){}}function ckA(A,q,K){if(A.user.trackedExperiments){let z=xK1(q,K);if(A.user.trackedExperiments.has(z))return[];A.user.trackedExperiments.add(z)}if(A.user.enableDevMode&&A.user.devLogs)A.user.devLogs.push({experiment:q,result:K,timestamp:Date.now().toString(),logType:"experiment"});let Y=[];if(A.global.trackingCallback){let z=A.global.trackingCallback;Y.push(JM6(()=>z(q,K,A.user)))}if(A.user.trackingCallback){let z=A.user.trackingCallback;Y.push(JM6(()=>z(q,K)))}if(A.global.eventLogger){let z=A.global.eventLogger;Y.push(JM6(()=>z(vFK,{experimentId:q.key,variationId:K.key,hashAttribute:K.hashAttribute,hashValue:K.hashValue},A.user)))}return Y}function LFK(A,q,K){if(A.user.trackedFeatureUsage){let Y=JSON.stringify(K.value);if(A.user.trackedFeatureUsage[q]===Y)return;if(A.user.trackedFeatureUsage[q]=Y,A.user.enableDevMode&&A.user.devLogs)A.user.devLogs.push({featureKey:q,result:K,timestamp:Date.now().toString(),logType:"feature"})}if(A.global.onFeatureUsage){let Y=A.global.onFeatureUsage;JM6(()=>Y(q,K,A.user))}if(A.user.onFeatureUsage){let Y=A.user.onFeatureUsage;JM6(()=>Y(q,K))}if(A.global.eventLogger){let Y=A.global.eventLogger;JM6(()=>Y(NFK,{feature:q,source:K.source,value:K.value,ruleId:K.source==="defaultValue"?"$default":K.ruleId||"",variationId:K.experimentResult?K.experimentResult.key:""},A.user))}}function IK1(A,q){if(q.stack.evaluatedFeatures.has(A))return oa(q,A,null,"cyclicPrerequisite");q.stack.evaluatedFeatures.add(A),q.stack.id=A;let K=kFK(q);if(K.has(A))return oa(q,A,K.get(A),"override");if(!q.global.features||!q.global.features[A])return oa(q,A,null,"unknownFeature");let Y=q.global.features[A];if(Y.rules){let z=new Set(q.stack.evaluatedFeatures);A:for(let w of Y.rules){if(w.parentConditions)for(let O of w.parentConditions){q.stack.evaluatedFeatures=new Set(z);let H=IK1(O.id,q);if(H.source==="cyclicPrerequisite")return oa(q,A,null,"cyclicPrerequisite");let j={value:H.value};if(!ra(j,O.condition||{})){if(O.gate)return oa(q,A,null,"prerequisite");continue A}}if(w.filters&&nkA(w.filters,q))continue;if("force"in w){if(w.condition&&!ikA(w.condition,q))continue;if(!yFK(q,w.seed||A,w.hashAttribute,q.user.saveStickyBucketAssignmentDoc&&!w.disableStickyBucketing?w.fallbackAttribute:void 0,w.range,w.coverage,w.hashVersion))continue;if(w.tracks)w.tracks.forEach((O)=>{if(!ckA(q,O.experiment,O.result).length&&q.global.saveDeferredTrack)q.global.saveDeferredTrack({experiment:O.experiment,result:O.result})});return oa(q,A,w.force,"force",w.id)}if(!w.variations)continue;let _={variations:w.variations,key:w.key||A};if("coverage"in w)_.coverage=w.coverage;if(w.weights)_.weights=w.weights;if(w.hashAttribute)_.hashAttribute=w.hashAttribute;if(w.fallbackAttribute)_.fallbackAttribute=w.fallbackAttribute;if(w.disableStickyBucketing)_.disableStickyBucketing=w.disableStickyBucketing;if(w.bucketVersion!==void 0)_.bucketVersion=w.bucketVersion;if(w.minBucketVersion!==void 0)_.minBucketVersion=w.minBucketVersion;if(w.namespace)_.namespace=w.namespace;if(w.meta)_.meta=w.meta;if(w.ranges)_.ranges=w.ranges;if(w.name)_.name=w.name;if(w.phase)_.phase=w.phase;if(w.seed)_.seed=w.seed;if(w.hashVersion)_.hashVersion=w.hashVersion;if(w.filters)_.filters=w.filters;if(w.condition)_.condition=w.condition;let{result:$}=bK1(_,A,q);if(q.global.onExperimentEval&&q.global.onExperimentEval(_,$),$.inExperiment&&!$.passthrough)return oa(q,A,$.value,"experiment",w.id,_,$)}}return oa(q,A,Y.defaultValue===void 0?null:Y.defaultValue,"defaultValue")}function bK1(A,q,K){let Y=A.key,z=A.variations.length;if(z<2)return{result:BO(K,A,-1,!1,q)};if(K.global.enabled===!1||K.user.enabled===!1)return{result:BO(K,A,-1,!1,q)};if(A=RFK(A,K),A.urlPatterns&&!LK1(K.user.url||"",A.urlPatterns))return{result:BO(K,A,-1,!1,q)};let w=RkA(Y,K.user.url||"",z);if(w!==null)return{result:BO(K,A,w,!1,q)};let _=EFK(K);if(Y in _){let W=_[Y];return{result:BO(K,A,W,!1,q)}}if(A.status==="draft"||A.active===!1)return{result:BO(K,A,-1,!1,q)};let{hashAttribute:$,hashValue:O}=dq6(K,A.hashAttribute,K.user.saveStickyBucketAssignmentDoc&&!A.disableStickyBucketing?A.fallbackAttribute:void 0);if(!O)return{result:BO(K,A,-1,!1,q)};let H=-1,j=!1,J=!1;if(K.user.saveStickyBucketAssignmentDoc&&!A.disableStickyBucketing){let{variation:W,versionIsBlocked:Z}=hFK({ctx:K,expKey:A.key,expBucketVersion:A.bucketVersion,expHashAttribute:A.hashAttribute,expFallbackAttribute:A.fallbackAttribute,expMinBucketVersion:A.minBucketVersion,expMeta:A.meta});j=W>=0,H=W,J=!!Z}if(!j){if(A.filters){if(nkA(A.filters,K))return{result:BO(K,A,-1,!1,q)}}else if(A.namespace&&!EkA(O,A.namespace))return{result:BO(K,A,-1,!1,q)};if(A.include&&!SkA(A.include))return{result:BO(K,A,-1,!1,q)};if(A.condition&&!ikA(A.condition,K))return{result:BO(K,A,-1,!1,q)};if(A.parentConditions){let W=new Set(K.stack.evaluatedFeatures);for(let Z of A.parentConditions){K.stack.evaluatedFeatures=new Set(W);let G=IK1(Z.id,K);if(G.source==="cyclicPrerequisite")return{result:BO(K,A,-1,!1,q)};let f={value:G.value};if(!ra(f,Z.condition||{}))return{result:BO(K,A,-1,!1,q)}}}if(A.groups&&!CFK(A.groups,K))return{result:BO(K,A,-1,!1,q)}}if(A.url&&!SFK(A.url,K))return{result:BO(K,A,-1,!1,q)};let M=Fh6(A.seed||Y,O,A.hashVersion||1);if(M===null)return{result:BO(K,A,-1,!1,q)};if(!j){let W=A.ranges||ykA(z,A.coverage===void 0?1:A.coverage,A.weights);H=LkA(M,W)}if(J)return{result:BO(K,A,-1,!1,q,void 0,!0)};if(H<0)return{result:BO(K,A,-1,!1,q)};if("force"in A)return{result:BO(K,A,A.force===void 0?-1:A.force,!1,q)};if(K.global.qaMode||K.user.qaMode)return{result:BO(K,A,-1,!1,q)};if(A.status==="stopped")return{result:BO(K,A,-1,!1,q)};let D=BO(K,A,H,!0,q,M,j);if(K.user.saveStickyBucketAssignmentDoc&&!A.disableStickyBucketing){let{changed:W,key:Z,doc:G}=bFK(K,$,Qh6(O),{[zt1(A.key,A.bucketVersion)]:D.key});if(W)K.user.stickyBucketAssignmentDocs=K.user.stickyBucketAssignmentDocs||{},K.user.stickyBucketAssignmentDocs[Z]=G,K.user.saveStickyBucketAssignmentDoc(G)}let X=ckA(K,A,D);if(X.length===0&&K.global.saveDeferredTrack)K.global.saveDeferredTrack({experiment:A,result:D});let P=!X.length?void 0:X.length===1?X[0]:Promise.all(X).then(()=>{});return"changeId"in A&&A.changeId&&K.global.recordChangeId&&K.global.recordChangeId(A.changeId),{result:D,trackingCall:P}}function oa(A,q,K,Y,z,w,_){let $={value:K,on:!!K,off:!K,source:Y,ruleId:z||""};if(w)$.experiment=w;if(_)$.experimentResult=_;if(Y!=="override")LFK(A,q,$);return $}function lkA(A){return{...A.user.attributes,...A.user.attributeOverrides}}function ikA(A,q){return ra(lkA(q),A,q.global.savedGroups||{})}function nkA(A,q){return A.some((K)=>{let{hashValue:Y}=dq6(q,K.attribute);if(!Y)return!0;let z=Fh6(K.seed,Y,K.hashVersion||2);if(z===null)return!0;return!K.ranges.some((w)=>EK1(z,w))})}function yFK(A,q,K,Y,z,w,_){if(!z&&w===void 0)return!0;if(!z&&w===0)return!1;let{hashValue:$}=dq6(A,K,Y);if(!$)return!1;let O=Fh6(q,$,_||1);if(O===null)return!1;return z?EK1(O,z):w!==void 0?O<=w:!0}function BO(A,q,K,Y,z,w,_){let $=!0;if(K<0||K>=q.variations.length)K=0,$=!1;let{hashAttribute:O,hashValue:H}=dq6(A,q.hashAttribute,A.user.saveStickyBucketAssignmentDoc&&!q.disableStickyBucketing?q.fallbackAttribute:void 0),j=q.meta?q.meta[K]:{},J={key:j.key||""+K,featureId:z,inExperiment:$,hashUsed:Y,variationId:K,value:q.variations[K],hashAttribute:O,hashValue:H,stickyBucketUsed:!!_};if(j.name)J.name=j.name;if(w!==void 0)J.bucket=w;if(j.passthrough)J.passthrough=j.passthrough;return J}function RFK(A,q){let K=A.key,Y=q.global.overrides;if(Y&&Y[K]){if(A=Object.assign({},A,Y[K]),typeof A.url==="string")A.url=ss1(A.url)}return A}function dq6(A,q,K){let Y=q||"id",z="",w=lkA(A);if(w[Y])z=w[Y];if(!z&&K){if(w[K])z=w[K];if(z)Y=K}return{hashAttribute:Y,hashValue:z}}function SFK(A,q){let K=q.user.url;if(!K)return!1;let Y=K.replace(/^https?:\/\//,"").replace(/^[^/]*\//,"/");if(A.test(K))return!0;if(A.test(Y))return!0;return!1}function CFK(A,q){let K=q.global.groups||{};for(let Y=0;Y<A.length;Y++)if(K[A[Y]])return!0;return!1}function hFK(A){let{ctx:q,expKey:K,expBucketVersion:Y,expHashAttribute:z,expFallbackAttribute:w,expMinBucketVersion:_,expMeta:$}=A;Y=Y||0,_=_||0,z=z||"id",$=$||[];let O=zt1(K,Y),H=IFK(q,z,w);if(_>0)for(let M=0;M<=_;M++){let D=zt1(K,M);if(H[D]!==void 0)return{variation:-1,versionIsBlocked:!0}}let j=H[O];if(j===void 0)return{variation:-1};let J=$.findIndex((M)=>M.key===j);if(J<0)return{variation:-1};return{variation:J}}function zt1(A,q){return q=q||0,`${A}__${q}`}function wt1(A,q){return`${A}||${q}`}function IFK(A,q,K){if(!A.user.stickyBucketAssignmentDocs)return{};let{hashAttribute:Y,hashValue:z}=dq6(A,q),w=wt1(Y,Qh6(z)),{hashAttribute:_,hashValue:$}=dq6(A,K),O=$?wt1(_,Qh6($)):null,H={};if(O&&A.user.stickyBucketAssignmentDocs[O])Object.assign(H,A.user.stickyBucketAssignmentDocs[O].assignments||{});if(A.user.stickyBucketAssignmentDocs[w])Object.assign(H,A.user.stickyBucketAssignmentDocs[w].assignments||{});return H}function bFK(A,q,K,Y){let z=wt1(q,K),w=A.user.stickyBucketAssignmentDocs&&A.user.stickyBucketAssignmentDocs[z]?A.user.stickyBucketAssignmentDocs[z].assignments||{}:{},_={...w,...Y},$=JSON.stringify(w)!==JSON.stringify(_);return{key:z,doc:{attributeName:q,attributeValue:K,assignments:_},changed:$}}function xFK(A,q){let K=new Set,Y=q&&q.features?q.features:A.global.features||{},z=q&&q.experiments?q.experiments:A.global.experiments||[];return Object.keys(Y).forEach((w)=>{let _=Y[w];if(_.rules){for(let $ of _.rules)if($.variations){if(K.add($.hashAttribute||"id"),$.fallbackAttribute)K.add($.fallbackAttribute)}}}),z.map((w)=>{if(K.add(w.hashAttribute||"id"),w.fallbackAttribute)K.add(w.fallbackAttribute)}),Array.from(K)}async function rkA(A,q,K){let Y=_t1(A,K);return q.getAllAssignments(Y)}function _t1(A,q){let K={};return xFK(A,q).forEach((z)=>{let{hashValue:w}=dq6(A,z);K[z]=Qh6(w)}),K}async function okA(A,q,K){if(A={...A},A.encryptedFeatures){try{A.features=JSON.parse(await pq6(A.encryptedFeatures,q,K))}catch(Y){console.error(Y)}delete A.encryptedFeatures}if(A.encryptedExperiments){try{A.experiments=JSON.parse(await pq6(A.encryptedExperiments,q,K))}catch(Y){console.error(Y)}delete A.encryptedExperiments}if(A.encryptedSavedGroups){try{A.savedGroups=JSON.parse(await pq6(A.encryptedSavedGroups,q,K))}catch(Y){console.error(Y)}delete A.encryptedSavedGroups}return A}function akA(A){let q=A.apiHost||"https://cdn.growthbook.io";return{apiHost:q.replace(/\/*$/,""),streamingHost:(A.streamingHost||q).replace(/\/*$/,""),apiRequestHeaders:A.apiHostRequestHeaders,streamingHostRequestHeaders:A.streamingHostRequestHeaders}}function xK1(A,q){return q.hashAttribute+q.hashValue+A.key+q.variationId}var NFK="Feature Evaluated",vFK="Experiment Viewed";var skA=k(()=>{dkA();Uh6()});class uK1{constructor(A){if(A=A||{},this.version=uFK,this._options=this.context=A,this._renderer=A.renderer||null,this._trackedExperiments=new Set,this._completedChangeIds=new Set,this._trackedFeatures={},this.debug=!!A.debug,this._subscriptions=new Set,this.ready=!1,this._assigned=new Map,this._activeAutoExperiments=new Map,this._triggeredExpKeys=new Set,this._initialized=!1,this._redirectedUrl="",this._deferredTrackingCalls=new Map,this._autoExperimentsAllowed=!A.disableExperimentsOnLoad,this._destroyCallbacks=[],this.logs=[],this.log=this.log.bind(this),this._saveDeferredTrack=this._saveDeferredTrack.bind(this),this._fireSubscriptions=this._fireSubscriptions.bind(this),this._recordChangedId=this._recordChangedId.bind(this),A.remoteEval){if(A.decryptionKey)throw Error("Encryption is not available for remoteEval");if(!A.clientKey)throw Error("Missing clientKey");let q=!1;try{q=!!new URL(A.apiHost||"").hostname.match(/growthbook\.io$/i)}catch(K){}if(q)throw Error("Cannot use remoteEval on GrowthBook Cloud")}else if(A.cacheKeyAttributes)throw Error("cacheKeyAttributes are only used for remoteEval");if(A.stickyBucketService){let q=A.stickyBucketService;this._saveStickyBucketAssignmentDoc=(K)=>{return q.saveAssignments(K)}}if(A.plugins)for(let q of A.plugins)q(this);if(A.features)this.ready=!0;if(MM6&&A.enableDevMode)window._growthbook=this,document.dispatchEvent(new Event("gbloaded"));if(A.experiments)this.ready=!0,this._updateAllAutoExperiments();if(this._options.stickyBucketService&&this._options.stickyBucketAssignmentDocs)for(let q in this._options.stickyBucketAssignmentDocs){let K=this._options.stickyBucketAssignmentDocs[q];if(K)this._options.stickyBucketService.saveAssignments(K).catch(()=>{})}if(this.ready)this.refreshStickyBuckets(this.getPayload())}async setPayload(A){this._payload=A;let q=await okA(A,this._options.decryptionKey);if(this._decryptedPayload=q,await this.refreshStickyBuckets(q),q.features)this._options.features=q.features;if(q.savedGroups)this._options.savedGroups=q.savedGroups;if(q.experiments)this._options.experiments=q.experiments,this._updateAllAutoExperiments();this.ready=!0,this._render()}initSync(A){this._initialized=!0;let q=A.payload;if(q.encryptedExperiments||q.encryptedFeatures)throw Error("initSync does not support encrypted payloads");if(this._options.stickyBucketService&&!this._options.stickyBucketAssignmentDocs)this._options.stickyBucketAssignmentDocs=this.generateStickyBucketAssignmentDocsSync(this._options.stickyBucketService,q);if(this._payload=q,this._decryptedPayload=q,q.features)this._options.features=q.features;if(q.experiments)this._options.experiments=q.experiments,this._updateAllAutoExperiments();return this.ready=!0,CK1(this,A),this}async init(A){if(this._initialized=!0,A=A||{},A.cacheSettings)xkA(A.cacheSettings);if(A.payload)return await this.setPayload(A.payload),CK1(this,A),{success:!0,source:"init"};else{let{data:q,...K}=await this._refresh({...A,allowStale:!0});return CK1(this,A),await this.setPayload(q||{}),K}}async loadFeatures(A){A=A||{},await this.init({skipCache:A.skipCache,timeout:A.timeout,streaming:(this._options.backgroundSync??!0)&&(A.autoRefresh||this._options.subscribeToChanges)})}async refreshFeatures(A){let q=await this._refresh({...A||{},allowStale:!1});if(q.data)await this.setPayload(q.data)}getApiInfo(){return[this.getApiHosts().apiHost,this.getClientKey()]}getApiHosts(){return akA(this._options)}getClientKey(){return this._options.clientKey||""}getPayload(){return this._payload||{features:this.getFeatures(),experiments:this.getExperiments()}}getDecryptedPayload(){return this._decryptedPayload||this.getPayload()}isRemoteEval(){return this._options.remoteEval||!1}getCacheKeyAttributes(){return this._options.cacheKeyAttributes}async _refresh(A){let{timeout:q,skipCache:K,allowStale:Y,streaming:z}=A;if(!this._options.clientKey)throw Error("Missing clientKey");return ukA({instance:this,timeout:q,skipCache:K||this._options.disableCache,allowStale:Y,backgroundSync:z??this._options.backgroundSync??!0})}_render(){if(this._renderer)try{this._renderer()}catch(A){console.error("Failed to render",A)}}setFeatures(A){this._options.features=A,this.ready=!0,this._render()}async setEncryptedFeatures(A,q,K){let Y=await pq6(A,q||this._options.decryptionKey,K);this.setFeatures(JSON.parse(Y))}setExperiments(A){this._options.experiments=A,this.ready=!0,this._updateAllAutoExperiments()}async setEncryptedExperiments(A,q,K){let Y=await pq6(A,q||this._options.decryptionKey,K);this.setExperiments(JSON.parse(Y))}async setAttributes(A){if(this._options.attributes=A,this._options.stickyBucketService)await this.refreshStickyBuckets();if(this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async updateAttributes(A){return this.setAttributes({...this._options.attributes,...A})}async setAttributeOverrides(A){if(this._options.attributeOverrides=A,this._options.stickyBucketService)await this.refreshStickyBuckets();if(this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}async setForcedVariations(A){if(this._options.forcedVariations=A||{},this._options.remoteEval){await this._refreshForRemoteEval();return}this._render(),this._updateAllAutoExperiments()}setForcedFeatures(A){this._options.forcedFeatureValues=A,this._render()}async setURL(A){if(A===this._options.url)return;if(this._options.url=A,this._redirectedUrl="",this._options.remoteEval){await this._refreshForRemoteEval(),this._updateAllAutoExperiments(!0);return}this._updateAllAutoExperiments(!0)}getAttributes(){return{...this._options.attributes,...this._options.attributeOverrides}}getForcedVariations(){return this._options.forcedVariations||{}}getForcedFeatures(){return this._options.forcedFeatureValues||new Map}getStickyBucketAssignmentDocs(){return this._options.stickyBucketAssignmentDocs||{}}getUrl(){return this._options.url||""}getFeatures(){return this._options.features||{}}getExperiments(){return this._options.experiments||[]}getCompletedChangeIds(){return Array.from(this._completedChangeIds)}subscribe(A){return this._subscriptions.add(A),()=>{this._subscriptions.delete(A)}}async _refreshForRemoteEval(){if(!this._options.remoteEval)return;if(!this._initialized)return;let A=await this._refresh({allowStale:!1});if(A.data)await this.setPayload(A.data)}getAllResults(){return new Map(this._assigned)}onDestroy(A){this._destroyCallbacks.push(A)}isDestroyed(){return!!this._destroyed}destroy(){if(this._destroyed=!0,this._destroyCallbacks.forEach((A)=>{try{A()}catch(q){console.error(q)}}),this._subscriptions.clear(),this._assigned.clear(),this._trackedExperiments.clear(),this._completedChangeIds.clear(),this._deferredTrackingCalls.clear(),this._trackedFeatures={},this._destroyCallbacks=[],this._payload=void 0,this._saveStickyBucketAssignmentDoc=void 0,BkA(this),this.logs=[],MM6&&window._growthbook===this)delete window._growthbook;this._activeAutoExperiments.forEach((A)=>{A.undo()}),this._activeAutoExperiments.clear(),this._triggeredExpKeys.clear()}setRenderer(A){this._renderer=A}forceVariation(A,q){if(this._options.forcedVariations=this._options.forcedVariations||{},this._options.forcedVariations[A]=q,this._options.remoteEval){this._refreshForRemoteEval();return}this._updateAllAutoExperiments(),this._render()}run(A){let{result:q}=bK1(A,null,this._getEvalContext());return this._fireSubscriptions(A,q),q}triggerExperiment(A){if(this._triggeredExpKeys.add(A),!this._options.experiments)return null;return this._options.experiments.filter((K)=>K.key===A).map((K)=>{return this._runAutoExperiment(K)}).filter((K)=>K!==null)}triggerAutoExperiments(){this._autoExperimentsAllowed=!0,this._updateAllAutoExperiments(!0)}_getEvalContext(){return{user:this._getUserContext(),global:this._getGlobalContext(),stack:{evaluatedFeatures:new Set}}}_getUserContext(){return{attributes:this._options.user?{...this._options.user,...this._options.attributes}:this._options.attributes,enableDevMode:this._options.enableDevMode,blockedChangeIds:this._options.blockedChangeIds,stickyBucketAssignmentDocs:this._options.stickyBucketAssignmentDocs,url:this._getContextUrl(),forcedVariations:this._options.forcedVariations,forcedFeatureValues:this._options.forcedFeatureValues,attributeOverrides:this._options.attributeOverrides,saveStickyBucketAssignmentDoc:this._saveStickyBucketAssignmentDoc,trackingCallback:this._options.trackingCallback,onFeatureUsage:this._options.onFeatureUsage,devLogs:this.logs,trackedExperiments:this._trackedExperiments,trackedFeatureUsage:this._trackedFeatures}}_getGlobalContext(){return{features:this._options.features,experiments:this._options.experiments,log:this.log,enabled:this._options.enabled,qaMode:this._options.qaMode,savedGroups:this._options.savedGroups,groups:this._options.groups,overrides:this._options.overrides,onExperimentEval:this._subscriptions.size>0?this._fireSubscriptions:void 0,recordChangeId:this._recordChangedId,saveDeferredTrack:this._saveDeferredTrack,eventLogger:this._options.eventLogger}}_runAutoExperiment(A,q){let K=this._activeAutoExperiments.get(A);if(A.manual&&!this._triggeredExpKeys.has(A.key)&&!K)return null;let Y=this._isAutoExperimentBlockedByContext(A),z,w;if(Y)z=BO(this._getEvalContext(),A,-1,!1,"");else({result:z,trackingCall:w}=bK1(A,null,this._getEvalContext())),this._fireSubscriptions(A,z);let _=JSON.stringify(z.value);if(!q&&z.inExperiment&&K&&K.valueHash===_)return z;if(K)this._undoActiveAutoExperiment(A);if(z.inExperiment){let $=yK1(A);if($==="redirect"&&z.value.urlRedirect&&A.urlPatterns){let O=A.persistQueryString?hkA(this._getContextUrl(),z.value.urlRedirect):z.value.urlRedirect;if(LK1(O,A.urlPatterns))return this.log("Skipping redirect because original URL matches redirect URL",{id:A.key}),z;this._redirectedUrl=O;let{navigate:H,delay:j}=this._getNavigateFunction();if(H)if(MM6)Promise.all([...w?[RK1(w,this._options.maxNavigateDelay??1000)]:[],new Promise((J)=>window.setTimeout(J,this._options.navigateDelay??j))]).then(()=>{try{H(O)}catch(J){console.error(J)}});else try{H(O)}catch(J){console.error(J)}}else if($==="visual"){let O=this._options.applyDomChangesCallback?this._options.applyDomChangesCallback(z.value):this._applyDOMChanges(z.value);if(O)this._activeAutoExperiments.set(A,{undo:O,valueHash:_})}}return z}_undoActiveAutoExperiment(A){let q=this._activeAutoExperiments.get(A);if(q)q.undo(),this._activeAutoExperiments.delete(A)}_updateAllAutoExperiments(A){if(!this._autoExperimentsAllowed)return;let q=this._options.experiments||[],K=new Set(q);this._activeAutoExperiments.forEach((Y,z)=>{if(!K.has(z))Y.undo(),this._activeAutoExperiments.delete(z)});for(let Y of q){let z=this._runAutoExperiment(Y,A);if(z!==null&&z!==void 0&&z.inExperiment&&yK1(Y)==="redirect")break}}_fireSubscriptions(A,q){let K=A.key,Y=this._assigned.get(K);if(!Y||Y.result.inExperiment!==q.inExperiment||Y.result.variationId!==q.variationId)this._assigned.set(K,{experiment:A,result:q}),this._subscriptions.forEach((z)=>{try{z(A,q)}catch(w){console.error(w)}})}_recordChangedId(A){this._completedChangeIds.add(A)}isOn(A){return this.evalFeature(A).on}isOff(A){return this.evalFeature(A).off}getFeatureValue(A,q){let K=this.evalFeature(A).value;return K===null?q:K}feature(A){return this.evalFeature(A)}evalFeature(A){return IK1(A,this._getEvalContext())}log(A,q){if(!this.debug)return;if(this._options.log)this._options.log(A,q);else console.log(A,q)}getDeferredTrackingCalls(){return Array.from(this._deferredTrackingCalls.values())}setDeferredTrackingCalls(A){this._deferredTrackingCalls=new Map(A.filter((q)=>q&&q.experiment&&q.result).map((q)=>{return[xK1(q.experiment,q.result),q]}))}async fireDeferredTrackingCalls(){if(!this._options.trackingCallback)return;let A=[];this._deferredTrackingCalls.forEach((q)=>{if(!q||!q.experiment||!q.result)console.error("Invalid deferred tracking call",{call:q});else A.push(this._options.trackingCallback(q.experiment,q.result))}),this._deferredTrackingCalls.clear(),await Promise.all(A)}setTrackingCallback(A){this._options.trackingCallback=A,this.fireDeferredTrackingCalls()}setEventLogger(A){this._options.eventLogger=A}async logEvent(A,q){if(this._destroyed){console.error("Cannot log event to destroyed GrowthBook instance");return}if(this._options.enableDevMode)this.logs.push({eventName:A,properties:q,timestamp:Date.now().toString(),logType:"event"});if(this._options.eventLogger)try{await this._options.eventLogger(A,q||{},this._getUserContext())}catch(K){console.error(K)}else console.error("No event logger configured")}_saveDeferredTrack(A){this._deferredTrackingCalls.set(xK1(A.experiment,A.result),A)}_getContextUrl(){return this._options.url||(MM6?window.location.href:"")}_isAutoExperimentBlockedByContext(A){let q=yK1(A);if(q==="visual"){if(this._options.disableVisualExperiments)return!0;if(this._options.disableJsInjection){if(A.variations.some((K)=>K.js))return!0}}else if(q==="redirect"){if(this._options.disableUrlRedirectExperiments)return!0;try{let K=new URL(this._getContextUrl());for(let Y of A.variations){if(!Y||!Y.urlRedirect)continue;let z=new URL(Y.urlRedirect);if(this._options.disableCrossOriginUrlRedirectExperiments){if(z.protocol!==K.protocol)return!0;if(z.host!==K.host)return!0}}}catch(K){return this.log("Error parsing current or redirect URL",{id:A.key,error:K}),!0}}else return!0;if(A.changeId&&(this._options.blockedChangeIds||[]).includes(A.changeId))return!0;return!1}getRedirectUrl(){return this._redirectedUrl}_getNavigateFunction(){if(this._options.navigate)return{navigate:this._options.navigate,delay:0};else if(MM6)return{navigate:(A)=>{window.location.replace(A)},delay:100};return{navigate:null,delay:0}}_applyDOMChanges(A){if(!MM6)return;let q=[];if(A.css){let K=document.createElement("style");K.innerHTML=A.css,document.head.appendChild(K),q.push(()=>K.remove())}if(A.js){let K=document.createElement("script");if(K.innerHTML=A.js,this._options.jsInjectionNonce)K.nonce=this._options.jsInjectionNonce;document.head.appendChild(K),q.push(()=>K.remove())}if(A.domMutations)A.domMutations.forEach((K)=>{q.push(tkA.default.declarative(K).revert)});return()=>{q.forEach((K)=>K())}}async refreshStickyBuckets(A){if(this._options.stickyBucketService){let q=this._getEvalContext(),K=await rkA(q,this._options.stickyBucketService,A);this._options.stickyBucketAssignmentDocs=K}}generateStickyBucketAssignmentDocsSync(A,q){if(!("getAllAssignmentsSync"in A)){console.error("generating StickyBucketAssignmentDocs docs requires StickyBucketServiceSync");return}let K=this._getEvalContext(),Y=_t1(K,q);return A.getAllAssignmentsSync(Y)}inDevMode(){return!!this._options.enableDevMode}}var tkA,MM6,uFK;var ekA=k(()=>{Uh6();QkA();skA();tkA=e(VkA(),1),MM6=typeof window<"u"&&typeof document<"u",uFK=CkA()});var AEA=k(()=>{ekA()});var qEA="sdk-zAZezfDKGoZuXXKe";var KEA=k(()=>{Z8()});async function YEA(){if(mK1===null&&!BK1)BK1=mFK(),mK1=await BK1,BK1=null,ik.cache.clear?.()}function zEA(){return ik(!0)}function BFK(){if(mK1!==null)return mK1;return}async function mFK(){return}var mK1=null,BK1=null,ik;var cq6=k(()=>{Q8();Eq();Q1();bA();Ef();K9();Z8();ik=T8((A)=>{let q=ny(),K=T1(),Y,z,w;if(A){if(Y=K3()??void 0,z=$m()??void 0,Y&&K.claudeCodeFirstTokenDate){let H=new Date(K.claudeCodeFirstTokenDate).getTime();if(!isNaN(H))w=H}}let _=Y9(),$=_?.organizationUuid,O=_?.accountUuid;return{deviceId:q,sessionId:d1(),email:BFK(),appVersion:{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION,platform:gJ6(),organizationUuid:$,accountUuid:O,userType:"external",subscriptionType:Y,rateLimitTier:z,firstTokenTime:w,...$1(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}})});function UV(){return $1(process.env.CLAUDE_CODE_USE_BEDROCK)||$1(process.env.CLAUDE_CODE_USE_VERTEX)||$1(process.env.CLAUDE_CODE_USE_FOUNDRY)||!!process.env.DISABLE_TELEMETRY||!!process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC}var aa=k(()=>{Z8()});var $EA=C((wEA)=>{Object.defineProperty(wEA,"__esModule",{value:!0});wEA._globalThis=void 0;wEA._globalThis=typeof globalThis==="object"?globalThis:global});var OEA=C((lq6)=>{var gFK=lq6&&lq6.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;Object.defineProperty(A,Y,{enumerable:!0,get:function(){return q[K]}})}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),FFK=lq6&&lq6.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))gFK(q,A,K)};Object.defineProperty(lq6,"__esModule",{value:!0});FFK($EA(),lq6)});var HEA=C((iq6)=>{var QFK=iq6&&iq6.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;Object.defineProperty(A,Y,{enumerable:!0,get:function(){return q[K]}})}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),UFK=iq6&&iq6.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))QFK(q,A,K)};Object.defineProperty(iq6,"__esModule",{value:!0});UFK(OEA(),iq6)});var $t1=C((jEA)=>{Object.defineProperty(jEA,"__esModule",{value:!0});jEA.VERSION=void 0;jEA.VERSION="1.9.0"});var WEA=C((XEA)=>{Object.defineProperty(XEA,"__esModule",{value:!0});XEA.isCompatible=XEA._makeCompatibilityCheck=void 0;var pFK=$t1(),MEA=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function DEA(A){let q=new Set([A]),K=new Set,Y=A.match(MEA);if(!Y)return()=>!1;let z={major:+Y[1],minor:+Y[2],patch:+Y[3],prerelease:Y[4]};if(z.prerelease!=null)return function(O){return O===A};function w($){return K.add($),!1}function _($){return q.add($),!0}return function(O){if(q.has(O))return!0;if(K.has(O))return!1;let H=O.match(MEA);if(!H)return w(O);let j={major:+H[1],minor:+H[2],patch:+H[3],prerelease:H[4]};if(j.prerelease!=null)return w(O);if(z.major!==j.major)return w(O);if(z.major===0){if(z.minor===j.minor&&z.patch<=j.patch)return _(O);return w(O)}if(z.minor<=j.minor)return _(O);return w(O)}}XEA._makeCompatibilityCheck=DEA;XEA.isCompatible=DEA(pFK.VERSION)});var nq6=C((ZEA)=>{Object.defineProperty(ZEA,"__esModule",{value:!0});ZEA.unregisterGlobal=ZEA.getGlobal=ZEA.registerGlobal=void 0;var cFK=HEA(),DM6=$t1(),lFK=WEA(),iFK=DM6.VERSION.split(".")[0],ch6=Symbol.for(`opentelemetry.js.api.${iFK}`),lh6=cFK._globalThis;function nFK(A,q,K,Y=!1){var z;let w=lh6[ch6]=(z=lh6[ch6])!==null&&z!==void 0?z:{version:DM6.VERSION};if(!Y&&w[A]){let _=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${A}`);return K.error(_.stack||_.message),!1}if(w.version!==DM6.VERSION){let _=Error(`@opentelemetry/api: Registration of version v${w.version} for ${A} does not match previously registered API v${DM6.VERSION}`);return K.error(_.stack||_.message),!1}return w[A]=q,K.debug(`@opentelemetry/api: Registered a global for ${A} v${DM6.VERSION}.`),!0}ZEA.registerGlobal=nFK;function rFK(A){var q,K;let Y=(q=lh6[ch6])===null||q===void 0?void 0:q.version;if(!Y||!(0,lFK.isCompatible)(Y))return;return(K=lh6[ch6])===null||K===void 0?void 0:K[A]}ZEA.getGlobal=rFK;function oFK(A,q){q.debug(`@opentelemetry/api: Unregistering a global for ${A} v${DM6.VERSION}.`);let K=lh6[ch6];if(K)delete K[A]}ZEA.unregisterGlobal=oFK});var NEA=C((TEA)=>{Object.defineProperty(TEA,"__esModule",{value:!0});TEA.DiagComponentLogger=void 0;var tFK=nq6();class fEA{constructor(A){this._namespace=A.namespace||"DiagComponentLogger"}debug(...A){return ih6("debug",this._namespace,A)}error(...A){return ih6("error",this._namespace,A)}info(...A){return ih6("info",this._namespace,A)}warn(...A){return ih6("warn",this._namespace,A)}verbose(...A){return ih6("verbose",this._namespace,A)}}TEA.DiagComponentLogger=fEA;function ih6(A,q,K){let Y=(0,tFK.getGlobal)("diag");if(!Y)return;return K.unshift(q),Y[A](...K)}});var gK1=C((vEA)=>{Object.defineProperty(vEA,"__esModule",{value:!0});vEA.DiagLogLevel=void 0;var eFK;(function(A){A[A.NONE=0]="NONE",A[A.ERROR=30]="ERROR",A[A.WARN=50]="WARN",A[A.INFO=60]="INFO",A[A.DEBUG=70]="DEBUG",A[A.VERBOSE=80]="VERBOSE",A[A.ALL=9999]="ALL"})(eFK=vEA.DiagLogLevel||(vEA.DiagLogLevel={}))});var LEA=C((kEA)=>{Object.defineProperty(kEA,"__esModule",{value:!0});kEA.createLogLevelDiagLogger=void 0;var Pd=gK1();function AQK(A,q){if(A<Pd.DiagLogLevel.NONE)A=Pd.DiagLogLevel.NONE;else if(A>Pd.DiagLogLevel.ALL)A=Pd.DiagLogLevel.ALL;q=q||{};function K(Y,z){let w=q[Y];if(typeof w==="function"&&A>=z)return w.bind(q);return function(){}}return{error:K("error",Pd.DiagLogLevel.ERROR),warn:K("warn",Pd.DiagLogLevel.WARN),info:K("info",Pd.DiagLogLevel.INFO),debug:K("debug",Pd.DiagLogLevel.DEBUG),verbose:K("verbose",Pd.DiagLogLevel.VERBOSE)}}kEA.createLogLevelDiagLogger=AQK});var rq6=C((REA)=>{Object.defineProperty(REA,"__esModule",{value:!0});REA.DiagAPI=void 0;var qQK=NEA(),KQK=LEA(),yEA=gK1(),FK1=nq6(),YQK="diag";class Ht1{constructor(){function A(Y){return function(...z){let w=(0,FK1.getGlobal)("diag");if(!w)return;return w[Y](...z)}}let q=this,K=(Y,z={logLevel:yEA.DiagLogLevel.INFO})=>{var w,_,$;if(Y===q){let j=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return q.error((w=j.stack)!==null&&w!==void 0?w:j.message),!1}if(typeof z==="number")z={logLevel:z};let O=(0,FK1.getGlobal)("diag"),H=(0,KQK.createLogLevelDiagLogger)((_=z.logLevel)!==null&&_!==void 0?_:yEA.DiagLogLevel.INFO,Y);if(O&&!z.suppressOverrideMessage){let j=($=Error().stack)!==null&&$!==void 0?$:"<failed to generate stacktrace>";O.warn(`Current logger will be overwritten from ${j}`),H.warn(`Current logger will overwrite one already registered from ${j}`)}return(0,FK1.registerGlobal)("diag",H,q,!0)};q.setLogger=K,q.disable=()=>{(0,FK1.unregisterGlobal)(YQK,q)},q.createComponentLogger=(Y)=>{return new qQK.DiagComponentLogger(Y)},q.verbose=A("verbose"),q.debug=A("debug"),q.info=A("info"),q.warn=A("warn"),q.error=A("error")}static instance(){if(!this._instance)this._instance=new Ht1;return this._instance}}REA.DiagAPI=Ht1});var IEA=C((CEA)=>{Object.defineProperty(CEA,"__esModule",{value:!0});CEA.BaggageImpl=void 0;class XM6{constructor(A){this._entries=A?new Map(A):new Map}getEntry(A){let q=this._entries.get(A);if(!q)return;return Object.assign({},q)}getAllEntries(){return Array.from(this._entries.entries()).map(([A,q])=>[A,q])}setEntry(A,q){let K=new XM6(this._entries);return K._entries.set(A,q),K}removeEntry(A){let q=new XM6(this._entries);return q._entries.delete(A),q}removeEntries(...A){let q=new XM6(this._entries);for(let K of A)q._entries.delete(K);return q}clear(){return new XM6}}CEA.BaggageImpl=XM6});var uEA=C((bEA)=>{Object.defineProperty(bEA,"__esModule",{value:!0});bEA.baggageEntryMetadataSymbol=void 0;bEA.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")});var jt1=C((BEA)=>{Object.defineProperty(BEA,"__esModule",{value:!0});BEA.baggageEntryMetadataFromString=BEA.createBaggage=void 0;var zQK=rq6(),wQK=IEA(),_QK=uEA(),$QK=zQK.DiagAPI.instance();function OQK(A={}){return new wQK.BaggageImpl(new Map(Object.entries(A)))}BEA.createBaggage=OQK;function HQK(A){if(typeof A!=="string")$QK.error(`Cannot create baggage metadata from unknown type: ${typeof A}`),A="";return{__TYPE__:_QK.baggageEntryMetadataSymbol,toString(){return A}}}BEA.baggageEntryMetadataFromString=HQK});var nh6=C((gEA)=>{Object.defineProperty(gEA,"__esModule",{value:!0});gEA.ROOT_CONTEXT=gEA.createContextKey=void 0;function JQK(A){return Symbol.for(A)}gEA.createContextKey=JQK;class QK1{constructor(A){let q=this;q._currentContext=A?new Map(A):new Map,q.getValue=(K)=>q._currentContext.get(K),q.setValue=(K,Y)=>{let z=new QK1(q._currentContext);return z._currentContext.set(K,Y),z},q.deleteValue=(K)=>{let Y=new QK1(q._currentContext);return Y._currentContext.delete(K),Y}}}gEA.ROOT_CONTEXT=new QK1});var dEA=C((UEA)=>{Object.defineProperty(UEA,"__esModule",{value:!0});UEA.DiagConsoleLogger=void 0;var Jt1=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class QEA{constructor(){function A(q){return function(...K){if(console){let Y=console[q];if(typeof Y!=="function")Y=console.log;if(typeof Y==="function")return Y.apply(console,K)}}}for(let q=0;q<Jt1.length;q++)this[Jt1[q].n]=A(Jt1[q].c)}}UEA.DiagConsoleLogger=QEA});var Tt1=C((cEA)=>{Object.defineProperty(cEA,"__esModule",{value:!0});cEA.createNoopMeter=cEA.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=cEA.NOOP_OBSERVABLE_GAUGE_METRIC=cEA.NOOP_OBSERVABLE_COUNTER_METRIC=cEA.NOOP_UP_DOWN_COUNTER_METRIC=cEA.NOOP_HISTOGRAM_METRIC=cEA.NOOP_GAUGE_METRIC=cEA.NOOP_COUNTER_METRIC=cEA.NOOP_METER=cEA.NoopObservableUpDownCounterMetric=cEA.NoopObservableGaugeMetric=cEA.NoopObservableCounterMetric=cEA.NoopObservableMetric=cEA.NoopHistogramMetric=cEA.NoopGaugeMetric=cEA.NoopUpDownCounterMetric=cEA.NoopCounterMetric=cEA.NoopMetric=cEA.NoopMeter=void 0;class Mt1{constructor(){}createGauge(A,q){return cEA.NOOP_GAUGE_METRIC}createHistogram(A,q){return cEA.NOOP_HISTOGRAM_METRIC}createCounter(A,q){return cEA.NOOP_COUNTER_METRIC}createUpDownCounter(A,q){return cEA.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(A,q){return cEA.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(A,q){return cEA.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(A,q){return cEA.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(A,q){}removeBatchObservableCallback(A){}}cEA.NoopMeter=Mt1;class PM6{}cEA.NoopMetric=PM6;class Dt1 extends PM6{add(A,q){}}cEA.NoopCounterMetric=Dt1;class Xt1 extends PM6{add(A,q){}}cEA.NoopUpDownCounterMetric=Xt1;class Pt1 extends PM6{record(A,q){}}cEA.NoopGaugeMetric=Pt1;class Wt1 extends PM6{record(A,q){}}cEA.NoopHistogramMetric=Wt1;class rh6{addCallback(A){}removeCallback(A){}}cEA.NoopObservableMetric=rh6;class Zt1 extends rh6{}cEA.NoopObservableCounterMetric=Zt1;class Gt1 extends rh6{}cEA.NoopObservableGaugeMetric=Gt1;class ft1 extends rh6{}cEA.NoopObservableUpDownCounterMetric=ft1;cEA.NOOP_METER=new Mt1;cEA.NOOP_COUNTER_METRIC=new Dt1;cEA.NOOP_GAUGE_METRIC=new Pt1;cEA.NOOP_HISTOGRAM_METRIC=new Wt1;cEA.NOOP_UP_DOWN_COUNTER_METRIC=new Xt1;cEA.NOOP_OBSERVABLE_COUNTER_METRIC=new Zt1;cEA.NOOP_OBSERVABLE_GAUGE_METRIC=new Gt1;cEA.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new ft1;function DQK(){return cEA.NOOP_METER}cEA.createNoopMeter=DQK});var qLA=C((ALA)=>{Object.defineProperty(ALA,"__esModule",{value:!0});ALA.ValueType=void 0;var kQK;(function(A){A[A.INT=0]="INT",A[A.DOUBLE=1]="DOUBLE"})(kQK=ALA.ValueType||(ALA.ValueType={}))});var Nt1=C((KLA)=>{Object.defineProperty(KLA,"__esModule",{value:!0});KLA.defaultTextMapSetter=KLA.defaultTextMapGetter=void 0;KLA.defaultTextMapGetter={get(A,q){if(A==null)return;return A[q]},keys(A){if(A==null)return[];return Object.keys(A)}};KLA.defaultTextMapSetter={set(A,q,K){if(A==null)return;A[q]=K}}});var $LA=C((wLA)=>{Object.defineProperty(wLA,"__esModule",{value:!0});wLA.NoopContextManager=void 0;var LQK=nh6();class zLA{active(){return LQK.ROOT_CONTEXT}with(A,q,K,...Y){return q.call(K,...Y)}bind(A,q){return q}enable(){return this}disable(){return this}}wLA.NoopContextManager=zLA});var oh6=C((HLA)=>{Object.defineProperty(HLA,"__esModule",{value:!0});HLA.ContextAPI=void 0;var yQK=$LA(),vt1=nq6(),OLA=rq6(),kt1="context",RQK=new yQK.NoopContextManager;class Et1{constructor(){}static getInstance(){if(!this._instance)this._instance=new Et1;return this._instance}setGlobalContextManager(A){return(0,vt1.registerGlobal)(kt1,A,OLA.DiagAPI.instance())}active(){return this._getContextManager().active()}with(A,q,K,...Y){return this._getContextManager().with(A,q,K,...Y)}bind(A,q){return this._getContextManager().bind(A,q)}_getContextManager(){return(0,vt1.getGlobal)(kt1)||RQK}disable(){this._getContextManager().disable(),(0,vt1.unregisterGlobal)(kt1,OLA.DiagAPI.instance())}}HLA.ContextAPI=Et1});var yt1=C((JLA)=>{Object.defineProperty(JLA,"__esModule",{value:!0});JLA.TraceFlags=void 0;var SQK;(function(A){A[A.NONE=0]="NONE",A[A.SAMPLED=1]="SAMPLED"})(SQK=JLA.TraceFlags||(JLA.TraceFlags={}))});var UK1=C((MLA)=>{Object.defineProperty(MLA,"__esModule",{value:!0});MLA.INVALID_SPAN_CONTEXT=MLA.INVALID_TRACEID=MLA.INVALID_SPANID=void 0;var CQK=yt1();MLA.INVALID_SPANID="0000000000000000";MLA.INVALID_TRACEID="00000000000000000000000000000000";MLA.INVALID_SPAN_CONTEXT={traceId:MLA.INVALID_TRACEID,spanId:MLA.INVALID_SPANID,traceFlags:CQK.TraceFlags.NONE}});var pK1=C((ZLA)=>{Object.defineProperty(ZLA,"__esModule",{value:!0});ZLA.NonRecordingSpan=void 0;var hQK=UK1();class WLA{constructor(A=hQK.INVALID_SPAN_CONTEXT){this._spanContext=A}spanContext(){return this._spanContext}setAttribute(A,q){return this}setAttributes(A){return this}addEvent(A,q){return this}addLink(A){return this}addLinks(A){return this}setStatus(A){return this}updateName(A){return this}end(A){}isRecording(){return!1}recordException(A,q){}}ZLA.NonRecordingSpan=WLA});var Ct1=C((TLA)=>{Object.defineProperty(TLA,"__esModule",{value:!0});TLA.getSpanContext=TLA.setSpanContext=TLA.deleteSpan=TLA.setSpan=TLA.getActiveSpan=TLA.getSpan=void 0;var IQK=nh6(),bQK=pK1(),xQK=oh6(),Rt1=(0,IQK.createContextKey)("OpenTelemetry Context Key SPAN");function St1(A){return A.getValue(Rt1)||void 0}TLA.getSpan=St1;function uQK(){return St1(xQK.ContextAPI.getInstance().active())}TLA.getActiveSpan=uQK;function fLA(A,q){return A.setValue(Rt1,q)}TLA.setSpan=fLA;function BQK(A){return A.deleteValue(Rt1)}TLA.deleteSpan=BQK;function mQK(A,q){return fLA(A,new bQK.NonRecordingSpan(q))}TLA.setSpanContext=mQK;function gQK(A){var q;return(q=St1(A))===null||q===void 0?void 0:q.spanContext()}TLA.getSpanContext=gQK});var dK1=C((ELA)=>{Object.defineProperty(ELA,"__esModule",{value:!0});ELA.wrapSpanContext=ELA.isSpanContextValid=ELA.isValidSpanId=ELA.isValidTraceId=void 0;var NLA=UK1(),cQK=pK1(),lQK=/^([0-9a-f]{32})$/i,iQK=/^[0-9a-f]{16}$/i;function vLA(A){return lQK.test(A)&&A!==NLA.INVALID_TRACEID}ELA.isValidTraceId=vLA;function kLA(A){return iQK.test(A)&&A!==NLA.INVALID_SPANID}ELA.isValidSpanId=kLA;function nQK(A){return vLA(A.traceId)&&kLA(A.spanId)}ELA.isSpanContextValid=nQK;function rQK(A){return new cQK.NonRecordingSpan(A)}ELA.wrapSpanContext=rQK});var bt1=C((SLA)=>{Object.defineProperty(SLA,"__esModule",{value:!0});SLA.NoopTracer=void 0;var tQK=oh6(),yLA=Ct1(),ht1=pK1(),eQK=dK1(),It1=tQK.ContextAPI.getInstance();class RLA{startSpan(A,q,K=It1.active()){if(Boolean(q===null||q===void 0?void 0:q.root))return new ht1.NonRecordingSpan;let z=K&&(0,yLA.getSpanContext)(K);if(AUK(z)&&(0,eQK.isSpanContextValid)(z))return new ht1.NonRecordingSpan(z);else return new ht1.NonRecordingSpan}startActiveSpan(A,q,K,Y){let z,w,_;if(arguments.length<2)return;else if(arguments.length===2)_=q;else if(arguments.length===3)z=q,_=K;else z=q,w=K,_=Y;let $=w!==null&&w!==void 0?w:It1.active(),O=this.startSpan(A,z,$),H=(0,yLA.setSpan)($,O);return It1.with(H,_,void 0,O)}}SLA.NoopTracer=RLA;function AUK(A){return typeof A==="object"&&typeof A.spanId==="string"&&typeof A.traceId==="string"&&typeof A.traceFlags==="number"}});var xt1=C((ILA)=>{Object.defineProperty(ILA,"__esModule",{value:!0});ILA.ProxyTracer=void 0;var qUK=bt1(),KUK=new qUK.NoopTracer;class hLA{constructor(A,q,K,Y){this._provider=A,this.name=q,this.version=K,this.options=Y}startSpan(A,q,K){return this._getTracer().startSpan(A,q,K)}startActiveSpan(A,q,K,Y){let z=this._getTracer();return Reflect.apply(z.startActiveSpan,z,arguments)}_getTracer(){if(this._delegate)return this._delegate;let A=this._provider.getDelegateTracer(this.name,this.version,this.options);if(!A)return KUK;return this._delegate=A,this._delegate}}ILA.ProxyTracer=hLA});var mLA=C((uLA)=>{Object.defineProperty(uLA,"__esModule",{value:!0});uLA.NoopTracerProvider=void 0;var YUK=bt1();class xLA{getTracer(A,q,K){return new YUK.NoopTracer}}uLA.NoopTracerProvider=xLA});var ut1=C((FLA)=>{Object.defineProperty(FLA,"__esModule",{value:!0});FLA.ProxyTracerProvider=void 0;var zUK=xt1(),wUK=mLA(),_UK=new wUK.NoopTracerProvider;class gLA{getTracer(A,q,K){var Y;return(Y=this.getDelegateTracer(A,q,K))!==null&&Y!==void 0?Y:new zUK.ProxyTracer(this,A,q,K)}getDelegate(){var A;return(A=this._delegate)!==null&&A!==void 0?A:_UK}setDelegate(A){this._delegate=A}getDelegateTracer(A,q,K){var Y;return(Y=this._delegate)===null||Y===void 0?void 0:Y.getTracer(A,q,K)}}FLA.ProxyTracerProvider=gLA});var pLA=C((ULA)=>{Object.defineProperty(ULA,"__esModule",{value:!0});ULA.SamplingDecision=void 0;var $UK;(function(A){A[A.NOT_RECORD=0]="NOT_RECORD",A[A.RECORD=1]="RECORD",A[A.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})($UK=ULA.SamplingDecision||(ULA.SamplingDecision={}))});var cLA=C((dLA)=>{Object.defineProperty(dLA,"__esModule",{value:!0});dLA.SpanKind=void 0;var OUK;(function(A){A[A.INTERNAL=0]="INTERNAL",A[A.SERVER=1]="SERVER",A[A.CLIENT=2]="CLIENT",A[A.PRODUCER=3]="PRODUCER",A[A.CONSUMER=4]="CONSUMER"})(OUK=dLA.SpanKind||(dLA.SpanKind={}))});var iLA=C((lLA)=>{Object.defineProperty(lLA,"__esModule",{value:!0});lLA.SpanStatusCode=void 0;var HUK;(function(A){A[A.UNSET=0]="UNSET",A[A.OK=1]="OK",A[A.ERROR=2]="ERROR"})(HUK=lLA.SpanStatusCode||(lLA.SpanStatusCode={}))});var oLA=C((nLA)=>{Object.defineProperty(nLA,"__esModule",{value:!0});nLA.validateValue=nLA.validateKey=void 0;var Ft1="[_0-9a-z-*/]",jUK=`[a-z]${Ft1}{0,255}`,JUK=`[a-z0-9]${Ft1}{0,240}@[a-z]${Ft1}{0,13}`,MUK=new RegExp(`^(?:${jUK}|${JUK})$`),DUK=/^[ -~]{0,255}[!-~]$/,XUK=/,|=/;function PUK(A){return MUK.test(A)}nLA.validateKey=PUK;function WUK(A){return DUK.test(A)&&!XUK.test(A)}nLA.validateValue=WUK});var KyA=C((AyA)=>{Object.defineProperty(AyA,"__esModule",{value:!0});AyA.TraceStateImpl=void 0;var aLA=oLA(),sLA=32,GUK=512,tLA=",",eLA="=";class Qt1{constructor(A){if(this._internalState=new Map,A)this._parse(A)}set(A,q){let K=this._clone();if(K._internalState.has(A))K._internalState.delete(A);return K._internalState.set(A,q),K}unset(A){let q=this._clone();return q._internalState.delete(A),q}get(A){return this._internalState.get(A)}serialize(){return this._keys().reduce((A,q)=>{return A.push(q+eLA+this.get(q)),A},[]).join(tLA)}_parse(A){if(A.length>GUK)return;if(this._internalState=A.split(tLA).reverse().reduce((q,K)=>{let Y=K.trim(),z=Y.indexOf(eLA);if(z!==-1){let w=Y.slice(0,z),_=Y.slice(z+1,K.length);if((0,aLA.validateKey)(w)&&(0,aLA.validateValue)(_))q.set(w,_)}return q},new Map),this._internalState.size>sLA)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,sLA))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let A=new Qt1;return A._internalState=new Map(this._internalState),A}}AyA.TraceStateImpl=Qt1});var wyA=C((YyA)=>{Object.defineProperty(YyA,"__esModule",{value:!0});YyA.createTraceState=void 0;var fUK=KyA();function TUK(A){return new fUK.TraceStateImpl(A)}YyA.createTraceState=TUK});var OyA=C((_yA)=>{Object.defineProperty(_yA,"__esModule",{value:!0});_yA.context=void 0;var VUK=oh6();_yA.context=VUK.ContextAPI.getInstance()});var JyA=C((HyA)=>{Object.defineProperty(HyA,"__esModule",{value:!0});HyA.diag=void 0;var NUK=rq6();HyA.diag=NUK.DiagAPI.instance()});var XyA=C((MyA)=>{Object.defineProperty(MyA,"__esModule",{value:!0});MyA.NOOP_METER_PROVIDER=MyA.NoopMeterProvider=void 0;var vUK=Tt1();class Ut1{getMeter(A,q,K){return vUK.NOOP_METER}}MyA.NoopMeterProvider=Ut1;MyA.NOOP_METER_PROVIDER=new Ut1});var GyA=C((WyA)=>{Object.defineProperty(WyA,"__esModule",{value:!0});WyA.MetricsAPI=void 0;var EUK=XyA(),pt1=nq6(),PyA=rq6(),dt1="metrics";class ct1{constructor(){}static getInstance(){if(!this._instance)this._instance=new ct1;return this._instance}setGlobalMeterProvider(A){return(0,pt1.registerGlobal)(dt1,A,PyA.DiagAPI.instance())}getMeterProvider(){return(0,pt1.getGlobal)(dt1)||EUK.NOOP_METER_PROVIDER}getMeter(A,q,K){return this.getMeterProvider().getMeter(A,q,K)}disable(){(0,pt1.unregisterGlobal)(dt1,PyA.DiagAPI.instance())}}WyA.MetricsAPI=ct1});var VyA=C((fyA)=>{Object.defineProperty(fyA,"__esModule",{value:!0});fyA.metrics=void 0;var LUK=GyA();fyA.metrics=LUK.MetricsAPI.getInstance()});var EyA=C((vyA)=>{Object.defineProperty(vyA,"__esModule",{value:!0});vyA.NoopTextMapPropagator=void 0;class NyA{inject(A,q){}extract(A,q){return A}fields(){return[]}}vyA.NoopTextMapPropagator=NyA});var SyA=C((yyA)=>{Object.defineProperty(yyA,"__esModule",{value:!0});yyA.deleteBaggage=yyA.setBaggage=yyA.getActiveBaggage=yyA.getBaggage=void 0;var yUK=oh6(),RUK=nh6(),lt1=(0,RUK.createContextKey)("OpenTelemetry Baggage Key");function LyA(A){return A.getValue(lt1)||void 0}yyA.getBaggage=LyA;function SUK(){return LyA(yUK.ContextAPI.getInstance().active())}yyA.getActiveBaggage=SUK;function CUK(A,q){return A.setValue(lt1,q)}yyA.setBaggage=CUK;function hUK(A){return A.deleteValue(lt1)}yyA.deleteBaggage=hUK});var xyA=C((IyA)=>{Object.defineProperty(IyA,"__esModule",{value:!0});IyA.PropagationAPI=void 0;var it1=nq6(),uUK=EyA(),CyA=Nt1(),cK1=SyA(),BUK=jt1(),hyA=rq6(),nt1="propagation",mUK=new uUK.NoopTextMapPropagator;class rt1{constructor(){this.createBaggage=BUK.createBaggage,this.getBaggage=cK1.getBaggage,this.getActiveBaggage=cK1.getActiveBaggage,this.setBaggage=cK1.setBaggage,this.deleteBaggage=cK1.deleteBaggage}static getInstance(){if(!this._instance)this._instance=new rt1;return this._instance}setGlobalPropagator(A){return(0,it1.registerGlobal)(nt1,A,hyA.DiagAPI.instance())}inject(A,q,K=CyA.defaultTextMapSetter){return this._getGlobalPropagator().inject(A,q,K)}extract(A,q,K=CyA.defaultTextMapGetter){return this._getGlobalPropagator().extract(A,q,K)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,it1.unregisterGlobal)(nt1,hyA.DiagAPI.instance())}_getGlobalPropagator(){return(0,it1.getGlobal)(nt1)||mUK}}IyA.PropagationAPI=rt1});var myA=C((uyA)=>{Object.defineProperty(uyA,"__esModule",{value:!0});uyA.propagation=void 0;var gUK=xyA();uyA.propagation=gUK.PropagationAPI.getInstance()});var dyA=C((UyA)=>{Object.defineProperty(UyA,"__esModule",{value:!0});UyA.TraceAPI=void 0;var ot1=nq6(),gyA=ut1(),FyA=dK1(),WM6=Ct1(),QyA=rq6(),at1="trace";class st1{constructor(){this._proxyTracerProvider=new gyA.ProxyTracerProvider,this.wrapSpanContext=FyA.wrapSpanContext,this.isSpanContextValid=FyA.isSpanContextValid,this.deleteSpan=WM6.deleteSpan,this.getSpan=WM6.getSpan,this.getActiveSpan=WM6.getActiveSpan,this.getSpanContext=WM6.getSpanContext,this.setSpan=WM6.setSpan,this.setSpanContext=WM6.setSpanContext}static getInstance(){if(!this._instance)this._instance=new st1;return this._instance}setGlobalTracerProvider(A){let q=(0,ot1.registerGlobal)(at1,this._proxyTracerProvider,QyA.DiagAPI.instance());if(q)this._proxyTracerProvider.setDelegate(A);return q}getTracerProvider(){return(0,ot1.getGlobal)(at1)||this._proxyTracerProvider}getTracer(A,q){return this.getTracerProvider().getTracer(A,q)}disable(){(0,ot1.unregisterGlobal)(at1,QyA.DiagAPI.instance()),this._proxyTracerProvider=new gyA.ProxyTracerProvider}}UyA.TraceAPI=st1});var iyA=C((cyA)=>{Object.defineProperty(cyA,"__esModule",{value:!0});cyA.trace=void 0;var FUK=dyA();cyA.trace=FUK.TraceAPI.getInstance()});var nq=C((M2)=>{Object.defineProperty(M2,"__esModule",{value:!0});M2.trace=M2.propagation=M2.metrics=M2.diag=M2.context=M2.INVALID_SPAN_CONTEXT=M2.INVALID_TRACEID=M2.INVALID_SPANID=M2.isValidSpanId=M2.isValidTraceId=M2.isSpanContextValid=M2.createTraceState=M2.TraceFlags=M2.SpanStatusCode=M2.SpanKind=M2.SamplingDecision=M2.ProxyTracerProvider=M2.ProxyTracer=M2.defaultTextMapSetter=M2.defaultTextMapGetter=M2.ValueType=M2.createNoopMeter=M2.DiagLogLevel=M2.DiagConsoleLogger=M2.ROOT_CONTEXT=M2.createContextKey=M2.baggageEntryMetadataFromString=void 0;var QUK=jt1();Object.defineProperty(M2,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return QUK.baggageEntryMetadataFromString}});var nyA=nh6();Object.defineProperty(M2,"createContextKey",{enumerable:!0,get:function(){return nyA.createContextKey}});Object.defineProperty(M2,"ROOT_CONTEXT",{enumerable:!0,get:function(){return nyA.ROOT_CONTEXT}});var UUK=dEA();Object.defineProperty(M2,"DiagConsoleLogger",{enumerable:!0,get:function(){return UUK.DiagConsoleLogger}});var pUK=gK1();Object.defineProperty(M2,"DiagLogLevel",{enumerable:!0,get:function(){return pUK.DiagLogLevel}});var dUK=Tt1();Object.defineProperty(M2,"createNoopMeter",{enumerable:!0,get:function(){return dUK.createNoopMeter}});var cUK=qLA();Object.defineProperty(M2,"ValueType",{enumerable:!0,get:function(){return cUK.ValueType}});var ryA=Nt1();Object.defineProperty(M2,"defaultTextMapGetter",{enumerable:!0,get:function(){return ryA.defaultTextMapGetter}});Object.defineProperty(M2,"defaultTextMapSetter",{enumerable:!0,get:function(){return ryA.defaultTextMapSetter}});var lUK=xt1();Object.defineProperty(M2,"ProxyTracer",{enumerable:!0,get:function(){return lUK.ProxyTracer}});var iUK=ut1();Object.defineProperty(M2,"ProxyTracerProvider",{enumerable:!0,get:function(){return iUK.ProxyTracerProvider}});var nUK=pLA();Object.defineProperty(M2,"SamplingDecision",{enumerable:!0,get:function(){return nUK.SamplingDecision}});var rUK=cLA();Object.defineProperty(M2,"SpanKind",{enumerable:!0,get:function(){return rUK.SpanKind}});var oUK=iLA();Object.defineProperty(M2,"SpanStatusCode",{enumerable:!0,get:function(){return oUK.SpanStatusCode}});var aUK=yt1();Object.defineProperty(M2,"TraceFlags",{enumerable:!0,get:function(){return aUK.TraceFlags}});var sUK=wyA();Object.defineProperty(M2,"createTraceState",{enumerable:!0,get:function(){return sUK.createTraceState}});var tt1=dK1();Object.defineProperty(M2,"isSpanContextValid",{enumerable:!0,get:function(){return tt1.isSpanContextValid}});Object.defineProperty(M2,"isValidTraceId",{enumerable:!0,get:function(){return tt1.isValidTraceId}});Object.defineProperty(M2,"isValidSpanId",{enumerable:!0,get:function(){return tt1.isValidSpanId}});var et1=UK1();Object.defineProperty(M2,"INVALID_SPANID",{enumerable:!0,get:function(){return et1.INVALID_SPANID}});Object.defineProperty(M2,"INVALID_TRACEID",{enumerable:!0,get:function(){return et1.INVALID_TRACEID}});Object.defineProperty(M2,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return et1.INVALID_SPAN_CONTEXT}});var oyA=OyA();Object.defineProperty(M2,"context",{enumerable:!0,get:function(){return oyA.context}});var ayA=JyA();Object.defineProperty(M2,"diag",{enumerable:!0,get:function(){return ayA.diag}});var syA=VyA();Object.defineProperty(M2,"metrics",{enumerable:!0,get:function(){return syA.metrics}});var tyA=myA();Object.defineProperty(M2,"propagation",{enumerable:!0,get:function(){return tyA.propagation}});var eyA=iyA();Object.defineProperty(M2,"trace",{enumerable:!0,get:function(){return eyA.trace}});M2.default={context:oyA.context,diag:ayA.diag,metrics:syA.metrics,propagation:tyA.propagation,trace:eyA.trace}});var qRA=C((ARA)=>{Object.defineProperty(ARA,"__esModule",{value:!0});ARA.SeverityNumber=void 0;var ApK;(function(A){A[A.UNSPECIFIED=0]="UNSPECIFIED",A[A.TRACE=1]="TRACE",A[A.TRACE2=2]="TRACE2",A[A.TRACE3=3]="TRACE3",A[A.TRACE4=4]="TRACE4",A[A.DEBUG=5]="DEBUG",A[A.DEBUG2=6]="DEBUG2",A[A.DEBUG3=7]="DEBUG3",A[A.DEBUG4=8]="DEBUG4",A[A.INFO=9]="INFO",A[A.INFO2=10]="INFO2",A[A.INFO3=11]="INFO3",A[A.INFO4=12]="INFO4",A[A.WARN=13]="WARN",A[A.WARN2=14]="WARN2",A[A.WARN3=15]="WARN3",A[A.WARN4=16]="WARN4",A[A.ERROR=17]="ERROR",A[A.ERROR2=18]="ERROR2",A[A.ERROR3=19]="ERROR3",A[A.ERROR4=20]="ERROR4",A[A.FATAL=21]="FATAL",A[A.FATAL2=22]="FATAL2",A[A.FATAL3=23]="FATAL3",A[A.FATAL4=24]="FATAL4"})(ApK=ARA.SeverityNumber||(ARA.SeverityNumber={}))});var lK1=C((KRA)=>{Object.defineProperty(KRA,"__esModule",{value:!0});KRA.NOOP_LOGGER=KRA.NoopLogger=void 0;class qe1{emit(A){}}KRA.NoopLogger=qe1;KRA.NOOP_LOGGER=new qe1});var Ye1=C((zRA)=>{Object.defineProperty(zRA,"__esModule",{value:!0});zRA.NOOP_LOGGER_PROVIDER=zRA.NoopLoggerProvider=void 0;var KpK=lK1();class Ke1{getLogger(A,q,K){return new KpK.NoopLogger}}zRA.NoopLoggerProvider=Ke1;zRA.NOOP_LOGGER_PROVIDER=new Ke1});var HRA=C(($RA)=>{Object.defineProperty($RA,"__esModule",{value:!0});$RA.ProxyLogger=void 0;var zpK=lK1();class _RA{constructor(A,q,K,Y){this._provider=A,this.name=q,this.version=K,this.options=Y}emit(A){this._getLogger().emit(A)}_getLogger(){if(this._delegate)return this._delegate;let A=this._provider._getDelegateLogger(this.name,this.version,this.options);if(!A)return zpK.NOOP_LOGGER;return this._delegate=A,this._delegate}}$RA.ProxyLogger=_RA});var ze1=C((JRA)=>{Object.defineProperty(JRA,"__esModule",{value:!0});JRA.ProxyLoggerProvider=void 0;var wpK=Ye1(),_pK=HRA();class jRA{getLogger(A,q,K){var Y;return(Y=this._getDelegateLogger(A,q,K))!==null&&Y!==void 0?Y:new _pK.ProxyLogger(this,A,q,K)}_getDelegate(){var A;return(A=this._delegate)!==null&&A!==void 0?A:wpK.NOOP_LOGGER_PROVIDER}_setDelegate(A){this._delegate=A}_getDelegateLogger(A,q,K){var Y;return(Y=this._delegate)===null||Y===void 0?void 0:Y.getLogger(A,q,K)}}JRA.ProxyLoggerProvider=jRA});var PRA=C((DRA)=>{Object.defineProperty(DRA,"__esModule",{value:!0});DRA._globalThis=void 0;DRA._globalThis=typeof globalThis==="object"?globalThis:global});var WRA=C((we1)=>{Object.defineProperty(we1,"__esModule",{value:!0});we1._globalThis=void 0;var $pK=PRA();Object.defineProperty(we1,"_globalThis",{enumerable:!0,get:function(){return $pK._globalThis}})});var ZRA=C((_e1)=>{Object.defineProperty(_e1,"__esModule",{value:!0});_e1._globalThis=void 0;var HpK=WRA();Object.defineProperty(_e1,"_globalThis",{enumerable:!0,get:function(){return HpK._globalThis}})});var TRA=C((GRA)=>{Object.defineProperty(GRA,"__esModule",{value:!0});GRA.API_BACKWARDS_COMPATIBILITY_VERSION=GRA.makeGetter=GRA._global=GRA.GLOBAL_LOGS_API_KEY=void 0;var JpK=ZRA();GRA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");GRA._global=JpK._globalThis;function MpK(A,q,K){return(Y)=>Y===A?q:K}GRA.makeGetter=MpK;GRA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var kRA=C((NRA)=>{Object.defineProperty(NRA,"__esModule",{value:!0});NRA.LogsAPI=void 0;var ry=TRA(),WpK=Ye1(),VRA=ze1();class $e1{constructor(){this._proxyLoggerProvider=new VRA.ProxyLoggerProvider}static getInstance(){if(!this._instance)this._instance=new $e1;return this._instance}setGlobalLoggerProvider(A){if(ry._global[ry.GLOBAL_LOGS_API_KEY])return this.getLoggerProvider();return ry._global[ry.GLOBAL_LOGS_API_KEY]=(0,ry.makeGetter)(ry.API_BACKWARDS_COMPATIBILITY_VERSION,A,WpK.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(A),A}getLoggerProvider(){var A,q;return(q=(A=ry._global[ry.GLOBAL_LOGS_API_KEY])===null||A===void 0?void 0:A.call(ry._global,ry.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&q!==void 0?q:this._proxyLoggerProvider}getLogger(A,q,K){return this.getLoggerProvider().getLogger(A,q,K)}disable(){delete ry._global[ry.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new VRA.ProxyLoggerProvider}}NRA.LogsAPI=$e1});var Oe1=C((ZM6)=>{Object.defineProperty(ZM6,"__esModule",{value:!0});ZM6.logs=ZM6.ProxyLoggerProvider=ZM6.NoopLogger=ZM6.NOOP_LOGGER=ZM6.SeverityNumber=void 0;var ZpK=qRA();Object.defineProperty(ZM6,"SeverityNumber",{enumerable:!0,get:function(){return ZpK.SeverityNumber}});var ERA=lK1();Object.defineProperty(ZM6,"NOOP_LOGGER",{enumerable:!0,get:function(){return ERA.NOOP_LOGGER}});Object.defineProperty(ZM6,"NoopLogger",{enumerable:!0,get:function(){return ERA.NoopLogger}});var GpK=ze1();Object.defineProperty(ZM6,"ProxyLoggerProvider",{enumerable:!0,get:function(){return GpK.ProxyLoggerProvider}});var fpK=kRA();ZM6.logs=fpK.LogsAPI.getInstance()});var ah6=C((yRA)=>{Object.defineProperty(yRA,"__esModule",{value:!0});yRA.isTracingSuppressed=yRA.unsuppressTracing=yRA.suppressTracing=void 0;var TpK=nq(),He1=(0,TpK.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function VpK(A){return A.setValue(He1,!0)}yRA.suppressTracing=VpK;function NpK(A){return A.deleteValue(He1)}yRA.unsuppressTracing=NpK;function vpK(A){return A.getValue(He1)===!0}yRA.isTracingSuppressed=vpK});var je1=C((SRA)=>{Object.defineProperty(SRA,"__esModule",{value:!0});SRA.BAGGAGE_MAX_TOTAL_LENGTH=SRA.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=SRA.BAGGAGE_MAX_NAME_VALUE_PAIRS=SRA.BAGGAGE_HEADER=SRA.BAGGAGE_ITEMS_SEPARATOR=SRA.BAGGAGE_PROPERTIES_SEPARATOR=SRA.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;SRA.BAGGAGE_KEY_PAIR_SEPARATOR="=";SRA.BAGGAGE_PROPERTIES_SEPARATOR=";";SRA.BAGGAGE_ITEMS_SEPARATOR=",";SRA.BAGGAGE_HEADER="baggage";SRA.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;SRA.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;SRA.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Je1=C((IRA)=>{Object.defineProperty(IRA,"__esModule",{value:!0});IRA.parseKeyPairsIntoRecord=IRA.parsePairKeyValue=IRA.getKeyPairs=IRA.serializeKeyPairs=void 0;var IpK=nq(),oq6=je1();function bpK(A){return A.reduce((q,K)=>{let Y=`${q}${q!==""?oq6.BAGGAGE_ITEMS_SEPARATOR:""}${K}`;return Y.length>oq6.BAGGAGE_MAX_TOTAL_LENGTH?q:Y},"")}IRA.serializeKeyPairs=bpK;function xpK(A){return A.getAllEntries().map(([q,K])=>{let Y=`${encodeURIComponent(q)}=${encodeURIComponent(K.value)}`;if(K.metadata!==void 0)Y+=oq6.BAGGAGE_PROPERTIES_SEPARATOR+K.metadata.toString();return Y})}IRA.getKeyPairs=xpK;function hRA(A){let q=A.split(oq6.BAGGAGE_PROPERTIES_SEPARATOR);if(q.length<=0)return;let K=q.shift();if(!K)return;let Y=K.indexOf(oq6.BAGGAGE_KEY_PAIR_SEPARATOR);if(Y<=0)return;let z=decodeURIComponent(K.substring(0,Y).trim()),w=decodeURIComponent(K.substring(Y+1).trim()),_;if(q.length>0)_=(0,IpK.baggageEntryMetadataFromString)(q.join(oq6.BAGGAGE_PROPERTIES_SEPARATOR));return{key:z,value:w,metadata:_}}IRA.parsePairKeyValue=hRA;function upK(A){let q={};if(typeof A==="string"&&A.length>0)A.split(oq6.BAGGAGE_ITEMS_SEPARATOR).forEach((K)=>{let Y=hRA(K);if(Y!==void 0&&Y.value.length>0)q[Y.key]=Y.value});return q}IRA.parseKeyPairsIntoRecord=upK});var mRA=C((uRA)=>{Object.defineProperty(uRA,"__esModule",{value:!0});uRA.W3CBaggagePropagator=void 0;var Me1=nq(),FpK=ah6(),aq6=je1(),De1=Je1();class xRA{inject(A,q,K){let Y=Me1.propagation.getBaggage(A);if(!Y||(0,FpK.isTracingSuppressed)(A))return;let z=(0,De1.getKeyPairs)(Y).filter((_)=>{return _.length<=aq6.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS}).slice(0,aq6.BAGGAGE_MAX_NAME_VALUE_PAIRS),w=(0,De1.serializeKeyPairs)(z);if(w.length>0)K.set(q,aq6.BAGGAGE_HEADER,w)}extract(A,q,K){let Y=K.get(q,aq6.BAGGAGE_HEADER),z=Array.isArray(Y)?Y.join(aq6.BAGGAGE_ITEMS_SEPARATOR):Y;if(!z)return A;let w={};if(z.length===0)return A;if(z.split(aq6.BAGGAGE_ITEMS_SEPARATOR).forEach(($)=>{let O=(0,De1.parsePairKeyValue)($);if(O){let H={value:O.value};if(O.metadata)H.metadata=O.metadata;w[O.key]=H}}),Object.entries(w).length===0)return A;return Me1.propagation.setBaggage(A,Me1.propagation.createBaggage(w))}fields(){return[aq6.BAGGAGE_HEADER]}}uRA.W3CBaggagePropagator=xRA});var URA=C((FRA)=>{Object.defineProperty(FRA,"__esModule",{value:!0});FRA.AnchoredClock=void 0;class gRA{_monotonicClock;_epochMillis;_performanceMillis;constructor(A,q){this._monotonicClock=q,this._epochMillis=A.now(),this._performanceMillis=q.now()}now(){let A=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+A}}FRA.AnchoredClock=gRA});var rRA=C((iRA)=>{Object.defineProperty(iRA,"__esModule",{value:!0});iRA.isAttributeValue=iRA.isAttributeKey=iRA.sanitizeAttributes=void 0;var pRA=nq();function QpK(A){let q={};if(typeof A!=="object"||A==null)return q;for(let K in A){if(!Object.prototype.hasOwnProperty.call(A,K))continue;if(!dRA(K)){pRA.diag.warn(`Invalid attribute key: ${K}`);continue}let Y=A[K];if(!cRA(Y)){pRA.diag.warn(`Invalid attribute value set for key: ${K}`);continue}if(Array.isArray(Y))q[K]=Y.slice();else q[K]=Y}return q}iRA.sanitizeAttributes=QpK;function dRA(A){return typeof A==="string"&&A!==""}iRA.isAttributeKey=dRA;function cRA(A){if(A==null)return!0;if(Array.isArray(A))return UpK(A);return lRA(typeof A)}iRA.isAttributeValue=cRA;function UpK(A){let q;for(let K of A){if(K==null)continue;let Y=typeof K;if(Y===q)continue;if(!q){if(lRA(Y)){q=Y;continue}return!1}return!1}return!0}function lRA(A){switch(A){case"number":case"boolean":case"string":return!0}return!1}});var Xe1=C((oRA)=>{Object.defineProperty(oRA,"__esModule",{value:!0});oRA.loggingErrorHandler=void 0;var cpK=nq();function lpK(){return(A)=>{cpK.diag.error(ipK(A))}}oRA.loggingErrorHandler=lpK;function ipK(A){if(typeof A==="string")return A;else return JSON.stringify(npK(A))}function npK(A){let q={},K=A;while(K!==null)Object.getOwnPropertyNames(K).forEach((Y)=>{if(q[Y])return;let z=K[Y];if(z)q[Y]=String(z)}),K=Object.getPrototypeOf(K);return q}});var ASA=C((tRA)=>{Object.defineProperty(tRA,"__esModule",{value:!0});tRA.globalErrorHandler=tRA.setGlobalErrorHandler=void 0;var rpK=Xe1(),sRA=(0,rpK.loggingErrorHandler)();function opK(A){sRA=A}tRA.setGlobalErrorHandler=opK;function apK(A){try{sRA(A)}catch{}}tRA.globalErrorHandler=apK});var _SA=C((zSA)=>{Object.defineProperty(zSA,"__esModule",{value:!0});zSA.getStringListFromEnv=zSA.getBooleanFromEnv=zSA.getStringFromEnv=zSA.getNumberFromEnv=void 0;var qSA=nq(),KSA=g6("util");function tpK(A){let q=process.env[A];if(q==null||q.trim()==="")return;let K=Number(q);if(isNaN(K)){qSA.diag.warn(`Unknown value ${(0,KSA.inspect)(q)} for ${A}, expected a number, using defaults`);return}return K}zSA.getNumberFromEnv=tpK;function YSA(A){let q=process.env[A];if(q==null||q.trim()==="")return;return q}zSA.getStringFromEnv=YSA;function epK(A){let q=process.env[A]?.trim().toLowerCase();if(q==null||q==="")return!1;if(q==="true")return!0;else if(q==="false")return!1;else return qSA.diag.warn(`Unknown value ${(0,KSA.inspect)(q)} for ${A}, expected 'true' or 'false', falling back to 'false' (default)`),!1}zSA.getBooleanFromEnv=epK;function AdK(A){return YSA(A)?.split(",").map((q)=>q.trim()).filter((q)=>q!=="")}zSA.getStringListFromEnv=AdK});var HSA=C(($SA)=>{Object.defineProperty($SA,"__esModule",{value:!0});$SA._globalThis=void 0;$SA._globalThis=typeof globalThis==="object"?globalThis:global});var MSA=C((jSA)=>{Object.defineProperty(jSA,"__esModule",{value:!0});jSA.otperformance=void 0;var zdK=g6("perf_hooks");jSA.otperformance=zdK.performance});var PSA=C((DSA)=>{Object.defineProperty(DSA,"__esModule",{value:!0});DSA.VERSION=void 0;DSA.VERSION="2.2.0"});var Pe1=C((WSA)=>{Object.defineProperty(WSA,"__esModule",{value:!0});WSA.createConstMap=void 0;function wdK(A){let q={},K=A.length;for(let Y=0;Y<K;Y++){let z=A[Y];if(z)q[String(z).toUpperCase().replace(/[-.]/g,"_")]=z}return q}WSA.createConstMap=wdK});var XxA=C(($xA)=>{Object.defineProperty($xA,"__esModule",{value:!0});$xA.SEMATTRS_NET_HOST_CARRIER_ICC=$xA.SEMATTRS_NET_HOST_CARRIER_MNC=$xA.SEMATTRS_NET_HOST_CARRIER_MCC=$xA.SEMATTRS_NET_HOST_CARRIER_NAME=$xA.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE=$xA.SEMATTRS_NET_HOST_CONNECTION_TYPE=$xA.SEMATTRS_NET_HOST_NAME=$xA.SEMATTRS_NET_HOST_PORT=$xA.SEMATTRS_NET_HOST_IP=$xA.SEMATTRS_NET_PEER_NAME=$xA.SEMATTRS_NET_PEER_PORT=$xA.SEMATTRS_NET_PEER_IP=$xA.SEMATTRS_NET_TRANSPORT=$xA.SEMATTRS_FAAS_INVOKED_REGION=$xA.SEMATTRS_FAAS_INVOKED_PROVIDER=$xA.SEMATTRS_FAAS_INVOKED_NAME=$xA.SEMATTRS_FAAS_COLDSTART=$xA.SEMATTRS_FAAS_CRON=$xA.SEMATTRS_FAAS_TIME=$xA.SEMATTRS_FAAS_DOCUMENT_NAME=$xA.SEMATTRS_FAAS_DOCUMENT_TIME=$xA.SEMATTRS_FAAS_DOCUMENT_OPERATION=$xA.SEMATTRS_FAAS_DOCUMENT_COLLECTION=$xA.SEMATTRS_FAAS_EXECUTION=$xA.SEMATTRS_FAAS_TRIGGER=$xA.SEMATTRS_EXCEPTION_ESCAPED=$xA.SEMATTRS_EXCEPTION_STACKTRACE=$xA.SEMATTRS_EXCEPTION_MESSAGE=$xA.SEMATTRS_EXCEPTION_TYPE=$xA.SEMATTRS_DB_SQL_TABLE=$xA.SEMATTRS_DB_MONGODB_COLLECTION=$xA.SEMATTRS_DB_REDIS_DATABASE_INDEX=$xA.SEMATTRS_DB_HBASE_NAMESPACE=$xA.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC=$xA.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID=$xA.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT=$xA.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE=$xA.SEMATTRS_DB_CASSANDRA_TABLE=$xA.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL=$xA.SEMATTRS_DB_CASSANDRA_PAGE_SIZE=$xA.SEMATTRS_DB_CASSANDRA_KEYSPACE=$xA.SEMATTRS_DB_MSSQL_INSTANCE_NAME=$xA.SEMATTRS_DB_OPERATION=$xA.SEMATTRS_DB_STATEMENT=$xA.SEMATTRS_DB_NAME=$xA.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME=$xA.SEMATTRS_DB_USER=$xA.SEMATTRS_DB_CONNECTION_STRING=$xA.SEMATTRS_DB_SYSTEM=$xA.SEMATTRS_AWS_LAMBDA_INVOKED_ARN=void 0;$xA.SEMATTRS_MESSAGING_DESTINATION_KIND=$xA.SEMATTRS_MESSAGING_DESTINATION=$xA.SEMATTRS_MESSAGING_SYSTEM=$xA.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=$xA.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=$xA.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT=$xA.SEMATTRS_AWS_DYNAMODB_COUNT=$xA.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS=$xA.SEMATTRS_AWS_DYNAMODB_SEGMENT=$xA.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD=$xA.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT=$xA.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE=$xA.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=$xA.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=$xA.SEMATTRS_AWS_DYNAMODB_SELECT=$xA.SEMATTRS_AWS_DYNAMODB_INDEX_NAME=$xA.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET=$xA.SEMATTRS_AWS_DYNAMODB_LIMIT=$xA.SEMATTRS_AWS_DYNAMODB_PROJECTION=$xA.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ=$xA.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=$xA.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=$xA.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS=$xA.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY=$xA.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES=$xA.SEMATTRS_HTTP_CLIENT_IP=$xA.SEMATTRS_HTTP_ROUTE=$xA.SEMATTRS_HTTP_SERVER_NAME=$xA.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED=$xA.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH=$xA.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=$xA.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH=$xA.SEMATTRS_HTTP_USER_AGENT=$xA.SEMATTRS_HTTP_FLAVOR=$xA.SEMATTRS_HTTP_STATUS_CODE=$xA.SEMATTRS_HTTP_SCHEME=$xA.SEMATTRS_HTTP_HOST=$xA.SEMATTRS_HTTP_TARGET=$xA.SEMATTRS_HTTP_URL=$xA.SEMATTRS_HTTP_METHOD=$xA.SEMATTRS_CODE_LINENO=$xA.SEMATTRS_CODE_FILEPATH=$xA.SEMATTRS_CODE_NAMESPACE=$xA.SEMATTRS_CODE_FUNCTION=$xA.SEMATTRS_THREAD_NAME=$xA.SEMATTRS_THREAD_ID=$xA.SEMATTRS_ENDUSER_SCOPE=$xA.SEMATTRS_ENDUSER_ROLE=$xA.SEMATTRS_ENDUSER_ID=$xA.SEMATTRS_PEER_SERVICE=void 0;$xA.DBSYSTEMVALUES_FILEMAKER=$xA.DBSYSTEMVALUES_DERBY=$xA.DBSYSTEMVALUES_FIREBIRD=$xA.DBSYSTEMVALUES_ADABAS=$xA.DBSYSTEMVALUES_CACHE=$xA.DBSYSTEMVALUES_EDB=$xA.DBSYSTEMVALUES_FIRSTSQL=$xA.DBSYSTEMVALUES_INGRES=$xA.DBSYSTEMVALUES_HANADB=$xA.DBSYSTEMVALUES_MAXDB=$xA.DBSYSTEMVALUES_PROGRESS=$xA.DBSYSTEMVALUES_HSQLDB=$xA.DBSYSTEMVALUES_CLOUDSCAPE=$xA.DBSYSTEMVALUES_HIVE=$xA.DBSYSTEMVALUES_REDSHIFT=$xA.DBSYSTEMVALUES_POSTGRESQL=$xA.DBSYSTEMVALUES_DB2=$xA.DBSYSTEMVALUES_ORACLE=$xA.DBSYSTEMVALUES_MYSQL=$xA.DBSYSTEMVALUES_MSSQL=$xA.DBSYSTEMVALUES_OTHER_SQL=$xA.SemanticAttributes=$xA.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE=$xA.SEMATTRS_MESSAGE_COMPRESSED_SIZE=$xA.SEMATTRS_MESSAGE_ID=$xA.SEMATTRS_MESSAGE_TYPE=$xA.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE=$xA.SEMATTRS_RPC_JSONRPC_ERROR_CODE=$xA.SEMATTRS_RPC_JSONRPC_REQUEST_ID=$xA.SEMATTRS_RPC_JSONRPC_VERSION=$xA.SEMATTRS_RPC_GRPC_STATUS_CODE=$xA.SEMATTRS_RPC_METHOD=$xA.SEMATTRS_RPC_SERVICE=$xA.SEMATTRS_RPC_SYSTEM=$xA.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE=$xA.SEMATTRS_MESSAGING_KAFKA_PARTITION=$xA.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID=$xA.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP=$xA.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY=$xA.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY=$xA.SEMATTRS_MESSAGING_CONSUMER_ID=$xA.SEMATTRS_MESSAGING_OPERATION=$xA.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES=$xA.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES=$xA.SEMATTRS_MESSAGING_CONVERSATION_ID=$xA.SEMATTRS_MESSAGING_MESSAGE_ID=$xA.SEMATTRS_MESSAGING_URL=$xA.SEMATTRS_MESSAGING_PROTOCOL_VERSION=$xA.SEMATTRS_MESSAGING_PROTOCOL=$xA.SEMATTRS_MESSAGING_TEMP_DESTINATION=void 0;$xA.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD=$xA.FaasDocumentOperationValues=$xA.FAASDOCUMENTOPERATIONVALUES_DELETE=$xA.FAASDOCUMENTOPERATIONVALUES_EDIT=$xA.FAASDOCUMENTOPERATIONVALUES_INSERT=$xA.FaasTriggerValues=$xA.FAASTRIGGERVALUES_OTHER=$xA.FAASTRIGGERVALUES_TIMER=$xA.FAASTRIGGERVALUES_PUBSUB=$xA.FAASTRIGGERVALUES_HTTP=$xA.FAASTRIGGERVALUES_DATASOURCE=$xA.DbCassandraConsistencyLevelValues=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ANY=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_THREE=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_TWO=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ONE=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM=$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ALL=$xA.DbSystemValues=$xA.DBSYSTEMVALUES_COCKROACHDB=$xA.DBSYSTEMVALUES_MEMCACHED=$xA.DBSYSTEMVALUES_ELASTICSEARCH=$xA.DBSYSTEMVALUES_GEODE=$xA.DBSYSTEMVALUES_NEO4J=$xA.DBSYSTEMVALUES_DYNAMODB=$xA.DBSYSTEMVALUES_COSMOSDB=$xA.DBSYSTEMVALUES_COUCHDB=$xA.DBSYSTEMVALUES_COUCHBASE=$xA.DBSYSTEMVALUES_REDIS=$xA.DBSYSTEMVALUES_MONGODB=$xA.DBSYSTEMVALUES_HBASE=$xA.DBSYSTEMVALUES_CASSANDRA=$xA.DBSYSTEMVALUES_COLDFUSION=$xA.DBSYSTEMVALUES_H2=$xA.DBSYSTEMVALUES_VERTICA=$xA.DBSYSTEMVALUES_TERADATA=$xA.DBSYSTEMVALUES_SYBASE=$xA.DBSYSTEMVALUES_SQLITE=$xA.DBSYSTEMVALUES_POINTBASE=$xA.DBSYSTEMVALUES_PERVASIVE=$xA.DBSYSTEMVALUES_NETEZZA=$xA.DBSYSTEMVALUES_MARIADB=$xA.DBSYSTEMVALUES_INTERBASE=$xA.DBSYSTEMVALUES_INSTANTDB=$xA.DBSYSTEMVALUES_INFORMIX=void 0;$xA.MESSAGINGOPERATIONVALUES_RECEIVE=$xA.MessagingDestinationKindValues=$xA.MESSAGINGDESTINATIONKINDVALUES_TOPIC=$xA.MESSAGINGDESTINATIONKINDVALUES_QUEUE=$xA.HttpFlavorValues=$xA.HTTPFLAVORVALUES_QUIC=$xA.HTTPFLAVORVALUES_SPDY=$xA.HTTPFLAVORVALUES_HTTP_2_0=$xA.HTTPFLAVORVALUES_HTTP_1_1=$xA.HTTPFLAVORVALUES_HTTP_1_0=$xA.NetHostConnectionSubtypeValues=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_NR=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_GSM=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_LTE=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE=$xA.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS=$xA.NetHostConnectionTypeValues=$xA.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN=$xA.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE=$xA.NETHOSTCONNECTIONTYPEVALUES_CELL=$xA.NETHOSTCONNECTIONTYPEVALUES_WIRED=$xA.NETHOSTCONNECTIONTYPEVALUES_WIFI=$xA.NetTransportValues=$xA.NETTRANSPORTVALUES_OTHER=$xA.NETTRANSPORTVALUES_INPROC=$xA.NETTRANSPORTVALUES_PIPE=$xA.NETTRANSPORTVALUES_UNIX=$xA.NETTRANSPORTVALUES_IP=$xA.NETTRANSPORTVALUES_IP_UDP=$xA.NETTRANSPORTVALUES_IP_TCP=$xA.FaasInvokedProviderValues=$xA.FAASINVOKEDPROVIDERVALUES_GCP=$xA.FAASINVOKEDPROVIDERVALUES_AZURE=$xA.FAASINVOKEDPROVIDERVALUES_AWS=void 0;$xA.MessageTypeValues=$xA.MESSAGETYPEVALUES_RECEIVED=$xA.MESSAGETYPEVALUES_SENT=$xA.RpcGrpcStatusCodeValues=$xA.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED=$xA.RPCGRPCSTATUSCODEVALUES_DATA_LOSS=$xA.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE=$xA.RPCGRPCSTATUSCODEVALUES_INTERNAL=$xA.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED=$xA.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE=$xA.RPCGRPCSTATUSCODEVALUES_ABORTED=$xA.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION=$xA.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED=$xA.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED=$xA.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS=$xA.RPCGRPCSTATUSCODEVALUES_NOT_FOUND=$xA.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED=$xA.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT=$xA.RPCGRPCSTATUSCODEVALUES_UNKNOWN=$xA.RPCGRPCSTATUSCODEVALUES_CANCELLED=$xA.RPCGRPCSTATUSCODEVALUES_OK=$xA.MessagingOperationValues=$xA.MESSAGINGOPERATIONVALUES_PROCESS=void 0;var oy=Pe1(),GSA="aws.lambda.invoked_arn",fSA="db.system",TSA="db.connection_string",VSA="db.user",NSA="db.jdbc.driver_classname",vSA="db.name",kSA="db.statement",ESA="db.operation",LSA="db.mssql.instance_name",ySA="db.cassandra.keyspace",RSA="db.cassandra.page_size",SSA="db.cassandra.consistency_level",CSA="db.cassandra.table",hSA="db.cassandra.idempotence",ISA="db.cassandra.speculative_execution_count",bSA="db.cassandra.coordinator.id",xSA="db.cassandra.coordinator.dc",uSA="db.hbase.namespace",BSA="db.redis.database_index",mSA="db.mongodb.collection",gSA="db.sql.table",FSA="exception.type",QSA="exception.message",USA="exception.stacktrace",pSA="exception.escaped",dSA="faas.trigger",cSA="faas.execution",lSA="faas.document.collection",iSA="faas.document.operation",nSA="faas.document.time",rSA="faas.document.name",oSA="faas.time",aSA="faas.cron",sSA="faas.coldstart",tSA="faas.invoked_name",eSA="faas.invoked_provider",ACA="faas.invoked_region",qCA="net.transport",KCA="net.peer.ip",YCA="net.peer.port",zCA="net.peer.name",wCA="net.host.ip",_CA="net.host.port",$CA="net.host.name",OCA="net.host.connection.type",HCA="net.host.connection.subtype",jCA="net.host.carrier.name",JCA="net.host.carrier.mcc",MCA="net.host.carrier.mnc",DCA="net.host.carrier.icc",XCA="peer.service",PCA="enduser.id",WCA="enduser.role",ZCA="enduser.scope",GCA="thread.id",fCA="thread.name",TCA="code.function",VCA="code.namespace",NCA="code.filepath",vCA="code.lineno",kCA="http.method",ECA="http.url",LCA="http.target",yCA="http.host",RCA="http.scheme",SCA="http.status_code",CCA="http.flavor",hCA="http.user_agent",ICA="http.request_content_length",bCA="http.request_content_length_uncompressed",xCA="http.response_content_length",uCA="http.response_content_length_uncompressed",BCA="http.server_name",mCA="http.route",gCA="http.client_ip",FCA="aws.dynamodb.table_names",QCA="aws.dynamodb.consumed_capacity",UCA="aws.dynamodb.item_collection_metrics",pCA="aws.dynamodb.provisioned_read_capacity",dCA="aws.dynamodb.provisioned_write_capacity",cCA="aws.dynamodb.consistent_read",lCA="aws.dynamodb.projection",iCA="aws.dynamodb.limit",nCA="aws.dynamodb.attributes_to_get",rCA="aws.dynamodb.index_name",oCA="aws.dynamodb.select",aCA="aws.dynamodb.global_secondary_indexes",sCA="aws.dynamodb.local_secondary_indexes",tCA="aws.dynamodb.exclusive_start_table",eCA="aws.dynamodb.table_count",AhA="aws.dynamodb.scan_forward",qhA="aws.dynamodb.segment",KhA="aws.dynamodb.total_segments",YhA="aws.dynamodb.count",zhA="aws.dynamodb.scanned_count",whA="aws.dynamodb.attribute_definitions",_hA="aws.dynamodb.global_secondary_index_updates",$hA="messaging.system",OhA="messaging.destination",HhA="messaging.destination_kind",jhA="messaging.temp_destination",JhA="messaging.protocol",MhA="messaging.protocol_version",DhA="messaging.url",XhA="messaging.message_id",PhA="messaging.conversation_id",WhA="messaging.message_payload_size_bytes",ZhA="messaging.message_payload_compressed_size_bytes",GhA="messaging.operation",fhA="messaging.consumer_id",ThA="messaging.rabbitmq.routing_key",VhA="messaging.kafka.message_key",NhA="messaging.kafka.consumer_group",vhA="messaging.kafka.client_id",khA="messaging.kafka.partition",EhA="messaging.kafka.tombstone",LhA="rpc.system",yhA="rpc.service",RhA="rpc.method",ShA="rpc.grpc.status_code",ChA="rpc.jsonrpc.version",hhA="rpc.jsonrpc.request_id",IhA="rpc.jsonrpc.error_code",bhA="rpc.jsonrpc.error_message",xhA="message.type",uhA="message.id",BhA="message.compressed_size",mhA="message.uncompressed_size";$xA.SEMATTRS_AWS_LAMBDA_INVOKED_ARN=GSA;$xA.SEMATTRS_DB_SYSTEM=fSA;$xA.SEMATTRS_DB_CONNECTION_STRING=TSA;$xA.SEMATTRS_DB_USER=VSA;$xA.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME=NSA;$xA.SEMATTRS_DB_NAME=vSA;$xA.SEMATTRS_DB_STATEMENT=kSA;$xA.SEMATTRS_DB_OPERATION=ESA;$xA.SEMATTRS_DB_MSSQL_INSTANCE_NAME=LSA;$xA.SEMATTRS_DB_CASSANDRA_KEYSPACE=ySA;$xA.SEMATTRS_DB_CASSANDRA_PAGE_SIZE=RSA;$xA.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL=SSA;$xA.SEMATTRS_DB_CASSANDRA_TABLE=CSA;$xA.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE=hSA;$xA.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT=ISA;$xA.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID=bSA;$xA.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC=xSA;$xA.SEMATTRS_DB_HBASE_NAMESPACE=uSA;$xA.SEMATTRS_DB_REDIS_DATABASE_INDEX=BSA;$xA.SEMATTRS_DB_MONGODB_COLLECTION=mSA;$xA.SEMATTRS_DB_SQL_TABLE=gSA;$xA.SEMATTRS_EXCEPTION_TYPE=FSA;$xA.SEMATTRS_EXCEPTION_MESSAGE=QSA;$xA.SEMATTRS_EXCEPTION_STACKTRACE=USA;$xA.SEMATTRS_EXCEPTION_ESCAPED=pSA;$xA.SEMATTRS_FAAS_TRIGGER=dSA;$xA.SEMATTRS_FAAS_EXECUTION=cSA;$xA.SEMATTRS_FAAS_DOCUMENT_COLLECTION=lSA;$xA.SEMATTRS_FAAS_DOCUMENT_OPERATION=iSA;$xA.SEMATTRS_FAAS_DOCUMENT_TIME=nSA;$xA.SEMATTRS_FAAS_DOCUMENT_NAME=rSA;$xA.SEMATTRS_FAAS_TIME=oSA;$xA.SEMATTRS_FAAS_CRON=aSA;$xA.SEMATTRS_FAAS_COLDSTART=sSA;$xA.SEMATTRS_FAAS_INVOKED_NAME=tSA;$xA.SEMATTRS_FAAS_INVOKED_PROVIDER=eSA;$xA.SEMATTRS_FAAS_INVOKED_REGION=ACA;$xA.SEMATTRS_NET_TRANSPORT=qCA;$xA.SEMATTRS_NET_PEER_IP=KCA;$xA.SEMATTRS_NET_PEER_PORT=YCA;$xA.SEMATTRS_NET_PEER_NAME=zCA;$xA.SEMATTRS_NET_HOST_IP=wCA;$xA.SEMATTRS_NET_HOST_PORT=_CA;$xA.SEMATTRS_NET_HOST_NAME=$CA;$xA.SEMATTRS_NET_HOST_CONNECTION_TYPE=OCA;$xA.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE=HCA;$xA.SEMATTRS_NET_HOST_CARRIER_NAME=jCA;$xA.SEMATTRS_NET_HOST_CARRIER_MCC=JCA;$xA.SEMATTRS_NET_HOST_CARRIER_MNC=MCA;$xA.SEMATTRS_NET_HOST_CARRIER_ICC=DCA;$xA.SEMATTRS_PEER_SERVICE=XCA;$xA.SEMATTRS_ENDUSER_ID=PCA;$xA.SEMATTRS_ENDUSER_ROLE=WCA;$xA.SEMATTRS_ENDUSER_SCOPE=ZCA;$xA.SEMATTRS_THREAD_ID=GCA;$xA.SEMATTRS_THREAD_NAME=fCA;$xA.SEMATTRS_CODE_FUNCTION=TCA;$xA.SEMATTRS_CODE_NAMESPACE=VCA;$xA.SEMATTRS_CODE_FILEPATH=NCA;$xA.SEMATTRS_CODE_LINENO=vCA;$xA.SEMATTRS_HTTP_METHOD=kCA;$xA.SEMATTRS_HTTP_URL=ECA;$xA.SEMATTRS_HTTP_TARGET=LCA;$xA.SEMATTRS_HTTP_HOST=yCA;$xA.SEMATTRS_HTTP_SCHEME=RCA;$xA.SEMATTRS_HTTP_STATUS_CODE=SCA;$xA.SEMATTRS_HTTP_FLAVOR=CCA;$xA.SEMATTRS_HTTP_USER_AGENT=hCA;$xA.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH=ICA;$xA.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=bCA;$xA.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH=xCA;$xA.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED=uCA;$xA.SEMATTRS_HTTP_SERVER_NAME=BCA;$xA.SEMATTRS_HTTP_ROUTE=mCA;$xA.SEMATTRS_HTTP_CLIENT_IP=gCA;$xA.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES=FCA;$xA.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY=QCA;$xA.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS=UCA;$xA.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY=pCA;$xA.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY=dCA;$xA.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ=cCA;$xA.SEMATTRS_AWS_DYNAMODB_PROJECTION=lCA;$xA.SEMATTRS_AWS_DYNAMODB_LIMIT=iCA;$xA.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET=nCA;$xA.SEMATTRS_AWS_DYNAMODB_INDEX_NAME=rCA;$xA.SEMATTRS_AWS_DYNAMODB_SELECT=oCA;$xA.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES=aCA;$xA.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES=sCA;$xA.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE=tCA;$xA.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT=eCA;$xA.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD=AhA;$xA.SEMATTRS_AWS_DYNAMODB_SEGMENT=qhA;$xA.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS=KhA;$xA.SEMATTRS_AWS_DYNAMODB_COUNT=YhA;$xA.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT=zhA;$xA.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS=whA;$xA.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES=_hA;$xA.SEMATTRS_MESSAGING_SYSTEM=$hA;$xA.SEMATTRS_MESSAGING_DESTINATION=OhA;$xA.SEMATTRS_MESSAGING_DESTINATION_KIND=HhA;$xA.SEMATTRS_MESSAGING_TEMP_DESTINATION=jhA;$xA.SEMATTRS_MESSAGING_PROTOCOL=JhA;$xA.SEMATTRS_MESSAGING_PROTOCOL_VERSION=MhA;$xA.SEMATTRS_MESSAGING_URL=DhA;$xA.SEMATTRS_MESSAGING_MESSAGE_ID=XhA;$xA.SEMATTRS_MESSAGING_CONVERSATION_ID=PhA;$xA.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES=WhA;$xA.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES=ZhA;$xA.SEMATTRS_MESSAGING_OPERATION=GhA;$xA.SEMATTRS_MESSAGING_CONSUMER_ID=fhA;$xA.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY=ThA;$xA.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY=VhA;$xA.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP=NhA;$xA.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID=vhA;$xA.SEMATTRS_MESSAGING_KAFKA_PARTITION=khA;$xA.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE=EhA;$xA.SEMATTRS_RPC_SYSTEM=LhA;$xA.SEMATTRS_RPC_SERVICE=yhA;$xA.SEMATTRS_RPC_METHOD=RhA;$xA.SEMATTRS_RPC_GRPC_STATUS_CODE=ShA;$xA.SEMATTRS_RPC_JSONRPC_VERSION=ChA;$xA.SEMATTRS_RPC_JSONRPC_REQUEST_ID=hhA;$xA.SEMATTRS_RPC_JSONRPC_ERROR_CODE=IhA;$xA.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE=bhA;$xA.SEMATTRS_MESSAGE_TYPE=xhA;$xA.SEMATTRS_MESSAGE_ID=uhA;$xA.SEMATTRS_MESSAGE_COMPRESSED_SIZE=BhA;$xA.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE=mhA;$xA.SemanticAttributes=(0,oy.createConstMap)([GSA,fSA,TSA,VSA,NSA,vSA,kSA,ESA,LSA,ySA,RSA,SSA,CSA,hSA,ISA,bSA,xSA,uSA,BSA,mSA,gSA,FSA,QSA,USA,pSA,dSA,cSA,lSA,iSA,nSA,rSA,oSA,aSA,sSA,tSA,eSA,ACA,qCA,KCA,YCA,zCA,wCA,_CA,$CA,OCA,HCA,jCA,JCA,MCA,DCA,XCA,PCA,WCA,ZCA,GCA,fCA,TCA,VCA,NCA,vCA,kCA,ECA,LCA,yCA,RCA,SCA,CCA,hCA,ICA,bCA,xCA,uCA,BCA,mCA,gCA,FCA,QCA,UCA,pCA,dCA,cCA,lCA,iCA,nCA,rCA,oCA,aCA,sCA,tCA,eCA,AhA,qhA,KhA,YhA,zhA,whA,_hA,$hA,OhA,HhA,jhA,JhA,MhA,DhA,XhA,PhA,WhA,ZhA,GhA,fhA,ThA,VhA,NhA,vhA,khA,EhA,LhA,yhA,RhA,ShA,ChA,hhA,IhA,bhA,xhA,uhA,BhA,mhA]);var ghA="other_sql",FhA="mssql",QhA="mysql",UhA="oracle",phA="db2",dhA="postgresql",chA="redshift",lhA="hive",ihA="cloudscape",nhA="hsqldb",rhA="progress",ohA="maxdb",ahA="hanadb",shA="ingres",thA="firstsql",ehA="edb",AIA="cache",qIA="adabas",KIA="firebird",YIA="derby",zIA="filemaker",wIA="informix",_IA="instantdb",$IA="interbase",OIA="mariadb",HIA="netezza",jIA="pervasive",JIA="pointbase",MIA="sqlite",DIA="sybase",XIA="teradata",PIA="vertica",WIA="h2",ZIA="coldfusion",GIA="cassandra",fIA="hbase",TIA="mongodb",VIA="redis",NIA="couchbase",vIA="couchdb",kIA="cosmosdb",EIA="dynamodb",LIA="neo4j",yIA="geode",RIA="elasticsearch",SIA="memcached",CIA="cockroachdb";$xA.DBSYSTEMVALUES_OTHER_SQL=ghA;$xA.DBSYSTEMVALUES_MSSQL=FhA;$xA.DBSYSTEMVALUES_MYSQL=QhA;$xA.DBSYSTEMVALUES_ORACLE=UhA;$xA.DBSYSTEMVALUES_DB2=phA;$xA.DBSYSTEMVALUES_POSTGRESQL=dhA;$xA.DBSYSTEMVALUES_REDSHIFT=chA;$xA.DBSYSTEMVALUES_HIVE=lhA;$xA.DBSYSTEMVALUES_CLOUDSCAPE=ihA;$xA.DBSYSTEMVALUES_HSQLDB=nhA;$xA.DBSYSTEMVALUES_PROGRESS=rhA;$xA.DBSYSTEMVALUES_MAXDB=ohA;$xA.DBSYSTEMVALUES_HANADB=ahA;$xA.DBSYSTEMVALUES_INGRES=shA;$xA.DBSYSTEMVALUES_FIRSTSQL=thA;$xA.DBSYSTEMVALUES_EDB=ehA;$xA.DBSYSTEMVALUES_CACHE=AIA;$xA.DBSYSTEMVALUES_ADABAS=qIA;$xA.DBSYSTEMVALUES_FIREBIRD=KIA;$xA.DBSYSTEMVALUES_DERBY=YIA;$xA.DBSYSTEMVALUES_FILEMAKER=zIA;$xA.DBSYSTEMVALUES_INFORMIX=wIA;$xA.DBSYSTEMVALUES_INSTANTDB=_IA;$xA.DBSYSTEMVALUES_INTERBASE=$IA;$xA.DBSYSTEMVALUES_MARIADB=OIA;$xA.DBSYSTEMVALUES_NETEZZA=HIA;$xA.DBSYSTEMVALUES_PERVASIVE=jIA;$xA.DBSYSTEMVALUES_POINTBASE=JIA;$xA.DBSYSTEMVALUES_SQLITE=MIA;$xA.DBSYSTEMVALUES_SYBASE=DIA;$xA.DBSYSTEMVALUES_TERADATA=XIA;$xA.DBSYSTEMVALUES_VERTICA=PIA;$xA.DBSYSTEMVALUES_H2=WIA;$xA.DBSYSTEMVALUES_COLDFUSION=ZIA;$xA.DBSYSTEMVALUES_CASSANDRA=GIA;$xA.DBSYSTEMVALUES_HBASE=fIA;$xA.DBSYSTEMVALUES_MONGODB=TIA;$xA.DBSYSTEMVALUES_REDIS=VIA;$xA.DBSYSTEMVALUES_COUCHBASE=NIA;$xA.DBSYSTEMVALUES_COUCHDB=vIA;$xA.DBSYSTEMVALUES_COSMOSDB=kIA;$xA.DBSYSTEMVALUES_DYNAMODB=EIA;$xA.DBSYSTEMVALUES_NEO4J=LIA;$xA.DBSYSTEMVALUES_GEODE=yIA;$xA.DBSYSTEMVALUES_ELASTICSEARCH=RIA;$xA.DBSYSTEMVALUES_MEMCACHED=SIA;$xA.DBSYSTEMVALUES_COCKROACHDB=CIA;$xA.DbSystemValues=(0,oy.createConstMap)([ghA,FhA,QhA,UhA,phA,dhA,chA,lhA,ihA,nhA,rhA,ohA,ahA,shA,thA,ehA,AIA,qIA,KIA,YIA,zIA,wIA,_IA,$IA,OIA,HIA,jIA,JIA,MIA,DIA,XIA,PIA,WIA,ZIA,GIA,fIA,TIA,VIA,NIA,vIA,kIA,EIA,LIA,yIA,RIA,SIA,CIA]);var hIA="all",IIA="each_quorum",bIA="quorum",xIA="local_quorum",uIA="one",BIA="two",mIA="three",gIA="local_one",FIA="any",QIA="serial",UIA="local_serial";$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ALL=hIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM=IIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM=bIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM=xIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ONE=uIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_TWO=BIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_THREE=mIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE=gIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_ANY=FIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL=QIA;$xA.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL=UIA;$xA.DbCassandraConsistencyLevelValues=(0,oy.createConstMap)([hIA,IIA,bIA,xIA,uIA,BIA,mIA,gIA,FIA,QIA,UIA]);var pIA="datasource",dIA="http",cIA="pubsub",lIA="timer",iIA="other";$xA.FAASTRIGGERVALUES_DATASOURCE=pIA;$xA.FAASTRIGGERVALUES_HTTP=dIA;$xA.FAASTRIGGERVALUES_PUBSUB=cIA;$xA.FAASTRIGGERVALUES_TIMER=lIA;$xA.FAASTRIGGERVALUES_OTHER=iIA;$xA.FaasTriggerValues=(0,oy.createConstMap)([pIA,dIA,cIA,lIA,iIA]);var nIA="insert",rIA="edit",oIA="delete";$xA.FAASDOCUMENTOPERATIONVALUES_INSERT=nIA;$xA.FAASDOCUMENTOPERATIONVALUES_EDIT=rIA;$xA.FAASDOCUMENTOPERATIONVALUES_DELETE=oIA;$xA.FaasDocumentOperationValues=(0,oy.createConstMap)([nIA,rIA,oIA]);var aIA="alibaba_cloud",sIA="aws",tIA="azure",eIA="gcp";$xA.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD=aIA;$xA.FAASINVOKEDPROVIDERVALUES_AWS=sIA;$xA.FAASINVOKEDPROVIDERVALUES_AZURE=tIA;$xA.FAASINVOKEDPROVIDERVALUES_GCP=eIA;$xA.FaasInvokedProviderValues=(0,oy.createConstMap)([aIA,sIA,tIA,eIA]);var AbA="ip_tcp",qbA="ip_udp",KbA="ip",YbA="unix",zbA="pipe",wbA="inproc",_bA="other";$xA.NETTRANSPORTVALUES_IP_TCP=AbA;$xA.NETTRANSPORTVALUES_IP_UDP=qbA;$xA.NETTRANSPORTVALUES_IP=KbA;$xA.NETTRANSPORTVALUES_UNIX=YbA;$xA.NETTRANSPORTVALUES_PIPE=zbA;$xA.NETTRANSPORTVALUES_INPROC=wbA;$xA.NETTRANSPORTVALUES_OTHER=_bA;$xA.NetTransportValues=(0,oy.createConstMap)([AbA,qbA,KbA,YbA,zbA,wbA,_bA]);var $bA="wifi",ObA="wired",HbA="cell",jbA="unavailable",JbA="unknown";$xA.NETHOSTCONNECTIONTYPEVALUES_WIFI=$bA;$xA.NETHOSTCONNECTIONTYPEVALUES_WIRED=ObA;$xA.NETHOSTCONNECTIONTYPEVALUES_CELL=HbA;$xA.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE=jbA;$xA.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN=JbA;$xA.NetHostConnectionTypeValues=(0,oy.createConstMap)([$bA,ObA,HbA,jbA,JbA]);var MbA="gprs",DbA="edge",XbA="umts",PbA="cdma",WbA="evdo_0",ZbA="evdo_a",GbA="cdma2000_1xrtt",fbA="hsdpa",TbA="hsupa",VbA="hspa",NbA="iden",vbA="evdo_b",kbA="lte",EbA="ehrpd",LbA="hspap",ybA="gsm",RbA="td_scdma",SbA="iwlan",CbA="nr",hbA="nrnsa",IbA="lte_ca";$xA.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS=MbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE=DbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS=XbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA=PbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0=WbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A=ZbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT=GbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA=fbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA=TbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA=VbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN=NbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B=vbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_LTE=kbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD=EbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP=LbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_GSM=ybA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA=RbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN=SbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_NR=CbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA=hbA;$xA.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA=IbA;$xA.NetHostConnectionSubtypeValues=(0,oy.createConstMap)([MbA,DbA,XbA,PbA,WbA,ZbA,GbA,fbA,TbA,VbA,NbA,vbA,kbA,EbA,LbA,ybA,RbA,SbA,CbA,hbA,IbA]);var bbA="1.0",xbA="1.1",ubA="2.0",BbA="SPDY",mbA="QUIC";$xA.HTTPFLAVORVALUES_HTTP_1_0=bbA;$xA.HTTPFLAVORVALUES_HTTP_1_1=xbA;$xA.HTTPFLAVORVALUES_HTTP_2_0=ubA;$xA.HTTPFLAVORVALUES_SPDY=BbA;$xA.HTTPFLAVORVALUES_QUIC=mbA;$xA.HttpFlavorValues={HTTP_1_0:bbA,HTTP_1_1:xbA,HTTP_2_0:ubA,SPDY:BbA,QUIC:mbA};var gbA="queue",FbA="topic";$xA.MESSAGINGDESTINATIONKINDVALUES_QUEUE=gbA;$xA.MESSAGINGDESTINATIONKINDVALUES_TOPIC=FbA;$xA.MessagingDestinationKindValues=(0,oy.createConstMap)([gbA,FbA]);var QbA="receive",UbA="process";$xA.MESSAGINGOPERATIONVALUES_RECEIVE=QbA;$xA.MESSAGINGOPERATIONVALUES_PROCESS=UbA;$xA.MessagingOperationValues=(0,oy.createConstMap)([QbA,UbA]);var pbA=0,dbA=1,cbA=2,lbA=3,ibA=4,nbA=5,rbA=6,obA=7,abA=8,sbA=9,tbA=10,ebA=11,AxA=12,qxA=13,KxA=14,YxA=15,zxA=16;$xA.RPCGRPCSTATUSCODEVALUES_OK=pbA;$xA.RPCGRPCSTATUSCODEVALUES_CANCELLED=dbA;$xA.RPCGRPCSTATUSCODEVALUES_UNKNOWN=cbA;$xA.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT=lbA;$xA.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED=ibA;$xA.RPCGRPCSTATUSCODEVALUES_NOT_FOUND=nbA;$xA.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS=rbA;$xA.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED=obA;$xA.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED=abA;$xA.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION=sbA;$xA.RPCGRPCSTATUSCODEVALUES_ABORTED=tbA;$xA.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE=ebA;$xA.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED=AxA;$xA.RPCGRPCSTATUSCODEVALUES_INTERNAL=qxA;$xA.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE=KxA;$xA.RPCGRPCSTATUSCODEVALUES_DATA_LOSS=YxA;$xA.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED=zxA;$xA.RpcGrpcStatusCodeValues={OK:pbA,CANCELLED:dbA,UNKNOWN:cbA,INVALID_ARGUMENT:lbA,DEADLINE_EXCEEDED:ibA,NOT_FOUND:nbA,ALREADY_EXISTS:rbA,PERMISSION_DENIED:obA,RESOURCE_EXHAUSTED:abA,FAILED_PRECONDITION:sbA,ABORTED:tbA,OUT_OF_RANGE:ebA,UNIMPLEMENTED:AxA,INTERNAL:qxA,UNAVAILABLE:KxA,DATA_LOSS:YxA,UNAUTHENTICATED:zxA};var wxA="SENT",_xA="RECEIVED";$xA.MESSAGETYPEVALUES_SENT=wxA;$xA.MESSAGETYPEVALUES_RECEIVED=_xA;$xA.MessageTypeValues=(0,oy.createConstMap)([wxA,_xA])});var PxA=C((sq6)=>{var YrK=sq6&&sq6.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),zrK=sq6&&sq6.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))YrK(q,A,K)};Object.defineProperty(sq6,"__esModule",{value:!0});zrK(XxA(),sq6)});var cBA=C((QBA)=>{Object.defineProperty(QBA,"__esModule",{value:!0});QBA.SEMRESATTRS_K8S_STATEFULSET_NAME=QBA.SEMRESATTRS_K8S_STATEFULSET_UID=QBA.SEMRESATTRS_K8S_DEPLOYMENT_NAME=QBA.SEMRESATTRS_K8S_DEPLOYMENT_UID=QBA.SEMRESATTRS_K8S_REPLICASET_NAME=QBA.SEMRESATTRS_K8S_REPLICASET_UID=QBA.SEMRESATTRS_K8S_CONTAINER_NAME=QBA.SEMRESATTRS_K8S_POD_NAME=QBA.SEMRESATTRS_K8S_POD_UID=QBA.SEMRESATTRS_K8S_NAMESPACE_NAME=QBA.SEMRESATTRS_K8S_NODE_UID=QBA.SEMRESATTRS_K8S_NODE_NAME=QBA.SEMRESATTRS_K8S_CLUSTER_NAME=QBA.SEMRESATTRS_HOST_IMAGE_VERSION=QBA.SEMRESATTRS_HOST_IMAGE_ID=QBA.SEMRESATTRS_HOST_IMAGE_NAME=QBA.SEMRESATTRS_HOST_ARCH=QBA.SEMRESATTRS_HOST_TYPE=QBA.SEMRESATTRS_HOST_NAME=QBA.SEMRESATTRS_HOST_ID=QBA.SEMRESATTRS_FAAS_MAX_MEMORY=QBA.SEMRESATTRS_FAAS_INSTANCE=QBA.SEMRESATTRS_FAAS_VERSION=QBA.SEMRESATTRS_FAAS_ID=QBA.SEMRESATTRS_FAAS_NAME=QBA.SEMRESATTRS_DEVICE_MODEL_NAME=QBA.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER=QBA.SEMRESATTRS_DEVICE_ID=QBA.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT=QBA.SEMRESATTRS_CONTAINER_IMAGE_TAG=QBA.SEMRESATTRS_CONTAINER_IMAGE_NAME=QBA.SEMRESATTRS_CONTAINER_RUNTIME=QBA.SEMRESATTRS_CONTAINER_ID=QBA.SEMRESATTRS_CONTAINER_NAME=QBA.SEMRESATTRS_AWS_LOG_STREAM_ARNS=QBA.SEMRESATTRS_AWS_LOG_STREAM_NAMES=QBA.SEMRESATTRS_AWS_LOG_GROUP_ARNS=QBA.SEMRESATTRS_AWS_LOG_GROUP_NAMES=QBA.SEMRESATTRS_AWS_EKS_CLUSTER_ARN=QBA.SEMRESATTRS_AWS_ECS_TASK_REVISION=QBA.SEMRESATTRS_AWS_ECS_TASK_FAMILY=QBA.SEMRESATTRS_AWS_ECS_TASK_ARN=QBA.SEMRESATTRS_AWS_ECS_LAUNCHTYPE=QBA.SEMRESATTRS_AWS_ECS_CLUSTER_ARN=QBA.SEMRESATTRS_AWS_ECS_CONTAINER_ARN=QBA.SEMRESATTRS_CLOUD_PLATFORM=QBA.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE=QBA.SEMRESATTRS_CLOUD_REGION=QBA.SEMRESATTRS_CLOUD_ACCOUNT_ID=QBA.SEMRESATTRS_CLOUD_PROVIDER=void 0;QBA.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE=QBA.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE=QBA.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS=QBA.CLOUDPLATFORMVALUES_AZURE_AKS=QBA.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES=QBA.CLOUDPLATFORMVALUES_AZURE_VM=QBA.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK=QBA.CLOUDPLATFORMVALUES_AWS_LAMBDA=QBA.CLOUDPLATFORMVALUES_AWS_EKS=QBA.CLOUDPLATFORMVALUES_AWS_ECS=QBA.CLOUDPLATFORMVALUES_AWS_EC2=QBA.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC=QBA.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS=QBA.CloudProviderValues=QBA.CLOUDPROVIDERVALUES_GCP=QBA.CLOUDPROVIDERVALUES_AZURE=QBA.CLOUDPROVIDERVALUES_AWS=QBA.CLOUDPROVIDERVALUES_ALIBABA_CLOUD=QBA.SemanticResourceAttributes=QBA.SEMRESATTRS_WEBENGINE_DESCRIPTION=QBA.SEMRESATTRS_WEBENGINE_VERSION=QBA.SEMRESATTRS_WEBENGINE_NAME=QBA.SEMRESATTRS_TELEMETRY_AUTO_VERSION=QBA.SEMRESATTRS_TELEMETRY_SDK_VERSION=QBA.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE=QBA.SEMRESATTRS_TELEMETRY_SDK_NAME=QBA.SEMRESATTRS_SERVICE_VERSION=QBA.SEMRESATTRS_SERVICE_INSTANCE_ID=QBA.SEMRESATTRS_SERVICE_NAMESPACE=QBA.SEMRESATTRS_SERVICE_NAME=QBA.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION=QBA.SEMRESATTRS_PROCESS_RUNTIME_VERSION=QBA.SEMRESATTRS_PROCESS_RUNTIME_NAME=QBA.SEMRESATTRS_PROCESS_OWNER=QBA.SEMRESATTRS_PROCESS_COMMAND_ARGS=QBA.SEMRESATTRS_PROCESS_COMMAND_LINE=QBA.SEMRESATTRS_PROCESS_COMMAND=QBA.SEMRESATTRS_PROCESS_EXECUTABLE_PATH=QBA.SEMRESATTRS_PROCESS_EXECUTABLE_NAME=QBA.SEMRESATTRS_PROCESS_PID=QBA.SEMRESATTRS_OS_VERSION=QBA.SEMRESATTRS_OS_NAME=QBA.SEMRESATTRS_OS_DESCRIPTION=QBA.SEMRESATTRS_OS_TYPE=QBA.SEMRESATTRS_K8S_CRONJOB_NAME=QBA.SEMRESATTRS_K8S_CRONJOB_UID=QBA.SEMRESATTRS_K8S_JOB_NAME=QBA.SEMRESATTRS_K8S_JOB_UID=QBA.SEMRESATTRS_K8S_DAEMONSET_NAME=QBA.SEMRESATTRS_K8S_DAEMONSET_UID=void 0;QBA.TelemetrySdkLanguageValues=QBA.TELEMETRYSDKLANGUAGEVALUES_WEBJS=QBA.TELEMETRYSDKLANGUAGEVALUES_RUBY=QBA.TELEMETRYSDKLANGUAGEVALUES_PYTHON=QBA.TELEMETRYSDKLANGUAGEVALUES_PHP=QBA.TELEMETRYSDKLANGUAGEVALUES_NODEJS=QBA.TELEMETRYSDKLANGUAGEVALUES_JAVA=QBA.TELEMETRYSDKLANGUAGEVALUES_GO=QBA.TELEMETRYSDKLANGUAGEVALUES_ERLANG=QBA.TELEMETRYSDKLANGUAGEVALUES_DOTNET=QBA.TELEMETRYSDKLANGUAGEVALUES_CPP=QBA.OsTypeValues=QBA.OSTYPEVALUES_Z_OS=QBA.OSTYPEVALUES_SOLARIS=QBA.OSTYPEVALUES_AIX=QBA.OSTYPEVALUES_HPUX=QBA.OSTYPEVALUES_DRAGONFLYBSD=QBA.OSTYPEVALUES_OPENBSD=QBA.OSTYPEVALUES_NETBSD=QBA.OSTYPEVALUES_FREEBSD=QBA.OSTYPEVALUES_DARWIN=QBA.OSTYPEVALUES_LINUX=QBA.OSTYPEVALUES_WINDOWS=QBA.HostArchValues=QBA.HOSTARCHVALUES_X86=QBA.HOSTARCHVALUES_PPC64=QBA.HOSTARCHVALUES_PPC32=QBA.HOSTARCHVALUES_IA64=QBA.HOSTARCHVALUES_ARM64=QBA.HOSTARCHVALUES_ARM32=QBA.HOSTARCHVALUES_AMD64=QBA.AwsEcsLaunchtypeValues=QBA.AWSECSLAUNCHTYPEVALUES_FARGATE=QBA.AWSECSLAUNCHTYPEVALUES_EC2=QBA.CloudPlatformValues=QBA.CLOUDPLATFORMVALUES_GCP_APP_ENGINE=QBA.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS=QBA.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE=QBA.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN=void 0;var tq6=Pe1(),WxA="cloud.provider",ZxA="cloud.account.id",GxA="cloud.region",fxA="cloud.availability_zone",TxA="cloud.platform",VxA="aws.ecs.container.arn",NxA="aws.ecs.cluster.arn",vxA="aws.ecs.launchtype",kxA="aws.ecs.task.arn",ExA="aws.ecs.task.family",LxA="aws.ecs.task.revision",yxA="aws.eks.cluster.arn",RxA="aws.log.group.names",SxA="aws.log.group.arns",CxA="aws.log.stream.names",hxA="aws.log.stream.arns",IxA="container.name",bxA="container.id",xxA="container.runtime",uxA="container.image.name",BxA="container.image.tag",mxA="deployment.environment",gxA="device.id",FxA="device.model.identifier",QxA="device.model.name",UxA="faas.name",pxA="faas.id",dxA="faas.version",cxA="faas.instance",lxA="faas.max_memory",ixA="host.id",nxA="host.name",rxA="host.type",oxA="host.arch",axA="host.image.name",sxA="host.image.id",txA="host.image.version",exA="k8s.cluster.name",AuA="k8s.node.name",quA="k8s.node.uid",KuA="k8s.namespace.name",YuA="k8s.pod.uid",zuA="k8s.pod.name",wuA="k8s.container.name",_uA="k8s.replicaset.uid",$uA="k8s.replicaset.name",OuA="k8s.deployment.uid",HuA="k8s.deployment.name",juA="k8s.statefulset.uid",JuA="k8s.statefulset.name",MuA="k8s.daemonset.uid",DuA="k8s.daemonset.name",XuA="k8s.job.uid",PuA="k8s.job.name",WuA="k8s.cronjob.uid",ZuA="k8s.cronjob.name",GuA="os.type",fuA="os.description",TuA="os.name",VuA="os.version",NuA="process.pid",vuA="process.executable.name",kuA="process.executable.path",EuA="process.command",LuA="process.command_line",yuA="process.command_args",RuA="process.owner",SuA="process.runtime.name",CuA="process.runtime.version",huA="process.runtime.description",IuA="service.name",buA="service.namespace",xuA="service.instance.id",uuA="service.version",BuA="telemetry.sdk.name",muA="telemetry.sdk.language",guA="telemetry.sdk.version",FuA="telemetry.auto.version",QuA="webengine.name",UuA="webengine.version",puA="webengine.description";QBA.SEMRESATTRS_CLOUD_PROVIDER=WxA;QBA.SEMRESATTRS_CLOUD_ACCOUNT_ID=ZxA;QBA.SEMRESATTRS_CLOUD_REGION=GxA;QBA.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE=fxA;QBA.SEMRESATTRS_CLOUD_PLATFORM=TxA;QBA.SEMRESATTRS_AWS_ECS_CONTAINER_ARN=VxA;QBA.SEMRESATTRS_AWS_ECS_CLUSTER_ARN=NxA;QBA.SEMRESATTRS_AWS_ECS_LAUNCHTYPE=vxA;QBA.SEMRESATTRS_AWS_ECS_TASK_ARN=kxA;QBA.SEMRESATTRS_AWS_ECS_TASK_FAMILY=ExA;QBA.SEMRESATTRS_AWS_ECS_TASK_REVISION=LxA;QBA.SEMRESATTRS_AWS_EKS_CLUSTER_ARN=yxA;QBA.SEMRESATTRS_AWS_LOG_GROUP_NAMES=RxA;QBA.SEMRESATTRS_AWS_LOG_GROUP_ARNS=SxA;QBA.SEMRESATTRS_AWS_LOG_STREAM_NAMES=CxA;QBA.SEMRESATTRS_AWS_LOG_STREAM_ARNS=hxA;QBA.SEMRESATTRS_CONTAINER_NAME=IxA;QBA.SEMRESATTRS_CONTAINER_ID=bxA;QBA.SEMRESATTRS_CONTAINER_RUNTIME=xxA;QBA.SEMRESATTRS_CONTAINER_IMAGE_NAME=uxA;QBA.SEMRESATTRS_CONTAINER_IMAGE_TAG=BxA;QBA.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT=mxA;QBA.SEMRESATTRS_DEVICE_ID=gxA;QBA.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER=FxA;QBA.SEMRESATTRS_DEVICE_MODEL_NAME=QxA;QBA.SEMRESATTRS_FAAS_NAME=UxA;QBA.SEMRESATTRS_FAAS_ID=pxA;QBA.SEMRESATTRS_FAAS_VERSION=dxA;QBA.SEMRESATTRS_FAAS_INSTANCE=cxA;QBA.SEMRESATTRS_FAAS_MAX_MEMORY=lxA;QBA.SEMRESATTRS_HOST_ID=ixA;QBA.SEMRESATTRS_HOST_NAME=nxA;QBA.SEMRESATTRS_HOST_TYPE=rxA;QBA.SEMRESATTRS_HOST_ARCH=oxA;QBA.SEMRESATTRS_HOST_IMAGE_NAME=axA;QBA.SEMRESATTRS_HOST_IMAGE_ID=sxA;QBA.SEMRESATTRS_HOST_IMAGE_VERSION=txA;QBA.SEMRESATTRS_K8S_CLUSTER_NAME=exA;QBA.SEMRESATTRS_K8S_NODE_NAME=AuA;QBA.SEMRESATTRS_K8S_NODE_UID=quA;QBA.SEMRESATTRS_K8S_NAMESPACE_NAME=KuA;QBA.SEMRESATTRS_K8S_POD_UID=YuA;QBA.SEMRESATTRS_K8S_POD_NAME=zuA;QBA.SEMRESATTRS_K8S_CONTAINER_NAME=wuA;QBA.SEMRESATTRS_K8S_REPLICASET_UID=_uA;QBA.SEMRESATTRS_K8S_REPLICASET_NAME=$uA;QBA.SEMRESATTRS_K8S_DEPLOYMENT_UID=OuA;QBA.SEMRESATTRS_K8S_DEPLOYMENT_NAME=HuA;QBA.SEMRESATTRS_K8S_STATEFULSET_UID=juA;QBA.SEMRESATTRS_K8S_STATEFULSET_NAME=JuA;QBA.SEMRESATTRS_K8S_DAEMONSET_UID=MuA;QBA.SEMRESATTRS_K8S_DAEMONSET_NAME=DuA;QBA.SEMRESATTRS_K8S_JOB_UID=XuA;QBA.SEMRESATTRS_K8S_JOB_NAME=PuA;QBA.SEMRESATTRS_K8S_CRONJOB_UID=WuA;QBA.SEMRESATTRS_K8S_CRONJOB_NAME=ZuA;QBA.SEMRESATTRS_OS_TYPE=GuA;QBA.SEMRESATTRS_OS_DESCRIPTION=fuA;QBA.SEMRESATTRS_OS_NAME=TuA;QBA.SEMRESATTRS_OS_VERSION=VuA;QBA.SEMRESATTRS_PROCESS_PID=NuA;QBA.SEMRESATTRS_PROCESS_EXECUTABLE_NAME=vuA;QBA.SEMRESATTRS_PROCESS_EXECUTABLE_PATH=kuA;QBA.SEMRESATTRS_PROCESS_COMMAND=EuA;QBA.SEMRESATTRS_PROCESS_COMMAND_LINE=LuA;QBA.SEMRESATTRS_PROCESS_COMMAND_ARGS=yuA;QBA.SEMRESATTRS_PROCESS_OWNER=RuA;QBA.SEMRESATTRS_PROCESS_RUNTIME_NAME=SuA;QBA.SEMRESATTRS_PROCESS_RUNTIME_VERSION=CuA;QBA.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION=huA;QBA.SEMRESATTRS_SERVICE_NAME=IuA;QBA.SEMRESATTRS_SERVICE_NAMESPACE=buA;QBA.SEMRESATTRS_SERVICE_INSTANCE_ID=xuA;QBA.SEMRESATTRS_SERVICE_VERSION=uuA;QBA.SEMRESATTRS_TELEMETRY_SDK_NAME=BuA;QBA.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE=muA;QBA.SEMRESATTRS_TELEMETRY_SDK_VERSION=guA;QBA.SEMRESATTRS_TELEMETRY_AUTO_VERSION=FuA;QBA.SEMRESATTRS_WEBENGINE_NAME=QuA;QBA.SEMRESATTRS_WEBENGINE_VERSION=UuA;QBA.SEMRESATTRS_WEBENGINE_DESCRIPTION=puA;QBA.SemanticResourceAttributes=(0,tq6.createConstMap)([WxA,ZxA,GxA,fxA,TxA,VxA,NxA,vxA,kxA,ExA,LxA,yxA,RxA,SxA,CxA,hxA,IxA,bxA,xxA,uxA,BxA,mxA,gxA,FxA,QxA,UxA,pxA,dxA,cxA,lxA,ixA,nxA,rxA,oxA,axA,sxA,txA,exA,AuA,quA,KuA,YuA,zuA,wuA,_uA,$uA,OuA,HuA,juA,JuA,MuA,DuA,XuA,PuA,WuA,ZuA,GuA,fuA,TuA,VuA,NuA,vuA,kuA,EuA,LuA,yuA,RuA,SuA,CuA,huA,IuA,buA,xuA,uuA,BuA,muA,guA,FuA,QuA,UuA,puA]);var duA="alibaba_cloud",cuA="aws",luA="azure",iuA="gcp";QBA.CLOUDPROVIDERVALUES_ALIBABA_CLOUD=duA;QBA.CLOUDPROVIDERVALUES_AWS=cuA;QBA.CLOUDPROVIDERVALUES_AZURE=luA;QBA.CLOUDPROVIDERVALUES_GCP=iuA;QBA.CloudProviderValues=(0,tq6.createConstMap)([duA,cuA,luA,iuA]);var nuA="alibaba_cloud_ecs",ruA="alibaba_cloud_fc",ouA="aws_ec2",auA="aws_ecs",suA="aws_eks",tuA="aws_lambda",euA="aws_elastic_beanstalk",ABA="azure_vm",qBA="azure_container_instances",KBA="azure_aks",YBA="azure_functions",zBA="azure_app_service",wBA="gcp_compute_engine",_BA="gcp_cloud_run",$BA="gcp_kubernetes_engine",OBA="gcp_cloud_functions",HBA="gcp_app_engine";QBA.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS=nuA;QBA.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC=ruA;QBA.CLOUDPLATFORMVALUES_AWS_EC2=ouA;QBA.CLOUDPLATFORMVALUES_AWS_ECS=auA;QBA.CLOUDPLATFORMVALUES_AWS_EKS=suA;QBA.CLOUDPLATFORMVALUES_AWS_LAMBDA=tuA;QBA.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK=euA;QBA.CLOUDPLATFORMVALUES_AZURE_VM=ABA;QBA.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES=qBA;QBA.CLOUDPLATFORMVALUES_AZURE_AKS=KBA;QBA.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS=YBA;QBA.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE=zBA;QBA.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE=wBA;QBA.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN=_BA;QBA.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE=$BA;QBA.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS=OBA;QBA.CLOUDPLATFORMVALUES_GCP_APP_ENGINE=HBA;QBA.CloudPlatformValues=(0,tq6.createConstMap)([nuA,ruA,ouA,auA,suA,tuA,euA,ABA,qBA,KBA,YBA,zBA,wBA,_BA,$BA,OBA,HBA]);var jBA="ec2",JBA="fargate";QBA.AWSECSLAUNCHTYPEVALUES_EC2=jBA;QBA.AWSECSLAUNCHTYPEVALUES_FARGATE=JBA;QBA.AwsEcsLaunchtypeValues=(0,tq6.createConstMap)([jBA,JBA]);var MBA="amd64",DBA="arm32",XBA="arm64",PBA="ia64",WBA="ppc32",ZBA="ppc64",GBA="x86";QBA.HOSTARCHVALUES_AMD64=MBA;QBA.HOSTARCHVALUES_ARM32=DBA;QBA.HOSTARCHVALUES_ARM64=XBA;QBA.HOSTARCHVALUES_IA64=PBA;QBA.HOSTARCHVALUES_PPC32=WBA;QBA.HOSTARCHVALUES_PPC64=ZBA;QBA.HOSTARCHVALUES_X86=GBA;QBA.HostArchValues=(0,tq6.createConstMap)([MBA,DBA,XBA,PBA,WBA,ZBA,GBA]);var fBA="windows",TBA="linux",VBA="darwin",NBA="freebsd",vBA="netbsd",kBA="openbsd",EBA="dragonflybsd",LBA="hpux",yBA="aix",RBA="solaris",SBA="z_os";QBA.OSTYPEVALUES_WINDOWS=fBA;QBA.OSTYPEVALUES_LINUX=TBA;QBA.OSTYPEVALUES_DARWIN=VBA;QBA.OSTYPEVALUES_FREEBSD=NBA;QBA.OSTYPEVALUES_NETBSD=vBA;QBA.OSTYPEVALUES_OPENBSD=kBA;QBA.OSTYPEVALUES_DRAGONFLYBSD=EBA;QBA.OSTYPEVALUES_HPUX=LBA;QBA.OSTYPEVALUES_AIX=yBA;QBA.OSTYPEVALUES_SOLARIS=RBA;QBA.OSTYPEVALUES_Z_OS=SBA;QBA.OsTypeValues=(0,tq6.createConstMap)([fBA,TBA,VBA,NBA,vBA,kBA,EBA,LBA,yBA,RBA,SBA]);var CBA="cpp",hBA="dotnet",IBA="erlang",bBA="go",xBA="java",uBA="nodejs",BBA="php",mBA="python",gBA="ruby",FBA="webjs";QBA.TELEMETRYSDKLANGUAGEVALUES_CPP=CBA;QBA.TELEMETRYSDKLANGUAGEVALUES_DOTNET=hBA;QBA.TELEMETRYSDKLANGUAGEVALUES_ERLANG=IBA;QBA.TELEMETRYSDKLANGUAGEVALUES_GO=bBA;QBA.TELEMETRYSDKLANGUAGEVALUES_JAVA=xBA;QBA.TELEMETRYSDKLANGUAGEVALUES_NODEJS=uBA;QBA.TELEMETRYSDKLANGUAGEVALUES_PHP=BBA;QBA.TELEMETRYSDKLANGUAGEVALUES_PYTHON=mBA;QBA.TELEMETRYSDKLANGUAGEVALUES_RUBY=gBA;QBA.TELEMETRYSDKLANGUAGEVALUES_WEBJS=FBA;QBA.TelemetrySdkLanguageValues=(0,tq6.createConstMap)([CBA,hBA,IBA,bBA,xBA,uBA,BBA,mBA,gBA,FBA])});var lBA=C((eq6)=>{var baK=eq6&&eq6.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),xaK=eq6&&eq6.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))baK(q,A,K)};Object.defineProperty(eq6,"__esModule",{value:!0});xaK(cBA(),eq6)});var aBA=C((iBA)=>{Object.defineProperty(iBA,"__esModule",{value:!0});iBA.ATTR_EXCEPTION_TYPE=iBA.ATTR_EXCEPTION_STACKTRACE=iBA.ATTR_EXCEPTION_MESSAGE=iBA.ATTR_EXCEPTION_ESCAPED=iBA.ERROR_TYPE_VALUE_OTHER=iBA.ATTR_ERROR_TYPE=iBA.DOTNET_GC_HEAP_GENERATION_VALUE_POH=iBA.DOTNET_GC_HEAP_GENERATION_VALUE_LOH=iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2=iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1=iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0=iBA.ATTR_DOTNET_GC_HEAP_GENERATION=iBA.DB_SYSTEM_NAME_VALUE_POSTGRESQL=iBA.DB_SYSTEM_NAME_VALUE_MYSQL=iBA.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER=iBA.DB_SYSTEM_NAME_VALUE_MARIADB=iBA.ATTR_DB_SYSTEM_NAME=iBA.ATTR_DB_STORED_PROCEDURE_NAME=iBA.ATTR_DB_RESPONSE_STATUS_CODE=iBA.ATTR_DB_QUERY_TEXT=iBA.ATTR_DB_QUERY_SUMMARY=iBA.ATTR_DB_OPERATION_NAME=iBA.ATTR_DB_OPERATION_BATCH_SIZE=iBA.ATTR_DB_NAMESPACE=iBA.ATTR_DB_COLLECTION_NAME=iBA.ATTR_CODE_STACKTRACE=iBA.ATTR_CODE_LINE_NUMBER=iBA.ATTR_CODE_FUNCTION_NAME=iBA.ATTR_CODE_FILE_PATH=iBA.ATTR_CODE_COLUMN_NUMBER=iBA.ATTR_CLIENT_PORT=iBA.ATTR_CLIENT_ADDRESS=iBA.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED=iBA.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS=iBA.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE=iBA.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS=iBA.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK=iBA.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED=iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED=iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER=iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER=iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED=iBA.ATTR_ASPNETCORE_RATE_LIMITING_RESULT=iBA.ATTR_ASPNETCORE_RATE_LIMITING_POLICY=iBA.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE=iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED=iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED=iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED=iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED=iBA.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT=void 0;iBA.OTEL_STATUS_CODE_VALUE_ERROR=iBA.ATTR_OTEL_STATUS_CODE=iBA.ATTR_OTEL_SCOPE_VERSION=iBA.ATTR_OTEL_SCOPE_NAME=iBA.NETWORK_TYPE_VALUE_IPV6=iBA.NETWORK_TYPE_VALUE_IPV4=iBA.ATTR_NETWORK_TYPE=iBA.NETWORK_TRANSPORT_VALUE_UNIX=iBA.NETWORK_TRANSPORT_VALUE_UDP=iBA.NETWORK_TRANSPORT_VALUE_TCP=iBA.NETWORK_TRANSPORT_VALUE_QUIC=iBA.NETWORK_TRANSPORT_VALUE_PIPE=iBA.ATTR_NETWORK_TRANSPORT=iBA.ATTR_NETWORK_PROTOCOL_VERSION=iBA.ATTR_NETWORK_PROTOCOL_NAME=iBA.ATTR_NETWORK_PEER_PORT=iBA.ATTR_NETWORK_PEER_ADDRESS=iBA.ATTR_NETWORK_LOCAL_PORT=iBA.ATTR_NETWORK_LOCAL_ADDRESS=iBA.JVM_THREAD_STATE_VALUE_WAITING=iBA.JVM_THREAD_STATE_VALUE_TIMED_WAITING=iBA.JVM_THREAD_STATE_VALUE_TERMINATED=iBA.JVM_THREAD_STATE_VALUE_RUNNABLE=iBA.JVM_THREAD_STATE_VALUE_NEW=iBA.JVM_THREAD_STATE_VALUE_BLOCKED=iBA.ATTR_JVM_THREAD_STATE=iBA.ATTR_JVM_THREAD_DAEMON=iBA.JVM_MEMORY_TYPE_VALUE_NON_HEAP=iBA.JVM_MEMORY_TYPE_VALUE_HEAP=iBA.ATTR_JVM_MEMORY_TYPE=iBA.ATTR_JVM_MEMORY_POOL_NAME=iBA.ATTR_JVM_GC_NAME=iBA.ATTR_JVM_GC_ACTION=iBA.ATTR_HTTP_ROUTE=iBA.ATTR_HTTP_RESPONSE_STATUS_CODE=iBA.ATTR_HTTP_RESPONSE_HEADER=iBA.ATTR_HTTP_REQUEST_RESEND_COUNT=iBA.ATTR_HTTP_REQUEST_METHOD_ORIGINAL=iBA.HTTP_REQUEST_METHOD_VALUE_TRACE=iBA.HTTP_REQUEST_METHOD_VALUE_PUT=iBA.HTTP_REQUEST_METHOD_VALUE_POST=iBA.HTTP_REQUEST_METHOD_VALUE_PATCH=iBA.HTTP_REQUEST_METHOD_VALUE_OPTIONS=iBA.HTTP_REQUEST_METHOD_VALUE_HEAD=iBA.HTTP_REQUEST_METHOD_VALUE_GET=iBA.HTTP_REQUEST_METHOD_VALUE_DELETE=iBA.HTTP_REQUEST_METHOD_VALUE_CONNECT=iBA.HTTP_REQUEST_METHOD_VALUE_OTHER=iBA.ATTR_HTTP_REQUEST_METHOD=iBA.ATTR_HTTP_REQUEST_HEADER=void 0;iBA.ATTR_USER_AGENT_ORIGINAL=iBA.ATTR_URL_SCHEME=iBA.ATTR_URL_QUERY=iBA.ATTR_URL_PATH=iBA.ATTR_URL_FULL=iBA.ATTR_URL_FRAGMENT=iBA.ATTR_TELEMETRY_SDK_VERSION=iBA.ATTR_TELEMETRY_SDK_NAME=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_RUST=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_PHP=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_GO=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET=iBA.TELEMETRY_SDK_LANGUAGE_VALUE_CPP=iBA.ATTR_TELEMETRY_SDK_LANGUAGE=iBA.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS=iBA.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS=iBA.SIGNALR_TRANSPORT_VALUE_LONG_POLLING=iBA.ATTR_SIGNALR_TRANSPORT=iBA.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT=iBA.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE=iBA.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN=iBA.ATTR_SIGNALR_CONNECTION_STATUS=iBA.ATTR_SERVICE_VERSION=iBA.ATTR_SERVICE_NAME=iBA.ATTR_SERVER_PORT=iBA.ATTR_SERVER_ADDRESS=iBA.ATTR_OTEL_STATUS_DESCRIPTION=iBA.OTEL_STATUS_CODE_VALUE_OK=void 0;iBA.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT="aspnetcore.diagnostics.exception.result";iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED="aborted";iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED="handled";iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED="skipped";iBA.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED="unhandled";iBA.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE="aspnetcore.diagnostics.handler.type";iBA.ATTR_ASPNETCORE_RATE_LIMITING_POLICY="aspnetcore.rate_limiting.policy";iBA.ATTR_ASPNETCORE_RATE_LIMITING_RESULT="aspnetcore.rate_limiting.result";iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED="acquired";iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER="endpoint_limiter";iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER="global_limiter";iBA.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED="request_canceled";iBA.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED="aspnetcore.request.is_unhandled";iBA.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK="aspnetcore.routing.is_fallback";iBA.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS="aspnetcore.routing.match_status";iBA.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE="failure";iBA.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS="success";iBA.ATTR_ASPNETCORE_USER_IS_AUTHENTICATED="aspnetcore.user.is_authenticated";iBA.ATTR_CLIENT_ADDRESS="client.address";iBA.ATTR_CLIENT_PORT="client.port";iBA.ATTR_CODE_COLUMN_NUMBER="code.column.number";iBA.ATTR_CODE_FILE_PATH="code.file.path";iBA.ATTR_CODE_FUNCTION_NAME="code.function.name";iBA.ATTR_CODE_LINE_NUMBER="code.line.number";iBA.ATTR_CODE_STACKTRACE="code.stacktrace";iBA.ATTR_DB_COLLECTION_NAME="db.collection.name";iBA.ATTR_DB_NAMESPACE="db.namespace";iBA.ATTR_DB_OPERATION_BATCH_SIZE="db.operation.batch.size";iBA.ATTR_DB_OPERATION_NAME="db.operation.name";iBA.ATTR_DB_QUERY_SUMMARY="db.query.summary";iBA.ATTR_DB_QUERY_TEXT="db.query.text";iBA.ATTR_DB_RESPONSE_STATUS_CODE="db.response.status_code";iBA.ATTR_DB_STORED_PROCEDURE_NAME="db.stored_procedure.name";iBA.ATTR_DB_SYSTEM_NAME="db.system.name";iBA.DB_SYSTEM_NAME_VALUE_MARIADB="mariadb";iBA.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER="microsoft.sql_server";iBA.DB_SYSTEM_NAME_VALUE_MYSQL="mysql";iBA.DB_SYSTEM_NAME_VALUE_POSTGRESQL="postgresql";iBA.ATTR_DOTNET_GC_HEAP_GENERATION="dotnet.gc.heap.generation";iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN0="gen0";iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN1="gen1";iBA.DOTNET_GC_HEAP_GENERATION_VALUE_GEN2="gen2";iBA.DOTNET_GC_HEAP_GENERATION_VALUE_LOH="loh";iBA.DOTNET_GC_HEAP_GENERATION_VALUE_POH="poh";iBA.ATTR_ERROR_TYPE="error.type";iBA.ERROR_TYPE_VALUE_OTHER="_OTHER";iBA.ATTR_EXCEPTION_ESCAPED="exception.escaped";iBA.ATTR_EXCEPTION_MESSAGE="exception.message";iBA.ATTR_EXCEPTION_STACKTRACE="exception.stacktrace";iBA.ATTR_EXCEPTION_TYPE="exception.type";var uaK=(A)=>`http.request.header.${A}`;iBA.ATTR_HTTP_REQUEST_HEADER=uaK;iBA.ATTR_HTTP_REQUEST_METHOD="http.request.method";iBA.HTTP_REQUEST_METHOD_VALUE_OTHER="_OTHER";iBA.HTTP_REQUEST_METHOD_VALUE_CONNECT="CONNECT";iBA.HTTP_REQUEST_METHOD_VALUE_DELETE="DELETE";iBA.HTTP_REQUEST_METHOD_VALUE_GET="GET";iBA.HTTP_REQUEST_METHOD_VALUE_HEAD="HEAD";iBA.HTTP_REQUEST_METHOD_VALUE_OPTIONS="OPTIONS";iBA.HTTP_REQUEST_METHOD_VALUE_PATCH="PATCH";iBA.HTTP_REQUEST_METHOD_VALUE_POST="POST";iBA.HTTP_REQUEST_METHOD_VALUE_PUT="PUT";iBA.HTTP_REQUEST_METHOD_VALUE_TRACE="TRACE";iBA.ATTR_HTTP_REQUEST_METHOD_ORIGINAL="http.request.method_original";iBA.ATTR_HTTP_REQUEST_RESEND_COUNT="http.request.resend_count";var BaK=(A)=>`http.response.header.${A}`;iBA.ATTR_HTTP_RESPONSE_HEADER=BaK;iBA.ATTR_HTTP_RESPONSE_STATUS_CODE="http.response.status_code";iBA.ATTR_HTTP_ROUTE="http.route";iBA.ATTR_JVM_GC_ACTION="jvm.gc.action";iBA.ATTR_JVM_GC_NAME="jvm.gc.name";iBA.ATTR_JVM_MEMORY_POOL_NAME="jvm.memory.pool.name";iBA.ATTR_JVM_MEMORY_TYPE="jvm.memory.type";iBA.JVM_MEMORY_TYPE_VALUE_HEAP="heap";iBA.JVM_MEMORY_TYPE_VALUE_NON_HEAP="non_heap";iBA.ATTR_JVM_THREAD_DAEMON="jvm.thread.daemon";iBA.ATTR_JVM_THREAD_STATE="jvm.thread.state";iBA.JVM_THREAD_STATE_VALUE_BLOCKED="blocked";iBA.JVM_THREAD_STATE_VALUE_NEW="new";iBA.JVM_THREAD_STATE_VALUE_RUNNABLE="runnable";iBA.JVM_THREAD_STATE_VALUE_TERMINATED="terminated";iBA.JVM_THREAD_STATE_VALUE_TIMED_WAITING="timed_waiting";iBA.JVM_THREAD_STATE_VALUE_WAITING="waiting";iBA.ATTR_NETWORK_LOCAL_ADDRESS="network.local.address";iBA.ATTR_NETWORK_LOCAL_PORT="network.local.port";iBA.ATTR_NETWORK_PEER_ADDRESS="network.peer.address";iBA.ATTR_NETWORK_PEER_PORT="network.peer.port";iBA.ATTR_NETWORK_PROTOCOL_NAME="network.protocol.name";iBA.ATTR_NETWORK_PROTOCOL_VERSION="network.protocol.version";iBA.ATTR_NETWORK_TRANSPORT="network.transport";iBA.NETWORK_TRANSPORT_VALUE_PIPE="pipe";iBA.NETWORK_TRANSPORT_VALUE_QUIC="quic";iBA.NETWORK_TRANSPORT_VALUE_TCP="tcp";iBA.NETWORK_TRANSPORT_VALUE_UDP="udp";iBA.NETWORK_TRANSPORT_VALUE_UNIX="unix";iBA.ATTR_NETWORK_TYPE="network.type";iBA.NETWORK_TYPE_VALUE_IPV4="ipv4";iBA.NETWORK_TYPE_VALUE_IPV6="ipv6";iBA.ATTR_OTEL_SCOPE_NAME="otel.scope.name";iBA.ATTR_OTEL_SCOPE_VERSION="otel.scope.version";iBA.ATTR_OTEL_STATUS_CODE="otel.status_code";iBA.OTEL_STATUS_CODE_VALUE_ERROR="ERROR";iBA.OTEL_STATUS_CODE_VALUE_OK="OK";iBA.ATTR_OTEL_STATUS_DESCRIPTION="otel.status_description";iBA.ATTR_SERVER_ADDRESS="server.address";iBA.ATTR_SERVER_PORT="server.port";iBA.ATTR_SERVICE_NAME="service.name";iBA.ATTR_SERVICE_VERSION="service.version";iBA.ATTR_SIGNALR_CONNECTION_STATUS="signalr.connection.status";iBA.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN="app_shutdown";iBA.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE="normal_closure";iBA.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT="timeout";iBA.ATTR_SIGNALR_TRANSPORT="signalr.transport";iBA.SIGNALR_TRANSPORT_VALUE_LONG_POLLING="long_polling";iBA.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS="server_sent_events";iBA.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS="web_sockets";iBA.ATTR_TELEMETRY_SDK_LANGUAGE="telemetry.sdk.language";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_CPP="cpp";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET="dotnet";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG="erlang";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_GO="go";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA="java";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS="nodejs";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_PHP="php";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON="python";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY="ruby";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_RUST="rust";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT="swift";iBA.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS="webjs";iBA.ATTR_TELEMETRY_SDK_NAME="telemetry.sdk.name";iBA.ATTR_TELEMETRY_SDK_VERSION="telemetry.sdk.version";iBA.ATTR_URL_FRAGMENT="url.fragment";iBA.ATTR_URL_FULL="url.full";iBA.ATTR_URL_PATH="url.path";iBA.ATTR_URL_QUERY="url.query";iBA.ATTR_URL_SCHEME="url.scheme";iBA.ATTR_USER_AGENT_ORIGINAL="user_agent.original"});var AmA=C((sBA)=>{Object.defineProperty(sBA,"__esModule",{value:!0});sBA.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS=sBA.METRIC_KESTREL_UPGRADED_CONNECTIONS=sBA.METRIC_KESTREL_TLS_HANDSHAKE_DURATION=sBA.METRIC_KESTREL_REJECTED_CONNECTIONS=sBA.METRIC_KESTREL_QUEUED_REQUESTS=sBA.METRIC_KESTREL_QUEUED_CONNECTIONS=sBA.METRIC_KESTREL_CONNECTION_DURATION=sBA.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES=sBA.METRIC_KESTREL_ACTIVE_CONNECTIONS=sBA.METRIC_JVM_THREAD_COUNT=sBA.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC=sBA.METRIC_JVM_MEMORY_USED=sBA.METRIC_JVM_MEMORY_LIMIT=sBA.METRIC_JVM_MEMORY_COMMITTED=sBA.METRIC_JVM_GC_DURATION=sBA.METRIC_JVM_CPU_TIME=sBA.METRIC_JVM_CPU_RECENT_UTILIZATION=sBA.METRIC_JVM_CPU_COUNT=sBA.METRIC_JVM_CLASS_UNLOADED=sBA.METRIC_JVM_CLASS_LOADED=sBA.METRIC_JVM_CLASS_COUNT=sBA.METRIC_HTTP_SERVER_REQUEST_DURATION=sBA.METRIC_HTTP_CLIENT_REQUEST_DURATION=sBA.METRIC_DOTNET_TIMER_COUNT=sBA.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT=sBA.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT=sBA.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH=sBA.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET=sBA.METRIC_DOTNET_PROCESS_CPU_TIME=sBA.METRIC_DOTNET_PROCESS_CPU_COUNT=sBA.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS=sBA.METRIC_DOTNET_JIT_COMPILED_METHODS=sBA.METRIC_DOTNET_JIT_COMPILED_IL_SIZE=sBA.METRIC_DOTNET_JIT_COMPILATION_TIME=sBA.METRIC_DOTNET_GC_PAUSE_TIME=sBA.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE=sBA.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE=sBA.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE=sBA.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED=sBA.METRIC_DOTNET_GC_COLLECTIONS=sBA.METRIC_DOTNET_EXCEPTIONS=sBA.METRIC_DOTNET_ASSEMBLY_COUNT=sBA.METRIC_DB_CLIENT_OPERATION_DURATION=sBA.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS=sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS=sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION=sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE=sBA.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS=sBA.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES=sBA.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS=void 0;sBA.METRIC_SIGNALR_SERVER_CONNECTION_DURATION=void 0;sBA.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS="aspnetcore.diagnostics.exceptions";sBA.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES="aspnetcore.rate_limiting.active_request_leases";sBA.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS="aspnetcore.rate_limiting.queued_requests";sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE="aspnetcore.rate_limiting.request.time_in_queue";sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION="aspnetcore.rate_limiting.request_lease.duration";sBA.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS="aspnetcore.rate_limiting.requests";sBA.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS="aspnetcore.routing.match_attempts";sBA.METRIC_DB_CLIENT_OPERATION_DURATION="db.client.operation.duration";sBA.METRIC_DOTNET_ASSEMBLY_COUNT="dotnet.assembly.count";sBA.METRIC_DOTNET_EXCEPTIONS="dotnet.exceptions";sBA.METRIC_DOTNET_GC_COLLECTIONS="dotnet.gc.collections";sBA.METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED="dotnet.gc.heap.total_allocated";sBA.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE="dotnet.gc.last_collection.heap.fragmentation.size";sBA.METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE="dotnet.gc.last_collection.heap.size";sBA.METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE="dotnet.gc.last_collection.memory.committed_size";sBA.METRIC_DOTNET_GC_PAUSE_TIME="dotnet.gc.pause.time";sBA.METRIC_DOTNET_JIT_COMPILATION_TIME="dotnet.jit.compilation.time";sBA.METRIC_DOTNET_JIT_COMPILED_IL_SIZE="dotnet.jit.compiled_il.size";sBA.METRIC_DOTNET_JIT_COMPILED_METHODS="dotnet.jit.compiled_methods";sBA.METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS="dotnet.monitor.lock_contentions";sBA.METRIC_DOTNET_PROCESS_CPU_COUNT="dotnet.process.cpu.count";sBA.METRIC_DOTNET_PROCESS_CPU_TIME="dotnet.process.cpu.time";sBA.METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET="dotnet.process.memory.working_set";sBA.METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH="dotnet.thread_pool.queue.length";sBA.METRIC_DOTNET_THREAD_POOL_THREAD_COUNT="dotnet.thread_pool.thread.count";sBA.METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT="dotnet.thread_pool.work_item.count";sBA.METRIC_DOTNET_TIMER_COUNT="dotnet.timer.count";sBA.METRIC_HTTP_CLIENT_REQUEST_DURATION="http.client.request.duration";sBA.METRIC_HTTP_SERVER_REQUEST_DURATION="http.server.request.duration";sBA.METRIC_JVM_CLASS_COUNT="jvm.class.count";sBA.METRIC_JVM_CLASS_LOADED="jvm.class.loaded";sBA.METRIC_JVM_CLASS_UNLOADED="jvm.class.unloaded";sBA.METRIC_JVM_CPU_COUNT="jvm.cpu.count";sBA.METRIC_JVM_CPU_RECENT_UTILIZATION="jvm.cpu.recent_utilization";sBA.METRIC_JVM_CPU_TIME="jvm.cpu.time";sBA.METRIC_JVM_GC_DURATION="jvm.gc.duration";sBA.METRIC_JVM_MEMORY_COMMITTED="jvm.memory.committed";sBA.METRIC_JVM_MEMORY_LIMIT="jvm.memory.limit";sBA.METRIC_JVM_MEMORY_USED="jvm.memory.used";sBA.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC="jvm.memory.used_after_last_gc";sBA.METRIC_JVM_THREAD_COUNT="jvm.thread.count";sBA.METRIC_KESTREL_ACTIVE_CONNECTIONS="kestrel.active_connections";sBA.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES="kestrel.active_tls_handshakes";sBA.METRIC_KESTREL_CONNECTION_DURATION="kestrel.connection.duration";sBA.METRIC_KESTREL_QUEUED_CONNECTIONS="kestrel.queued_connections";sBA.METRIC_KESTREL_QUEUED_REQUESTS="kestrel.queued_requests";sBA.METRIC_KESTREL_REJECTED_CONNECTIONS="kestrel.rejected_connections";sBA.METRIC_KESTREL_TLS_HANDSHAKE_DURATION="kestrel.tls_handshake.duration";sBA.METRIC_KESTREL_UPGRADED_CONNECTIONS="kestrel.upgraded_connections";sBA.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS="signalr.server.active_connections";sBA.METRIC_SIGNALR_SERVER_CONNECTION_DURATION="signalr.server.connection.duration"});var YmA=C((qmA)=>{Object.defineProperty(qmA,"__esModule",{value:!0});qmA.EVENT_EXCEPTION=void 0;qmA.EVENT_EXCEPTION="exception"});var AK6=C((LI)=>{var K63=LI&&LI.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),sh6=LI&&LI.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))K63(q,A,K)};Object.defineProperty(LI,"__esModule",{value:!0});sh6(PxA(),LI);sh6(lBA(),LI);sh6(aBA(),LI);sh6(AmA(),LI);sh6(YmA(),LI)});var _mA=C((zmA)=>{Object.defineProperty(zmA,"__esModule",{value:!0});zmA.ATTR_PROCESS_RUNTIME_NAME=void 0;zmA.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var HmA=C(($mA)=>{Object.defineProperty($mA,"__esModule",{value:!0});$mA.SDK_INFO=void 0;var Y63=PSA(),iK1=AK6(),z63=_mA();$mA.SDK_INFO={[iK1.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[z63.ATTR_PROCESS_RUNTIME_NAME]:"node",[iK1.ATTR_TELEMETRY_SDK_LANGUAGE]:iK1.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[iK1.ATTR_TELEMETRY_SDK_VERSION]:Y63.VERSION}});var jmA=C((Wd)=>{Object.defineProperty(Wd,"__esModule",{value:!0});Wd.SDK_INFO=Wd.otperformance=Wd._globalThis=Wd.getStringListFromEnv=Wd.getNumberFromEnv=Wd.getBooleanFromEnv=Wd.getStringFromEnv=void 0;var nK1=_SA();Object.defineProperty(Wd,"getStringFromEnv",{enumerable:!0,get:function(){return nK1.getStringFromEnv}});Object.defineProperty(Wd,"getBooleanFromEnv",{enumerable:!0,get:function(){return nK1.getBooleanFromEnv}});Object.defineProperty(Wd,"getNumberFromEnv",{enumerable:!0,get:function(){return nK1.getNumberFromEnv}});Object.defineProperty(Wd,"getStringListFromEnv",{enumerable:!0,get:function(){return nK1.getStringListFromEnv}});var w63=HSA();Object.defineProperty(Wd,"_globalThis",{enumerable:!0,get:function(){return w63._globalThis}});var _63=MSA();Object.defineProperty(Wd,"otperformance",{enumerable:!0,get:function(){return _63.otperformance}});var $63=HmA();Object.defineProperty(Wd,"SDK_INFO",{enumerable:!0,get:function(){return $63.SDK_INFO}})});var We1=C((Zd)=>{Object.defineProperty(Zd,"__esModule",{value:!0});Zd.getStringListFromEnv=Zd.getNumberFromEnv=Zd.getStringFromEnv=Zd.getBooleanFromEnv=Zd.otperformance=Zd._globalThis=Zd.SDK_INFO=void 0;var qK6=jmA();Object.defineProperty(Zd,"SDK_INFO",{enumerable:!0,get:function(){return qK6.SDK_INFO}});Object.defineProperty(Zd,"_globalThis",{enumerable:!0,get:function(){return qK6._globalThis}});Object.defineProperty(Zd,"otperformance",{enumerable:!0,get:function(){return qK6.otperformance}});Object.defineProperty(Zd,"getBooleanFromEnv",{enumerable:!0,get:function(){return qK6.getBooleanFromEnv}});Object.defineProperty(Zd,"getStringFromEnv",{enumerable:!0,get:function(){return qK6.getStringFromEnv}});Object.defineProperty(Zd,"getNumberFromEnv",{enumerable:!0,get:function(){return qK6.getNumberFromEnv}});Object.defineProperty(Zd,"getStringListFromEnv",{enumerable:!0,get:function(){return qK6.getStringListFromEnv}})});var WmA=C((XmA)=>{Object.defineProperty(XmA,"__esModule",{value:!0});XmA.addHrTimes=XmA.isTimeInput=XmA.isTimeInputHrTime=XmA.hrTimeToMicroseconds=XmA.hrTimeToMilliseconds=XmA.hrTimeToNanoseconds=XmA.hrTimeToTimeStamp=XmA.hrTimeDuration=XmA.timeInputToHrTime=XmA.hrTime=XmA.getTimeOrigin=XmA.millisToHrTime=void 0;var Ze1=We1(),JmA=9,j63=6,J63=Math.pow(10,j63),rK1=Math.pow(10,JmA);function th6(A){let q=A/1000,K=Math.trunc(q),Y=Math.round(A%1000*J63);return[K,Y]}XmA.millisToHrTime=th6;function Ge1(){let A=Ze1.otperformance.timeOrigin;if(typeof A!=="number"){let q=Ze1.otperformance;A=q.timing&&q.timing.fetchStart}return A}XmA.getTimeOrigin=Ge1;function MmA(A){let q=th6(Ge1()),K=th6(typeof A==="number"?A:Ze1.otperformance.now());return DmA(q,K)}XmA.hrTime=MmA;function M63(A){if(fe1(A))return A;else if(typeof A==="number")if(A<Ge1())return MmA(A);else return th6(A);else if(A instanceof Date)return th6(A.getTime());else throw TypeError("Invalid input type")}XmA.timeInputToHrTime=M63;function D63(A,q){let K=q[0]-A[0],Y=q[1]-A[1];if(Y<0)K-=1,Y+=rK1;return[K,Y]}XmA.hrTimeDuration=D63;function X63(A){let q=JmA,K=`${"0".repeat(q)}${A[1]}Z`,Y=K.substring(K.length-q-1);return new Date(A[0]*1000).toISOString().replace("000Z",Y)}XmA.hrTimeToTimeStamp=X63;function P63(A){return A[0]*rK1+A[1]}XmA.hrTimeToNanoseconds=P63;function W63(A){return A[0]*1000+A[1]/1e6}XmA.hrTimeToMilliseconds=W63;function Z63(A){return A[0]*1e6+A[1]/1000}XmA.hrTimeToMicroseconds=Z63;function fe1(A){return Array.isArray(A)&&A.length===2&&typeof A[0]==="number"&&typeof A[1]==="number"}XmA.isTimeInputHrTime=fe1;function G63(A){return fe1(A)||typeof A==="number"||A instanceof Date}XmA.isTimeInput=G63;function DmA(A,q){let K=[A[0]+q[0],A[1]+q[1]];if(K[1]>=rK1)K[1]-=rK1,K[0]+=1;return K}XmA.addHrTimes=DmA});var fmA=C((ZmA)=>{Object.defineProperty(ZmA,"__esModule",{value:!0});ZmA.unrefTimer=void 0;function C63(A){if(typeof A!=="number")A.unref()}ZmA.unrefTimer=C63});var VmA=C((TmA)=>{Object.defineProperty(TmA,"__esModule",{value:!0});TmA.ExportResultCode=void 0;var h63;(function(A){A[A.SUCCESS=0]="SUCCESS",A[A.FAILED=1]="FAILED"})(h63=TmA.ExportResultCode||(TmA.ExportResultCode={}))});var LmA=C((kmA)=>{Object.defineProperty(kmA,"__esModule",{value:!0});kmA.CompositePropagator=void 0;var NmA=nq();class vmA{_propagators;_fields;constructor(A={}){this._propagators=A.propagators??[],this._fields=Array.from(new Set(this._propagators.map((q)=>typeof q.fields==="function"?q.fields():[]).reduce((q,K)=>q.concat(K),[])))}inject(A,q,K){for(let Y of this._propagators)try{Y.inject(A,q,K)}catch(z){NmA.diag.warn(`Failed to inject with ${Y.constructor.name}. Err: ${z.message}`)}}extract(A,q,K){return this._propagators.reduce((Y,z)=>{try{return z.extract(Y,q,K)}catch(w){NmA.diag.warn(`Failed to extract with ${z.constructor.name}. Err: ${w.message}`)}return Y},A)}fields(){return this._fields.slice()}}kmA.CompositePropagator=vmA});var SmA=C((ymA)=>{Object.defineProperty(ymA,"__esModule",{value:!0});ymA.validateValue=ymA.validateKey=void 0;var Ve1="[_0-9a-z-*/]",I63=`[a-z]${Ve1}{0,255}`,b63=`[a-z0-9]${Ve1}{0,240}@[a-z]${Ve1}{0,13}`,x63=new RegExp(`^(?:${I63}|${b63})$`),u63=/^[ -~]{0,255}[!-~]$/,B63=/,|=/;function m63(A){return x63.test(A)}ymA.validateKey=m63;function g63(A){return u63.test(A)&&!B63.test(A)}ymA.validateValue=g63});var ve1=C((xmA)=>{Object.defineProperty(xmA,"__esModule",{value:!0});xmA.TraceState=void 0;var CmA=SmA(),hmA=32,Q63=512,ImA=",",bmA="=";class Ne1{_internalState=new Map;constructor(A){if(A)this._parse(A)}set(A,q){let K=this._clone();if(K._internalState.has(A))K._internalState.delete(A);return K._internalState.set(A,q),K}unset(A){let q=this._clone();return q._internalState.delete(A),q}get(A){return this._internalState.get(A)}serialize(){return this._keys().reduce((A,q)=>{return A.push(q+bmA+this.get(q)),A},[]).join(ImA)}_parse(A){if(A.length>Q63)return;if(this._internalState=A.split(ImA).reverse().reduce((q,K)=>{let Y=K.trim(),z=Y.indexOf(bmA);if(z!==-1){let w=Y.slice(0,z),_=Y.slice(z+1,K.length);if((0,CmA.validateKey)(w)&&(0,CmA.validateValue)(_))q.set(w,_)}return q},new Map),this._internalState.size>hmA)this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,hmA))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let A=new Ne1;return A._internalState=new Map(this._internalState),A}}xmA.TraceState=Ne1});var QmA=C((gmA)=>{Object.defineProperty(gmA,"__esModule",{value:!0});gmA.W3CTraceContextPropagator=gmA.parseTraceParent=gmA.TRACE_STATE_HEADER=gmA.TRACE_PARENT_HEADER=void 0;var oK1=nq(),U63=ah6(),p63=ve1();gmA.TRACE_PARENT_HEADER="traceparent";gmA.TRACE_STATE_HEADER="tracestate";var d63="00",c63="(?!ff)[\\da-f]{2}",l63="(?![0]{32})[\\da-f]{32}",i63="(?![0]{16})[\\da-f]{16}",n63="[\\da-f]{2}",r63=new RegExp(`^\\s?(${c63})-(${l63})-(${i63})-(${n63})(-.*)?\\s?$`);function BmA(A){let q=r63.exec(A);if(!q)return null;if(q[1]==="00"&&q[5])return null;return{traceId:q[2],spanId:q[3],traceFlags:parseInt(q[4],16)}}gmA.parseTraceParent=BmA;class mmA{inject(A,q,K){let Y=oK1.trace.getSpanContext(A);if(!Y||(0,U63.isTracingSuppressed)(A)||!(0,oK1.isSpanContextValid)(Y))return;let z=`${d63}-${Y.traceId}-${Y.spanId}-0${Number(Y.traceFlags||oK1.TraceFlags.NONE).toString(16)}`;if(K.set(q,gmA.TRACE_PARENT_HEADER,z),Y.traceState)K.set(q,gmA.TRACE_STATE_HEADER,Y.traceState.serialize())}extract(A,q,K){let Y=K.get(q,gmA.TRACE_PARENT_HEADER);if(!Y)return A;let z=Array.isArray(Y)?Y[0]:Y;if(typeof z!=="string")return A;let w=BmA(z);if(!w)return A;w.isRemote=!0;let _=K.get(q,gmA.TRACE_STATE_HEADER);if(_){let $=Array.isArray(_)?_.join(","):_;w.traceState=new p63.TraceState(typeof $==="string"?$:void 0)}return oK1.trace.setSpanContext(A,w)}fields(){return[gmA.TRACE_PARENT_HEADER,gmA.TRACE_STATE_HEADER]}}gmA.W3CTraceContextPropagator=mmA});var cmA=C((pmA)=>{Object.defineProperty(pmA,"__esModule",{value:!0});pmA.getRPCMetadata=pmA.deleteRPCMetadata=pmA.setRPCMetadata=pmA.RPCType=void 0;var a63=nq(),ke1=(0,a63.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),s63;(function(A){A.HTTP="http"})(s63=pmA.RPCType||(pmA.RPCType={}));function t63(A,q){return A.setValue(ke1,q)}pmA.setRPCMetadata=t63;function e63(A){return A.deleteValue(ke1)}pmA.deleteRPCMetadata=e63;function A13(A){return A.getValue(ke1)}pmA.getRPCMetadata=A13});var smA=C((omA)=>{Object.defineProperty(omA,"__esModule",{value:!0});omA.isPlainObject=void 0;var Y13="[object Object]",z13="[object Null]",w13="[object Undefined]",_13=Function.prototype,lmA=_13.toString,$13=lmA.call(Object),O13=Object.getPrototypeOf,imA=Object.prototype,nmA=imA.hasOwnProperty,KK6=Symbol?Symbol.toStringTag:void 0,rmA=imA.toString;function H13(A){if(!j13(A)||J13(A)!==Y13)return!1;let q=O13(A);if(q===null)return!0;let K=nmA.call(q,"constructor")&&q.constructor;return typeof K=="function"&&K instanceof K&&lmA.call(K)===$13}omA.isPlainObject=H13;function j13(A){return A!=null&&typeof A=="object"}function J13(A){if(A==null)return A===void 0?w13:z13;return KK6&&KK6 in Object(A)?M13(A):D13(A)}function M13(A){let q=nmA.call(A,KK6),K=A[KK6],Y=!1;try{A[KK6]=void 0,Y=!0}catch{}let z=rmA.call(A);if(Y)if(q)A[KK6]=K;else delete A[KK6];return z}function D13(A){return rmA.call(A)}});var zgA=C((KgA)=>{Object.defineProperty(KgA,"__esModule",{value:!0});KgA.merge=void 0;var tmA=smA(),X13=20;function P13(...A){let q=A.shift(),K=new WeakMap;while(A.length>0)q=AgA(q,A.shift(),0,K);return q}KgA.merge=P13;function Ee1(A){if(eK1(A))return A.slice();return A}function AgA(A,q,K=0,Y){let z;if(K>X13)return;if(K++,tK1(A)||tK1(q)||qgA(q))z=Ee1(q);else if(eK1(A)){if(z=A.slice(),eK1(q))for(let w=0,_=q.length;w<_;w++)z.push(Ee1(q[w]));else if(eh6(q)){let w=Object.keys(q);for(let _=0,$=w.length;_<$;_++){let O=w[_];z[O]=Ee1(q[O])}}}else if(eh6(A))if(eh6(q)){if(!W13(A,q))return q;z=Object.assign({},A);let w=Object.keys(q);for(let _=0,$=w.length;_<$;_++){let O=w[_],H=q[O];if(tK1(H))if(typeof H>"u")delete z[O];else z[O]=H;else{let j=z[O],J=H;if(emA(A,O,Y)||emA(q,O,Y))delete z[O];else{if(eh6(j)&&eh6(J)){let M=Y.get(j)||[],D=Y.get(J)||[];M.push({obj:A,key:O}),D.push({obj:q,key:O}),Y.set(j,M),Y.set(J,D)}z[O]=AgA(z[O],H,K,Y)}}}}else z=q;return z}function emA(A,q,K){let Y=K.get(A[q])||[];for(let z=0,w=Y.length;z<w;z++){let _=Y[z];if(_.key===q&&_.obj===A)return!0}return!1}function eK1(A){return Array.isArray(A)}function qgA(A){return typeof A==="function"}function eh6(A){return!tK1(A)&&!eK1(A)&&!qgA(A)&&typeof A==="object"}function tK1(A){return typeof A==="string"||typeof A==="number"||typeof A==="boolean"||typeof A>"u"||A instanceof Date||A instanceof RegExp||A===null}function W13(A,q){if(!(0,tmA.isPlainObject)(A)||!(0,tmA.isPlainObject)(q))return!1;return!0}});var $gA=C((wgA)=>{Object.defineProperty(wgA,"__esModule",{value:!0});wgA.callWithTimeout=wgA.TimeoutError=void 0;class A31 extends Error{constructor(A){super(A);Object.setPrototypeOf(this,A31.prototype)}}wgA.TimeoutError=A31;function Z13(A,q){let K,Y=new Promise(function(w,_){K=setTimeout(function(){_(new A31("Operation timed out."))},q)});return Promise.race([A,Y]).then((z)=>{return clearTimeout(K),z},(z)=>{throw clearTimeout(K),z})}wgA.callWithTimeout=Z13});var JgA=C((HgA)=>{Object.defineProperty(HgA,"__esModule",{value:!0});HgA.isUrlIgnored=HgA.urlMatches=void 0;function OgA(A,q){if(typeof q==="string")return A===q;else return!!A.match(q)}HgA.urlMatches=OgA;function f13(A,q){if(!q)return!1;for(let K of q)if(OgA(A,K))return!0;return!1}HgA.isUrlIgnored=f13});var PgA=C((DgA)=>{Object.defineProperty(DgA,"__esModule",{value:!0});DgA.Deferred=void 0;class MgA{_promise;_resolve;_reject;constructor(){this._promise=new Promise((A,q)=>{this._resolve=A,this._reject=q})}get promise(){return this._promise}resolve(A){this._resolve(A)}reject(A){this._reject(A)}}DgA.Deferred=MgA});var fgA=C((ZgA)=>{Object.defineProperty(ZgA,"__esModule",{value:!0});ZgA.BindOnceFuture=void 0;var V13=PgA();class WgA{_callback;_that;_isCalled=!1;_deferred=new V13.Deferred;constructor(A,q){this._callback=A,this._that=q}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...A){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...A)).then((q)=>this._deferred.resolve(q),(q)=>this._deferred.reject(q))}catch(q){this._deferred.reject(q)}}return this._deferred.promise}}ZgA.BindOnceFuture=WgA});var vgA=C((VgA)=>{Object.defineProperty(VgA,"__esModule",{value:!0});VgA.diagLogLevelFromString=void 0;var Gd=nq(),TgA={ALL:Gd.DiagLogLevel.ALL,VERBOSE:Gd.DiagLogLevel.VERBOSE,DEBUG:Gd.DiagLogLevel.DEBUG,INFO:Gd.DiagLogLevel.INFO,WARN:Gd.DiagLogLevel.WARN,ERROR:Gd.DiagLogLevel.ERROR,NONE:Gd.DiagLogLevel.NONE};function N13(A){if(A==null)return;let q=TgA[A.toUpperCase()];if(q==null)return Gd.diag.warn(`Unknown log level "${A}", expected one of ${Object.keys(TgA)}, using default`),Gd.DiagLogLevel.INFO;return q}VgA.diagLogLevelFromString=N13});var ygA=C((EgA)=>{Object.defineProperty(EgA,"__esModule",{value:!0});EgA._export=void 0;var kgA=nq(),v13=ah6();function k13(A,q){return new Promise((K)=>{kgA.context.with((0,v13.suppressTracing)(kgA.context.active()),()=>{A.export(q,(Y)=>{K(Y)})})})}EgA._export=k13});var b9=C((BK)=>{Object.defineProperty(BK,"__esModule",{value:!0});BK.internal=BK.diagLogLevelFromString=BK.BindOnceFuture=BK.urlMatches=BK.isUrlIgnored=BK.callWithTimeout=BK.TimeoutError=BK.merge=BK.TraceState=BK.unsuppressTracing=BK.suppressTracing=BK.isTracingSuppressed=BK.setRPCMetadata=BK.getRPCMetadata=BK.deleteRPCMetadata=BK.RPCType=BK.parseTraceParent=BK.W3CTraceContextPropagator=BK.TRACE_STATE_HEADER=BK.TRACE_PARENT_HEADER=BK.CompositePropagator=BK.otperformance=BK.getStringListFromEnv=BK.getNumberFromEnv=BK.getBooleanFromEnv=BK.getStringFromEnv=BK._globalThis=BK.SDK_INFO=BK.parseKeyPairsIntoRecord=BK.ExportResultCode=BK.unrefTimer=BK.timeInputToHrTime=BK.millisToHrTime=BK.isTimeInputHrTime=BK.isTimeInput=BK.hrTimeToTimeStamp=BK.hrTimeToNanoseconds=BK.hrTimeToMilliseconds=BK.hrTimeToMicroseconds=BK.hrTimeDuration=BK.hrTime=BK.getTimeOrigin=BK.addHrTimes=BK.loggingErrorHandler=BK.setGlobalErrorHandler=BK.globalErrorHandler=BK.sanitizeAttributes=BK.isAttributeValue=BK.AnchoredClock=BK.W3CBaggagePropagator=void 0;var E13=mRA();Object.defineProperty(BK,"W3CBaggagePropagator",{enumerable:!0,get:function(){return E13.W3CBaggagePropagator}});var L13=URA();Object.defineProperty(BK,"AnchoredClock",{enumerable:!0,get:function(){return L13.AnchoredClock}});var RgA=rRA();Object.defineProperty(BK,"isAttributeValue",{enumerable:!0,get:function(){return RgA.isAttributeValue}});Object.defineProperty(BK,"sanitizeAttributes",{enumerable:!0,get:function(){return RgA.sanitizeAttributes}});var SgA=ASA();Object.defineProperty(BK,"globalErrorHandler",{enumerable:!0,get:function(){return SgA.globalErrorHandler}});Object.defineProperty(BK,"setGlobalErrorHandler",{enumerable:!0,get:function(){return SgA.setGlobalErrorHandler}});var y13=Xe1();Object.defineProperty(BK,"loggingErrorHandler",{enumerable:!0,get:function(){return y13.loggingErrorHandler}});var ay=WmA();Object.defineProperty(BK,"addHrTimes",{enumerable:!0,get:function(){return ay.addHrTimes}});Object.defineProperty(BK,"getTimeOrigin",{enumerable:!0,get:function(){return ay.getTimeOrigin}});Object.defineProperty(BK,"hrTime",{enumerable:!0,get:function(){return ay.hrTime}});Object.defineProperty(BK,"hrTimeDuration",{enumerable:!0,get:function(){return ay.hrTimeDuration}});Object.defineProperty(BK,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return ay.hrTimeToMicroseconds}});Object.defineProperty(BK,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return ay.hrTimeToMilliseconds}});Object.defineProperty(BK,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return ay.hrTimeToNanoseconds}});Object.defineProperty(BK,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return ay.hrTimeToTimeStamp}});Object.defineProperty(BK,"isTimeInput",{enumerable:!0,get:function(){return ay.isTimeInput}});Object.defineProperty(BK,"isTimeInputHrTime",{enumerable:!0,get:function(){return ay.isTimeInputHrTime}});Object.defineProperty(BK,"millisToHrTime",{enumerable:!0,get:function(){return ay.millisToHrTime}});Object.defineProperty(BK,"timeInputToHrTime",{enumerable:!0,get:function(){return ay.timeInputToHrTime}});var R13=fmA();Object.defineProperty(BK,"unrefTimer",{enumerable:!0,get:function(){return R13.unrefTimer}});var S13=VmA();Object.defineProperty(BK,"ExportResultCode",{enumerable:!0,get:function(){return S13.ExportResultCode}});var C13=Je1();Object.defineProperty(BK,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return C13.parseKeyPairsIntoRecord}});var YK6=We1();Object.defineProperty(BK,"SDK_INFO",{enumerable:!0,get:function(){return YK6.SDK_INFO}});Object.defineProperty(BK,"_globalThis",{enumerable:!0,get:function(){return YK6._globalThis}});Object.defineProperty(BK,"getStringFromEnv",{enumerable:!0,get:function(){return YK6.getStringFromEnv}});Object.defineProperty(BK,"getBooleanFromEnv",{enumerable:!0,get:function(){return YK6.getBooleanFromEnv}});Object.defineProperty(BK,"getNumberFromEnv",{enumerable:!0,get:function(){return YK6.getNumberFromEnv}});Object.defineProperty(BK,"getStringListFromEnv",{enumerable:!0,get:function(){return YK6.getStringListFromEnv}});Object.defineProperty(BK,"otperformance",{enumerable:!0,get:function(){return YK6.otperformance}});var h13=LmA();Object.defineProperty(BK,"CompositePropagator",{enumerable:!0,get:function(){return h13.CompositePropagator}});var q31=QmA();Object.defineProperty(BK,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return q31.TRACE_PARENT_HEADER}});Object.defineProperty(BK,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return q31.TRACE_STATE_HEADER}});Object.defineProperty(BK,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return q31.W3CTraceContextPropagator}});Object.defineProperty(BK,"parseTraceParent",{enumerable:!0,get:function(){return q31.parseTraceParent}});var K31=cmA();Object.defineProperty(BK,"RPCType",{enumerable:!0,get:function(){return K31.RPCType}});Object.defineProperty(BK,"deleteRPCMetadata",{enumerable:!0,get:function(){return K31.deleteRPCMetadata}});Object.defineProperty(BK,"getRPCMetadata",{enumerable:!0,get:function(){return K31.getRPCMetadata}});Object.defineProperty(BK,"setRPCMetadata",{enumerable:!0,get:function(){return K31.setRPCMetadata}});var Le1=ah6();Object.defineProperty(BK,"isTracingSuppressed",{enumerable:!0,get:function(){return Le1.isTracingSuppressed}});Object.defineProperty(BK,"suppressTracing",{enumerable:!0,get:function(){return Le1.suppressTracing}});Object.defineProperty(BK,"unsuppressTracing",{enumerable:!0,get:function(){return Le1.unsuppressTracing}});var I13=ve1();Object.defineProperty(BK,"TraceState",{enumerable:!0,get:function(){return I13.TraceState}});var b13=zgA();Object.defineProperty(BK,"merge",{enumerable:!0,get:function(){return b13.merge}});var CgA=$gA();Object.defineProperty(BK,"TimeoutError",{enumerable:!0,get:function(){return CgA.TimeoutError}});Object.defineProperty(BK,"callWithTimeout",{enumerable:!0,get:function(){return CgA.callWithTimeout}});var hgA=JgA();Object.defineProperty(BK,"isUrlIgnored",{enumerable:!0,get:function(){return hgA.isUrlIgnored}});Object.defineProperty(BK,"urlMatches",{enumerable:!0,get:function(){return hgA.urlMatches}});var x13=fgA();Object.defineProperty(BK,"BindOnceFuture",{enumerable:!0,get:function(){return x13.BindOnceFuture}});var u13=vgA();Object.defineProperty(BK,"diagLogLevelFromString",{enumerable:!0,get:function(){return u13.diagLogLevelFromString}});var B13=ygA();BK.internal={_export:B13._export}});var ugA=C((bgA)=>{Object.defineProperty(bgA,"__esModule",{value:!0});bgA.defaultServiceName=void 0;function m13(){return`unknown_service:${process.argv0}`}bgA.defaultServiceName=m13});var BgA=C((ye1)=>{Object.defineProperty(ye1,"__esModule",{value:!0});ye1.defaultServiceName=void 0;var g13=ugA();Object.defineProperty(ye1,"defaultServiceName",{enumerable:!0,get:function(){return g13.defaultServiceName}})});var Se1=C((Re1)=>{Object.defineProperty(Re1,"__esModule",{value:!0});Re1.defaultServiceName=void 0;var Q13=BgA();Object.defineProperty(Re1,"defaultServiceName",{enumerable:!0,get:function(){return Q13.defaultServiceName}})});var FgA=C((mgA)=>{Object.defineProperty(mgA,"__esModule",{value:!0});mgA.identity=mgA.isPromiseLike=void 0;var p13=(A)=>{return A!==null&&typeof A==="object"&&typeof A.then==="function"};mgA.isPromiseLike=p13;function d13(A){return A}mgA.identity=d13});var Ie1=C((UgA)=>{Object.defineProperty(UgA,"__esModule",{value:!0});UgA.defaultResource=UgA.emptyResource=UgA.resourceFromDetectedResource=UgA.resourceFromAttributes=void 0;var qI6=nq(),Ce1=b9(),zK6=AK6(),l13=Se1(),AI6=FgA();class KI6{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(A,q){let K=new KI6({},q);return K._rawAttributes=QgA(A),K._asyncAttributesPending=A.filter(([Y,z])=>(0,AI6.isPromiseLike)(z)).length>0,K}constructor(A,q){let K=A.attributes??{};this._rawAttributes=Object.entries(K).map(([Y,z])=>{if((0,AI6.isPromiseLike)(z))this._asyncAttributesPending=!0;return[Y,z]}),this._rawAttributes=QgA(this._rawAttributes),this._schemaUrl=o13(q?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let A=0;A<this._rawAttributes.length;A++){let[q,K]=this._rawAttributes[A];this._rawAttributes[A]=[q,(0,AI6.isPromiseLike)(K)?await K:K]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)qI6.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let A={};for(let[q,K]of this._rawAttributes){if((0,AI6.isPromiseLike)(K)){qI6.diag.debug(`Unsettled resource attribute ${q} skipped`);continue}if(K!=null)A[q]??=K}if(!this._asyncAttributesPending)this._memoizedAttributes=A;return A}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(A){if(A==null)return this;let q=a13(this,A),K=q?{schemaUrl:q}:void 0;return KI6.FromAttributeList([...A.getRawAttributes(),...this.getRawAttributes()],K)}}function he1(A,q){return KI6.FromAttributeList(Object.entries(A),q)}UgA.resourceFromAttributes=he1;function i13(A,q){return new KI6(A,q)}UgA.resourceFromDetectedResource=i13;function n13(){return he1({})}UgA.emptyResource=n13;function r13(){return he1({[zK6.ATTR_SERVICE_NAME]:(0,l13.defaultServiceName)(),[zK6.ATTR_TELEMETRY_SDK_LANGUAGE]:Ce1.SDK_INFO[zK6.ATTR_TELEMETRY_SDK_LANGUAGE],[zK6.ATTR_TELEMETRY_SDK_NAME]:Ce1.SDK_INFO[zK6.ATTR_TELEMETRY_SDK_NAME],[zK6.ATTR_TELEMETRY_SDK_VERSION]:Ce1.SDK_INFO[zK6.ATTR_TELEMETRY_SDK_VERSION]})}UgA.defaultResource=r13;function QgA(A){return A.map(([q,K])=>{if((0,AI6.isPromiseLike)(K))return[q,K.catch((Y)=>{qI6.diag.debug("promise rejection for resource attribute: %s - %s",q,Y);return})];return[q,K]})}function o13(A){if(typeof A==="string"||A===void 0)return A;qI6.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",A);return}function a13(A,q){let K=A?.schemaUrl,Y=q?.schemaUrl,z=K===void 0||K==="",w=Y===void 0||Y==="";if(z)return Y;if(w)return K;if(K===Y)return K;qI6.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',K,Y);return}});var igA=C((cgA)=>{Object.defineProperty(cgA,"__esModule",{value:!0});cgA.detectResources=void 0;var dgA=nq(),be1=Ie1(),A83=(A={})=>{return(A.detectors||[]).map((K)=>{try{let Y=(0,be1.resourceFromDetectedResource)(K.detect(A));return dgA.diag.debug(`${K.constructor.name} found resource.`,Y),Y}catch(Y){return dgA.diag.debug(`${K.constructor.name} failed: ${Y.message}`),(0,be1.emptyResource)()}}).reduce((K,Y)=>K.merge(Y),(0,be1.emptyResource)())};cgA.detectResources=A83});var sgA=C((ogA)=>{Object.defineProperty(ogA,"__esModule",{value:!0});ogA.envDetector=void 0;var q83=nq(),K83=AK6(),ngA=b9();class rgA{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";_ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.";_ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters.";detect(A){let q={},K=(0,ngA.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),Y=(0,ngA.getStringFromEnv)("OTEL_SERVICE_NAME");if(K)try{let z=this._parseResourceAttributes(K);Object.assign(q,z)}catch(z){q83.diag.debug(`EnvDetector failed: ${z.message}`)}if(Y)q[K83.ATTR_SERVICE_NAME]=Y;return{attributes:q}}_parseResourceAttributes(A){if(!A)return{};let q={},K=A.split(this._COMMA_SEPARATOR,-1);for(let Y of K){let z=Y.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(z.length!==2)continue;let[w,_]=z;if(w=w.trim(),_=_.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(w))throw Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(_))throw Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);q[w]=decodeURIComponent(_)}return q}_isValid(A){return A.length<=this._MAX_LENGTH&&this._isBaggageOctetString(A)}_isBaggageOctetString(A){for(let q=0;q<A.length;q++){let K=A.charCodeAt(q);if(K<33||K===44||K===59||K===92||K>126)return!1}return!0}_isValidAndNotEmpty(A){return A.length>0&&this._isValid(A)}}ogA.envDetector=new rgA});var YI6=C((tgA)=>{Object.defineProperty(tgA,"__esModule",{value:!0});tgA.ATTR_WEBENGINE_VERSION=tgA.ATTR_WEBENGINE_NAME=tgA.ATTR_WEBENGINE_DESCRIPTION=tgA.ATTR_SERVICE_NAMESPACE=tgA.ATTR_SERVICE_INSTANCE_ID=tgA.ATTR_PROCESS_RUNTIME_VERSION=tgA.ATTR_PROCESS_RUNTIME_NAME=tgA.ATTR_PROCESS_RUNTIME_DESCRIPTION=tgA.ATTR_PROCESS_PID=tgA.ATTR_PROCESS_OWNER=tgA.ATTR_PROCESS_EXECUTABLE_PATH=tgA.ATTR_PROCESS_EXECUTABLE_NAME=tgA.ATTR_PROCESS_COMMAND_ARGS=tgA.ATTR_PROCESS_COMMAND=tgA.ATTR_OS_VERSION=tgA.ATTR_OS_TYPE=tgA.ATTR_K8S_POD_NAME=tgA.ATTR_K8S_NAMESPACE_NAME=tgA.ATTR_K8S_DEPLOYMENT_NAME=tgA.ATTR_K8S_CLUSTER_NAME=tgA.ATTR_HOST_TYPE=tgA.ATTR_HOST_NAME=tgA.ATTR_HOST_IMAGE_VERSION=tgA.ATTR_HOST_IMAGE_NAME=tgA.ATTR_HOST_IMAGE_ID=tgA.ATTR_HOST_ID=tgA.ATTR_HOST_ARCH=tgA.ATTR_CONTAINER_NAME=tgA.ATTR_CONTAINER_IMAGE_TAGS=tgA.ATTR_CONTAINER_IMAGE_NAME=tgA.ATTR_CONTAINER_ID=tgA.ATTR_CLOUD_REGION=tgA.ATTR_CLOUD_PROVIDER=tgA.ATTR_CLOUD_AVAILABILITY_ZONE=tgA.ATTR_CLOUD_ACCOUNT_ID=void 0;tgA.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";tgA.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";tgA.ATTR_CLOUD_PROVIDER="cloud.provider";tgA.ATTR_CLOUD_REGION="cloud.region";tgA.ATTR_CONTAINER_ID="container.id";tgA.ATTR_CONTAINER_IMAGE_NAME="container.image.name";tgA.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";tgA.ATTR_CONTAINER_NAME="container.name";tgA.ATTR_HOST_ARCH="host.arch";tgA.ATTR_HOST_ID="host.id";tgA.ATTR_HOST_IMAGE_ID="host.image.id";tgA.ATTR_HOST_IMAGE_NAME="host.image.name";tgA.ATTR_HOST_IMAGE_VERSION="host.image.version";tgA.ATTR_HOST_NAME="host.name";tgA.ATTR_HOST_TYPE="host.type";tgA.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";tgA.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";tgA.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";tgA.ATTR_K8S_POD_NAME="k8s.pod.name";tgA.ATTR_OS_TYPE="os.type";tgA.ATTR_OS_VERSION="os.version";tgA.ATTR_PROCESS_COMMAND="process.command";tgA.ATTR_PROCESS_COMMAND_ARGS="process.command_args";tgA.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";tgA.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";tgA.ATTR_PROCESS_OWNER="process.owner";tgA.ATTR_PROCESS_PID="process.pid";tgA.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";tgA.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";tgA.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";tgA.ATTR_SERVICE_INSTANCE_ID="service.instance.id";tgA.ATTR_SERVICE_NAMESPACE="service.namespace";tgA.ATTR_WEBENGINE_DESCRIPTION="webengine.description";tgA.ATTR_WEBENGINE_NAME="webengine.name";tgA.ATTR_WEBENGINE_VERSION="webengine.version"});var Y31=C((AFA)=>{Object.defineProperty(AFA,"__esModule",{value:!0});AFA.execAsync=void 0;var m83=g6("child_process"),g83=g6("util");AFA.execAsync=g83.promisify(m83.exec)});var zFA=C((KFA)=>{Object.defineProperty(KFA,"__esModule",{value:!0});KFA.getMachineId=void 0;var F83=Y31(),Q83=nq();async function U83(){try{let q=(await(0,F83.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
`).find((Y)=>Y.includes("IOPlatformUUID"));if(!q)return;let K=q.split('" = "');if(K.length===2)return K[1].slice(0,-1)}catch(A){Q83.diag.debug(`error reading machine id: ${A}`)}return}KFA.getMachineId=U83});var $FA=C((wFA)=>{Object.defineProperty(wFA,"__esModule",{value:!0});wFA.getMachineId=void 0;var p83=g6("fs"),d83=nq();async function c83(){let A=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let q of A)try{return(await p83.promises.readFile(q,{encoding:"utf8"})).trim()}catch(K){d83.diag.debug(`error reading machine id: ${K}`)}return}wFA.getMachineId=c83});var JFA=C((HFA)=>{Object.defineProperty(HFA,"__esModule",{value:!0});HFA.getMachineId=void 0;var l83=g6("fs"),i83=Y31(),OFA=nq();async function n83(){try{return(await l83.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(A){OFA.diag.debug(`error reading machine id: ${A}`)}try{return(await(0,i83.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(A){OFA.diag.debug(`error reading machine id: ${A}`)}return}HFA.getMachineId=n83});var PFA=C((DFA)=>{Object.defineProperty(DFA,"__esModule",{value:!0});DFA.getMachineId=void 0;var MFA=g6("process"),r83=Y31(),o83=nq();async function a83(){let q="%windir%\\System32\\REG.exe";if(MFA.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in MFA.env)q="%windir%\\sysnative\\cmd.exe /c "+q;try{let Y=(await(0,r83.execAsync)(`${q} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split("REG_SZ");if(Y.length===2)return Y[1].trim()}catch(K){o83.diag.debug(`error reading machine id: ${K}`)}return}DFA.getMachineId=a83});var GFA=C((WFA)=>{Object.defineProperty(WFA,"__esModule",{value:!0});WFA.getMachineId=void 0;var s83=nq();async function t83(){s83.diag.debug("could not read machine-id: unsupported platform");return}WFA.getMachineId=t83});var VFA=C((fFA)=>{Object.defineProperty(fFA,"__esModule",{value:!0});fFA.getMachineId=void 0;var e83=g6("process"),wK6;async function AA3(){if(!wK6)switch(e83.platform){case"darwin":wK6=(await Promise.resolve().then(() => e(zFA()))).getMachineId;break;case"linux":wK6=(await Promise.resolve().then(() => e($FA()))).getMachineId;break;case"freebsd":wK6=(await Promise.resolve().then(() => e(JFA()))).getMachineId;break;case"win32":wK6=(await Promise.resolve().then(() => e(PFA()))).getMachineId;break;default:wK6=(await Promise.resolve().then(() => e(GFA()))).getMachineId;break}return wK6()}fFA.getMachineId=AA3});var xe1=C((NFA)=>{Object.defineProperty(NFA,"__esModule",{value:!0});NFA.normalizeType=NFA.normalizeArch=void 0;var qA3=(A)=>{switch(A){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return A}};NFA.normalizeArch=qA3;var KA3=(A)=>{switch(A){case"sunos":return"solaris";case"win32":return"windows";default:return A}};NFA.normalizeType=KA3});var RFA=C((LFA)=>{Object.defineProperty(LFA,"__esModule",{value:!0});LFA.hostDetector=void 0;var ue1=YI6(),kFA=g6("os"),zA3=VFA(),wA3=xe1();class EFA{detect(A){return{attributes:{[ue1.ATTR_HOST_NAME]:(0,kFA.hostname)(),[ue1.ATTR_HOST_ARCH]:(0,wA3.normalizeArch)((0,kFA.arch)()),[ue1.ATTR_HOST_ID]:(0,zA3.getMachineId)()}}}}LFA.hostDetector=new EFA});var xFA=C((IFA)=>{Object.defineProperty(IFA,"__esModule",{value:!0});IFA.osDetector=void 0;var SFA=YI6(),CFA=g6("os"),_A3=xe1();class hFA{detect(A){return{attributes:{[SFA.ATTR_OS_TYPE]:(0,_A3.normalizeType)((0,CFA.platform)()),[SFA.ATTR_OS_VERSION]:(0,CFA.release)()}}}}IFA.osDetector=new hFA});var gFA=C((BFA)=>{Object.defineProperty(BFA,"__esModule",{value:!0});BFA.processDetector=void 0;var $A3=nq(),fd=YI6(),OA3=g6("os");class uFA{detect(A){let q={[fd.ATTR_PROCESS_PID]:process.pid,[fd.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[fd.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[fd.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[fd.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[fd.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[fd.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)q[fd.ATTR_PROCESS_COMMAND]=process.argv[1];try{let K=OA3.userInfo();q[fd.ATTR_PROCESS_OWNER]=K.username}catch(K){$A3.diag.debug(`error obtaining process owner: ${K}`)}return{attributes:q}}}BFA.processDetector=new uFA});var pFA=C((QFA)=>{Object.defineProperty(QFA,"__esModule",{value:!0});QFA.serviceInstanceIdDetector=void 0;var HA3=YI6(),jA3=g6("crypto");class FFA{detect(A){return{attributes:{[HA3.ATTR_SERVICE_INSTANCE_ID]:(0,jA3.randomUUID)()}}}}QFA.serviceInstanceIdDetector=new FFA});var dFA=C((GM6)=>{Object.defineProperty(GM6,"__esModule",{value:!0});GM6.serviceInstanceIdDetector=GM6.processDetector=GM6.osDetector=GM6.hostDetector=void 0;var JA3=RFA();Object.defineProperty(GM6,"hostDetector",{enumerable:!0,get:function(){return JA3.hostDetector}});var MA3=xFA();Object.defineProperty(GM6,"osDetector",{enumerable:!0,get:function(){return MA3.osDetector}});var DA3=gFA();Object.defineProperty(GM6,"processDetector",{enumerable:!0,get:function(){return DA3.processDetector}});var XA3=pFA();Object.defineProperty(GM6,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return XA3.serviceInstanceIdDetector}})});var cFA=C((fM6)=>{Object.defineProperty(fM6,"__esModule",{value:!0});fM6.serviceInstanceIdDetector=fM6.processDetector=fM6.osDetector=fM6.hostDetector=void 0;var z31=dFA();Object.defineProperty(fM6,"hostDetector",{enumerable:!0,get:function(){return z31.hostDetector}});Object.defineProperty(fM6,"osDetector",{enumerable:!0,get:function(){return z31.osDetector}});Object.defineProperty(fM6,"processDetector",{enumerable:!0,get:function(){return z31.processDetector}});Object.defineProperty(fM6,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return z31.serviceInstanceIdDetector}})});var nFA=C((lFA)=>{Object.defineProperty(lFA,"__esModule",{value:!0});lFA.noopDetector=lFA.NoopDetector=void 0;class Be1{detect(){return{attributes:{}}}}lFA.NoopDetector=Be1;lFA.noopDetector=new Be1});var rFA=C((sa)=>{Object.defineProperty(sa,"__esModule",{value:!0});sa.noopDetector=sa.serviceInstanceIdDetector=sa.processDetector=sa.osDetector=sa.hostDetector=sa.envDetector=void 0;var GA3=sgA();Object.defineProperty(sa,"envDetector",{enumerable:!0,get:function(){return GA3.envDetector}});var w31=cFA();Object.defineProperty(sa,"hostDetector",{enumerable:!0,get:function(){return w31.hostDetector}});Object.defineProperty(sa,"osDetector",{enumerable:!0,get:function(){return w31.osDetector}});Object.defineProperty(sa,"processDetector",{enumerable:!0,get:function(){return w31.processDetector}});Object.defineProperty(sa,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return w31.serviceInstanceIdDetector}});var fA3=nFA();Object.defineProperty(sa,"noopDetector",{enumerable:!0,get:function(){return fA3.noopDetector}})});var TM6=C((sy)=>{Object.defineProperty(sy,"__esModule",{value:!0});sy.defaultServiceName=sy.emptyResource=sy.defaultResource=sy.resourceFromAttributes=sy.serviceInstanceIdDetector=sy.processDetector=sy.osDetector=sy.hostDetector=sy.envDetector=sy.detectResources=void 0;var VA3=igA();Object.defineProperty(sy,"detectResources",{enumerable:!0,get:function(){return VA3.detectResources}});var zI6=rFA();Object.defineProperty(sy,"envDetector",{enumerable:!0,get:function(){return zI6.envDetector}});Object.defineProperty(sy,"hostDetector",{enumerable:!0,get:function(){return zI6.hostDetector}});Object.defineProperty(sy,"osDetector",{enumerable:!0,get:function(){return zI6.osDetector}});Object.defineProperty(sy,"processDetector",{enumerable:!0,get:function(){return zI6.processDetector}});Object.defineProperty(sy,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return zI6.serviceInstanceIdDetector}});var me1=Ie1();Object.defineProperty(sy,"resourceFromAttributes",{enumerable:!0,get:function(){return me1.resourceFromAttributes}});Object.defineProperty(sy,"defaultResource",{enumerable:!0,get:function(){return me1.defaultResource}});Object.defineProperty(sy,"emptyResource",{enumerable:!0,get:function(){return me1.emptyResource}});var NA3=Se1();Object.defineProperty(sy,"defaultServiceName",{enumerable:!0,get:function(){return NA3.defaultServiceName}})});var tFA=C((aFA)=>{Object.defineProperty(aFA,"__esModule",{value:!0});aFA.LogRecordImpl=void 0;var _K6=nq(),_31=b9();class oFA{hrTime;hrTimeObserved;spanContext;resource;instrumentationScope;attributes={};_severityText;_severityNumber;_body;_eventName;totalAttributesCount=0;_isReadonly=!1;_logRecordLimits;set severityText(A){if(this._isLogRecordReadonly())return;this._severityText=A}get severityText(){return this._severityText}set severityNumber(A){if(this._isLogRecordReadonly())return;this._severityNumber=A}get severityNumber(){return this._severityNumber}set body(A){if(this._isLogRecordReadonly())return;this._body=A}get body(){return this._body}get eventName(){return this._eventName}set eventName(A){if(this._isLogRecordReadonly())return;this._eventName=A}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}constructor(A,q,K){let{timestamp:Y,observedTimestamp:z,eventName:w,severityNumber:_,severityText:$,body:O,attributes:H={},context:j}=K,J=Date.now();if(this.hrTime=(0,_31.timeInputToHrTime)(Y??J),this.hrTimeObserved=(0,_31.timeInputToHrTime)(z??J),j){let M=_K6.trace.getSpanContext(j);if(M&&_K6.isSpanContextValid(M))this.spanContext=M}this.severityNumber=_,this.severityText=$,this.body=O,this.resource=A.resource,this.instrumentationScope=q,this._logRecordLimits=A.logRecordLimits,this._eventName=w,this.setAttributes(H)}setAttribute(A,q){if(this._isLogRecordReadonly())return this;if(q===null)return this;if(A.length===0)return _K6.diag.warn(`Invalid attribute key: ${A}`),this;if(!(0,_31.isAttributeValue)(q)&&!(typeof q==="object"&&!Array.isArray(q)&&Object.keys(q).length>0))return _K6.diag.warn(`Invalid attribute value set for key: ${A}`),this;if(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,A)){if(this.droppedAttributesCount===1)_K6.diag.warn("Dropping extra attributes.");return this}if((0,_31.isAttributeValue)(q))this.attributes[A]=this._truncateToSize(q);else this.attributes[A]=q;return this}setAttributes(A){for(let[q,K]of Object.entries(A))this.setAttribute(q,K);return this}setBody(A){return this.body=A,this}setEventName(A){return this.eventName=A,this}setSeverityNumber(A){return this.severityNumber=A,this}setSeverityText(A){return this.severityText=A,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(A){let q=this._logRecordLimits.attributeValueLengthLimit;if(q<=0)return _K6.diag.warn(`Attribute value limit must be positive, got ${q}`),A;if(typeof A==="string")return this._truncateToLimitUtil(A,q);if(Array.isArray(A))return A.map((K)=>typeof K==="string"?this._truncateToLimitUtil(K,q):K);return A}_truncateToLimitUtil(A,q){if(A.length<=q)return A;return A.substring(0,q)}_isLogRecordReadonly(){if(this._isReadonly)_K6.diag.warn("Can not execute the operation on emitted log record");return this._isReadonly}}aFA.LogRecordImpl=oFA});var KQA=C((AQA)=>{Object.defineProperty(AQA,"__esModule",{value:!0});AQA.Logger=void 0;var kA3=nq(),EA3=tFA();class eFA{instrumentationScope;_sharedState;constructor(A,q){this.instrumentationScope=A,this._sharedState=q}emit(A){let q=A.context||kA3.context.active(),K=new EA3.LogRecordImpl(this._sharedState,this.instrumentationScope,{context:q,...A});this._sharedState.activeProcessor.onEmit(K,q),K._makeReadonly()}}AQA.Logger=eFA});var wQA=C((YQA)=>{Object.defineProperty(YQA,"__esModule",{value:!0});YQA.reconfigureLimits=YQA.loadDefaultConfig=void 0;var VM6=b9();function LA3(){return{forceFlushTimeoutMillis:30000,logRecordLimits:{attributeValueLengthLimit:(0,VM6.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:(0,VM6.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT")??128},includeTraceContext:!0}}YQA.loadDefaultConfig=LA3;function yA3(A){return{attributeCountLimit:A.attributeCountLimit??(0,VM6.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT")??(0,VM6.getNumberFromEnv)("OTEL_ATTRIBUTE_COUNT_LIMIT")??128,attributeValueLengthLimit:A.attributeValueLengthLimit??(0,VM6.getNumberFromEnv)("OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT")??(0,VM6.getNumberFromEnv)("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0}}YQA.reconfigureLimits=yA3});var HQA=C(($QA)=>{Object.defineProperty($QA,"__esModule",{value:!0});$QA.NoopLogRecordProcessor=void 0;class _QA{forceFlush(){return Promise.resolve()}onEmit(A,q){}shutdown(){return Promise.resolve()}}$QA.NoopLogRecordProcessor=_QA});var DQA=C((JQA)=>{Object.defineProperty(JQA,"__esModule",{value:!0});JQA.MultiLogRecordProcessor=void 0;var SA3=b9();class jQA{processors;forceFlushTimeoutMillis;constructor(A,q){this.processors=A,this.forceFlushTimeoutMillis=q}async forceFlush(){let A=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map((q)=>(0,SA3.callWithTimeout)(q.forceFlush(),A)))}onEmit(A,q){this.processors.forEach((K)=>K.onEmit(A,q))}async shutdown(){await Promise.all(this.processors.map((A)=>A.shutdown()))}}JQA.MultiLogRecordProcessor=jQA});var ZQA=C((PQA)=>{Object.defineProperty(PQA,"__esModule",{value:!0});PQA.LoggerProviderSharedState=void 0;var CA3=HQA(),hA3=DQA();class XQA{resource;forceFlushTimeoutMillis;logRecordLimits;processors;loggers=new Map;activeProcessor;registeredLogRecordProcessors=[];constructor(A,q,K,Y){if(this.resource=A,this.forceFlushTimeoutMillis=q,this.logRecordLimits=K,this.processors=Y,Y.length>0)this.registeredLogRecordProcessors=Y,this.activeProcessor=new hA3.MultiLogRecordProcessor(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis);else this.activeProcessor=new CA3.NoopLogRecordProcessor}}PQA.LoggerProviderSharedState=XQA});var kQA=C((VQA)=>{Object.defineProperty(VQA,"__esModule",{value:!0});VQA.LoggerProvider=VQA.DEFAULT_LOGGER_NAME=void 0;var $31=nq(),IA3=Oe1(),bA3=TM6(),GQA=b9(),xA3=KQA(),fQA=wQA(),uA3=ZQA();VQA.DEFAULT_LOGGER_NAME="unknown";class TQA{_shutdownOnce;_sharedState;constructor(A={}){let q=(0,GQA.merge)({},(0,fQA.loadDefaultConfig)(),A),K=A.resource??(0,bA3.defaultResource)();this._sharedState=new uA3.LoggerProviderSharedState(K,q.forceFlushTimeoutMillis,(0,fQA.reconfigureLimits)(q.logRecordLimits),A?.processors??[]),this._shutdownOnce=new GQA.BindOnceFuture(this._shutdown,this)}getLogger(A,q,K){if(this._shutdownOnce.isCalled)return $31.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),IA3.NOOP_LOGGER;if(!A)$31.diag.warn("Logger requested without instrumentation scope name.");let Y=A||VQA.DEFAULT_LOGGER_NAME,z=`${Y}@${q||""}:${K?.schemaUrl||""}`;if(!this._sharedState.loggers.has(z))this._sharedState.loggers.set(z,new xA3.Logger({name:Y,version:q,schemaUrl:K?.schemaUrl},this._sharedState));return this._sharedState.loggers.get(z)}forceFlush(){if(this._shutdownOnce.isCalled)return $31.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise;return this._sharedState.activeProcessor.forceFlush()}shutdown(){if(this._shutdownOnce.isCalled)return $31.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise;return this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}VQA.LoggerProvider=TQA});var SQA=C((yQA)=>{Object.defineProperty(yQA,"__esModule",{value:!0});yQA.ConsoleLogRecordExporter=void 0;var EQA=b9();class LQA{export(A,q){this._sendLogRecords(A,q)}shutdown(){return Promise.resolve()}_exportInfo(A){return{resource:{attributes:A.resource.attributes},instrumentationScope:A.instrumentationScope,timestamp:(0,EQA.hrTimeToMicroseconds)(A.hrTime),traceId:A.spanContext?.traceId,spanId:A.spanContext?.spanId,traceFlags:A.spanContext?.traceFlags,severityText:A.severityText,severityNumber:A.severityNumber,body:A.body,attributes:A.attributes}}_sendLogRecords(A,q){for(let K of A)console.dir(this._exportInfo(K),{depth:3});q?.({code:EQA.ExportResultCode.SUCCESS})}}yQA.ConsoleLogRecordExporter=LQA});var bQA=C((hQA)=>{Object.defineProperty(hQA,"__esModule",{value:!0});hQA.SimpleLogRecordProcessor=void 0;var NM6=b9();class CQA{_exporter;_shutdownOnce;_unresolvedExports;constructor(A){this._exporter=A,this._shutdownOnce=new NM6.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}onEmit(A){if(this._shutdownOnce.isCalled)return;let q=()=>NM6.internal._export(this._exporter,[A]).then((K)=>{if(K.code!==NM6.ExportResultCode.SUCCESS)(0,NM6.globalErrorHandler)(K.error??Error(`SimpleLogRecordProcessor: log record export failed (status ${K})`))}).catch(NM6.globalErrorHandler);if(A.resource.asyncAttributesPending){let K=A.resource.waitForAsyncAttributes?.().then(()=>{return this._unresolvedExports.delete(K),q()},NM6.globalErrorHandler);if(K!=null)this._unresolvedExports.add(K)}else q()}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports))}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}hQA.SimpleLogRecordProcessor=CQA});var gQA=C((BQA)=>{Object.defineProperty(BQA,"__esModule",{value:!0});BQA.InMemoryLogRecordExporter=void 0;var xQA=b9();class uQA{_finishedLogRecords=[];_stopped=!1;export(A,q){if(this._stopped)return q({code:xQA.ExportResultCode.FAILED,error:Error("Exporter has been stopped")});this._finishedLogRecords.push(...A),q({code:xQA.ExportResultCode.SUCCESS})}shutdown(){return this._stopped=!0,this.reset(),Promise.resolve()}getFinishedLogRecords(){return this._finishedLogRecords}reset(){this._finishedLogRecords=[]}}BQA.InMemoryLogRecordExporter=uQA});var pQA=C((QQA)=>{Object.defineProperty(QQA,"__esModule",{value:!0});QQA.BatchLogRecordProcessorBase=void 0;var BA3=nq(),ty=b9();class FQA{_exporter;_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_isExporting=!1;_finishedLogRecords=[];_timer;_shutdownOnce;constructor(A,q){if(this._exporter=A,this._maxExportBatchSize=q?.maxExportBatchSize??(0,ty.getNumberFromEnv)("OTEL_BLRP_MAX_EXPORT_BATCH_SIZE")??512,this._maxQueueSize=q?.maxQueueSize??(0,ty.getNumberFromEnv)("OTEL_BLRP_MAX_QUEUE_SIZE")??2048,this._scheduledDelayMillis=q?.scheduledDelayMillis??(0,ty.getNumberFromEnv)("OTEL_BLRP_SCHEDULE_DELAY")??5000,this._exportTimeoutMillis=q?.exportTimeoutMillis??(0,ty.getNumberFromEnv)("OTEL_BLRP_EXPORT_TIMEOUT")??30000,this._shutdownOnce=new ty.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize)BA3.diag.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize}onEmit(A){if(this._shutdownOnce.isCalled)return;this._addToBuffer(A)}forceFlush(){if(this._shutdownOnce.isCalled)return this._shutdownOnce.promise;return this._flushAll()}shutdown(){return this._shutdownOnce.call()}async _shutdown(){this.onShutdown(),await this._flushAll(),await this._exporter.shutdown()}_addToBuffer(A){if(this._finishedLogRecords.length>=this._maxQueueSize)return;this._finishedLogRecords.push(A),this._maybeStartTimer()}_flushAll(){return new Promise((A,q)=>{let K=[],Y=Math.ceil(this._finishedLogRecords.length/this._maxExportBatchSize);for(let z=0;z<Y;z++)K.push(this._flushOneBatch());Promise.all(K).then(()=>{A()}).catch(q)})}_flushOneBatch(){if(this._clearTimer(),this._finishedLogRecords.length===0)return Promise.resolve();return new Promise((A,q)=>{(0,ty.callWithTimeout)(this._export(this._finishedLogRecords.splice(0,this._maxExportBatchSize)),this._exportTimeoutMillis).then(()=>A()).catch(q)})}_maybeStartTimer(){if(this._isExporting)return;let A=()=>{this._isExporting=!0,this._flushOneBatch().then(()=>{if(this._isExporting=!1,this._finishedLogRecords.length>0)this._clearTimer(),this._maybeStartTimer()}).catch((q)=>{this._isExporting=!1,(0,ty.globalErrorHandler)(q)})};if(this._finishedLogRecords.length>=this._maxExportBatchSize)return A();if(this._timer!==void 0)return;if(this._timer=setTimeout(()=>A(),this._scheduledDelayMillis),typeof this._timer!=="number")this._timer.unref()}_clearTimer(){if(this._timer!==void 0)clearTimeout(this._timer),this._timer=void 0}_export(A){let q=()=>ty.internal._export(this._exporter,A).then((Y)=>{if(Y.code!==ty.ExportResultCode.SUCCESS)(0,ty.globalErrorHandler)(Y.error??Error(`BatchLogRecordProcessor: log record export failed (status ${Y})`))}).catch(ty.globalErrorHandler),K=A.map((Y)=>Y.resource).filter((Y)=>Y.asyncAttributesPending);if(K.length===0)return q();else return Promise.all(K.map((Y)=>Y.waitForAsyncAttributes?.())).then(q,ty.globalErrorHandler)}}QQA.BatchLogRecordProcessorBase=FQA});var iQA=C((cQA)=>{Object.defineProperty(cQA,"__esModule",{value:!0});cQA.BatchLogRecordProcessor=void 0;var mA3=pQA();class dQA extends mA3.BatchLogRecordProcessorBase{onShutdown(){}}cQA.BatchLogRecordProcessor=dQA});var nQA=C((ge1)=>{Object.defineProperty(ge1,"__esModule",{value:!0});ge1.BatchLogRecordProcessor=void 0;var gA3=iQA();Object.defineProperty(ge1,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return gA3.BatchLogRecordProcessor}})});var rQA=C((Fe1)=>{Object.defineProperty(Fe1,"__esModule",{value:!0});Fe1.BatchLogRecordProcessor=void 0;var QA3=nQA();Object.defineProperty(Fe1,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return QA3.BatchLogRecordProcessor}})});var Qe1=C(($K6)=>{Object.defineProperty($K6,"__esModule",{value:!0});$K6.BatchLogRecordProcessor=$K6.InMemoryLogRecordExporter=$K6.SimpleLogRecordProcessor=$K6.ConsoleLogRecordExporter=$K6.LoggerProvider=void 0;var pA3=kQA();Object.defineProperty($K6,"LoggerProvider",{enumerable:!0,get:function(){return pA3.LoggerProvider}});var dA3=SQA();Object.defineProperty($K6,"ConsoleLogRecordExporter",{enumerable:!0,get:function(){return dA3.ConsoleLogRecordExporter}});var cA3=bQA();Object.defineProperty($K6,"SimpleLogRecordProcessor",{enumerable:!0,get:function(){return cA3.SimpleLogRecordProcessor}});var lA3=gQA();Object.defineProperty($K6,"InMemoryLogRecordExporter",{enumerable:!0,get:function(){return lA3.InMemoryLogRecordExporter}});var iA3=rQA();Object.defineProperty($K6,"BatchLogRecordProcessor",{enumerable:!0,get:function(){return iA3.BatchLogRecordProcessor}})});function oQA(A){if(A<=1)return!1;try{return process.kill(A,0),!0}catch{return!1}}async function aQA(A,q=10){if(process.platform==="win32"){let z=`
      $pid = ${String(A)}
      $ancestors = @()
      for ($i = 0; $i -lt ${q}; $i++) {
        $proc = Get-CimInstance Win32_Process -Filter "ProcessId=$pid" -ErrorAction SilentlyContinue
        if (-not $proc -or -not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
        $pid = $proc.ParentProcessId
        $ancestors += $pid
      }
      $ancestors -join ','
    `.trim(),w=await z7("powershell.exe",["-NoProfile","-Command",z],{timeout:3000});if(w.code!==0||!w.stdout?.trim())return[];return w.stdout.trim().split(",").filter(Boolean).map((_)=>parseInt(_,10)).filter((_)=>!isNaN(_))}let K=`pid=${String(A)}; for i in $(seq 1 ${q}); do ppid=$(ps -o ppid= -p $pid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; echo $ppid; pid=$ppid; done`,Y=await z7("sh",["-c",K],{timeout:3000});if(Y.code!==0||!Y.stdout?.trim())return[];return Y.stdout.trim().split(`
`).filter(Boolean).map((z)=>parseInt(z,10)).filter((z)=>!isNaN(z))}function sQA(A){try{let q=String(A),K=process.platform==="win32"?`powershell.exe -NoProfile -Command "(Get-CimInstance Win32_Process -Filter \\"ProcessId=${q}\\").CommandLine"`:`ps -o command= -p ${q}`,Y=FV(K,{timeout:1000});return Y?Y.trim():null}catch{return null}}async function tQA(A,q=10){if(process.platform==="win32"){let z=`
      $currentPid = ${String(A)}
      $commands = @()
      for ($i = 0; $i -lt ${q}; $i++) {
        $proc = Get-CimInstance Win32_Process -Filter "ProcessId=$currentPid" -ErrorAction SilentlyContinue
        if (-not $proc) { break }
        if ($proc.CommandLine) { $commands += $proc.CommandLine }
        if (-not $proc.ParentProcessId -or $proc.ParentProcessId -eq 0) { break }
        $currentPid = $proc.ParentProcessId
      }
      $commands -join [char]0
    `.trim(),w=await z7("powershell.exe",["-NoProfile","-Command",z],{timeout:3000});if(w.code!==0||!w.stdout?.trim())return[];return w.stdout.split("\x00").filter(Boolean)}let K=`currentpid=${String(A)}; for i in $(seq 1 ${q}); do cmd=$(ps -o command= -p $currentpid 2>/dev/null); if [ -n "$cmd" ]; then printf '%s\\0' "$cmd"; fi; ppid=$(ps -o ppid= -p $currentpid 2>/dev/null | tr -d ' '); if [ -z "$ppid" ] || [ "$ppid" = "0" ] || [ "$ppid" = "1" ]; then break; fi; currentpid=$ppid; done`,Y=await z7("sh",["-c",K],{timeout:3000});if(Y.code!==0||!Y.stdout?.trim())return[];return Y.stdout.split("\x00").filter(Boolean)}var wI6=k(()=>{aq()});import{stat as oA3}from"fs/promises";function tA3(){if(process.platform!=="linux")return!1;return Ue1??!1}async function eQA(){if(OK6!==void 0)return OK6;if(process.platform==="darwin")return OK6=null,null;try{let A=await tQA(process.pid,10);for(let q of A){let K=q.toLowerCase();for(let Y of js1)if(K.includes(Y))return OK6=Y,Y}}catch{}return OK6=null,null}async function eA3(){if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(YA.platform!=="darwin")return await eQA()||"pycharm"}return YA.terminal}function A73(){if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(YA.platform!=="darwin"){if(OK6!==void 0)return OK6||"pycharm";return"pycharm"}}return YA.terminal}async function pe1(){if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm")await eQA()}var aA3,sA3=()=>{return process.platform==="linux"&&process.env.CLAUDE_CODE_BUBBLEWRAP==="1"},Ue1=null,OK6,pV;var ta=k(()=>{aq();wI6();Eq();K9();aA3=T8(async()=>{let{code:A}=await W8("test",["-f","/.dockerenv"]);if(A!==0)return!1;return process.platform==="linux"});if(process.platform==="linux"){let A=process.arch==="x64"?"x86_64":"aarch64";oA3(`/lib/libc.musl-${A}.so.1`).then(()=>{Ue1=!0},()=>{Ue1=!1})}pV={...YA,terminal:A73(),getIsDocker:aA3,getIsBubblewrapSandbox:sA3,isMuslEnvironment:tA3,getTerminalWithJetBrainsDetectionAsync:eA3,initJetBrainsDetection:pe1}});var O31="claude-code-20250219",AUA="interleaved-thinking-2025-05-14",ea="context-1m-2025-08-07",H31="context-management-2025-06-27",As="structured-outputs-2025-12-15",de1="web-search-2025-03-05",j31="tool-examples-2025-10-29",qUA="advanced-tool-use-2025-11-20",KUA="tool-search-tool-2025-10-19",ce1="effort-2025-11-24",YUA="adaptive-thinking-2026-01-28",_I6="prompt-caching-scope-2026-01-05",zUA="fast-mode-2026-02-01",wUA="redact-thinking-2026-02-12",le1="afk-mode-2026-01-31",ie1,ne1;var HK6=k(()=>{ie1=new Set(["interleaved-thinking-2025-05-14","context-1m-2025-08-07","tool-search-tool-2025-10-19","tool-examples-2025-10-29"]),ne1=new Set(["claude-code-20250219","interleaved-thinking-2025-05-14","context-management-2025-06-27"])});function D7(){return $1(process.env.CLAUDE_CODE_USE_BEDROCK)?"bedrock":$1(process.env.CLAUDE_CODE_USE_VERTEX)?"vertex":$1(process.env.CLAUDE_CODE_USE_FOUNDRY)?"foundry":"firstParty"}function jK6(){return D7()}function Om(){let A=process.env.ANTHROPIC_BASE_URL;if(!A)return!0;try{let q=new URL(A).host;return["api.anthropic.com"].includes(q)}catch{return!1}}var yz=k(()=>{Z8()});import{AsyncLocalStorage as q73}from"async_hooks";function M31(){return _UA.getStore()?.workload}function D31(A,q){if(A===void 0)return q();return _UA.run({workload:A},q)}var J31="cron",_UA;var JK6=k(()=>{_UA=new q73});function ey(){let A=process.env.CLAUDE_AGENT_SDK_VERSION?`, agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`:"",q=process.env.CLAUDE_AGENT_SDK_CLIENT_APP?`, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`:"",K=M31(),Y=K?`, workload/${K}`:"";return`claude-cli/${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION} (external, ${process.env.CLAUDE_CODE_ENTRYPOINT}${A}${q}${Y})`}function qs(){let A=[];if(process.env.CLAUDE_CODE_ENTRYPOINT)A.push(process.env.CLAUDE_CODE_ENTRYPOINT);if(process.env.CLAUDE_AGENT_SDK_VERSION)A.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`);if(process.env.CLAUDE_AGENT_SDK_CLIENT_APP)A.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);let q=A.length>0?` (${A.join(", ")})`:"";return`claude-code/${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION}${q}`}function mO(){return`claude-code/${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION}`}function gO(){if(A7()){let q=g7();if(!q?.accessToken)return{headers:{},error:"No OAuth token available"};return{headers:{Authorization:`Bearer ${q.accessToken}`,"anthropic-beta":G0}}}let A=nk();if(!A)return{headers:{},error:"No API key available"};return{headers:{"x-api-key":A}}}var uD=k(()=>{bA();L5();JK6()});async function K73(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return L("[clientData] skipped: nonessential traffic disabled"),null;if(!A7()||!Cf())return L("[clientData] skipped: not OAuth subscriber or missing profile scope"),null;let A=`${U7().BASE_API_URL}/api/oauth/claude_cli/client_data`;for(let q=0;q<2;q++){let K=gO();if(K.error)throw Error(`Auth error: ${K.error}`);try{L(`[clientData] fetching (attempt ${q+1}/2)`);let z=(await I8.get(A,{headers:{"Content-Type":"application/json","User-Agent":mO(),...K.headers},timeout:5000})).data.client_data??null;return L(`[clientData] fetch ok (${z?Object.keys(z).length+" fields":"null"})`),z}catch(Y){let z=g7()?.accessToken;if(q===0&&I8.isAxiosError(Y)&&Y.response?.status===401&&z){L("[clientData] 401 received, refreshing token and retrying"),await Sf(z);continue}throw L(`[clientData] fetch failed: ${I8.isAxiosError(Y)?Y.response?.status??Y.code:"unknown"}`),Y}}return null}async function $UA(){try{let A=await K73(),q=T1().clientDataCache;if(QV(q?.data,A))return L("[clientData] cache unchanged, skipping write"),A;return L("[clientData] cache updated, persisting to disk"),_8((K)=>({...K,clientDataCache:{data:A,timestamp:Date.now()}})),A}catch(A){return $6(A),null}}function Y73(A){let q=T1().clientDataCache?.data?.[A];return typeof q==="string"?q:null}function OUA(){return Y73("coral_reef_sonnet")==="true"}var re1=k(()=>{A3();_M6();uD();x1();G1();Q8();L5();bA()});function vM6(){return $1(process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)}function rk(A){if(vM6())return!1;return/\[1m\]/i.test(A)}function $73(A){if(vM6())return!1;let q=A.toLowerCase();return q.includes("claude-sonnet-4")||q.includes("opus-4-6")}function XM(A,q){if(rk(A)||q?.includes(ea)&&$73(A))return 1e6;if(oe1(A))return 1e6;return z73}function oe1(A){if(vM6())return!1;if(rk(A))return!1;if(!A.toLowerCase().includes("sonnet-4-6"))return!1;return OUA()}function X31(A,q){if(!A)return{used:null,remaining:null};let K=A.input_tokens+A.cache_creation_input_tokens+A.cache_read_input_tokens,Y=Math.round(K/q*100),z=Math.min(100,Math.max(0,Y));return{used:z,remaining:100-z}}function Ks(A){let q=A.toLowerCase(),K,Y;if(q.includes("opus-4-5")||q.includes("opus-4-6")||q.includes("sonnet-4")||q.includes("haiku-4"))K=32000,Y=64000;else if(q.includes("opus-4-1")||q.includes("opus-4"))K=32000,Y=32000;else if(q.includes("claude-3-opus"))K=4096,Y=4096;else if(q.includes("claude-3-sonnet"))K=8192,Y=8192;else if(q.includes("claude-3-haiku"))K=4096,Y=4096;else if(q.includes("3-5-sonnet")||q.includes("3-5-haiku"))K=8192,Y=8192;else if(q.includes("3-7-sonnet"))K=32000,Y=64000;else K=w73,Y=_73;return{default:K,upperLimit:Y}}function jUA(A){return Ks(A).upperLimit-1}var z73=200000,HUA=20000,w73=32000,_73=64000;var PM=k(()=>{re1();HK6();Z8()});function O73(A,q,K){if(K!==void 0&&!kB(A[q],K)||K===void 0&&!(q in A))go(A,q,K)}var $I6;var ae1=k(()=>{NR6();oO6();$I6=O73});function H73(A){return function(q,K,Y){var z=-1,w=Object(q),_=Y(q),$=_.length;while($--){var O=_[A?$:++z];if(K(w[O],O,w)===!1)break}return q}}var JUA;var MUA=k(()=>{JUA=H73});var j73,P31;var se1=k(()=>{MUA();j73=JUA(),P31=j73});function J73(A){return CD(A)&&SB(A)}var DUA;var XUA=k(()=>{$H6();LB();DUA=J73});function Z73(A){if(!CD(A)||vk(A)!=M73)return!1;var q=CH6(A);if(q===null)return!0;var K=P73.call(q,"constructor")&&q.constructor;return typeof K=="function"&&K instanceof K&&PUA.call(K)==W73}var M73="[object Object]",D73,X73,PUA,P73,W73,kM6;var W31=k(()=>{G46();P81();LB();D73=Function.prototype,X73=Object.prototype,PUA=D73.toString,P73=X73.hasOwnProperty,W73=PUA.call(Object);kM6=Z73});function G73(A,q){if(q==="constructor"&&typeof A[q]==="function")return;if(q=="__proto__")return;return A[q]}var OI6;var te1=k(()=>{OI6=G73});function f73(A){return hy(A,bB(A))}var WUA;var ZUA=k(()=>{F46();SH6();WUA=f73});function T73(A,q,K,Y,z,w,_){var $=OI6(A,K),O=OI6(q,K),H=_.get(O);if(H){$I6(A,K,H);return}var j=w?w($,O,K+"",A,q,_):void 0,J=j===void 0;if(J){var M=mw(O),D=!M&&yB(O),X=!M&&!D&&wH6(O);if(j=O,M||D||X)if(mw($))j=$;else if(DUA($))j=X81($);else if(D)J=!1,j=kR6(O,!0);else if(X)J=!1,j=f81(O,!0);else j=[];else if(kM6(O)||Rp(O)){if(j=$,Rp($))j=WUA($);else if(!Bw($)||nO6($))j=T81(O)}else J=!1}if(J)_.set(O,j),z(j,O,Y,w,_),_.delete(O);$I6(A,K,j)}var GUA;var fUA=k(()=>{ae1();LF1();CF1();yF1();hF1();sy6();Wf();XUA();ty6();M11();Pf();W31();b11();te1();ZUA();GUA=T73});function TUA(A,q,K,Y,z){if(A===q)return;P31(q,function(w,_){if(z||(z=new EB),Bw(w))GUA(A,q,_,K,TUA,Y,z);else{var $=Y?Y(OI6(A,_),w,_+"",A,q,z):void 0;if($===void 0)$=w;$I6(A,_,$)}},bB)}var VUA;var NUA=k(()=>{ay6();ae1();se1();fUA();Pf();SH6();te1();VUA=TUA});function V73(A,q,K){switch(K.length){case 0:return A.call(q);case 1:return A.call(q,K[0]);case 2:return A.call(q,K[0],K[1]);case 3:return A.call(q,K[0],K[1],K[2])}return A.apply(q,K)}var vUA;var kUA=k(()=>{vUA=V73});function N73(A,q,K){return q=EUA(q===void 0?A.length-1:q,0),function(){var Y=arguments,z=-1,w=EUA(Y.length-q,0),_=Array(w);while(++z<w)_[z]=Y[q+z];z=-1;var $=Array(q+1);while(++z<q)$[z]=Y[z];return $[q]=K(_),vUA(A,this,$)}}var EUA,Z31;var ee1=k(()=>{kUA();EUA=Math.max;Z31=N73});function v73(A){return function(){return A}}var LUA;var yUA=k(()=>{LUA=v73});var k73,RUA;var SUA=k(()=>{yUA();EF1();r11();k73=!RH6?XH6:function(A,q){return RH6(A,"toString",{configurable:!0,enumerable:!1,value:LUA(q),writable:!0})},RUA=k73});function R73(A){var q=0,K=0;return function(){var Y=y73(),z=L73-(Y-K);if(K=Y,z>0){if(++q>=E73)return arguments[0]}else q=0;return A.apply(void 0,arguments)}}var E73=800,L73=16,y73,CUA;var hUA=k(()=>{y73=Date.now;CUA=R73});var S73,G31;var A68=k(()=>{SUA();hUA();S73=CUA(RUA),G31=S73});function C73(A,q){return G31(Z31(A,q,XH6),A+"")}var IUA;var bUA=k(()=>{r11();ee1();A68();IUA=C73});function h73(A,q,K){if(!Bw(K))return!1;var Y=typeof q;if(Y=="number"?SB(K)&&bo(q,K.length):Y=="string"&&(q in K))return kB(K[q],A);return!1}var xUA;var uUA=k(()=>{oO6();$H6();ey6();Pf();xUA=h73});function I73(A){return IUA(function(q,K){var Y=-1,z=K.length,w=z>1?K[z-1]:void 0,_=z>2?K[2]:void 0;if(w=A.length>3&&typeof w=="function"?(z--,w):void 0,_&&xUA(K[0],K[1],_))w=z<3?void 0:w,z=1;q=Object(q);while(++Y<z){var $=K[Y];if($)A(q,$,Y,w)}return q})}var BUA;var mUA=k(()=>{bUA();uUA();BUA=I73});var b73,MK6;var gUA=k(()=>{NUA();mUA();b73=BUA(function(A,q,K,Y){VUA(A,q,K,Y)}),MK6=b73});import{dirname as x73}from"path";function z8(A,q,K={}){let Y=u73();if(!Y)return;let z={timestamp:new Date().toISOString(),level:A,event:q,data:K},w=P1();try{w.appendFileSync(Y,U6(z)+`
`)}catch{try{w.mkdirSync(x73(Y)),w.appendFileSync(Y,U6(z)+`
`)}catch{}}}function u73(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function EM6(A,q,K){let Y=Date.now();z8("info",`${A}_started`);try{let z=await q(),w=K?K(z):{};return z8("info",`${A}_completed`,{duration_ms:Date.now()-Y,...w}),z}catch(z){throw z8("error",`${A}_failed`,{duration_ms:Date.now()-Y}),z}}var D2=k(()=>{Y7();a1()});function Ys(A){switch(A){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function LM6(A){switch(A){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"built-in":return"Built-in"}}function f31(A){switch(A){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function FUA(A){switch(A){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function QUA(A){if(A==="")return[];let q=A.split(",").map((Y)=>Y.trim()),K=[];for(let Y of q)switch(Y){case"user":K.push("userSettings");break;case"project":K.push("projectSettings");break;case"local":K.push("localSettings");break;default:throw Error(`Invalid setting source: ${Y}. Valid options are: user, project, local`)}return K}function Td(){let A=qF1(),q=new Set(A);return q.add("policySettings"),q.add("flagSettings"),Array.from(q)}function WM(A){return Td().includes(A)}var hf,DK6,UUA="https://json.schemastore.org/claude-code-settings.json";var F2=k(()=>{Q1();hf=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];DK6=["localSettings","projectSettings","userSettings"]});function i6(A){let q;return()=>q??=A()}var q68={};m1(q68,{PERMISSION_MODES:()=>hZ,INTERNAL_PERMISSION_MODES:()=>pUA,EXTERNAL_PERMISSION_MODES:()=>T31});var T31,pUA,hZ;var HI6=k(()=>{T31=["acceptEdits","bypassPermissions","default","dontAsk","plan"],pUA=[...T31,"auto"],hZ=pUA});function iUA(A){return!0}function V31(A){return dUA[A]??dUA.default}function zs(A){return V31(A).external}function yI(A){return hZ.includes(A)?A:"default"}function Vd(A){return V31(A).title}function nUA(A){return A==="default"||A===void 0}function jI6(A){return V31(A).symbol}function If(A){return V31(A).color}var cUA,lUA,dUA;var k0=k(()=>{B7();HI6();cUA=i6(()=>Q4.enum(hZ)),lUA=i6(()=>Q4.enum(T31)),dUA={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:"⏸",color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var Tq="Agent",XK6="Task",rUA="verification";var RI="TaskStop",oUA=`
- Stops a running background task by its ID
- Takes a task_id parameter identifying the task to stop
- Returns a success or failure status
- Use this tool when you need to terminate a long-running task
`;var SI="TaskOutput";function bf(A){return aUA[A]??A}function sUA(A){let q=[];for(let[K,Y]of Object.entries(aUA))if(Y===A)q.push(K);return q}function g73(A){return A.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function F73(A){return A.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function Sj(A){let q=Q73(A,"(");if(q===-1)return{toolName:bf(A)};let K=U73(A,")");if(K===-1||K<=q)return{toolName:bf(A)};if(K!==A.length-1)return{toolName:bf(A)};let Y=A.substring(0,q),z=A.substring(q+1,K);if(!Y)return{toolName:bf(A)};if(z===""||z==="*")return{toolName:bf(Y)};let w=F73(z);return{toolName:bf(Y),ruleContent:w}}function K5(A){if(!A.ruleContent)return A.toolName;let q=g73(A.ruleContent);return`${A.toolName}(${q})`}function Q73(A,q){for(let K=0;K<A.length;K++)if(A[K]===q){let Y=0,z=K-1;while(z>=0&&A[z]==="\\")Y++,z--;if(Y%2===0)return K}return-1}function U73(A,q){for(let K=A.length-1;K>=0;K--)if(A[K]===q){let Y=0,z=K-1;while(z>=0&&A[z]==="\\")Y++,z--;if(Y%2===0)return K}return-1}var aUA;var E0=k(()=>{aUA={Task:Tq,KillShell:RI,AgentOutputTool:SI,BashOutputTool:SI,...{}}});function FO(A){let q=A.replace(/[^a-zA-Z0-9_-]/g,"_");if(A.startsWith("claude.ai "))q=q.replace(/_+/g,"_").replace(/^_|_$/g,"");return q}function ok(A){let q=A.split("__"),[K,Y,...z]=q;if(K!=="mcp"||!Y)return null;let w=z.length>0?z.join("__"):void 0;return{serverName:Y,toolName:w}}function CI(A){return`mcp__${FO(A)}__`}function K68(A,q){return`${CI(A)}${FO(q)}`}function JI6(A){return A.mcpInfo?K68(A.mcpInfo.serverName,A.mcpInfo.toolName):A.name}function N31(A,q){let K=`mcp__${FO(q)}__`;return A.replace(K,"")}function v31(A){let q=A.replace(/\s*\(MCP\)\s*$/,"");q=q.trim();let K=q.indexOf(" - ");if(K!==-1)return q.substring(K+3).trim();return q}var AR=()=>{};function tUA(A){return Y68.filePatternTools.includes(A)}function eUA(A){return Y68.bashPrefixTools.includes(A)}function ApA(A){return Y68.customValidation[A]}var Y68;var qpA=k(()=>{Y68={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(A)=>{if(A.includes("*")||A.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(A)=>{if(A.includes("://")||A.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!A.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function KpA(A,q){let K=0,Y=q-1;while(Y>=0&&A[Y]==="\\")K++,Y--;return K%2!==0}function z68(A,q){let K=0;for(let Y=0;Y<A.length;Y++)if(A[Y]===q&&!KpA(A,Y))K++;return K}function d73(A){for(let q=0;q<A.length-1;q++)if(A[q]==="("&&A[q+1]===")"){if(!KpA(A,q))return!0}return!1}function w68(A){if(!A||A.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let q=z68(A,"("),K=z68(A,")");if(q!==K)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(d73(A)){let _=A.substring(0,A.indexOf("("));if(!_)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${_}" without parentheses`,examples:[`${_}`,`${_}(some-pattern)`]}}let Y=Sj(A),z=ok(Y.toolName);if(z){if(Y.ruleContent!==void 0||z68(A,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${Y.toolName}" without parentheses, or use "mcp__${z.serverName}__*" for all tools`,examples:[`mcp__${z.serverName}`,`mcp__${z.serverName}__*`,z.toolName&&z.toolName!=="*"?`mcp__${z.serverName}__${z.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!Y.toolName||Y.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(Y.toolName[0]!==Y.toolName[0]?.toUpperCase()&&!p73.has(Y.toolName))return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${String(Y.toolName).charAt(0).toUpperCase()+String(Y.toolName).slice(1)}"`};let w=ApA(Y.toolName);if(w&&Y.ruleContent!==void 0){let _=w(Y.ruleContent);if(!_.valid)return _}if(eUA(Y.toolName)&&Y.ruleContent!==void 0){let _=Y.ruleContent;if(_.includes(":*")&&!_.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(_===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(tUA(Y.toolName)&&Y.ruleContent!==void 0){let _=Y.ruleContent;if(_.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${Y.toolName}(*.ts) - matches .ts files`,`${Y.toolName}(src/**) - matches all files in src`,`${Y.toolName}(**/*.test.ts) - matches test files`]};if(_.includes("*")&&!_.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!_.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${Y.toolName}(*.js) - all .js files`,`${Y.toolName}(src/*) - all files directly in src`,`${Y.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var p73,k31;var _68=k(()=>{B7();E0();AR();qpA();p73=new Set([]);k31=i6(()=>I.string().superRefine((A,q)=>{let K=w68(A);if(!K.valid){let Y=K.error;if(K.suggestion)Y+=`. ${K.suggestion}`;if(K.examples&&K.examples.length>0)Y+=`. Examples: ${K.examples.join(", ")}`;q.addIssue({code:I.ZodIssueCode.custom,message:Y,params:{received:A}})}}))});var Hm;var YpA=k(()=>{Hm=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStart","SubagentStop","PreCompact","PermissionRequest","Setup","TeammateIdle","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded"]});var zpA=()=>{};var yM6=k(()=>{YpA();zpA()});function c73(){let A=I.object({type:I.literal("command").describe("Bash command hook type"),command:I.string().describe("Shell command to execute"),timeout:I.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:I.string().optional().describe("Custom status message to display in spinner while hook runs"),once:I.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:I.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:I.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),q=I.object({type:I.literal("prompt").describe("LLM prompt hook type"),prompt:I.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),timeout:I.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:I.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.'),statusMessage:I.string().optional().describe("Custom status message to display in spinner while hook runs"),once:I.boolean().optional().describe("If true, hook runs once and is removed after execution")}),K=I.object({type:I.literal("http").describe("HTTP hook type"),url:I.string().url().describe("URL to POST the hook input JSON to"),timeout:I.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:I.record(I.string(),I.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:I.array(I.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:I.string().optional().describe("Custom status message to display in spinner while hook runs"),once:I.boolean().optional().describe("If true, hook runs once and is removed after execution")}),Y=I.object({type:I.literal("agent").describe("Agentic verifier hook type"),prompt:I.string().transform((z)=>(w)=>z).describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),timeout:I.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:I.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:I.string().optional().describe("Custom status message to display in spinner while hook runs"),once:I.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:A,PromptHookSchema:q,HttpHookSchema:K,AgentHookSchema:Y}}var wpA,_pA,qR;var E31=k(()=>{B7();yM6();wpA=i6(()=>{let{BashCommandHookSchema:A,PromptHookSchema:q,AgentHookSchema:K,HttpHookSchema:Y}=c73();return I.discriminatedUnion("type",[A,q,K,Y])}),_pA=i6(()=>I.object({matcher:I.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:I.array(wpA()).describe("List of hooks to execute when the matcher matches")})),qR=i6(()=>I.partialRecord(I.enum(Hm),I.array(_pA())))});var $68,uQw,O68,$pA,l73,i73,n73,r73,o73,a73,s73,jm,OpA;var PK6=k(()=>{B7();$68=i6(()=>I.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),uQw=i6(()=>I.enum(["stdio","sse","sse-ide","http","ws","sdk"])),O68=i6(()=>I.object({type:I.literal("stdio").optional(),command:I.string().min(1,"Command cannot be empty"),args:I.array(I.string()).default([]),env:I.record(I.string(),I.string()).optional()})),$pA=i6(()=>I.object({clientId:I.string().optional(),callbackPort:I.number().int().positive().optional(),authServerMetadataUrl:I.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional()})),l73=i6(()=>I.object({type:I.literal("sse"),url:I.string(),headers:I.record(I.string(),I.string()).optional(),headersHelper:I.string().optional(),oauth:$pA().optional()})),i73=i6(()=>I.object({type:I.literal("sse-ide"),url:I.string(),ideName:I.string(),ideRunningInWindows:I.boolean().optional()})),n73=i6(()=>I.object({type:I.literal("ws-ide"),url:I.string(),ideName:I.string(),authToken:I.string().optional(),ideRunningInWindows:I.boolean().optional()})),r73=i6(()=>I.object({type:I.literal("http"),url:I.string(),headers:I.record(I.string(),I.string()).optional(),headersHelper:I.string().optional(),oauth:$pA().optional()})),o73=i6(()=>I.object({type:I.literal("ws"),url:I.string(),headers:I.record(I.string(),I.string()).optional(),headersHelper:I.string().optional()})),a73=i6(()=>I.object({type:I.literal("sdk"),name:I.string()})),s73=i6(()=>I.object({type:I.literal("claudeai-proxy"),url:I.string(),id:I.string()})),jm=i6(()=>I.union([O68(),l73(),i73(),n73(),r73(),o73(),a73(),s73()])),OpA=i6(()=>I.object({mcpServers:I.record(I.string(),jm())}))});function MI6(A,q){let K=A.toLowerCase();return q.autoUpdate??(ak.has(K)&&!t73.has(K))}function q43(A){if(ak.has(A.toLowerCase()))return!1;if(A43.test(A))return!0;return e73.test(A)}function JpA(A,q){let K=A.toLowerCase();if(!ak.has(K))return null;if(q.source==="github"){if(!(q.repo||"").toLowerCase().startsWith(`${L31}/`))return`The name '${A}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${L31}/' can use this name.`;return null}if(q.source==="git"&&q.url){let Y=q.url.toLowerCase(),z=Y.includes("github.com/anthropics/"),w=Y.includes("git@github.com:anthropics/");if(z||w)return null;return`The name '${A}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${L31}/' can use this name.`}return`The name '${A}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${L31}' organization.`}function hM6(A){return typeof A==="string"&&A.startsWith("./")}var ak,t73,e73,A43,L31="anthropics",Nd,RM6,HpA,j68,J68,MpA,K43,DpA,Y43,z43,w43,_43,$43,O43,jpA,H43,j43,SM6,J43,XpA,M43,WK6,DI6,H68,D43,X43,ws,CM6,UQw,P43,XI6,W43,Z43,PI6,pQw,G43,IM6;var L0=k(()=>{B7();E31();PK6();ak=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),t73=new Set(["knowledge-work-plugins"]);e73=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,A43=/[^\u0020-\u007E]/;Nd=i6(()=>I.string().startsWith("./")),RM6=i6(()=>Nd().endsWith(".json")),HpA=i6(()=>I.union([Nd().refine((A)=>A.endsWith(".mcpb")||A.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),I.string().url().refine((A)=>A.endsWith(".mcpb")||A.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),j68=i6(()=>Nd().endsWith(".md")),J68=i6(()=>I.union([j68(),Nd()])),MpA=i6(()=>I.object({name:I.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:I.string().optional().describe("Contact email for support or feedback"),url:I.string().optional().describe("Website, GitHub profile, or organization URL")})),K43=i6(()=>I.object({name:I.string().min(1,"Plugin name cannot be empty").refine((A)=>!A.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:I.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:I.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:MpA().optional().describe("Information about the plugin creator or maintainer"),homepage:I.string().url().optional().describe("Plugin homepage or documentation URL"),repository:I.string().optional().describe("Source code repository URL"),license:I.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:I.array(I.string()).optional().describe("Tags for plugin discovery and categorization")})),DpA=i6(()=>I.object({description:I.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:I.lazy(()=>qR()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),Y43=i6(()=>I.object({hooks:I.union([RM6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),I.lazy(()=>qR()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),I.array(I.union([RM6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),I.lazy(()=>qR()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),z43=i6(()=>I.object({source:J68().optional().describe("Path to command markdown file, relative to plugin root"),content:I.string().optional().describe("Inline markdown content for the command"),description:I.string().optional().describe("Command description override"),argumentHint:I.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:I.string().optional().describe("Default model for this command"),allowedTools:I.array(I.string()).optional().describe("Tools allowed when command runs")}).refine((A)=>A.source&&!A.content||!A.source&&A.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),w43=i6(()=>I.object({commands:I.union([J68().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),I.array(J68().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),I.record(I.string(),z43()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),_43=i6(()=>I.object({agents:I.union([j68().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),I.array(j68().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),$43=i6(()=>I.object({skills:I.union([Nd().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),I.array(Nd().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),O43=i6(()=>I.object({outputStyles:I.union([Nd().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),I.array(Nd().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),jpA=i6(()=>I.string().min(1)),H43=i6(()=>I.string().min(2).refine((A)=>A.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),j43=i6(()=>I.object({mcpServers:I.union([RM6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),HpA().describe("Path or URL to MCPB file containing MCP server configuration"),I.record(I.string(),jm()).describe("MCP server configurations keyed by server name"),I.array(I.union([RM6().describe("Path to MCP servers configuration file"),HpA().describe("Path or URL to MCPB file"),I.record(I.string(),jm()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),SM6=i6(()=>I.strictObject({command:I.string().min(1).refine((A)=>{if(A.includes(" ")&&!A.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:I.array(jpA()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:I.record(H43(),jpA()).refine((A)=>Object.keys(A).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:I.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:I.record(I.string(),I.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:I.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:I.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:I.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:I.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:I.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:I.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:I.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),J43=i6(()=>I.object({lspServers:I.union([RM6().describe("Path to .lsp.json configuration file relative to plugin root"),I.record(I.string(),SM6()).describe("LSP server configurations keyed by server name"),I.array(I.union([RM6().describe("Path to LSP configuration file"),I.record(I.string(),SM6()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),XpA=i6(()=>I.string().refine((A)=>!A.includes("..")&&!A.includes("//"),"Package name cannot contain path traversal patterns").refine((A)=>{let q=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,K=/^[a-z0-9][a-z0-9-._]*$/;return q.test(A)||K.test(A)},"Invalid npm package name format")),M43=i6(()=>I.object({settings:I.record(I.string(),I.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),WK6=i6(()=>I.object({...K43().shape,...Y43().partial().shape,...w43().partial().shape,..._43().partial().shape,...$43().partial().shape,...O43().partial().shape,...j43().partial().shape,...J43().partial().shape,...M43().partial().shape}).strict()),DI6=i6(()=>I.discriminatedUnion("source",[I.object({source:I.literal("url"),url:I.string().url().describe("Direct URL to marketplace.json file"),headers:I.record(I.string(),I.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),I.object({source:I.literal("github"),repo:I.string().describe("GitHub repository in owner/repo format"),ref:I.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:I.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:I.array(I.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),I.object({source:I.literal("git"),url:I.string().endsWith(".git").describe("Full git repository URL"),ref:I.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:I.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:I.array(I.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),I.object({source:I.literal("npm"),package:XpA().describe("NPM package containing marketplace.json")}),I.object({source:I.literal("file"),path:I.string().describe("Local file path to marketplace.json")}),I.object({source:I.literal("directory"),path:I.string().describe("Local directory containing .claude-plugin/marketplace.json")}),I.object({source:I.literal("hostPattern"),hostPattern:I.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),I.object({source:I.literal("pathPattern"),pathPattern:I.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')})])),H68=i6(()=>I.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),D43=i6(()=>I.union([Nd().describe("Path to the plugin root, relative to the marketplace directory"),I.object({source:I.literal("npm"),package:XpA().or(I.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:I.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:I.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),I.object({source:I.literal("pip"),package:I.string().describe("Python package name as it appears on PyPI"),version:I.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:I.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),I.object({source:I.literal("url"),url:I.string().endsWith(".git").describe("Full git repository URL (https:// or git@)"),ref:I.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:H68().optional().describe("Specific commit SHA to use")}),I.object({source:I.literal("github"),repo:I.string().describe("GitHub repository in owner/repo format"),ref:I.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:H68().optional().describe("Specific commit SHA to use")}),I.object({source:I.literal("git-subdir"),url:I.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:I.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:I.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:H68().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")]));X43=i6(()=>WK6().partial().extend({name:I.string().min(1,"Plugin name cannot be empty").refine((A)=>!A.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:D43().describe("Where to fetch the plugin from"),category:I.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:I.array(I.string()).optional().describe("Tags for searchability and discovery"),strict:I.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")}).strict()),ws=i6(()=>I.object({name:I.string().min(1,"Marketplace must have a name").refine((A)=>!A.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((A)=>!q43(A),{message:'Marketplace name cannot impersonate official Anthropic/Claude marketplaces. Names containing "official", "anthropic", or "claude" in official-sounding combinations are reserved.'}),owner:MpA().describe("Marketplace maintainer or curator information"),plugins:I.array(X43()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:I.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:I.object({pluginRoot:I.string().optional().describe("Base path for relative plugin sources"),version:I.string().optional().describe("Marketplace version"),description:I.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata")})),CM6=i6(()=>I.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),UQw=i6(()=>I.union([CM6(),I.object({id:CM6().describe('Plugin identifier (e.g., "formatter@tools")'),version:I.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:I.boolean().optional().describe("If true, cannot be disabled"),config:I.record(I.string(),I.unknown()).optional().describe("Plugin-specific configuration")})])),P43=i6(()=>I.object({version:I.string().describe("Currently installed version"),installedAt:I.string().describe("ISO 8601 timestamp of installation"),lastUpdated:I.string().optional().describe("ISO 8601 timestamp of last update"),installPath:I.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:I.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),XI6=i6(()=>I.object({version:I.literal(1).describe("Schema version 1"),plugins:I.record(CM6(),P43()).describe("Map of plugin IDs to their installation metadata")})),W43=i6(()=>I.enum(["managed","user","project","local"])),Z43=i6(()=>I.object({scope:W43().describe("Installation scope"),projectPath:I.string().optional().describe("Project path (required for project/local scopes)"),installPath:I.string().describe("Absolute path to the versioned plugin directory"),version:I.string().optional().describe("Currently installed version"),installedAt:I.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:I.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:I.string().optional().describe("Git commit SHA for git-based plugins")})),PI6=i6(()=>I.object({version:I.literal(2).describe("Schema version 2"),plugins:I.record(CM6(),I.array(Z43())).describe("Map of plugin IDs to arrays of installation entries")})),pQw=i6(()=>I.union([XI6(),PI6()])),G43=i6(()=>I.object({source:DI6().describe("Where to fetch the marketplace from"),installLocation:I.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:I.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:I.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),IM6=i6(()=>I.record(I.string(),G43()))});var f43,T43,PpA;var WpA=k(()=>{B7();f43=i6(()=>I.object({allowedDomains:I.array(I.string()).optional(),allowManagedDomainsOnly:I.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:I.array(I.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:I.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:I.boolean().optional(),httpProxyPort:I.number().optional(),socksProxyPort:I.number().optional()}).optional()),T43=i6(()=>I.object({allowWrite:I.array(I.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:I.array(I.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:I.array(I.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules.")}).optional()),PpA=i6(()=>I.object({enabled:I.boolean().optional(),autoAllowBashIfSandboxed:I.boolean().optional(),allowUnsandboxedCommands:I.boolean().optional().describe("Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true."),network:f43(),filesystem:T43(),ignoreViolations:I.record(I.string(),I.array(I.string())).optional(),enableWeakerNestedSandbox:I.boolean().optional(),enableWeakerNetworkIsolation:I.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:I.array(I.string()).optional(),ripgrep:I.object({command:I.string(),args:I.array(I.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function bM6(A){return"serverName"in A&&A.serverName!==void 0}function R31(A){return"serverCommand"in A&&A.serverCommand!==void 0}function S31(A){return"serverUrl"in A&&A.serverUrl!==void 0}var V43,N43,v43,k43,E43,dX;var hI=k(()=>{B7();k0();_68();F2();L0();WpA();E31();E31();V43=i6(()=>I.record(I.string(),I.coerce.string())),N43=i6(()=>I.object({allow:I.array(k31()).optional().describe("List of permission rules for allowed operations"),deny:I.array(k31()).optional().describe("List of permission rules for denied operations"),ask:I.array(k31()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:I.enum(hZ).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:I.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),...{disableAutoMode:I.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:I.array(I.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),v43=i6(()=>I.object({source:DI6().describe("Where to fetch the marketplace from"),installLocation:I.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:I.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),k43=i6(()=>I.object({serverName:I.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:I.array(I.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:I.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((A)=>{return[A.serverName!==void 0,A.serverCommand!==void 0,A.serverUrl!==void 0].filter(Boolean).length===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),E43=i6(()=>I.object({serverName:I.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:I.array(I.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:I.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((A)=>{return[A.serverName!==void 0,A.serverCommand!==void 0,A.serverUrl!==void 0].filter(Boolean).length===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),dX=i6(()=>I.object({$schema:I.literal(UUA).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:I.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:I.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:I.string().optional().describe("Path to a script that refreshes AWS authentication"),fileSuggestion:I.object({type:I.literal("command"),command:I.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:I.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:I.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (0 to disable cleanup)"),env:V43().optional().describe("Environment variables to set for Claude Code sessions"),attribution:I.object({commit:I.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:I.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeCoAuthoredBy:I.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:I.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:N43().optional().describe("Tool usage permissions configuration"),model:I.string().optional().describe("Override the default model used by Claude Code"),availableModels:I.array(I.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:I.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:I.array(I.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:I.array(I.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:I.array(k43()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:I.array(E43()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:qR().optional().describe("Custom commands to run before/after tool executions"),worktree:I.object({symlinkDirectories:I.array(I.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"')}).optional().describe("Git worktree configuration for --worktree flag. Symlinks prevent duplicating large directories like node_modules across worktrees."),disableAllHooks:I.boolean().optional().describe("Disable all hooks and statusLine execution"),allowManagedHooksOnly:I.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:I.array(I.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:I.array(I.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:I.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:I.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),statusLine:I.object({type:I.literal("command"),command:I.string(),padding:I.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:I.record(I.string(),I.union([I.array(I.string()),I.boolean(),I.undefined()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:I.record(I.string(),v43()).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:I.array(DI6()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:I.array(DI6()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:I.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:I.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:I.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:I.string().optional().describe("Controls the output style for assistant responses"),language:I.string().optional().describe('Preferred language for Claude responses (e.g., "japanese", "spanish")'),skipWebFetchPreflight:I.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:PpA().optional(),spinnerTipsEnabled:I.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:I.object({mode:I.enum(["append","replace"]),verbs:I.array(I.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:I.object({excludeDefault:I.boolean().optional(),tips:I.array(I.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:I.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:I.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:I.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),fastMode:I.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:I.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:I.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),agent:I.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:I.array(I.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:I.record(I.string(),I.object({mcpServers:I.record(I.string(),I.record(I.string(),I.union([I.string(),I.number(),I.boolean(),I.array(I.string())]))).optional().describe("User configuration values for MCP servers keyed by server name")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:I.object({defaultEnvironmentId:I.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:I.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),minimumVersion:I.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:I.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{voiceEnabled:I.boolean().optional().describe("Enable voice mode (hold-to-talk dictation)")},...{},prefersReducedMotion:I.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:I.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),showThinkingSummaries:I.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:I.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:I.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),autoMode:I.object({allow:I.array(I.string()).optional().describe("Rules for the auto mode classifier allow section"),deny:I.array(I.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:I.array(I.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},sshConfigs:I.array(I.object({id:I.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:I.string().describe("Display name for the SSH connection"),sshHost:I.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:I.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:I.string().optional().describe("Path to SSH identity file (private key)")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:I.array(I.string()).optional().describe('Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:I.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});import{readFile as L43}from"fs/promises";import{join as y43}from"path";async function WI6(A,q,K,Y){try{let z=await L43(y43(A,"config"),"utf-8");return R43(z,q,K,Y)}catch{return null}}function R43(A,q,K,Y){let z=A.split(`
`),w=q.toLowerCase(),_=Y.toLowerCase(),$=!1;for(let O of z){let H=O.trim();if(H.length===0||H[0]==="#"||H[0]===";")continue;if(H[0]==="["){$=I43(H,w,K);continue}if(!$)continue;let j=S43(H);if(j&&j.key.toLowerCase()===_)return j.value}return null}function S43(A){let q=0;while(q<A.length&&b43(A[q]))q++;if(q===0)return null;let K=A.slice(0,q);while(q<A.length&&(A[q]===" "||A[q]==="\t"))q++;if(q>=A.length||A[q]!=="=")return null;q++;while(q<A.length&&(A[q]===" "||A[q]==="\t"))q++;let Y=C43(A,q);return{key:K,value:Y}}function C43(A,q){let K="",Y=!1,z=q;while(z<A.length){let w=A[z];if(!Y&&(w==="#"||w===";"))break;if(w==='"'){Y=!Y,z++;continue}if(w==="\\"&&z+1<A.length){let _=A[z+1];if(Y){switch(_){case"n":K+=`
`;break;case"t":K+="\t";break;case"b":K+="\b";break;case'"':K+='"';break;case"\\":K+="\\";break;default:K+=_;break}z+=2;continue}if(_==="\\"){K+="\\",z+=2;continue}}K+=w,z++}if(!Y)K=h43(K);return K}function h43(A){let q=A.length;while(q>0&&(A[q-1]===" "||A[q-1]==="\t"))q--;return A.slice(0,q)}function I43(A,q,K){let Y=1;while(Y<A.length&&A[Y]!=="]"&&A[Y]!==" "&&A[Y]!=="\t"&&A[Y]!=='"')Y++;if(A.slice(1,Y).toLowerCase()!==q)return!1;if(K===null)return Y<A.length&&A[Y]==="]";while(Y<A.length&&(A[Y]===" "||A[Y]==="\t"))Y++;if(Y>=A.length||A[Y]!=='"')return!1;Y++;let w="";while(Y<A.length&&A[Y]!=='"'){if(A[Y]==="\\"&&Y+1<A.length){let _=A[Y+1];if(_==="\\"||_==='"'){w+=_,Y+=2;continue}w+=_,Y+=2;continue}w+=A[Y],Y++}if(Y>=A.length||A[Y]!=='"')return!1;if(Y++,Y>=A.length||A[Y]!=="]")return!1;return w===K}function b43(A){return A>="a"&&A<="z"||A>="A"&&A<="Z"||A>="0"&&A<="9"||A==="-"}var ZpA=()=>{};import{watchFile as x43,unwatchFile as GpA}from"fs";import{readFile as uM6,stat as TpA,readdir as u43}from"fs/promises";import{resolve as M68,join as II}from"path";function VpA(){xM6.clear()}async function KR(A){let q=M68(A??I1()),K=xM6.get(q);if(K!==void 0)return K;let Y=Fw(q);if(!Y)return xM6.set(q,null),null;let z=II(Y,".git");try{if((await TpA(z)).isFile()){let _=(await uM6(z,"utf-8")).trim();if(_.startsWith("gitdir:")){let $=_.slice(7).trim(),O=M68(Y,$);return xM6.set(q,O),O}}return xM6.set(q,z),z}catch{return xM6.set(q,null),null}}async function C31(A){try{let q=(await uM6(II(A,"HEAD"),"utf-8")).trim();if(q.startsWith("ref:")){let K=q.slice(4).trim();if(K.startsWith("refs/heads/"))return{type:"branch",name:K.slice(11)};let Y=await ZI6(A,K);return Y?{type:"detached",sha:Y}:{type:"detached",sha:""}}return{type:"detached",sha:q}}catch{return null}}async function ZI6(A,q){let K=await fpA(A,q);if(K)return K;let Y=await D68(A);if(Y&&Y!==A)return fpA(Y,q);return null}async function fpA(A,q){try{let K=(await uM6(II(A,q),"utf-8")).trim();if(K.startsWith("ref:"))return ZI6(A,K.slice(4).trim());return K}catch{}try{let K=await uM6(II(A,"packed-refs"),"utf-8");for(let Y of K.split(`
`)){if(Y.startsWith("#")||Y.startsWith("^"))continue;let z=Y.indexOf(" ");if(z===-1)continue;if(Y.slice(z+1)===q)return Y.slice(0,z)}}catch{}return null}async function D68(A){try{let q=(await uM6(II(A,"commondir"),"utf-8")).trim();return M68(A,q)}catch{return null}}async function B43(A,q,K){try{let Y=(await uM6(II(A,q),"utf-8")).trim();if(Y.startsWith("ref:")){let z=Y.slice(4).trim();if(z.startsWith(K))return z.slice(K.length)}}catch{}return null}class NpA{gitDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await KR(),this.initialized=!0,!this.gitDir)return;this.watchPath(II(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(II(this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Kq(async()=>{this.stopWatching()})}watchPath(A,q){this.watchedPaths.push(A),x43(A,{interval:m43},q)}async watchCurrentBranchRef(){if(!this.gitDir)return;let A=await C31(this.gitDir);if(!A||A.type!=="branch")return;let q=II(this.gitDir,"refs","heads",A.name);if(q===this.branchRefPath)return;if(this.branchRefPath)GpA(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((K)=>K!==this.branchRefPath);this.branchRefPath=q,this.watchPath(q,()=>{this.invalidate()})}async onHeadChanged(){await this.watchCurrentBranchRef(),this.invalidate()}invalidate(){for(let A of this.cache.values())A.dirty=!0}stopWatching(){for(let A of this.watchedPaths)GpA(A);this.watchedPaths=[],this.branchRefPath=null}async get(A,q){await this.ensureStarted();let K=this.cache.get(A);if(K&&!K.dirty)return K.value;if(K)K.dirty=!1;let Y=await q(),z=this.cache.get(A);if(z&&!z.dirty)z.value=Y;if(!z)this.cache.set(A,{value:Y,dirty:!1,compute:q});return Y}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null}}async function g43(){let A=await KR();if(!A)return"HEAD";let q=await C31(A);if(!q)return"HEAD";return q.type==="branch"?q.name:"HEAD"}async function F43(){let A=await KR();if(!A)return"";let q=await C31(A);if(!q)return"";if(q.type==="branch")return await ZI6(A,`refs/heads/${q.name}`)??"";return q.sha}async function Q43(){let A=await KR();if(!A)return null;let q=await WI6(A,"remote","origin","url");if(q)return q;let K=await D68(A);if(K&&K!==A)return WI6(K,"remote","origin","url");return null}async function U43(){let A=await KR();if(!A)return"main";let q=await B43(A,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(q)return q;for(let K of["main","master"])if(await ZI6(A,`refs/remotes/origin/${K}`))return K;return"main"}function vpA(){return h31.get("branch",g43)}function kpA(){return h31.get("head",F43)}function EpA(){return h31.get("remoteUrl",Q43)}function LpA(){return h31.get("defaultBranch",U43)}async function I31(A){let q=await KR(A);if(!q)return null;let K=await C31(q);if(!K)return null;if(K.type==="branch")return ZI6(q,`refs/heads/${K.name}`);return K.sha}async function b31(A){let q=await KR(A);if(!q)return null;let K=await WI6(q,"remote","origin","url");if(K)return K;let Y=await D68(q);if(Y&&Y!==q)return WI6(Y,"remote","origin","url");return null}async function ypA(){let A=await KR();if(!A)return!1;try{return await TpA(II(A,"shallow")),!0}catch{return!1}}async function RpA(){try{let A=await KR();if(!A)return 0;return(await u43(II(A,"worktrees"))).length+1}catch{return 1}}var xM6,m43=1000,h31;var ZK6=k(()=>{U3();W7();sY();ZpA();xM6=new Map;h31=new NpA});function x31(A){let q=A.slice(A.lastIndexOf(".")).toLowerCase();return p43.has(q)}function SpA(A){let q=Math.min(A.length,d43),K=0;for(let Y=0;Y<q;Y++){let z=A[Y];if(z===0)return!0;if(z<32&&z!==9&&z!==10&&z!==13)K++}return K/q>0.1}var p43,d43=8192;var X68=k(()=>{p43=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});var VI6={};m1(VI6,{parseGitRemote:()=>TI6,parseGitHubRepository:()=>GK6,getCachedRepository:()=>fI6,detectCurrentRepositoryWithHost:()=>GI6,detectCurrentRepository:()=>vd,clearRepositoryCaches:()=>P68});function P68(){mM6.clear(),BM6.clear()}async function vd(){let A=await GI6();if(!A)return null;if(A.host!=="github.com")return null;return`${A.owner}/${A.name}`}async function GI6(){let A=I1();if(BM6.has(A))return BM6.get(A)??null;try{let q=await _s();if(L(`Git remote URL: ${q}`),!q)return L("No git remote URL found"),BM6.set(A,null),mM6.set(A,null),null;let K=TI6(q);if(L(`Parsed repository: ${K?`${K.host}/${K.owner}/${K.name}`:null} from URL: ${q}`),BM6.set(A,K),K&&K.host==="github.com")mM6.set(A,`${K.owner}/${K.name}`);else mM6.set(A,null);return K}catch(q){return L(`Error detecting repository: ${q}`),BM6.set(A,null),mM6.set(A,null),null}}function fI6(){return mM6.get(I1())??null}function TI6(A){let q=A.trim(),K=q.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(K?.[1]&&K[2]&&K[3]){if(!CpA(K[1]))return null;return{host:K[1],owner:K[2],name:K[3]}}let Y=q.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(Y?.[1]&&Y[2]&&Y[3]&&Y[4]){let z=Y[1],w=Y[2],_=w.split(":")[0]??"";if(!CpA(_))return null;return{host:z==="https"||z==="http"?w:_,owner:Y[3],name:Y[4]}}return null}function GK6(A){let q=A.trim(),K=TI6(q);if(K){if(K.host!=="github.com")return null;return`${K.owner}/${K.name}`}if(!q.includes("://")&&!q.includes("@")&&q.includes("/")){let Y=q.split("/");if(Y.length===2&&Y[0]&&Y[1]){let z=Y[1].replace(/\.git$/,"");return`${Y[0]}/${z}`}}return L(`Could not parse repository from: ${q}`),null}function CpA(A){if(!A.includes("."))return!1;let q=A.split(".").pop();if(!q)return!1;return/^[a-zA-Z]+$/.test(q)}var mM6,BM6;var xf=k(()=>{U3();G1();W7();mM6=new Map,BM6=new Map});var v68={};m1(v68,{stashToCleanState:()=>V68,preserveGitStateForIssue:()=>Yq3,normalizeGitRemoteUrl:()=>dpA,isAtGitRoot:()=>s43,gitExe:()=>nA,getWorktreeCount:()=>gM6,getRepoRemoteHash:()=>NI6,getRemoteUrl:()=>_s,getIsHeadOnRemote:()=>f68,getIsGit:()=>Cj,getIsClean:()=>$s,getHead:()=>ppA,getGithubRepo:()=>FM6,getGitStateIssue:()=>t43,getGitState:()=>N68,getGitDir:()=>Z68,getFileStatus:()=>m31,getDefaultBranch:()=>dV,getCommitsAheadOfDefaultBranch:()=>cpA,getChangedFiles:()=>Aq3,getBranchPushStatus:()=>T68,getBranch:()=>ZJ,findRemoteBase:()=>lpA,findGitRoot:()=>Fw,findCanonicalGitRoot:()=>y0,dirIsInGitRepo:()=>G68,commitAndPushChanges:()=>e43});import{createHash as c43}from"crypto";import{statSync as hpA,readFileSync as IpA}from"fs";import{realpath as bpA,stat as l43,readFile as i43,open as n43}from"fs/promises";import{resolve as W68,dirname as QpA,join as B31,sep as xpA,basename as r43}from"path";function o43(){function A(q){let K=upA(q);return K===UpA?null:K}return A.cache=upA.cache,A}function a43(){function A(q){let K=Fw(q);if(!K)return null;return BpA(K)}return A.cache=BpA.cache,A}function Z68(A){return KR(A)}async function s43(){let A=I1(),q=Fw(A);if(!q)return!1;try{let[K,Y]=await Promise.all([bpA(A),bpA(q)]);return K===Y}catch{return A===q}}function dpA(A){let q=A.trim();if(!q)return null;let K=q.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(K&&K[1]&&K[2])return`${K[1]}/${K[2]}`.toLowerCase();let Y=q.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(Y&&Y[1]&&Y[2]){let z=Y[1],w=Y[2];if(zq3(z)&&w.startsWith("git/")){let _=w.slice(4),$=_.split("/");if($.length>=3&&$[0].includes("."))return _.toLowerCase();return`github.com/${_}`.toLowerCase()}return`${z}/${w}`.toLowerCase()}return null}async function NI6(){let A=await _s();if(!A)return null;let q=dpA(A);if(!q)return null;return c43("sha256").update(q).digest("hex").substring(0,16)}async function cpA(){let A=await dV(),{stdout:q,code:K}=await W8(nA(),["rev-list","--count",`${A}..HEAD`]);if(K!==0)return null;return parseInt(q.trim(),10)||0}async function N68(){try{let[A,q,K,Y,z,w]=await Promise.all([ppA(),ZJ(),_s(),f68(),$s(),gM6()]);return{commitHash:A,branchName:q,remoteUrl:K,isHeadOnRemote:Y,isClean:z,worktreeCount:w}}catch(A){return null}}async function FM6(){let{parseGitRemote:A}=await Promise.resolve().then(() => (xf(),VI6)),q=await _s();if(!q)return L("Local GitHub repo: unknown"),null;let K=A(q);if(K&&K.host==="github.com"){let Y=`${K.owner}/${K.name}`;return L(`Local GitHub repo: ${Y}`),Y}return L("Local GitHub repo: unknown"),null}async function lpA(){let{stdout:A,code:q}=await W8(nA(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(q===0&&A.trim())return A.trim();let{stdout:K,code:Y}=await W8(nA(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(Y===0){let w=K.match(/HEAD branch: (\S+)/);if(w&&w[1])return`origin/${w[1]}`}let z=["origin/main","origin/staging","origin/master"];for(let w of z){let{code:_}=await W8(nA(),["rev-parse","--verify",w],{preserveOutputOnError:!1});if(_===0)return w}return null}function Kq3(){return ypA()}async function u31(){let{stdout:A,code:q}=await W8(nA(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1});if(q!==0||!A.trim())return[];let K=A.trim().split(`
`).filter(Boolean),Y=[],z=0;for(let w of K){if(Y.length>=FpA){L(`Untracked file capture: reached max file count (${FpA})`);break}if(x31(w))continue;try{let $=(await l43(w)).size;if($>mpA){L(`Untracked file capture: skipping ${w} (exceeds ${mpA} bytes)`);continue}if(z+$>gpA){L(`Untracked file capture: reached total size limit (${gpA} bytes)`);break}if($===0){Y.push({path:w,content:""});continue}let O=Math.min(qq3,$),H=await n43(w,"r");try{let j=Buffer.alloc(O),{bytesRead:J}=await H.read(j,0,O,0),M=j.subarray(0,J);if(SpA(M))continue;let D;if($<=O)D=M.toString("utf-8");else D=await i43(w,"utf-8");Y.push({path:w,content:D}),z+=$}finally{await H.close()}}catch(_){L(`Failed to read untracked file ${w}: ${_}`)}}return Y}async function Yq3(){try{if(!await Cj())return null;if(await Kq3()){L("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:M},D]=await Promise.all([W8(nA(),["diff","HEAD"]),u31()]);return{remote_base_sha:null,remote_base:null,patch:M||"",untracked_files:D,format_patch:null,head_sha:null,branch_name:null}}let q=await lpA();if(!q){L("No remote found, using HEAD-only mode for issue");let[{stdout:M},D]=await Promise.all([W8(nA(),["diff","HEAD"]),u31()]);return{remote_base_sha:null,remote_base:null,patch:M||"",untracked_files:D,format_patch:null,head_sha:null,branch_name:null}}let{stdout:K,code:Y}=await W8(nA(),["merge-base","HEAD",q],{preserveOutputOnError:!1});if(Y!==0||!K.trim()){L("Merge-base failed, using HEAD-only mode for issue");let[{stdout:M},D]=await Promise.all([W8(nA(),["diff","HEAD"]),u31()]);return{remote_base_sha:null,remote_base:null,patch:M||"",untracked_files:D,format_patch:null,head_sha:null,branch_name:null}}let z=K.trim(),[{stdout:w},_,{stdout:$,code:O},{stdout:H},{stdout:j}]=await Promise.all([W8(nA(),["diff",z]),u31(),W8(nA(),["format-patch",`${z}..HEAD`,"--stdout"]),W8(nA(),["rev-parse","HEAD"]),W8(nA(),["rev-parse","--abbrev-ref","HEAD"])]),J=null;if(O===0&&$&&$.trim())J=$;return{remote_base_sha:z,remote_base:q,patch:w||"",untracked_files:_,format_patch:J,head_sha:H?.trim()||null,branch_name:j?.trim()&&j.trim()!=="HEAD"?j.trim():null}}catch(A){return $6(A),null}}function zq3(A){let q=A.split(":")[0]??"";return q==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(q)}var UpA,upA,Fw,BpA,y0,nA,Cj,G68=async(A)=>{return Fw(A)!==null},ppA=async()=>{return kpA()},ZJ=async()=>{return vpA()},dV=async()=>{return LpA()},_s=async()=>{return EpA()},f68=async()=>{let{code:A}=await W8(nA(),["rev-parse","@{u}"],{preserveOutputOnError:!1});return A===0},$s=async(A)=>{let q=["--no-optional-locks","status","--porcelain"];if(A?.ignoreUntracked)q.push("-uno");let{stdout:K}=await W8(nA(),q,{preserveOutputOnError:!1});return K.trim().length===0},T68=async()=>{let[A,q]=await Promise.all([f68(),cpA()]);if(!A)return{hasUpstream:!1,needsPush:!0,commitsAhead:0,commitsAheadOfDefaultBranch:q};let{stdout:K,code:Y}=await W8(nA(),["rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1});if(Y!==0)return{hasUpstream:!0,needsPush:!1,commitsAhead:0,commitsAheadOfDefaultBranch:q};let z=parseInt(K.trim(),10)||0;return{hasUpstream:!0,needsPush:z>0,commitsAhead:z,commitsAheadOfDefaultBranch:q}},t43=async()=>{let[A,q]=await Promise.all([$s(),T68()]);return{hasUncommitted:!A,hasUnpushed:q.needsPush,commitsAheadOfDefaultBranch:q.commitsAheadOfDefaultBranch}},e43=async(A,q)=>{if(!await $s()){q?.("committing");let{code:O,stderr:H}=await W8(nA(),["add","-A"],{preserveOutputOnError:!0});if(O!==0)return{success:!1,error:`Failed to stage changes: ${H}`};let{code:j,stderr:J}=await W8(nA(),["commit","-m",A],{preserveOutputOnError:!0});if(j!==0)return{success:!1,error:`Failed to commit: ${J}`}}q?.("pushing");let[Y,z]=await Promise.all([T68(),ZJ()]),w=Y.hasUpstream?["push"]:["push","-u","origin",z],{code:_,stderr:$}=await W8(nA(),w,{preserveOutputOnError:!0});if(_!==0)return{success:!1,error:`Failed to push: ${$}`};return{success:!0}},Aq3=async()=>{let{stdout:A}=await W8(nA(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return A.trim().split(`
`).map((q)=>q.trim().split(" ",2)[1]?.trim()).filter((q)=>typeof q==="string")},m31=async()=>{let{stdout:A}=await W8(nA(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),q=[],K=[];return A.trim().split(`
`).filter((Y)=>Y.length>0).forEach((Y)=>{let z=Y.substring(0,2),w=Y.substring(2).trim();if(z==="??")K.push(w);else if(w)q.push(w)}),{tracked:q,untracked:K}},gM6=async()=>{return RpA()},V68=async(A)=>{try{let q=A||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:K}=await m31();if(K.length>0){let{code:z}=await W8(nA(),["add",...K],{preserveOutputOnError:!1});if(z!==0)return!1}let{code:Y}=await W8(nA(),["stash","push","--message",q],{preserveOutputOnError:!1});return Y===0}catch(q){return!1}},mpA=524288000,gpA=5368709120,FpA=20000,qq3=65536;var U3=k(()=>{Eq();Hd();aq();G1();W7();D2();x1();tB();ZK6();X68();UpA=Symbol("git-root-not-found"),upA=V0((A)=>{let q=Date.now();z8("info","find_git_root_started");let K=W68(A),Y=K.substring(0,K.indexOf(xpA)+1)||xpA,z=0;while(K!==Y){try{let _=B31(K,".git");z++;let $=hpA(_);if($.isDirectory()||$.isFile())return z8("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:z,found:!0}),K.normalize("NFC")}catch{}let w=QpA(K);if(w===K)break;K=w}try{let w=B31(Y,".git");z++;let _=hpA(w);if(_.isDirectory()||_.isFile())return z8("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:z,found:!0}),Y.normalize("NFC")}catch{}return z8("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:z,found:!1}),UpA},(A)=>A,50),Fw=o43();BpA=V0((A)=>{try{let q=IpA(B31(A,".git"),"utf-8").trim();if(!q.startsWith("gitdir:"))return A;let K=W68(A,q.slice(7).trim()),Y=W68(K,IpA(B31(K,"commondir"),"utf-8").trim());if(r43(Y)!==".git")return Y.normalize("NFC");return QpA(Y).normalize("NFC")}catch{return A}},(A)=>A,50),y0=a43();nA=T8(()=>{return Hq1("git")||"git"}),Cj=T8(async()=>{let A=Date.now();z8("info","is_git_check_started");let q=Fw(I1())!==null;return z8("info","is_git_check_completed",{duration_ms:Date.now()-A,is_git:q}),q})});import{join as wq3,dirname as _q3}from"path";import{homedir as $q3}from"os";import{mkdir as Oq3,readFile as Hq3,appendFile as jq3,writeFile as Jq3}from"fs/promises";async function k68(A,q){let{code:K}=await z7("git",["check-ignore",A],{preserveOutputOnError:!1,cwd:q});return K===0}function Mq3(){return wq3($q3(),".config","git","ignore")}async function ipA(A,q=I1()){try{if(!await G68(q))return;let K=`**/${A}`,Y=A.endsWith("/")?`${A}sample-file.txt`:A;if(await k68(Y,q))return;let z=Mq3(),w=_q3(z);await Oq3(w,{recursive:!0});try{if((await Hq3(z,{encoding:"utf-8"})).includes(K))return;await jq3(z,`
${K}
`)}catch(_){if(_.code==="ENOENT")await Jq3(z,`${K}
`,"utf-8");else throw _}}catch(K){$6(K)}}var E68=k(()=>{U3();W7();x1();aq()});function npA(A){let q=Dq3.find((Y)=>Y.matches(A));if(!q)return null;let K={...q.tip};if(A.code==="invalid_value"&&A.enumValues&&!K.suggestion)K.suggestion=`Valid values: ${A.enumValues.map((Y)=>`"${Y}"`).join(", ")}`;if(!K.docLink&&A.path){let Y=A.path.split(".")[0];if(Y)K.docLink=Xq3[Y]}return K}var Dq3,Xq3;var rpA=k(()=>{Dq3=[{matches:(A)=>A.path==="permissions.defaultMode"&&A.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)',docLink:"https://code.claude.com/docs/en/iam#permission-modes"}},{matches:(A)=>A.path==="apiKeyHelper"&&A.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(A)=>A.path==="cleanupPeriodDays"&&A.code==="too_small"&&A.expected==="0",tip:{suggestion:"Must be 0 or greater. Use 0 to disable automatic cleanup and keep chat transcripts forever, or set a positive number for days to retain (default is 30 days)"}},{matches:(A)=>A.path.startsWith("env.")&&A.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"',docLink:"https://code.claude.com/docs/en/settings#environment-variables"}},{matches:(A)=>(A.path==="permissions.allow"||A.path==="permissions.deny")&&A.code==="invalid_type"&&A.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(A)=>A.path.includes("hooks")&&A.code==="invalid_type",tip:{suggestion:'Hooks use a new format with matchers. Example: {"PostToolUse": [{"matcher": {"tools": ["BashTool"]}, "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(A)=>A.code==="invalid_type"&&A.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeCoAuthoredBy": true'}},{matches:(A)=>A.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields",docLink:"https://code.claude.com/docs/en/settings"}},{matches:(A)=>A.code==="invalid_value"&&A.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(A)=>A.code==="invalid_type"&&A.expected==="object"&&A.received===null&&A.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(A)=>A.path==="permissions.additionalDirectories"&&A.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command',docLink:"https://code.claude.com/docs/en/iam#working-directories"}}],Xq3={permissions:"https://code.claude.com/docs/en/iam#configuring-permissions",env:"https://code.claude.com/docs/en/settings#environment-variables",hooks:"https://code.claude.com/docs/en/hooks"}});function L68(){let A=gp(dX(),{unrepresentable:"any"});return U6(A,null,2)}var opA=k(()=>{B7();hI();a1()});function apA(A){return A.code==="invalid_type"}function spA(A){return A.code==="invalid_value"}function Pq3(A){return A.code==="unrecognized_keys"}function tpA(A){return A.code==="too_small"}function y68(A){if(A===null)return"null";if(A===void 0)return"undefined";if(Array.isArray(A))return"array";return typeof A}function epA(A){let q=A.match(/received (\w+)/);return q?q[1]:void 0}function QM6(A,q){return A.issues.map((K)=>{let Y=K.path.map(String).join("."),z=K.message,w,_,$,O,H;if(spA(K))_=K.values.map((J)=>String(J)),$=_.join(" | "),O=void 0,H=void 0;else if(apA(K)){$=K.expected;let J=epA(K.message);O=J??y68(K.input),H=J??y68(K.input)}else if(tpA(K))$=String(K.minimum);else if(K.code==="custom"&&"params"in K)O=K.params.received,H=O;let j=npA({path:Y,code:K.code,expected:$,received:O,enumValues:_,message:K.message,value:O});if(spA(K))w=_?.map((J)=>`"${J}"`).join(", "),z=`Invalid value. Expected one of: ${w}`;else if(apA(K)){let J=epA(K.message)??y68(K.input);if(K.expected==="object"&&J==="null"&&Y==="")z="Invalid or malformed JSON";else z=`Expected ${K.expected}, but received ${J}`}else if(Pq3(K)){let J=K.keys.join(", ");z=`Unrecognized field${K.keys.length>1?"s":""}: ${J}`}else if(tpA(K))z=`Number must be greater than or equal to ${K.minimum}`,w=String(K.minimum);return{file:q,path:Y,message:z,expected:w,invalidValue:H,suggestion:j?.suggestion,docLink:j?.docLink}})}function R68(A){try{let q=O8(A),K=dX().strict().safeParse(q);if(K.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
`+QM6(K.error,"settings").map((w)=>`- ${w.path}: ${w.message}`).join(`
`),fullSchema:L68()}}catch(q){return{isValid:!1,error:`Invalid JSON: ${q instanceof Error?q.message:"Unknown parsing error"}`,fullSchema:L68()}}}function g31(A,q){if(!A||typeof A!=="object")return[];let K=A;if(!K.permissions||typeof K.permissions!=="object")return[];let Y=K.permissions,z=[];for(let w of["allow","deny","ask"]){let _=Y[w];if(!Array.isArray(_))continue;Y[w]=_.filter(($)=>{if(typeof $!=="string")return z.push({file:q,path:`permissions.${w}`,message:`Non-string value in ${w} array was removed`,invalidValue:$}),!1;let O=w68($);if(!O.valid){let H=`Invalid permission rule "${$}" was skipped`;if(O.error)H+=`: ${O.error}`;if(O.suggestion)H+=`. ${O.suggestion}`;return z.push({file:q,path:`permissions.${w}`,message:H,invalidValue:$}),!1}return!0})}return z}var F31=k(()=>{hI();rpA();opA();a1();_68()});import{existsSync as Wq3}from"fs";var IZ;var Os=k(()=>{Eq();uK();IZ=T8(function(){switch(c8()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":if(Wq3("C:\\Program Files\\ClaudeCode"))return"C:\\Program Files\\ClaudeCode";return"C:\\ProgramData\\ClaudeCode";default:return"/etc/claude-code"}})});import{stat as Zq3,lstat as AdA,readdir as Gq3,realpath as fq3}from"node:fs/promises";import{Readable as Tq3}from"node:stream";import{resolve as qdA,relative as Vq3,join as Nq3,sep as vq3}from"node:path";function $dA(A,q={}){let K=q.entryType||q.type;if(K==="both")K=sk.FILE_DIR_TYPE;if(K)q.type=K;if(!A)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof A!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(K&&!KdA.includes(K))throw Error(`readdirp: Invalid type passed. Use one of ${KdA.join(", ")}`);return q.root=A,new _dA(q)}var sk,S68,wdA="READDIRP_RECURSIVE_ERROR",kq3,KdA,Eq3,Lq3,yq3=(A)=>kq3.has(A.code),Rq3,YdA=(A)=>!0,zdA=(A)=>{if(A===void 0)return YdA;if(typeof A==="function")return A;if(typeof A==="string"){let q=A.trim();return(K)=>K.basename===q}if(Array.isArray(A)){let q=A.map((K)=>K.trim());return(K)=>q.some((Y)=>K.basename===Y)}return YdA},_dA;var OdA=k(()=>{sk={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},S68={root:".",fileFilter:(A)=>!0,directoryFilter:(A)=>!0,type:sk.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(S68);kq3=new Set(["ENOENT","EPERM","EACCES","ELOOP",wdA]),KdA=[sk.DIR_TYPE,sk.EVERYTHING_TYPE,sk.FILE_DIR_TYPE,sk.FILE_TYPE],Eq3=new Set([sk.DIR_TYPE,sk.EVERYTHING_TYPE,sk.FILE_DIR_TYPE]),Lq3=new Set([sk.EVERYTHING_TYPE,sk.FILE_DIR_TYPE,sk.FILE_TYPE]),Rq3=process.platform==="win32";_dA=class _dA extends Tq3{constructor(A={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:A.highWaterMark});let q={...S68,...A},{root:K,type:Y}=q;this._fileFilter=zdA(q.fileFilter),this._directoryFilter=zdA(q.directoryFilter);let z=q.lstat?AdA:Zq3;if(Rq3)this._stat=(w)=>z(w,{bigint:!0});else this._stat=z;this._maxDepth=q.depth??S68.depth,this._wantsDir=Y?Eq3.has(Y):!1,this._wantsFile=Y?Lq3.has(Y):!1,this._wantsEverything=Y===sk.EVERYTHING_TYPE,this._root=qdA(K),this._isDirent=!q.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(K,1)],this.reading=!1,this.parent=void 0}async _read(A){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&A>0){let q=this.parent,K=q&&q.files;if(K&&K.length>0){let{path:Y,depth:z}=q,w=K.splice(0,A).map(($)=>this._formatEntry($,Y)),_=await Promise.all(w);for(let $ of _){if(!$)continue;if(this.destroyed)return;let O=await this._getEntryType($);if(O==="directory"&&this._directoryFilter($)){if(z<=this._maxDepth)this.parents.push(this._exploreDir($.fullPath,z+1));if(this._wantsDir)this.push($),A--}else if((O==="file"||this._includeAsFile($))&&this._fileFilter($)){if(this._wantsFile)this.push($),A--}}}else{let Y=this.parents.pop();if(!Y){this.push(null);break}if(this.parent=await Y,this.destroyed)return}}}catch(q){this.destroy(q)}finally{this.reading=!1}}async _exploreDir(A,q){let K;try{K=await Gq3(A,this._rdOptions)}catch(Y){this._onError(Y)}return{files:K,depth:q,path:A}}async _formatEntry(A,q){let K,Y=this._isDirent?A.name:A;try{let z=qdA(Nq3(q,Y));K={path:Vq3(this._root,z),fullPath:z,basename:Y},K[this._statsProp]=this._isDirent?A:await this._stat(z)}catch(z){this._onError(z);return}return K}_onError(A){if(yq3(A)&&!this.destroyed)this.emit("warn",A);else this.destroy(A)}async _getEntryType(A){if(!A&&this._statsProp in A)return"";let q=A[this._statsProp];if(q.isFile())return"file";if(q.isDirectory())return"directory";if(q&&q.isSymbolicLink()){let K=A.fullPath;try{let Y=await fq3(K),z=await AdA(Y);if(z.isFile())return"file";if(z.isDirectory()){let w=Y.length;if(K.startsWith(Y)&&K.substr(w,1)===vq3){let _=Error(`Circular symlink detected: "${K}" points to "${Y}"`);return _.code=wdA,this._onError(_)}return"directory"}}catch(Y){return this._onError(Y),""}}}_includeAsFile(A){let q=A&&A[this._statsProp];return q&&this._wantsEverything&&!q.isDirectory()}}});import{watchFile as Sq3,unwatchFile as HdA,watch as Cq3}from"fs";import{open as hq3,stat as JdA,lstat as Iq3,realpath as C68}from"fs/promises";import*as QO from"path";import{type as bq3}from"os";function jdA(A,q,K,Y,z){let w=(_,$)=>{if(K(A),z(_,$,{watchedPath:A}),$&&A!==$)p31(QO.resolve(A,$),fK6,QO.join(A,$))};try{return Cq3(A,{persistent:q.persistent},w)}catch(_){Y(_);return}}class u68{constructor(A){this.fsw=A,this._boundHandleError=(q)=>A._handleError(q)}_watchWithNodeFs(A,q){let K=this.fsw.options,Y=QO.dirname(A),z=QO.basename(A);this.fsw._getWatchedDir(Y).add(z);let _=QO.resolve(A),$={persistent:K.persistent};if(!q)q=d31;let O;if(K.usePolling){let H=K.interval!==K.binaryInterval;$.interval=H&&pq3(z)?K.binaryInterval:K.interval,O=lq3(A,_,$,{listener:q,rawEmitter:this.fsw._emitRaw})}else O=cq3(A,_,$,{listener:q,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return O}_handleFile(A,q,K){if(this.fsw.closed)return;let Y=QO.dirname(A),z=QO.basename(A),w=this.fsw._getWatchedDir(Y),_=q;if(w.has(z))return;let $=async(H,j)=>{if(!this.fsw._throttle(gq3,A,5))return;if(!j||j.mtimeMs===0)try{let J=await JdA(A);if(this.fsw.closed)return;let{atimeMs:M,mtimeMs:D}=J;if(!M||M<=D||D!==_.mtimeMs)this.fsw._emit(bI.CHANGE,A,J);if((uq3||Bq3||mq3)&&_.ino!==J.ino){this.fsw._closeFile(H),_=J;let X=this._watchWithNodeFs(A,$);if(X)this.fsw._addPathCloser(H,X)}else _=J}catch(J){this.fsw._remove(Y,z)}else if(w.has(z)){let{atimeMs:J,mtimeMs:M}=j;if(!J||J<=M||M!==_.mtimeMs)this.fsw._emit(bI.CHANGE,A,j);_=j}},O=this._watchWithNodeFs(A,$);if(!(K&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(A)){if(!this.fsw._throttle(bI.ADD,A,0))return;this.fsw._emit(bI.ADD,A,q)}return O}async _handleSymlink(A,q,K,Y){if(this.fsw.closed)return;let z=A.fullPath,w=this.fsw._getWatchedDir(q);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let _;try{_=await C68(K)}catch($){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(w.has(Y)){if(this.fsw._symlinkPaths.get(z)!==_)this.fsw._symlinkPaths.set(z,_),this.fsw._emit(bI.CHANGE,K,A.stats)}else w.add(Y),this.fsw._symlinkPaths.set(z,_),this.fsw._emit(bI.ADD,K,A.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(z))return!0;this.fsw._symlinkPaths.set(z,!0)}_handleRead(A,q,K,Y,z,w,_){if(A=QO.join(A,""),_=this.fsw._throttle("readdir",A,1000),!_)return;let $=this.fsw._getWatchedDir(K.path),O=new Set,H=this.fsw._readdirp(A,{fileFilter:(j)=>K.filterPath(j),directoryFilter:(j)=>K.filterDir(j)});if(!H)return;return H.on(xq3,async(j)=>{if(this.fsw.closed){H=void 0;return}let J=j.path,M=QO.join(A,J);if(O.add(J),j.stats.isSymbolicLink()&&await this._handleSymlink(j,A,M,J))return;if(this.fsw.closed){H=void 0;return}if(J===Y||!Y&&!$.has(J))this.fsw._incrReadyCount(),M=QO.join(z,QO.relative(z,M)),this._addToNodeFs(M,q,K,w+1)}).on(bI.ERROR,this._boundHandleError),new Promise((j,J)=>{if(!H)return J();H.once(b68,()=>{if(this.fsw.closed){H=void 0;return}let M=_?_.clear():!1;if(j(void 0),$.getChildren().filter((D)=>{return D!==A&&!O.has(D)}).forEach((D)=>{this.fsw._remove(A,D)}),H=void 0,M)this._handleRead(A,!1,K,Y,z,w,_)})})}async _handleDir(A,q,K,Y,z,w,_){let $=this.fsw._getWatchedDir(QO.dirname(A)),O=$.has(QO.basename(A));if(!(K&&this.fsw.options.ignoreInitial)&&!z&&!O)this.fsw._emit(bI.ADD_DIR,A,q);$.add(QO.basename(A)),this.fsw._getWatchedDir(A);let H,j,J=this.fsw.options.depth;if((J==null||Y<=J)&&!this.fsw._symlinkPaths.has(_)){if(!z){if(await this._handleRead(A,K,w,z,A,Y,H),this.fsw.closed)return}j=this._watchWithNodeFs(A,(M,D)=>{if(D&&D.mtimeMs===0)return;this._handleRead(M,!1,w,z,A,Y,H)})}return j}async _addToNodeFs(A,q,K,Y,z){let w=this.fsw._emitReady;if(this.fsw._isIgnored(A)||this.fsw.closed)return w(),!1;let _=this.fsw._getWatchHelpers(A);if(K)_.filterPath=($)=>K.filterPath($),_.filterDir=($)=>K.filterDir($);try{let $=await Fq3[_.statMethod](_.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(_.watchPath,$))return w(),!1;let O=this.fsw.options.followSymlinks,H;if($.isDirectory()){let j=QO.resolve(A),J=O?await C68(A):A;if(this.fsw.closed)return;if(H=await this._handleDir(_.watchPath,$,q,Y,z,_,J),this.fsw.closed)return;if(j!==J&&J!==void 0)this.fsw._symlinkPaths.set(j,J)}else if($.isSymbolicLink()){let j=O?await C68(A):A;if(this.fsw.closed)return;let J=QO.dirname(_.watchPath);if(this.fsw._getWatchedDir(J).add(_.watchPath),this.fsw._emit(bI.ADD,_.watchPath,$),H=await this._handleDir(J,$,q,Y,A,_,j),this.fsw.closed)return;if(j!==void 0)this.fsw._symlinkPaths.set(QO.resolve(A),j)}else H=this._handleFile(_.watchPath,$,q);if(w(),H)this.fsw._addPathCloser(A,H);return!1}catch($){if(this.fsw._handleError($))return w(),A}}}var xq3="data",b68="end",MdA="close",d31=()=>{},c31,x68,uq3,Bq3,mq3,DdA,n$,bI,gq3="watch",Fq3,fK6="listeners",Q31="errHandlers",UM6="rawEmitters",Qq3,Uq3,pq3=(A)=>Uq3.has(QO.extname(A).slice(1).toLowerCase()),I68=(A,q)=>{if(A instanceof Set)A.forEach(q);else q(A)},vI6=(A,q,K)=>{let Y=A[q];if(!(Y instanceof Set))A[q]=Y=new Set([Y]);Y.add(K)},dq3=(A)=>(q)=>{let K=A[q];if(K instanceof Set)K.clear();else delete A[q]},kI6=(A,q,K)=>{let Y=A[q];if(Y instanceof Set)Y.delete(K);else if(Y===K)delete A[q]},XdA=(A)=>A instanceof Set?A.size===0:!A,U31,p31=(A,q,K,Y,z)=>{let w=U31.get(A);if(!w)return;I68(w[q],(_)=>{_(K,Y,z)})},cq3=(A,q,K,Y)=>{let{listener:z,errHandler:w,rawEmitter:_}=Y,$=U31.get(q),O;if(!K.persistent){if(O=jdA(A,K,z,w,_),!O)return;return O.close.bind(O)}if($)vI6($,fK6,z),vI6($,Q31,w),vI6($,UM6,_);else{if(O=jdA(A,K,p31.bind(null,q,fK6),w,p31.bind(null,q,UM6)),!O)return;O.on(bI.ERROR,async(H)=>{let j=p31.bind(null,q,Q31);if($)$.watcherUnusable=!0;if(x68&&H.code==="EPERM")try{await(await hq3(A,"r")).close(),j(H)}catch(J){}else j(H)}),$={listeners:z,errHandlers:w,rawEmitters:_,watcher:O},U31.set(q,$)}return()=>{if(kI6($,fK6,z),kI6($,Q31,w),kI6($,UM6,_),XdA($.listeners))$.watcher.close(),U31.delete(q),Qq3.forEach(dq3($)),$.watcher=void 0,Object.freeze($)}},h68,lq3=(A,q,K,Y)=>{let{listener:z,rawEmitter:w}=Y,_=h68.get(q),$=_&&_.options;if($&&($.persistent<K.persistent||$.interval>K.interval))HdA(q),_=void 0;if(_)vI6(_,fK6,z),vI6(_,UM6,w);else _={listeners:z,rawEmitters:w,options:K,watcher:Sq3(q,K,(O,H)=>{I68(_.rawEmitters,(J)=>{J(bI.CHANGE,q,{curr:O,prev:H})});let j=O.mtimeMs;if(O.size!==H.size||j>H.mtimeMs||j===0)I68(_.listeners,(J)=>J(A,O))})},h68.set(q,_);return()=>{if(kI6(_,fK6,z),kI6(_,UM6,w),XdA(_.listeners))h68.delete(q),HdA(q),_.options=_.watcher=void 0,Object.freeze(_)}};var PdA=k(()=>{c31=process.platform,x68=c31==="win32",uq3=c31==="darwin",Bq3=c31==="linux",mq3=c31==="freebsd",DdA=bq3()==="OS400",n$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},bI=n$,Fq3={lstat:Iq3,stat:JdA},Qq3=[fK6,Q31,UM6],Uq3=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),U31=new Map;h68=new Map});var n31={};m1(n31,{watch:()=>kdA,default:()=>TK6,WatchHelper:()=>g68,FSWatcher:()=>i31});import{stat as iq3}from"fs";import{stat as nq3,readdir as rq3}from"fs/promises";import{EventEmitter as oq3}from"events";import*as t9 from"path";function l31(A){return Array.isArray(A)?A:[A]}function KK3(A){if(typeof A==="function")return A;if(typeof A==="string")return(q)=>A===q;if(A instanceof RegExp)return(q)=>A.test(q);if(typeof A==="object"&&A!==null)return(q)=>{if(A.path===q)return!0;if(A.recursive){let K=t9.relative(A.path,q);if(!K)return!1;return!K.startsWith("..")&&!t9.isAbsolute(K)}return!1};return()=>!1}function YK3(A){if(typeof A!=="string")throw Error("string expected");A=t9.normalize(A),A=A.replace(/\\/g,"/");let q=!1;if(A.startsWith("//"))q=!0;let K=/\/\//;while(A.match(K))A=A.replace(K,"/");if(q)A="/"+A;return A}function ZdA(A,q,K){let Y=YK3(q);for(let z=0;z<A.length;z++){let w=A[z];if(w(Y,K))return!0}return!1}function zK3(A,q){if(A==null)throw TypeError("anymatch: specify first argument");let Y=l31(A).map((z)=>KK3(z));if(q==null)return(z,w)=>{return ZdA(Y,z,w)};return ZdA(Y,q)}class vdA{constructor(A,q){this.path=A,this._removeWatcher=q,this.items=new Set}add(A){let{items:q}=this;if(!q)return;if(A!==VdA&&A!==sq3)q.add(A)}async remove(A){let{items:q}=this;if(!q)return;if(q.delete(A),q.size>0)return;let K=this.path;try{await rq3(K)}catch(Y){if(this._removeWatcher)this._removeWatcher(t9.dirname(K),t9.basename(K))}}has(A){let{items:q}=this;if(!q)return;return q.has(A)}getChildren(){let{items:A}=this;if(!A)return[];return[...A.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=d31,this.items=_K3,Object.freeze(this)}}class g68{constructor(A,q,K){this.fsw=K;let Y=A;this.path=A=A.replace(qK3,""),this.watchPath=Y,this.fullWatchPath=t9.resolve(Y),this.dirParts=[],this.dirParts.forEach((z)=>{if(z.length>1)z.pop()}),this.followSymlinks=q,this.statMethod=q?$K3:OK3}entryPath(A){return t9.join(this.watchPath,t9.relative(this.watchPath,A.fullPath))}filterPath(A){let{stats:q}=A;if(q&&q.isSymbolicLink())return this.filterDir(A);let K=this.entryPath(A);return this.fsw._isntIgnored(K,q)&&this.fsw._hasReadPermissions(q)}filterDir(A){return this.fsw._isntIgnored(this.entryPath(A),A.stats)}}function kdA(A,q={}){let K=new i31(q);return K.add(A),K}var B68="/",aq3="//",VdA=".",sq3="..",tq3="string",eq3,WdA,AK3,qK3,m68=(A)=>typeof A==="object"&&A!==null&&!(A instanceof RegExp),GdA=(A)=>{let q=l31(A).flat();if(!q.every((K)=>typeof K===tq3))throw TypeError(`Non-string provided as watch path: ${q}`);return q.map(NdA)},fdA=(A)=>{let q=A.replace(eq3,B68),K=!1;if(q.startsWith(aq3))K=!0;while(q.match(WdA))q=q.replace(WdA,B68);if(K)q=B68+q;return q},NdA=(A)=>fdA(t9.normalize(fdA(A))),TdA=(A="")=>(q)=>{if(typeof q==="string")return NdA(t9.isAbsolute(q)?q:t9.join(A,q));else return q},wK3=(A,q)=>{if(t9.isAbsolute(A))return A;return t9.join(q,A)},_K3,$K3="stat",OK3="lstat",i31,TK6;var VK6=k(()=>{OdA();PdA();/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */eq3=/\\/g,WdA=/\/\//,AK3=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,qK3=/^\.[/\\]/;_K3=Object.freeze(new Set);i31=class i31 extends oq3{constructor(A={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let q=A.awaitWriteFinish,K={stabilityThreshold:2000,pollInterval:100},Y={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...A,ignored:A.ignored?l31(A.ignored):l31([]),awaitWriteFinish:q===!0?K:typeof q==="object"?{...K,...q}:!1};if(DdA)Y.usePolling=!0;if(Y.atomic===void 0)Y.atomic=!Y.usePolling;let z=process.env.CHOKIDAR_USEPOLLING;if(z!==void 0){let $=z.toLowerCase();if($==="false"||$==="0")Y.usePolling=!1;else if($==="true"||$==="1")Y.usePolling=!0;else Y.usePolling=!!$}let w=process.env.CHOKIDAR_INTERVAL;if(w)Y.interval=Number.parseInt(w,10);let _=0;this._emitReady=()=>{if(_++,_>=this._readyCount)this._emitReady=d31,this._readyEmitted=!0,process.nextTick(()=>this.emit(n$.READY))},this._emitRaw=(...$)=>this.emit(n$.RAW,...$),this._boundRemove=this._remove.bind(this),this.options=Y,this._nodeFsHandler=new u68(this),Object.freeze(Y)}_addIgnoredPath(A){if(m68(A)){for(let q of this._ignoredPaths)if(m68(q)&&q.path===A.path&&q.recursive===A.recursive)return}this._ignoredPaths.add(A)}_removeIgnoredPath(A){if(this._ignoredPaths.delete(A),typeof A==="string"){for(let q of this._ignoredPaths)if(m68(q)&&q.path===A)this._ignoredPaths.delete(q)}}add(A,q,K){let{cwd:Y}=this.options;this.closed=!1,this._closePromise=void 0;let z=GdA(A);if(Y)z=z.map((w)=>{return wK3(w,Y)});if(z.forEach((w)=>{this._removeIgnoredPath(w)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=z.length,Promise.all(z.map(async(w)=>{let _=await this._nodeFsHandler._addToNodeFs(w,!K,void 0,0,q);if(_)this._emitReady();return _})).then((w)=>{if(this.closed)return;w.forEach((_)=>{if(_)this.add(t9.dirname(_),t9.basename(q||_))})}),this}unwatch(A){if(this.closed)return this;let q=GdA(A),{cwd:K}=this.options;return q.forEach((Y)=>{if(!t9.isAbsolute(Y)&&!this._closers.has(Y)){if(K)Y=t9.join(K,Y);Y=t9.resolve(Y)}if(this._closePath(Y),this._addIgnoredPath(Y),this._watched.has(Y))this._addIgnoredPath({path:Y,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let A=[];return this._closers.forEach((q)=>q.forEach((K)=>{let Y=K();if(Y instanceof Promise)A.push(Y)})),this._streams.forEach((q)=>q.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((q)=>q.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=A.length?Promise.all(A).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let A={};return this._watched.forEach((q,K)=>{let z=(this.options.cwd?t9.relative(this.options.cwd,K):K)||VdA;A[z]=q.getChildren().sort()}),A}emitWithAll(A,q){if(this.emit(A,...q),A!==n$.ERROR)this.emit(n$.ALL,A,...q)}async _emit(A,q,K){if(this.closed)return;let Y=this.options;if(x68)q=t9.normalize(q);if(Y.cwd)q=t9.relative(Y.cwd,q);let z=[q];if(K!=null)z.push(K);let w=Y.awaitWriteFinish,_;if(w&&(_=this._pendingWrites.get(q)))return _.lastChange=new Date,this;if(Y.atomic){if(A===n$.UNLINK)return this._pendingUnlinks.set(q,[A,...z]),setTimeout(()=>{this._pendingUnlinks.forEach(($,O)=>{this.emit(...$),this.emit(n$.ALL,...$),this._pendingUnlinks.delete(O)})},typeof Y.atomic==="number"?Y.atomic:100),this;if(A===n$.ADD&&this._pendingUnlinks.has(q))A=n$.CHANGE,this._pendingUnlinks.delete(q)}if(w&&(A===n$.ADD||A===n$.CHANGE)&&this._readyEmitted){let $=(O,H)=>{if(O)A=n$.ERROR,z[0]=O,this.emitWithAll(A,z);else if(H){if(z.length>1)z[1]=H;else z.push(H);this.emitWithAll(A,z)}};return this._awaitWriteFinish(q,w.stabilityThreshold,A,$),this}if(A===n$.CHANGE){if(!this._throttle(n$.CHANGE,q,50))return this}if(Y.alwaysStat&&K===void 0&&(A===n$.ADD||A===n$.ADD_DIR||A===n$.CHANGE)){let $=Y.cwd?t9.join(Y.cwd,q):q,O;try{O=await nq3($)}catch(H){}if(!O||this.closed)return;z.push(O)}return this.emitWithAll(A,z),this}_handleError(A){let q=A&&A.code;if(A&&q!=="ENOENT"&&q!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||q!=="EPERM"&&q!=="EACCES"))this.emit(n$.ERROR,A);return A||this.closed}_throttle(A,q,K){if(!this._throttled.has(A))this._throttled.set(A,new Map);let Y=this._throttled.get(A);if(!Y)throw Error("invalid throttle");let z=Y.get(q);if(z)return z.count++,!1;let w,_=()=>{let O=Y.get(q),H=O?O.count:0;if(Y.delete(q),clearTimeout(w),O)clearTimeout(O.timeoutObject);return H};w=setTimeout(_,K);let $={timeoutObject:w,clear:_,count:0};return Y.set(q,$),$}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(A,q,K,Y){let z=this.options.awaitWriteFinish;if(typeof z!=="object")return;let w=z.pollInterval,_,$=A;if(this.options.cwd&&!t9.isAbsolute(A))$=t9.join(this.options.cwd,A);let O=new Date,H=this._pendingWrites;function j(J){iq3($,(M,D)=>{if(M||!H.has(A)){if(M&&M.code!=="ENOENT")Y(M);return}let X=Number(new Date);if(J&&D.size!==J.size)H.get(A).lastChange=X;let P=H.get(A);if(X-P.lastChange>=q)H.delete(A),Y(void 0,D);else _=setTimeout(j,w,D)})}if(!H.has(A))H.set(A,{lastChange:O,cancelWait:()=>{return H.delete(A),clearTimeout(_),K}}),_=setTimeout(j,w)}_isIgnored(A,q){if(this.options.atomic&&AK3.test(A))return!0;if(!this._userIgnored){let{cwd:K}=this.options,z=(this.options.ignored||[]).map(TdA(K)),_=[...[...this._ignoredPaths].map(TdA(K)),...z];this._userIgnored=zK3(_,void 0)}return this._userIgnored(A,q)}_isntIgnored(A,q){return!this._isIgnored(A,q)}_getWatchHelpers(A){return new g68(A,this.options.followSymlinks,this)}_getWatchedDir(A){let q=t9.resolve(A);if(!this._watched.has(q))this._watched.set(q,new vdA(q,this._boundRemove));return this._watched.get(q)}_hasReadPermissions(A){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number(A.mode)&256)}_remove(A,q,K){let Y=t9.join(A,q),z=t9.resolve(Y);if(K=K!=null?K:this._watched.has(Y)||this._watched.has(z),!this._throttle("remove",Y,100))return;if(!K&&this._watched.size===1)this.add(A,q,!0);this._getWatchedDir(Y).getChildren().forEach((J)=>this._remove(Y,J));let $=this._getWatchedDir(A),O=$.has(q);if($.remove(q),this._symlinkPaths.has(z))this._symlinkPaths.delete(z);let H=Y;if(this.options.cwd)H=t9.relative(this.options.cwd,Y);if(this.options.awaitWriteFinish&&this._pendingWrites.has(H)){if(this._pendingWrites.get(H).cancelWait()===n$.ADD)return}this._watched.delete(Y),this._watched.delete(z);let j=K?n$.UNLINK_DIR:n$.UNLINK;if(O&&!this._isIgnored(Y))this._emit(j,Y);this._closePath(Y)}_closePath(A){this._closeFile(A);let q=t9.dirname(A);this._getWatchedDir(q).remove(t9.basename(A))}_closeFile(A){let q=this._closers.get(A);if(!q)return;q.forEach((K)=>K()),this._closers.delete(A)}_addPathCloser(A,q){if(!q)return;let K=this._closers.get(A);if(!K)K=[],this._closers.set(A,K);K.push(q)}_readdirp(A,q){if(this.closed)return;let K={type:n$.ALL,alwaysStat:!0,lstat:!0,...q,depth:0},Y=$dA(A,K);return this._streams.add(Y),Y.once(MdA,()=>{Y=void 0}),Y.once(b68,()=>{if(Y)this._streams.delete(Y),Y=void 0}),Y}};TK6={watch:kdA,FSWatcher:i31}});function F68({onlyFirst:A=!1}={}){let K=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(K,A?void 0:"g")}function lz(A){if(typeof A!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof A}\``);return A.replace(HK3,"")}var HK3;var uf=k(()=>{HK3=F68()});function EdA(A){return A===161||A===164||A===167||A===168||A===170||A===173||A===174||A>=176&&A<=180||A>=182&&A<=186||A>=188&&A<=191||A===198||A===208||A===215||A===216||A>=222&&A<=225||A===230||A>=232&&A<=234||A===236||A===237||A===240||A===242||A===243||A>=247&&A<=250||A===252||A===254||A===257||A===273||A===275||A===283||A===294||A===295||A===299||A>=305&&A<=307||A===312||A>=319&&A<=322||A===324||A>=328&&A<=331||A===333||A===338||A===339||A===358||A===359||A===363||A===462||A===464||A===466||A===468||A===470||A===472||A===474||A===476||A===593||A===609||A===708||A===711||A>=713&&A<=715||A===717||A===720||A>=728&&A<=731||A===733||A===735||A>=768&&A<=879||A>=913&&A<=929||A>=931&&A<=937||A>=945&&A<=961||A>=963&&A<=969||A===1025||A>=1040&&A<=1103||A===1105||A===8208||A>=8211&&A<=8214||A===8216||A===8217||A===8220||A===8221||A>=8224&&A<=8226||A>=8228&&A<=8231||A===8240||A===8242||A===8243||A===8245||A===8251||A===8254||A===8308||A===8319||A>=8321&&A<=8324||A===8364||A===8451||A===8453||A===8457||A===8467||A===8470||A===8481||A===8482||A===8486||A===8491||A===8531||A===8532||A>=8539&&A<=8542||A>=8544&&A<=8555||A>=8560&&A<=8569||A===8585||A>=8592&&A<=8601||A===8632||A===8633||A===8658||A===8660||A===8679||A===8704||A===8706||A===8707||A===8711||A===8712||A===8715||A===8719||A===8721||A===8725||A===8730||A>=8733&&A<=8736||A===8739||A===8741||A>=8743&&A<=8748||A===8750||A>=8756&&A<=8759||A===8764||A===8765||A===8776||A===8780||A===8786||A===8800||A===8801||A>=8804&&A<=8807||A===8810||A===8811||A===8814||A===8815||A===8834||A===8835||A===8838||A===8839||A===8853||A===8857||A===8869||A===8895||A===8978||A>=9312&&A<=9449||A>=9451&&A<=9547||A>=9552&&A<=9587||A>=9600&&A<=9615||A>=9618&&A<=9621||A===9632||A===9633||A>=9635&&A<=9641||A===9650||A===9651||A===9654||A===9655||A===9660||A===9661||A===9664||A===9665||A>=9670&&A<=9672||A===9675||A>=9678&&A<=9681||A>=9698&&A<=9701||A===9711||A===9733||A===9734||A===9737||A===9742||A===9743||A===9756||A===9758||A===9792||A===9794||A===9824||A===9825||A>=9827&&A<=9829||A>=9831&&A<=9834||A===9836||A===9837||A===9839||A===9886||A===9887||A===9919||A>=9926&&A<=9933||A>=9935&&A<=9939||A>=9941&&A<=9953||A===9955||A===9960||A===9961||A>=9963&&A<=9969||A===9972||A>=9974&&A<=9977||A===9979||A===9980||A===9982||A===9983||A===10045||A>=10102&&A<=10111||A>=11094&&A<=11097||A>=12872&&A<=12879||A>=57344&&A<=63743||A>=65024&&A<=65039||A===65533||A>=127232&&A<=127242||A>=127248&&A<=127277||A>=127280&&A<=127337||A>=127344&&A<=127373||A===127375||A===127376||A>=127387&&A<=127404||A>=917760&&A<=917999||A>=983040&&A<=1048573||A>=1048576&&A<=1114109}function EI6(A){return A===12288||A>=65281&&A<=65376||A>=65504&&A<=65510}function LI6(A){return A>=4352&&A<=4447||A===8986||A===8987||A===9001||A===9002||A>=9193&&A<=9196||A===9200||A===9203||A===9725||A===9726||A===9748||A===9749||A>=9776&&A<=9783||A>=9800&&A<=9811||A===9855||A>=9866&&A<=9871||A===9875||A===9889||A===9898||A===9899||A===9917||A===9918||A===9924||A===9925||A===9934||A===9940||A===9962||A===9970||A===9971||A===9973||A===9978||A===9981||A===9989||A===9994||A===9995||A===10024||A===10060||A===10062||A>=10067&&A<=10069||A===10071||A>=10133&&A<=10135||A===10160||A===10175||A===11035||A===11036||A===11088||A===11093||A>=11904&&A<=11929||A>=11931&&A<=12019||A>=12032&&A<=12245||A>=12272&&A<=12287||A>=12289&&A<=12350||A>=12353&&A<=12438||A>=12441&&A<=12543||A>=12549&&A<=12591||A>=12593&&A<=12686||A>=12688&&A<=12773||A>=12783&&A<=12830||A>=12832&&A<=12871||A>=12880&&A<=42124||A>=42128&&A<=42182||A>=43360&&A<=43388||A>=44032&&A<=55203||A>=63744&&A<=64255||A>=65040&&A<=65049||A>=65072&&A<=65106||A>=65108&&A<=65126||A>=65128&&A<=65131||A>=94176&&A<=94180||A>=94192&&A<=94198||A>=94208&&A<=101589||A>=101631&&A<=101662||A>=101760&&A<=101874||A>=110576&&A<=110579||A>=110581&&A<=110587||A===110589||A===110590||A>=110592&&A<=110882||A===110898||A>=110928&&A<=110930||A===110933||A>=110948&&A<=110951||A>=110960&&A<=111355||A>=119552&&A<=119638||A>=119648&&A<=119670||A===126980||A===127183||A===127374||A>=127377&&A<=127386||A>=127488&&A<=127490||A>=127504&&A<=127547||A>=127552&&A<=127560||A===127568||A===127569||A>=127584&&A<=127589||A>=127744&&A<=127776||A>=127789&&A<=127797||A>=127799&&A<=127868||A>=127870&&A<=127891||A>=127904&&A<=127946||A>=127951&&A<=127955||A>=127968&&A<=127984||A===127988||A>=127992&&A<=128062||A===128064||A>=128066&&A<=128252||A>=128255&&A<=128317||A>=128331&&A<=128334||A>=128336&&A<=128359||A===128378||A===128405||A===128406||A===128420||A>=128507&&A<=128591||A>=128640&&A<=128709||A===128716||A>=128720&&A<=128722||A>=128725&&A<=128728||A>=128732&&A<=128735||A===128747||A===128748||A>=128756&&A<=128764||A>=128992&&A<=129003||A===129008||A>=129292&&A<=129338||A>=129340&&A<=129349||A>=129351&&A<=129535||A>=129648&&A<=129660||A>=129664&&A<=129674||A>=129678&&A<=129734||A===129736||A>=129741&&A<=129756||A>=129759&&A<=129770||A>=129775&&A<=129784||A>=131072&&A<=196605||A>=196608&&A<=262141}var Q68=()=>{};function jK3(A){if(!Number.isSafeInteger(A))throw TypeError(`Expected a code point, got \`${typeof A}\`.`)}function NK6(A,{ambiguousAsWide:q=!1}={}){if(jK3(A),EI6(A)||LI6(A)||q&&EdA(A))return 2;return 1}var yI6=k(()=>{Q68();Q68()});var U68=C((vpw,LdA)=>{LdA.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});function hj(){if(!p68)p68=new Intl.Segmenter(void 0,{granularity:"grapheme"});return p68}function RI6(A){if(!A)return"";return hj().segment(A)[Symbol.iterator]().next().value?.segment??""}function kd(A){if(!A)return"";let q="";for(let{segment:K}of hj().segment(A))q=K;return q}function RdA(){if(!d68)d68=new Intl.Segmenter(void 0,{granularity:"word"});return d68}function l68(A,q){let K=`${A}:${q}`,Y=ydA.get(K);if(!Y)Y=new Intl.RelativeTimeFormat("en",{style:A,numeric:q}),ydA.set(K,Y);return Y}function i68(){if(!c68)c68=Intl.DateTimeFormat().resolvedOptions().timeZone;return c68}var p68=null,d68=null,ydA,c68=null;var YR=k(()=>{ydA=new Map});function JK3(A){if(typeof A!=="string"||A.length===0)return 0;let q=!0;for(let Y=0;Y<A.length;Y++){let z=A.charCodeAt(Y);if(z>=127||z===27){q=!1;break}}if(q){let Y=0;for(let z=0;z<A.length;z++)if(A.charCodeAt(z)>31)Y++;return Y}if(A.includes("\x1B")){if(A=lz(A),A.length===0)return 0}if(!MK3(A)){let Y=0;for(let z of A){let w=z.codePointAt(0);if(!CdA(w))Y+=NK6(w,{ambiguousAsWide:!1})}return Y}let K=0;for(let{segment:Y}of hj().segment(A)){if(SdA.lastIndex=0,SdA.test(Y)){K+=DK3(Y);continue}for(let z of Y){let w=z.codePointAt(0);if(!CdA(w)){K+=NK6(w,{ambiguousAsWide:!1});break}}}return K}function MK3(A){for(let q of A){let K=q.codePointAt(0);if(K>=127744&&K<=129791)return!0;if(K>=9728&&K<=10175)return!0;if(K>=127462&&K<=127487)return!0;if(K>=65024&&K<=65039)return!0;if(K===8205)return!0}return!1}function DK3(A){let q=A.codePointAt(0);if(q>=127462&&q<=127487){let K=0;for(let Y of A)K++;return K===1?1:2}if(A.length===2){if(A.codePointAt(1)===65039&&(q>=48&&q<=57||q===35||q===42))return 1}return 2}function CdA(A){if(A>=32&&A<127)return!1;if(A>=160&&A<768)return A===173;if(A<=31||A>=127&&A<=159)return!0;if(A>=8203&&A<=8205||A===65279||A>=8288&&A<=8292)return!0;if(A>=65024&&A<=65039||A>=917760&&A<=917999)return!0;if(A>=768&&A<=879||A>=6832&&A<=6911||A>=7616&&A<=7679||A>=8400&&A<=8447||A>=65056&&A<=65071)return!0;if(A>=2304&&A<=3407){let q=A&127;if(q<=3)return!0;if(q>=58&&q<=79)return!0;if(q>=81&&q<=87)return!0;if(q>=98&&q<=99)return!0}if(A===3633||A>=3636&&A<=3642||A>=3655&&A<=3662||A===3761||A>=3764&&A<=3772||A>=3784&&A<=3789)return!0;if(A>=1536&&A<=1541||A===1757||A===1807||A===2274)return!0;if(A>=55296&&A<=57343)return!0;if(A>=917504&&A<=917631)return!0;return!1}var IdA,SdA,hdA,XK3,B8;var y5=k(()=>{uf();yI6();YR();IdA=e(U68(),1),SdA=IdA.default();hdA=typeof Bun<"u"&&typeof Bun.stringWidth==="function"?Bun.stringWidth:null,XK3={ambiguousIsNarrow:!0},B8=hdA?(A)=>hdA(A,XK3):JK3});function bdA(A,q){if(B8(A)<=q)return A;if(q<=0)return"…";if(q<5)return vK(A,q);let K=A.lastIndexOf("/"),Y=K>=0?A.slice(K):A,z=K>=0?A.slice(0,K):"",w=B8(Y);if(w>=q-1)return pM6(A,q);let _=q-1-w;if(_<=0)return pM6(Y,q);return dM6(z,_)+"…"+Y}function vK(A,q){if(B8(A)<=q)return A;if(q<=1)return"…";let K=0,Y="";for(let{segment:z}of hj().segment(A)){let w=B8(z);if(K+w>q-1)break;Y+=z,K+=w}return Y+"…"}function pM6(A,q){if(B8(A)<=q)return A;if(q<=1)return"…";let K=[...hj().segment(A)],Y=0,z=K.length;for(let w=K.length-1;w>=0;w--){let _=B8(K[w].segment);if(Y+_>q-1)break;Y+=_,z=w}return"…"+K.slice(z).map((w)=>w.segment).join("")}function dM6(A,q){if(B8(A)<=q)return A;if(q<=0)return"";let K=0,Y="";for(let{segment:z}of hj().segment(A)){let w=B8(z);if(K+w>q)break;Y+=z,K+=w}return Y}function Z9(A,q,K=!1){let Y=A;if(K){let z=A.indexOf(`
`);if(z!==-1){if(Y=A.substring(0,z),B8(Y)+1>q)return vK(Y,q);return`${Y}…`}}if(B8(Y)<=q)return Y;return vK(Y,q)}function G3(A,q){if(A<60000){if(A===0)return"0s";if(A<1)return`${(A/1000).toFixed(1)}s`;return`${Math.round(A/1000).toString()}s`}let K=Math.floor(A/86400000),Y=Math.floor(A%86400000/3600000),z=Math.floor(A%3600000/60000),w=Math.round(A%60000/1000);if(w===60)w=0,z++;if(z===60)z=0,Y++;if(Y===24)Y=0,K++;let _=q?.hideTrailingZeros;if(q?.mostSignificantOnly){if(K>0)return`${K}d`;if(Y>0)return`${Y}h`;if(z>0)return`${z}m`;return`${w}s`}if(K>0){if(_&&Y===0&&z===0)return`${K}d`;if(_&&z===0)return`${K}d ${Y}h`;return`${K}d ${Y}h ${z}m`}if(Y>0){if(_&&z===0&&w===0)return`${Y}h`;if(_&&w===0)return`${Y}h ${z}m`;return`${Y}h ${z}m ${w}s`}if(z>0){if(_&&w===0)return`${z}m`;return`${z}m ${w}s`}return`${w}s`}function f3(A){let q=A>=1000;return PK3(q).format(A).toLowerCase()}function r31(A,q={}){let{style:K="narrow",numeric:Y="always",now:z=new Date}=q,w=A.getTime()-z.getTime(),_=Math.trunc(w/1000),$=[{unit:"year",seconds:31536000,shortUnit:"y"},{unit:"month",seconds:2592000,shortUnit:"mo"},{unit:"week",seconds:604800,shortUnit:"w"},{unit:"day",seconds:86400,shortUnit:"d"},{unit:"hour",seconds:3600,shortUnit:"h"},{unit:"minute",seconds:60,shortUnit:"m"},{unit:"second",seconds:1,shortUnit:"s"}];for(let{unit:O,seconds:H,shortUnit:j}of $)if(Math.abs(_)>=H){let J=Math.trunc(_/H);if(K==="narrow")return _<0?`${Math.abs(J)}${j} ago`:`in ${J}${j}`;return l68("long",Y).format(J,O)}if(K==="narrow")return _<=0?"0s ago":"in 0s";return l68(K,Y).format(0,"second")}function vK6(A,q={}){let{now:K=new Date,...Y}=q;if(A>K)return r31(A,{...Y,now:K});return r31(A,{...Y,numeric:"always",now:K})}function SI6(A){let q=A.fileSize!==void 0?RK(A.fileSize):`${A.messageCount} messages`,K=[vK6(A.modified,{style:"short"}),...A.gitBranch?[A.gitBranch]:[],q];if(A.tag)K.push(`#${A.tag}`);if(A.agentSetting)K.push(`agent:${A.agentSetting}`);if(A.prNumber){let Y=A.prRepository?`${A.prRepository.split("/")[1]}#${A.prNumber}`:`PR #${A.prNumber}`;K.push(Y)}return K.join(" · ")}function cM6(A,q=!1,K=!0){if(!A)return;let Y=new Date(A*1000),z=new Date,w=Y.getMinutes();if((Y.getTime()-z.getTime())/3600000>24){let O={month:"short",day:"numeric",hour:K?"numeric":void 0,minute:!K||w===0?void 0:"2-digit",hour12:K?!0:void 0};if(Y.getFullYear()!==z.getFullYear())O.year="numeric";return Y.toLocaleString("en-US",O).replace(/ ([AP]M)/i,(j,J)=>J.toLowerCase())+(q?` (${i68()})`:"")}return Y.toLocaleTimeString("en-US",{hour:"numeric",minute:w===0?void 0:"2-digit",hour12:!0}).replace(/ ([AP]M)/i,(O,H)=>H.toLowerCase())+(q?` (${i68()})`:"")}function cX(A){if(A<1000)return String(A);let K=(A/1000).toFixed(1);if(K.endsWith(".0"))return`${K.slice(0,-2)}k`;return`${K}k`}function xdA(A,q=!1,K=!0){let Y=new Date(A);return`${cM6(Math.floor(Y.getTime()/1000),q,K)}`}var n68=null,r68=null,PK3=(A)=>{if(A){if(!n68)n68=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1,minimumFractionDigits:1});return n68}else{if(!r68)r68=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1,minimumFractionDigits:0});return r68}};var Oq=k(()=>{y5();p7();YR()});var QdA=C((bpw,FdA)=>{var gdA=g6("child_process"),udA=gdA.spawn,WK3=gdA.exec;FdA.exports=function(A,q,K){if(typeof q==="function"&&K===void 0)K=q,q=void 0;if(A=parseInt(A),Number.isNaN(A))if(K)return K(Error("pid must be a number"));else throw Error("pid must be a number");var Y={},z={};switch(Y[A]=[],z[A]=1,process.platform){case"win32":WK3("taskkill /pid "+A+" /T /F",K);break;case"darwin":o68(A,Y,z,function(w){return udA("pgrep",["-P",w])},function(){BdA(Y,q,K)});break;default:o68(A,Y,z,function(w){return udA("ps",["-o","pid","--no-headers","--ppid",w])},function(){BdA(Y,q,K)});break}};function BdA(A,q,K){var Y={};try{Object.keys(A).forEach(function(z){if(A[z].forEach(function(w){if(!Y[w])mdA(w,q),Y[w]=1}),!Y[z])mdA(z,q),Y[z]=1})}catch(z){if(K)return K(z);else throw z}if(K)return K()}function mdA(A,q){try{process.kill(parseInt(A,10),q)}catch(K){if(K.code!=="ESRCH")throw K}}function o68(A,q,K,Y,z){var w=Y(A),_="";w.stdout.on("data",function(H){var H=H.toString("ascii");_+=H});var $=function(O){if(delete K[A],O!=0){if(Object.keys(K).length==0)z();return}_.match(/\d+/g).forEach(function(H){H=parseInt(H,10),q[A].push(H),q[H]=[],K[H]=1,o68(H,q,K,Y,z)})};w.on("close",$)}});import{constants as kK6}from"fs";import{mkdir as ZK3,open as pdA,readdir as GK3,stat as Bpw,symlink as UdA,unlink as ddA}from"fs/promises";import{join as a68}from"path";function EK6(){return a68(s31(),"tasks")}async function s68(){await ZK3(EK6(),{recursive:!0})}function W_(A){return a68(EK6(),`${A}.output`)}class a31{#A;#q=null;#K=[];#z=null;#Y=null;constructor(A){this.#A=W_(A)}append(A){if(this.#K.push(A),!this.#z)this.#z=new Promise((q)=>{this.#Y=q}),this.#H()}flush(){return this.#z??Promise.resolve()}cancel(){this.#K.length=0}async#_(){while(!0){try{if(!this.#q)await s68(),this.#q=await pdA(this.#A,process.platform==="win32"?"a":kK6.O_WRONLY|kK6.O_APPEND|kK6.O_CREAT|cdA);while(!0)if(await this.#w(),this.#K.length===0)break}finally{if(this.#q){let A=this.#q;this.#q=null,await A.close()}}if(this.#K.length)continue;break}}#w(){return this.#q.appendFile(this.#O())}#O(){let A=this.#K.splice(0,this.#K.length),q=0;for(let z of A)q+=Buffer.byteLength(z,"utf8");let K=Buffer.allocUnsafe(q),Y=0;for(let z of A)Y+=K.write(z,Y,"utf8");return K}async#H(){try{await this.#_()}finally{let A=this.#Y;this.#z=null,this.#Y=null,A()}}}function fK3(A){let q=o31.get(A);if(!q)q=new a31(A),o31.set(A,q);return q}function idA(A,q){fK3(A).append(q)}async function bH(A){let q=o31.get(A);if(q)await q.flush(),o31.delete(A)}async function ndA(A,q,K=ldA){try{let Y=await k81(W_(A),q,K);if(!Y)return{content:"",newOffset:q};return{content:Y.content,newOffset:q+Y.bytesRead}}catch(Y){if(Y.code==="ENOENT")return{content:"",newOffset:q};return $6(Y),{content:"",newOffset:q}}}async function t68(A,q=ldA){try{let{content:K,bytesTotal:Y,bytesRead:z}=await bH6(W_(A),q);if(Y>z)return`[${Math.round((Y-z)/1024)}KB of earlier output omitted]
${K}`;return K}catch(K){if(K.code==="ENOENT")return"";return $6(K),""}}async function e68(A){await s68();let q=W_(A);return await(await pdA(q,process.platform==="win32"?"wx":kK6.O_WRONLY|kK6.O_CREAT|kK6.O_EXCL|cdA)).close(),q}async function lM6(A,q){try{await s68();let K=W_(A);try{await UdA(q,K)}catch{await ddA(K),await UdA(q,K)}return K}catch(K){return $6(K),e68(A)}}async function rdA(){try{let A=EK6(),q=await GK3(A);await Promise.all(q.map((K)=>ddA(a68(A,K)).catch(()=>{})))}catch{}}var cdA,ldA=8388608,o31;var BD=k(()=>{Y7();x1();iz();cdA=kK6.O_NOFOLLOW??0;o31=new Map});import{randomBytes as TK3}from"crypto";function NK3(A){return VK3[A]??"x"}function tk(A){let q=NK3(A),K=TK3(8),Y=q;for(let z=0;z<8;z++)Y+=odA[K[z]%odA.length];return Y}function Bf(A,q,K,Y){return{id:A,type:q,status:"pending",description:K,toolUseId:Y,startTime:Date.now(),outputFile:W_(A),outputOffset:0,notified:!1}}var VK3,odA="0123456789abcdefghijklmnopqrstuvwxyz";var Ed=k(()=>{BD();VK3={local_bash:"b",local_agent:"a",remote_agent:"r",in_process_teammate:"t"}});class CI6{capacity;buffer;head=0;size=0;constructor(A){this.capacity=A;this.buffer=Array(A)}add(A){if(this.buffer[this.head]=A,this.head=(this.head+1)%this.capacity,this.size<this.capacity)this.size++}addAll(A){for(let q of A)this.add(q)}getRecent(A){let q=[],K=this.size<this.capacity?0:this.head,Y=Math.min(A,this.size);for(let z=0;z<Y;z++){let w=(K+this.size-Y+z)%this.capacity;q.push(this.buffer[w])}return q}toArray(){if(this.size===0)return[];let A=[],q=this.size<this.capacity?0:this.head;for(let K=0;K<this.size;K++){let Y=(q+K)%this.capacity;A.push(this.buffer[Y])}return A}clear(){this.buffer.length=0,this.head=0,this.size=0}length(){return this.size}}function iM6(A){return A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function xI(A){return A.replace(/[０-９]/g,(q)=>String.fromCharCode(q.charCodeAt(0)-65248))}function t31(A){return A.replace(/\u3000/g," ")}function e31(A,q=",",K=adA){let z="";for(let w of A){let _=z?q:"",$=_+w;if(z.length+$.length<=K)z+=$;else{let O=K-z.length-_.length-14;if(O>0)z+=_+w.slice(0,O)+"...[truncated]";else z+="...[truncated]";return z}}return z}class A18{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(A=adA){this.maxSize=A}append(A){let q=typeof A==="string"?A:A.toString();if(this.totalBytesReceived+=q.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+q.length>this.maxSize){let K=this.maxSize-this.content.length;if(K>0)this.content+=q.slice(0,K);this.isTruncated=!0}else this.content+=q}toString(){if(!this.isTruncated)return this.content;let A=this.totalBytesReceived-this.maxSize,q=Math.round(A/1024);return this.content+`
... [output truncated - ${q}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function sdA(A,q){let K=A.split(`
`);if(K.length<=q)return A;return K.slice(0,q).join(`
`)+"…"}var adA=33554432;function Hs(A,q,K,Y){if(!q)return{effective:K,status:"valid"};let z=parseInt(q,10);if(isNaN(z)||z<=0){let w={effective:K,status:"invalid",message:`Invalid value "${q}" (using default: ${K})`};return L(`${A} ${w.message}`),w}if(z>Y){let w={effective:Y,status:"capped",message:`Capped from ${z} to ${Y}`};return L(`${A} ${w.message}`),w}return{effective:z,status:"valid"}}var hI6=k(()=>{G1()});function A51(){return Hs("BASH_MAX_OUTPUT_LENGTH",process.env.BASH_MAX_OUTPUT_LENGTH,K18,q18).effective}var q18=150000,K18=30000;var q51=k(()=>{hI6()});import{unlink as vK3}from"fs/promises";var kK3=8388608,EK3=1000,LK3=4096,w$;var II6=k(()=>{BD();Y7();q51();w$=class w${taskId;path;stdoutToFile;#A="";#q="";#K=null;#z=new CI6(1000);#Y=0;#_=0;#w;#O;#H=!1;#j=0;static#$=new Map;static#J=new Map;static#M=null;constructor(A,q,K=!1,Y=kK3){if(this.taskId=A,this.path=W_(A),this.stdoutToFile=K,this.#w=Y,this.#O=q,K&&q)w$.#$.set(A,this)}static startPolling(A){let q=w$.#$.get(A);if(!q||!q.#O)return;if(w$.#J.set(A,q),!w$.#M)w$.#M=setInterval(w$.#W,EK3),w$.#M.unref()}static stopPolling(A){if(w$.#J.delete(A),w$.#J.size===0&&w$.#M)clearInterval(w$.#M),w$.#M=null}static#W(){for(let[,A]of w$.#J){if(!A.#O)continue;bH6(A.path,LK3).then(({content:q,bytesRead:K,bytesTotal:Y})=>{if(!A.#O)return;if(!q){A.#O("","",0,Y,!1);return}let z=q.length,w=0,_=0;for(let O=0;O<100&&z>0;O++)if(z=q.lastIndexOf(`
`,z-1),_++,O===4)w=z<=0?0:z+1;let $=z<=0?0:z+1;A.#_=Y,A.#O(q.slice(w),q.slice($),_,Y,K<Y)},()=>{})}}writeStdout(A){this.#X(A,!1)}writeStderr(A){this.#X(A,!0)}#X(A,q){if(this.#_+=A.length,this.#G(A),this.#K){this.#K.append(q?`[stderr] ${A}`:A);return}if(this.#A.length+this.#q.length+A.length>this.#w){this.#P(q?A:null,q?null:A);return}if(q)this.#q+=A;else this.#A+=A}#G(A){let Y=0,z=[],w=0,_=A.length;while(_>0){let $=A.lastIndexOf(`
`,_-1);if($===-1)break;if(Y++,z.length<100&&w<4096){let O=_-$-1;if(O>0&&O<=4096-w){let H=A.slice($+1,_);if(H.trim())z.push(Buffer.from(H).toString()),w+=O}}_=$}this.#Y+=Y;for(let $=z.length-1;$>=0;$--)this.#z.add(z[$]);if(this.#O&&z.length>0){let $=this.#z.getRecent(5);this.#O(e31($,`
`),e31(this.#z.getRecent(100),`
`),this.#Y,this.#_,this.#K!==null)}}#P(A,q){if(this.#K=new a31(this.taskId),this.#A)this.#K.append(this.#A),this.#A="";if(this.#q)this.#K.append(`[stderr] ${this.#q}`),this.#q="";if(q)this.#K.append(q);if(A)this.#K.append(`[stderr] ${A}`)}async getStdout(){if(this.stdoutToFile)return this.#Z();if(this.#K){let A=this.#z.getRecent(5),q=e31(A,`
`),Y=`
Output truncated (${Math.round(this.#_/1024)}KB total). Full output saved to: ${this.path}`;return q?q+Y:Y.trimStart()}return this.#A}async#Z(){let A=A51();try{let q=await k81(this.path,0,A);if(!q)return this.#H=!0,"";let{content:K,bytesRead:Y,bytesTotal:z}=q;return this.#j=z,this.#H=z<=Y,K}catch{return""}}getStderr(){if(this.#K)return"";return this.#q}get isOverflowed(){return this.#K!==null}get totalLines(){return this.#Y}get totalBytes(){return this.#_}get outputFileRedundant(){return this.#H}get outputFileSize(){return this.#j}spillToDisk(){if(!this.#K)this.#P(null,null)}async flush(){await this.#K?.flush()}async deleteOutputFile(){try{await vK3(this.path)}catch{}}clear(){this.#A="",this.#q="",this.#z.clear(),this.#O=null,this.#K?.cancel(),w$.stopPolling(this.taskId),w$.#$.delete(this.taskId)}}});class Y18{#A;#q=!1;#K;#z;#Y=this.#_.bind(this);constructor(A,q,K){this.#A=A,this.#K=q,this.#z=K,A.setEncoding("utf-8"),A.on("data",this.#Y)}#_(A){let q=typeof A==="string"?A:A.toString();if(this.#z)this.#K.writeStderr(q);else this.#K.writeStdout(q)}cleanup(){if(this.#q)return;this.#q=!0,this.#A.removeListener("data",this.#Y),this.#A=null,this.#K=null,this.#Y=()=>{}}}class z18{#A="running";#q;#K;#z;#Y;#_=null;#w;#O;#H;#j;#$=null;#J=null;#M=null;taskOutput;static#W(A){if(A.#j&&A.#O)A.#O(A.background.bind(A));else A.#k(edA)}result;onTimeout;constructor(A,q,K,Y,z=!1){if(this.#Y=A,this.#w=q,this.#H=K,this.#j=z,this.taskOutput=Y,this.#z=A.stderr?new Y18(A.stderr,Y,!0):null,this.#K=A.stdout?new Y18(A.stdout,Y,!1):null,z)this.onTimeout=(w)=>{this.#O=w};this.result=this.#T()}get status(){return this.#A}#X(){if(this.#w.reason==="interrupt")return;this.kill()}#G(A,q){let K=A!==null&&A!==void 0?A:q==="SIGTERM"?144:1;this.#Z(K)}#P(){this.#Z(1)}#Z(A){if(this.#J)this.#J(A),this.#J=null}#f(){let A=this.#_;if(A)clearTimeout(A),this.#_=null;let q=this.#M;if(q)this.#w.removeEventListener("abort",q),this.#M=null}#T(){this.#M=this.#X.bind(this),this.#w.addEventListener("abort",this.#M,{once:!0}),this.#Y.once("exit",this.#G.bind(this)),this.#Y.once("error",this.#P.bind(this)),this.#_=setTimeout(z18.#W,this.#H,this);let A=new Promise((q)=>{this.#J=q});return new Promise((q)=>{this.#$=q,A.then(this.#N.bind(this))})}async#N(A){if(this.#f(),this.#A==="running"||this.#A==="backgrounded")this.#A="completed";let q=await this.taskOutput.getStdout(),K={code:A,stdout:q,stderr:this.taskOutput.getStderr(),interrupted:A===tdA,backgroundTaskId:this.#q};if(this.taskOutput.stdoutToFile&&!this.#q)if(this.taskOutput.outputFileRedundant)this.taskOutput.deleteOutputFile();else K.outputFilePath=this.taskOutput.path,K.outputFileSize=this.taskOutput.outputFileSize,K.outputTaskId=this.taskOutput.taskId;if(A===edA)K.stderr=[`Command timed out after ${G3(this.#H)}`,K.stderr].filter(Boolean).join(" ");let Y=this.#$;if(Y)this.#$=null,Y(K)}#k(A){if(this.#A="killed",this.#Y.pid)AcA.default(this.#Y.pid,"SIGKILL");this.#Z(A??tdA)}kill(){this.#k()}background(A){if(this.#A==="running"){if(this.#q=A,this.#A="backgrounded",this.#f(),!this.taskOutput.stdoutToFile)this.taskOutput.spillToDisk();return!0}return!1}cleanup(){this.#K?.cleanup(),this.#z?.cleanup(),this.taskOutput.clear(),this.#f(),this.#Y=null,this.#w=null,this.#O=void 0}}function K51(A,q,K,Y,z=!1){return new z18(A,q,K,Y,z)}class qcA{status="killed";result;taskOutput;constructor(A){this.taskOutput=new w$(tk("local_bash"),null),this.result=Promise.resolve({code:A?.code??145,stdout:"",stderr:A?.stderr??"Command aborted before execution",interrupted:!0,backgroundTaskId:A?.backgroundTaskId})}background(){return!1}kill(){}cleanup(){}}function w18(A,q){return new qcA({backgroundTaskId:A,...q})}function KcA(A){let q=new w$(tk("local_bash"),null);return{status:"completed",result:Promise.resolve({code:1,stdout:"",stderr:A,interrupted:!1,preSpawnError:A}),taskOutput:q,background(){return!1},kill(){},cleanup(){}}}var AcA,tdA=137,edA=143;var _18=k(()=>{Oq();Ed();II6();AcA=e(QdA(),1)});var zcA=C((Odw,YcA)=>{YcA.exports=function(q){return q.map(function(K){if(K==="")return"''";if(K&&typeof K==="object")return K.op.replace(/(.)/g,"\\$1");if(/["\s\\]/.test(K)&&!/'/.test(K))return"'"+K.replace(/(['])/g,"\\$1")+"'";if(/["'\s]/.test(K))return'"'+K.replace(/(["\\$`!])/g,"\\$1")+'"';return String(K).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}});var JcA=C((Hdw,jcA)=>{var HcA="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wcA=new RegExp("^"+HcA+"$"),_cA="|&;()<> \\t",yK3='"((\\\\"|[^"])*?)"',RK3="'((\\\\'|[^'])*?)'",SK3=/^#$/,$cA="'",OcA='"',$18="$",LK6="",CK3=4294967296;for(Y51=0;Y51<4;Y51++)LK6+=(CK3*Math.random()).toString(16);var Y51,hK3=new RegExp("^"+LK6);function IK3(A,q){var K=q.lastIndex,Y=[],z;while(z=q.exec(A))if(Y.push(z),q.lastIndex===z.index)q.lastIndex+=1;return q.lastIndex=K,Y}function bK3(A,q,K){var Y=typeof A==="function"?A(K):A[K];if(typeof Y>"u"&&K!="")Y="";else if(typeof Y>"u")Y="$";if(typeof Y==="object")return q+LK6+JSON.stringify(Y)+LK6;return q+Y}function xK3(A,q,K){if(!K)K={};var Y=K.escape||"\\",z="(\\"+Y+`['"`+_cA+`]|[^\\s'"`+_cA+"])+",w=new RegExp(["("+HcA+")","("+z+"|"+yK3+"|"+RK3+")+"].join("|"),"g"),_=IK3(A,w);if(_.length===0)return[];if(!q)q={};var $=!1;return _.map(function(O){var H=O[0];if(!H||$)return;if(wcA.test(H))return{op:H};var j=!1,J=!1,M="",D=!1,X;function P(){X+=1;var G,f,V=H.charAt(X);if(V==="{"){if(X+=1,H.charAt(X)==="}")throw Error("Bad substitution: "+H.slice(X-2,X+1));if(G=H.indexOf("}",X),G<0)throw Error("Bad substitution: "+H.slice(X));f=H.slice(X,G),X=G}else if(/[*@#?$!_-]/.test(V))f=V,X+=1;else{var N=H.slice(X);if(G=N.match(/[^\w\d_]/),!G)f=N,X=H.length;else f=N.slice(0,G.index),X+=G.index-1}return bK3(q,"",f)}for(X=0;X<H.length;X++){var W=H.charAt(X);if(D=D||!j&&(W==="*"||W==="?"),J)M+=W,J=!1;else if(j)if(W===j)j=!1;else if(j==$cA)M+=W;else if(W===Y)if(X+=1,W=H.charAt(X),W===OcA||W===Y||W===$18)M+=W;else M+=Y+W;else if(W===$18)M+=P();else M+=W;else if(W===OcA||W===$cA)j=W;else if(wcA.test(W))return{op:H};else if(SK3.test(W)){$=!0;var Z={comment:A.slice(O.index+X+1)};if(M.length)return[M,Z];return[Z]}else if(W===Y)J=!0;else if(W===$18)M+=P();else M+=W}if(D)return{op:"glob",pattern:M};return M}).reduce(function(O,H){return typeof H>"u"?O:O.concat(H)},[])}jcA.exports=function(q,K,Y){var z=xK3(q,K,Y);if(typeof K!=="function")return z;return z.reduce(function(w,_){if(typeof _==="object")return w.concat(_);var $=_.split(RegExp("("+LK6+".*?"+LK6+")","g"));if($.length===1)return w.concat($[0]);return w.concat($.filter(Boolean).map(function(O){if(hK3.test(O))return JSON.parse(O.split(LK6)[1]);return O}))},[])}});var z51=C((uK3)=>{uK3.quote=zcA();uK3.parse=JcA()});function Xw(A,q){try{return{success:!0,tokens:typeof q==="function"?nM6.parse(A,q):nM6.parse(A,q)}}catch(K){if(K instanceof Error)$6(K);return{success:!1,error:K instanceof Error?K.message:"Unknown parse error"}}}function gK3(A){try{let q=A.map((Y,z)=>{if(Y===null||Y===void 0)return String(Y);let w=typeof Y;if(w==="string")return Y;if(w==="number"||w==="boolean")return String(Y);if(w==="object")throw Error(`Cannot quote argument at index ${z}: object values are not supported`);if(w==="symbol")throw Error(`Cannot quote argument at index ${z}: symbol values are not supported`);if(w==="function")throw Error(`Cannot quote argument at index ${z}: function values are not supported`);throw Error(`Cannot quote argument at index ${z}: unsupported type ${w}`)});return{success:!0,quoted:nM6.quote(q)}}catch(q){if(q instanceof Error)$6(q);return{success:!1,error:q instanceof Error?q.message:"Unknown quote error"}}}function McA(A){let q=!1,K=!1;for(let Y=0;Y<A.length;Y++){let z=A[Y];if(z==="\\"&&!q){Y++;continue}if(z==='"'&&!q){K=!K;continue}if(z==="'"&&!K){if(q=!q,!q){let w=0,_=Y-1;while(_>=0&&A[_]==="\\")w++,_--;if(w>0&&w%2===1)return!0;if(w>0&&w%2===0&&A.indexOf("'",Y+1)!==-1)return!0}continue}}return!1}function G4(A){let q=gK3([...A]);if(q.success)return q.quoted;try{let K=A.map((Y)=>{if(Y===null||Y===void 0)return String(Y);let z=typeof Y;if(z==="string"||z==="number"||z==="boolean")return String(Y);return U6(Y)});return nM6.quote(K)}catch(K){if(K instanceof Error)$6(K);throw Error("Failed to quote shell arguments safely")}}var nM6;var ZM=k(()=>{x1();a1();nM6=e(z51(),1)});function w51(A,q){let K=A.lastIndexOf(" -");if(K>0){let Y=A.substring(0,K),z=A.substring(K+1);return`${G4([Y])} ${z} ${G4([q])}`}else return`${G4([A])} ${G4([q])}`}var O18=k(()=>{ZM()});import{readFile as DcA,mkdir as FK3,readdir as QK3}from"fs/promises";import{join as H18}from"node:path";async function XcA(){let A=H18(OA(),"session-env",d1());return await FK3(A,{recursive:!0}),A}async function PcA(A,q){let K=A.toLowerCase();return H18(await XcA(),`${K}-hook-${q}.sh`)}function WcA(){L("Invalidating session environment cache"),js=void 0}async function ZcA(){if(c8()==="windows")return L("Session environment not yet supported on Windows"),null;if(js!==void 0)return js;let A=[],q=process.env.CLAUDE_ENV_FILE;if(q)try{let Y=(await DcA(q,"utf8")).trim();if(Y)A.push(Y),L(`Session environment loaded from CLAUDE_ENV_FILE: ${q} (${Y.length} chars)`)}catch(Y){if(Y.code!=="ENOENT")L(`Failed to read CLAUDE_ENV_FILE: ${D1(Y)}`)}let K=await XcA();try{let z=(await QK3(K)).filter((w)=>w.match(/^(setup|sessionstart)-hook-\d+\.sh$/)).sort((w,_)=>{let $=w.match(/^(setup|sessionstart)-hook-(\d+)\.sh$/),O=_.match(/^(setup|sessionstart)-hook-(\d+)\.sh$/),H=$?.[1]||"",j=O?.[1]||"";if(H!==j)return H==="setup"?-1:1;let J=parseInt($?.[2]||"0",10),M=parseInt(O?.[2]||"0",10);return J-M});for(let w of z){let _=H18(K,w);try{let $=(await DcA(_,"utf8")).trim();if($)A.push($)}catch($){if($.code!=="ENOENT")L(`Failed to read hook file ${_}: ${D1($)}`)}}if(z.length>0)L(`Session environment loaded from ${z.length} hook file(s)`)}catch(Y){if(Y.code!=="ENOENT")L(`Failed to load session environment from hooks: ${D1(Y)}`)}if(A.length===0)return L("No session environment scripts found"),js=null,js;return js=A.join(`
`),L(`Session environment script ready (${js.length} chars total)`),js}var js=void 0;var _51=k(()=>{G1();uK();Z8();Q1();MA()});function $51(A,q,K,Y,z,w,_){fcA(A,q,K,Y,z,w,_)}function O51(A,q,K,Y,z,w,_){let $=_?.id||`function-hook-${Date.now()}-${Math.random()}`,O={type:"function",id:$,timeout:_?.timeout||5000,callback:z,errorMessage:w};return fcA(A,q,K,Y,O),$}function fcA(A,q,K,Y,z,w,_){A(($)=>{let O=$.sessionHooks[q]||{hooks:{}},H=O.hooks[K]||[],j=H.findIndex((D)=>D.matcher===Y&&D.skillRoot===_),J;if(j>=0){J=[...H];let D=J[j];J[j]={matcher:D.matcher,skillRoot:D.skillRoot,hooks:[...D.hooks,{hook:z,onHookSuccess:w}]}}else J=[...H,{matcher:Y,skillRoot:_,hooks:[{hook:z,onHookSuccess:w}]}];let M={...O.hooks,[K]:J};return{...$,sessionHooks:{...$.sessionHooks,[q]:{hooks:M}}}}),L(`Added session hook for event ${K} in session ${q}`)}function TcA(A,q,K,Y){A((z)=>{let w=z.sessionHooks[q];if(!w)return z;let $=(w.hooks[K]||[]).map((H)=>{let j=H.hooks.filter((J)=>!oM6(J.hook,Y));return j.length>0?{...H,hooks:j}:null}).filter((H)=>H!==null),O=$.length>0?{...w.hooks,[K]:$}:{...w.hooks};if($.length===0)delete O[K];return{...z,sessionHooks:{...z.sessionHooks,[q]:{...w,hooks:O}}}}),L(`Removed session hook for event ${K} in session ${q}`)}function GcA(A){return A.map((q)=>({matcher:q.matcher,skillRoot:q.skillRoot,hooks:q.hooks.map((K)=>K.hook).filter((K)=>K.type!=="function")}))}function H51(A,q,K){let Y=A.sessionHooks[q];if(!Y)return new Map;let z=new Map;if(K){let w=Y.hooks[K];if(w)z.set(K,GcA(w));return z}for(let w of Hm){let _=Y.hooks[w];if(_)z.set(w,GcA(_))}return z}function VcA(A,q,K){let Y=A.sessionHooks[q];if(!Y)return new Map;let z=new Map,w=(_)=>{return _.map(($)=>({matcher:$.matcher,hooks:$.hooks.map((O)=>O.hook).filter((O)=>O.type==="function")})).filter(($)=>$.hooks.length>0)};if(K){let _=Y.hooks[K];if(_){let $=w(_);if($.length>0)z.set(K,$)}return z}for(let _ of Hm){let $=Y.hooks[_];if($){let O=w($);if(O.length>0)z.set(_,O)}}return z}function NcA(A,q,K,Y,z){let w=A.sessionHooks[q];if(!w)return;let _=w.hooks[K];if(!_)return;for(let $ of _)if($.matcher===Y||Y===""){let O=$.hooks.find((H)=>oM6(H.hook,z));if(O)return O}return}function rM6(A,q){A((K)=>{let Y={...K.sessionHooks};return delete Y[q],{...K,sessionHooks:Y}}),L(`Cleared all session hooks for session ${q}`)}var Ld=k(()=>{yM6();G1();Jm()});import{resolve as UK3}from"path";function oM6(A,q){if(A.type!==q.type)return!1;switch(A.type){case"command":return q.type==="command"&&A.command===q.command;case"prompt":return q.type==="prompt"&&A.prompt===q.prompt;case"agent":return q.type==="agent"&&A.prompt===q.prompt;case"http":return q.type==="http"&&A.url===q.url;case"function":return!1}}function Ij(A){if("statusMessage"in A&&A.statusMessage)return A.statusMessage;switch(A.type){case"command":return A.command;case"prompt":return A.prompt;case"agent":return A.prompt([]);case"http":return A.url;case"callback":return"callback";case"function":return"function"}}function vcA(A){let q=[];if(HA("policySettings")?.allowManagedHooksOnly!==!0){let _=["userSettings","projectSettings","localSettings"],$=new Set;for(let O of _){let H=X2(O);if(H){let J=UK3(H);if($.has(J))continue;$.add(J)}let j=HA(O);if(!j?.hooks)continue;for(let[J,M]of Object.entries(j.hooks))for(let D of M)for(let X of D.hooks)q.push({event:J,config:X,matcher:D.matcher,source:O})}}let z=d1(),w=H51(A,z);for(let[_,$]of w.entries())for(let O of $)for(let H of O.hooks)q.push({event:_,config:H,matcher:O.matcher,source:"sessionHook"});return q}async function kcA(A,q,K="",Y="userSettings"){let w=(HA(Y)??{}).hooks??{},_=w[A]??[],$=_.findIndex((J)=>J.matcher===K),O;if($>=0){O=[..._];let J=O[$];O[$]={matcher:J.matcher,hooks:[...J.hooks,q]}}else O=[..._,{matcher:K,hooks:[q]}];let H={...w,[A]:O},{error:j}=xA(Y,{hooks:H});if(j)throw Error(j.message);yK6()}async function EcA(A){if(A.source==="pluginHook")throw Error("Plugin hooks cannot be removed through settings. Disable the plugin instead.");if(A.source==="sessionHook")throw Error("Session hooks cannot be removed through settings. They are temporary and will be cleared when the session ends.");let q=HA(A.source)??{},K=q.hooks??{},z=(K[A.event]??[]).map(($)=>{if($.matcher===A.matcher){let O=$.hooks.filter((H)=>!oM6(H,A.config));return O.length>0?{...$,hooks:O}:null}return $}).filter(($)=>$!==null),w={...K,[A.event]:z.length>0?z:void 0},_=Object.values(w).some(($)=>$!==void 0);xA(A.source,{...q,hooks:_?w:void 0}),yK6()}function LcA(A){switch(A){case"userSettings":return"User settings (~/.claude/settings.json)";case"projectSettings":return"Project settings (.claude/settings.json)";case"localSettings":return"Local settings (.claude/settings.local.json)";case"pluginHook":return"Plugin hooks (~/.claude/plugins/*/hooks/hooks.json)";case"sessionHook":return"Session hooks (in-memory, temporary)";default:return A}}function j18(A){switch(A){case"userSettings":return"User Settings";case"projectSettings":return"Project Settings";case"localSettings":return"Local Settings";case"pluginHook":return"Plugin Hooks";case"sessionHook":return"Session Hooks";default:return A}}function ycA(A){switch(A){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"pluginHook":return"Plugin";case"sessionHook":return"Session";default:return A}}function RcA(A,q,K){let Y=DK6.reduce((z,w,_)=>{return z[w]=_,z},{});return[...A].sort((z,w)=>{let _=q[K]?.[z]||[],$=q[K]?.[w]||[],O=Array.from(new Set(_.map((D)=>D.source))),H=Array.from(new Set($.map((D)=>D.source))),j=(D)=>D==="pluginHook"?999:Y[D],J=Math.min(...O.map(j)),M=Math.min(...H.map(j));if(J!==M)return J-M;return z.localeCompare(w)})}var Jm=k(()=>{GA();F2();RK6();Ld();Q1()});function J18(){let A=HA("policySettings");if(A?.disableAllHooks===!0)return{};if(A?.allowManagedHooksOnly===!0)return A.hooks??{};let q=BA();if(q.disableAllHooks===!0)return A?.hooks??{};return q.hooks??{}}function zR(){let A=HA("policySettings");if(A?.allowManagedHooksOnly===!0)return!0;if(BA().disableAllHooks===!0&&A?.disableAllHooks!==!0)return!0;return!1}function bI6(){return HA("policySettings")?.disableAllHooks===!0}function M18(A){if(!A)return null;let q={},K=Object.keys(A).sort();for(let Y of K){let z=A[Y];if(!z)continue;let w=[...z].sort((_,$)=>{let O=_.matcher||"",H=$.matcher||"";return O.localeCompare(H)});q[Y]=w.map((_)=>({matcher:_.matcher,hooks:[..._.hooks].sort(($,O)=>Ij($).localeCompare(Ij(O)))}))}return q}function D18(){let A=J18();Js=M18(A)}function yK6(){HM();let A=J18();Js=M18(A)}function ScA(){if(Js===null)return null;let A=M18(J18()),q=U6(Js),K=U6(A);if(q===K)return null;let Y=[],z=new Set(Object.keys(Js||{})),w=new Set(Object.keys(A||{}));for(let _ of w)if(!z.has(_))Y.push(`Added hooks for event: ${_}`);for(let _ of z)if(!w.has(_))Y.push(`Removed all hooks for event: ${_}`);for(let _ of z)if(w.has(_)){let $=Js?.[_]||[],O=A?.[_]||[];if(U6($)!==U6(O)){let H=[],j=new Map($.map((M)=>[M.matcher||"",M])),J=new Map(O.map((M)=>[M.matcher||"",M]));for(let[M]of J)if(!j.has(M))H.push(`  - Added matcher: ${M||"(no matcher)"}`);for(let[M]of j)if(!J.has(M))H.push(`  - Removed matcher: ${M||"(no matcher)"}`);for(let[M,D]of J)if(j.has(M)){let X=j.get(M);if(U6(X.hooks)!==U6(D.hooks))H.push(`  - Modified hooks for matcher: ${M||"(no matcher)"}`)}if(H.length>0)Y.push(`Modified hooks for event: ${_}`),Y.push(...H);else Y.push(`Modified hooks for event: ${_}`)}}return Y.length>0?Y.join(`
`):"Hooks configuration has been modified"}function xI6(){if(Js===null)D18();return Js}var Js=null;var RK6=k(()=>{GA();Jm();Q1();a1()});import{isAbsolute as pK3,join as uI6,normalize as IcA,sep as bcA}from"path";function G9(){let A=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if($1(A))return!1;if(dz(A))return!0;if($1(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let q=h7();if(q.autoMemoryEnabled!==void 0)return q.autoMemoryEnabled;return!0}function yd(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return OA()}function X18(){let A=process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE;if(!A)return;let q=IcA(A).replace(/[/\\]+$/,"");if(!pK3(q)||q.length<3||/^[A-Za-z]:$/.test(q)||q.startsWith("\\\\")||q.startsWith("//")||q.includes("\x00"))return;return(q+bcA).normalize("NFC")}function j51(){return X18()!==void 0}function ucA(){return y0(Uz())??Uz()}function mD(){let A=X18();if(A)return A;let q=uI6(yd(),"projects");return(uI6(q,ID(ucA()),xcA)+bcA).normalize("NFC")}function J51(){let A=X18();if(A)return uI6(A,hcA);let q=uI6(yd(),"projects");return uI6(q,ID(ucA()),xcA,hcA)}function BI6(A){return IcA(A).startsWith(mD())}var xcA="memory",hcA="MEMORY.md";var GJ=k(()=>{Q1();U3();Z8();GA();Kz()});function dK3(){return process.argv.includes("--agent-teams")}function Z7(){if(!$1(process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS)&&!dK3())return!1;if(!p8("tengu_amber_flint",!0))return!1;return!0}var uY=k(()=>{rA();Z8()});function cK3(A){var q=A==null?0:A.length;return q?A[q-1]:void 0}var cV;var aM6=k(()=>{cV=cK3});import BcA from"node:process";function P18(){let{env:A}=BcA,{TERM:q,TERM_PROGRAM:K}=A;if(BcA.platform!=="win32")return q!=="linux";return Boolean(A.WT_SESSION)||Boolean(A.TERMINUS_SUBLIME)||A.ConEmuTask==="{cmd::Cmder}"||K==="Terminus-Sublime"||K==="vscode"||q==="xterm-256color"||q==="alacritty"||q==="rxvt-unicode"||q==="rxvt-unicode-256color"||A.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var mcA=()=>{};var gcA,FcA,lK3,iK3,nK3,rK3,oK3,q1,Acw;var t7=k(()=>{mcA();gcA={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},FcA={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},lK3={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},iK3={...gcA,...FcA},nK3={...gcA,...lK3},rK3=P18(),oK3=rK3?iK3:nK3,q1=oK3,Acw=Object.entries(FcA)});var Yz=C((Y33)=>{var W18=Symbol.for("yaml.alias"),QcA=Symbol.for("yaml.document"),M51=Symbol.for("yaml.map"),UcA=Symbol.for("yaml.pair"),Z18=Symbol.for("yaml.scalar"),D51=Symbol.for("yaml.seq"),Rd=Symbol.for("yaml.node.type"),aK3=(A)=>!!A&&typeof A==="object"&&A[Rd]===W18,sK3=(A)=>!!A&&typeof A==="object"&&A[Rd]===QcA,tK3=(A)=>!!A&&typeof A==="object"&&A[Rd]===M51,eK3=(A)=>!!A&&typeof A==="object"&&A[Rd]===UcA,pcA=(A)=>!!A&&typeof A==="object"&&A[Rd]===Z18,A33=(A)=>!!A&&typeof A==="object"&&A[Rd]===D51;function dcA(A){if(A&&typeof A==="object")switch(A[Rd]){case M51:case D51:return!0}return!1}function q33(A){if(A&&typeof A==="object")switch(A[Rd]){case W18:case M51:case Z18:case D51:return!0}return!1}var K33=(A)=>(pcA(A)||dcA(A))&&!!A.anchor;Y33.ALIAS=W18;Y33.DOC=QcA;Y33.MAP=M51;Y33.NODE_TYPE=Rd;Y33.PAIR=UcA;Y33.SCALAR=Z18;Y33.SEQ=D51;Y33.hasAnchor=K33;Y33.isAlias=aK3;Y33.isCollection=dcA;Y33.isDocument=sK3;Y33.isMap=tK3;Y33.isNode=q33;Y33.isPair=eK3;Y33.isScalar=pcA;Y33.isSeq=A33});var mI6=C((T33)=>{var gD=Yz(),lV=Symbol("break visit"),ccA=Symbol("skip children"),Mm=Symbol("remove node");function X51(A,q){let K=lcA(q);if(gD.isDocument(A)){if(sM6(null,A.contents,K,Object.freeze([A]))===Mm)A.contents=null}else sM6(null,A,K,Object.freeze([]))}X51.BREAK=lV;X51.SKIP=ccA;X51.REMOVE=Mm;function sM6(A,q,K,Y){let z=icA(A,q,K,Y);if(gD.isNode(z)||gD.isPair(z))return ncA(A,Y,z),sM6(A,z,K,Y);if(typeof z!=="symbol"){if(gD.isCollection(q)){Y=Object.freeze(Y.concat(q));for(let w=0;w<q.items.length;++w){let _=sM6(w,q.items[w],K,Y);if(typeof _==="number")w=_-1;else if(_===lV)return lV;else if(_===Mm)q.items.splice(w,1),w-=1}}else if(gD.isPair(q)){Y=Object.freeze(Y.concat(q));let w=sM6("key",q.key,K,Y);if(w===lV)return lV;else if(w===Mm)q.key=null;let _=sM6("value",q.value,K,Y);if(_===lV)return lV;else if(_===Mm)q.value=null}}return z}async function P51(A,q){let K=lcA(q);if(gD.isDocument(A)){if(await tM6(null,A.contents,K,Object.freeze([A]))===Mm)A.contents=null}else await tM6(null,A,K,Object.freeze([]))}P51.BREAK=lV;P51.SKIP=ccA;P51.REMOVE=Mm;async function tM6(A,q,K,Y){let z=await icA(A,q,K,Y);if(gD.isNode(z)||gD.isPair(z))return ncA(A,Y,z),tM6(A,z,K,Y);if(typeof z!=="symbol"){if(gD.isCollection(q)){Y=Object.freeze(Y.concat(q));for(let w=0;w<q.items.length;++w){let _=await tM6(w,q.items[w],K,Y);if(typeof _==="number")w=_-1;else if(_===lV)return lV;else if(_===Mm)q.items.splice(w,1),w-=1}}else if(gD.isPair(q)){Y=Object.freeze(Y.concat(q));let w=await tM6("key",q.key,K,Y);if(w===lV)return lV;else if(w===Mm)q.key=null;let _=await tM6("value",q.value,K,Y);if(_===lV)return lV;else if(_===Mm)q.value=null}}return z}function lcA(A){if(typeof A==="object"&&(A.Collection||A.Node||A.Value))return Object.assign({Alias:A.Node,Map:A.Node,Scalar:A.Node,Seq:A.Node},A.Value&&{Map:A.Value,Scalar:A.Value,Seq:A.Value},A.Collection&&{Map:A.Collection,Seq:A.Collection},A);return A}function icA(A,q,K,Y){if(typeof K==="function")return K(A,q,Y);if(gD.isMap(q))return K.Map?.(A,q,Y);if(gD.isSeq(q))return K.Seq?.(A,q,Y);if(gD.isPair(q))return K.Pair?.(A,q,Y);if(gD.isScalar(q))return K.Scalar?.(A,q,Y);if(gD.isAlias(q))return K.Alias?.(A,q,Y);return}function ncA(A,q,K){let Y=q[q.length-1];if(gD.isCollection(Y))Y.items[A]=K;else if(gD.isPair(Y))if(A==="key")Y.key=K;else Y.value=K;else if(gD.isDocument(Y))Y.contents=K;else{let z=gD.isAlias(Y)?"alias":"scalar";throw Error(`Cannot replace node with ${z} parent`)}}T33.visit=X51;T33.visitAsync=P51});var G18=C((L33)=>{var rcA=Yz(),v33=mI6(),k33={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},E33=(A)=>A.replace(/[!,[\]{}]/g,(q)=>k33[q]);class wR{constructor(A,q){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wR.defaultYaml,A),this.tags=Object.assign({},wR.defaultTags,q)}clone(){let A=new wR(this.yaml,this.tags);return A.docStart=this.docStart,A}atDocument(){let A=new wR(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wR.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wR.defaultTags);break}return A}add(A,q){if(this.atNextDocument)this.yaml={explicit:wR.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wR.defaultTags),this.atNextDocument=!1;let K=A.trim().split(/[ \t]+/),Y=K.shift();switch(Y){case"%TAG":{if(K.length!==2){if(q(0,"%TAG directive should contain exactly two parts"),K.length<2)return!1}let[z,w]=K;return this.tags[z]=w,!0}case"%YAML":{if(this.yaml.explicit=!0,K.length!==1)return q(0,"%YAML directive should contain exactly one part"),!1;let[z]=K;if(z==="1.1"||z==="1.2")return this.yaml.version=z,!0;else{let w=/^\d+\.\d+$/.test(z);return q(6,`Unsupported YAML version ${z}`,w),!1}}default:return q(0,`Unknown directive ${Y}`,!0),!1}}tagName(A,q){if(A==="!")return"!";if(A[0]!=="!")return q(`Not a valid tag: ${A}`),null;if(A[1]==="<"){let w=A.slice(2,-1);if(w==="!"||w==="!!")return q(`Verbatim tags aren't resolved, so ${A} is invalid.`),null;if(A[A.length-1]!==">")q("Verbatim tags must end with a >");return w}let[,K,Y]=A.match(/^(.*!)([^!]*)$/s);if(!Y)q(`The ${A} tag has no suffix`);let z=this.tags[K];if(z)try{return z+decodeURIComponent(Y)}catch(w){return q(String(w)),null}if(K==="!")return A;return q(`Could not resolve tag: ${A}`),null}tagString(A){for(let[q,K]of Object.entries(this.tags))if(A.startsWith(K))return q+E33(A.substring(K.length));return A[0]==="!"?A:`!<${A}>`}toString(A){let q=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],K=Object.entries(this.tags),Y;if(A&&K.length>0&&rcA.isNode(A.contents)){let z={};v33.visit(A.contents,(w,_)=>{if(rcA.isNode(_)&&_.tag)z[_.tag]=!0}),Y=Object.keys(z)}else Y=[];for(let[z,w]of K){if(z==="!!"&&w==="tag:yaml.org,2002:")continue;if(!A||Y.some((_)=>_.startsWith(w)))q.push(`%TAG ${z} ${w}`)}return q.join(`
`)}}wR.defaultYaml={explicit:!1,version:"1.2"};wR.defaultTags={"!!":"tag:yaml.org,2002:"};L33.Directives=wR});var W51=C((h33)=>{var ocA=Yz(),R33=mI6();function S33(A){if(/[\x00-\x19\s,[\]{}]/.test(A)){let K=`Anchor must not contain whitespace or control characters: ${JSON.stringify(A)}`;throw Error(K)}return!0}function acA(A){let q=new Set;return R33.visit(A,{Value(K,Y){if(Y.anchor)q.add(Y.anchor)}}),q}function scA(A,q){for(let K=1;;++K){let Y=`${A}${K}`;if(!q.has(Y))return Y}}function C33(A,q){let K=[],Y=new Map,z=null;return{onAnchor:(w)=>{K.push(w),z??(z=acA(A));let _=scA(q,z);return z.add(_),_},setAnchors:()=>{for(let w of K){let _=Y.get(w);if(typeof _==="object"&&_.anchor&&(ocA.isScalar(_.node)||ocA.isCollection(_.node)))_.node.anchor=_.anchor;else{let $=Error("Failed to resolve repeated object (this should not happen)");throw $.source=w,$}}},sourceObjects:Y}}h33.anchorIsValid=S33;h33.anchorNames=acA;h33.createNodeAnchors=C33;h33.findNewAnchor=scA});var f18=C((B33)=>{function gI6(A,q,K,Y){if(Y&&typeof Y==="object")if(Array.isArray(Y))for(let z=0,w=Y.length;z<w;++z){let _=Y[z],$=gI6(A,Y,String(z),_);if($===void 0)delete Y[z];else if($!==_)Y[z]=$}else if(Y instanceof Map)for(let z of Array.from(Y.keys())){let w=Y.get(z),_=gI6(A,Y,z,w);if(_===void 0)Y.delete(z);else if(_!==w)Y.set(z,_)}else if(Y instanceof Set)for(let z of Array.from(Y)){let w=gI6(A,Y,z,z);if(w===void 0)Y.delete(z);else if(w!==z)Y.delete(z),Y.add(w)}else for(let[z,w]of Object.entries(Y)){let _=gI6(A,Y,z,w);if(_===void 0)delete Y[z];else if(_!==w)Y[z]=_}return A.call(q,K,Y)}B33.applyReviver=gI6});var Ms=C((F33)=>{var g33=Yz();function tcA(A,q,K){if(Array.isArray(A))return A.map((Y,z)=>tcA(Y,String(z),K));if(A&&typeof A.toJSON==="function"){if(!K||!g33.hasAnchor(A))return A.toJSON(q,K);let Y={aliasCount:0,count:1,res:void 0};K.anchors.set(A,Y),K.onCreate=(w)=>{Y.res=w,delete K.onCreate};let z=A.toJSON(q,K);if(K.onCreate)K.onCreate(z);return z}if(typeof A==="bigint"&&!K?.keep)return Number(A);return A}F33.toJS=tcA});var Z51=C((d33)=>{var U33=f18(),ecA=Yz(),p33=Ms();class AlA{constructor(A){Object.defineProperty(this,ecA.NODE_TYPE,{value:A})}clone(){let A=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)A.range=this.range.slice();return A}toJS(A,{mapAsMap:q,maxAliasCount:K,onAnchor:Y,reviver:z}={}){if(!ecA.isDocument(A))throw TypeError("A document argument is required");let w={anchors:new Map,doc:A,keep:!0,mapAsMap:q===!0,mapKeyWarned:!1,maxAliasCount:typeof K==="number"?K:100},_=p33.toJS(this,"",w);if(typeof Y==="function")for(let{count:$,res:O}of w.anchors.values())Y(O,$);return typeof z==="function"?U33.applyReviver(z,{"":_},"",_):_}}d33.NodeBase=AlA});var FI6=C((o33)=>{var l33=W51(),i33=mI6(),eM6=Yz(),n33=Z51(),r33=Ms();class qlA extends n33.NodeBase{constructor(A){super(eM6.ALIAS);this.source=A,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(A,q){let K;if(q?.aliasResolveCache)K=q.aliasResolveCache;else if(K=[],i33.visit(A,{Node:(z,w)=>{if(eM6.isAlias(w)||eM6.hasAnchor(w))K.push(w)}}),q)q.aliasResolveCache=K;let Y=void 0;for(let z of K){if(z===this)break;if(z.anchor===this.source)Y=z}return Y}toJSON(A,q){if(!q)return{source:this.source};let{anchors:K,doc:Y,maxAliasCount:z}=q,w=this.resolve(Y,q);if(!w){let $=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError($)}let _=K.get(w);if(!_)r33.toJS(w,null,q),_=K.get(w);if(!_||_.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(z>=0){if(_.count+=1,_.aliasCount===0)_.aliasCount=G51(Y,w,K);if(_.count*_.aliasCount>z)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return _.res}toString(A,q,K){let Y=`*${this.source}`;if(A){if(l33.anchorIsValid(this.source),A.options.verifyAliasOrder&&!A.anchors.has(this.source)){let z=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(z)}if(A.implicitKey)return`${Y} `}return Y}}function G51(A,q,K){if(eM6.isAlias(q)){let Y=q.resolve(A),z=K&&Y&&K.get(Y);return z?z.count*z.aliasCount:0}else if(eM6.isCollection(q)){let Y=0;for(let z of q.items){let w=G51(A,z,K);if(w>Y)Y=w}return Y}else if(eM6.isPair(q)){let Y=G51(A,q.key,K),z=G51(A,q.value,K);return Math.max(Y,z)}return 1}o33.Alias=qlA});var GM=C((q53)=>{var s33=Yz(),t33=Z51(),e33=Ms(),A53=(A)=>!A||typeof A!=="function"&&typeof A!=="object";class SK6 extends t33.NodeBase{constructor(A){super(s33.SCALAR);this.value=A}toJSON(A,q){return q?.keep?this.value:e33.toJS(this.value,A,q)}toString(){return String(this.value)}}SK6.BLOCK_FOLDED="BLOCK_FOLDED";SK6.BLOCK_LITERAL="BLOCK_LITERAL";SK6.PLAIN="PLAIN";SK6.QUOTE_DOUBLE="QUOTE_DOUBLE";SK6.QUOTE_SINGLE="QUOTE_SINGLE";q53.Scalar=SK6;q53.isScalarValue=A53});var QI6=C((O53)=>{var z53=FI6(),CK6=Yz(),KlA=GM(),w53="tag:yaml.org,2002:";function _53(A,q,K){if(q){let Y=K.filter((w)=>w.tag===q),z=Y.find((w)=>!w.format)??Y[0];if(!z)throw Error(`Tag ${q} not found`);return z}return K.find((Y)=>Y.identify?.(A)&&!Y.format)}function $53(A,q,K){if(CK6.isDocument(A))A=A.contents;if(CK6.isNode(A))return A;if(CK6.isPair(A)){let J=K.schema[CK6.MAP].createNode?.(K.schema,null,K);return J.items.push(A),J}if(A instanceof String||A instanceof Number||A instanceof Boolean||typeof BigInt<"u"&&A instanceof BigInt)A=A.valueOf();let{aliasDuplicateObjects:Y,onAnchor:z,onTagObj:w,schema:_,sourceObjects:$}=K,O=void 0;if(Y&&A&&typeof A==="object")if(O=$.get(A),O)return O.anchor??(O.anchor=z(A)),new z53.Alias(O.anchor);else O={anchor:null,node:null},$.set(A,O);if(q?.startsWith("!!"))q=w53+q.slice(2);let H=_53(A,q,_.tags);if(!H){if(A&&typeof A.toJSON==="function")A=A.toJSON();if(!A||typeof A!=="object"){let J=new KlA.Scalar(A);if(O)O.node=J;return J}H=A instanceof Map?_[CK6.MAP]:(Symbol.iterator in Object(A))?_[CK6.SEQ]:_[CK6.MAP]}if(w)w(H),delete K.onTagObj;let j=H?.createNode?H.createNode(K.schema,A,K):typeof H?.nodeClass?.from==="function"?H.nodeClass.from(K.schema,A,K):new KlA.Scalar(A);if(q)j.tag=q;else if(!H.default)j.tag=H.tag;if(O)O.node=j;return j}O53.createNode=$53});var f51=C((M53)=>{var j53=QI6(),Dm=Yz(),J53=Z51();function T18(A,q,K){let Y=K;for(let z=q.length-1;z>=0;--z){let w=q[z];if(typeof w==="number"&&Number.isInteger(w)&&w>=0){let _=[];_[w]=Y,Y=_}else Y=new Map([[w,Y]])}return j53.createNode(Y,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:A,sourceObjects:new Map})}var YlA=(A)=>A==null||typeof A==="object"&&!!A[Symbol.iterator]().next().done;class zlA extends J53.NodeBase{constructor(A,q){super(A);Object.defineProperty(this,"schema",{value:q,configurable:!0,enumerable:!1,writable:!0})}clone(A){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(A)q.schema=A;if(q.items=q.items.map((K)=>Dm.isNode(K)||Dm.isPair(K)?K.clone(A):K),this.range)q.range=this.range.slice();return q}addIn(A,q){if(YlA(A))this.add(q);else{let[K,...Y]=A,z=this.get(K,!0);if(Dm.isCollection(z))z.addIn(Y,q);else if(z===void 0&&this.schema)this.set(K,T18(this.schema,Y,q));else throw Error(`Expected YAML collection at ${K}. Remaining path: ${Y}`)}}deleteIn(A){let[q,...K]=A;if(K.length===0)return this.delete(q);let Y=this.get(q,!0);if(Dm.isCollection(Y))return Y.deleteIn(K);else throw Error(`Expected YAML collection at ${q}. Remaining path: ${K}`)}getIn(A,q){let[K,...Y]=A,z=this.get(K,!0);if(Y.length===0)return!q&&Dm.isScalar(z)?z.value:z;else return Dm.isCollection(z)?z.getIn(Y,q):void 0}hasAllNullValues(A){return this.items.every((q)=>{if(!Dm.isPair(q))return!1;let K=q.value;return K==null||A&&Dm.isScalar(K)&&K.value==null&&!K.commentBefore&&!K.comment&&!K.tag})}hasIn(A){let[q,...K]=A;if(K.length===0)return this.has(q);let Y=this.get(q,!0);return Dm.isCollection(Y)?Y.hasIn(K):!1}setIn(A,q){let[K,...Y]=A;if(Y.length===0)this.set(K,q);else{let z=this.get(K,!0);if(Dm.isCollection(z))z.setIn(Y,q);else if(z===void 0&&this.schema)this.set(K,T18(this.schema,Y,q));else throw Error(`Expected YAML collection at ${K}. Remaining path: ${Y}`)}}}M53.Collection=zlA;M53.collectionFromPath=T18;M53.isEmptyPath=YlA});var UI6=C((G53)=>{var W53=(A)=>A.replace(/^(?!$)(?: $)?/gm,"#");function V18(A,q){if(/^\n+$/.test(A))return A.substring(1);return q?A.replace(/^(?! *$)/gm,q):A}var Z53=(A,q,K)=>A.endsWith(`
`)?V18(K,q):K.includes(`
`)?`
`+V18(K,q):(A.endsWith(" ")?"":" ")+K;G53.indentComment=V18;G53.lineComment=Z53;G53.stringifyComment=W53});var _lA=C((v53)=>{function N53(A,q,K="flow",{indentAtStart:Y,lineWidth:z=80,minContentWidth:w=20,onFold:_,onOverflow:$}={}){if(!z||z<0)return A;if(z<w)w=0;let O=Math.max(1+w,1+z-q.length);if(A.length<=O)return A;let H=[],j={},J=z-q.length;if(typeof Y==="number")if(Y>z-Math.max(2,w))H.push(0);else J=z-Y;let M=void 0,D=void 0,X=!1,P=-1,W=-1,Z=-1;if(K==="block"){if(P=wlA(A,P,q.length),P!==-1)J=P+O}for(let f;f=A[P+=1];){if(K==="quoted"&&f==="\\"){switch(W=P,A[P+1]){case"x":P+=3;break;case"u":P+=5;break;case"U":P+=9;break;default:P+=1}Z=P}if(f===`
`){if(K==="block")P=wlA(A,P,q.length);J=P+q.length+O,M=void 0}else{if(f===" "&&D&&D!==" "&&D!==`
`&&D!=="\t"){let V=A[P+1];if(V&&V!==" "&&V!==`
`&&V!=="\t")M=P}if(P>=J)if(M)H.push(M),J=M+O,M=void 0;else if(K==="quoted"){while(D===" "||D==="\t")D=f,f=A[P+=1],X=!0;let V=P>Z+1?P-2:W-1;if(j[V])return A;H.push(V),j[V]=!0,J=V+O,M=void 0}else X=!0}D=f}if(X&&$)$();if(H.length===0)return A;if(_)_();let G=A.slice(0,H[0]);for(let f=0;f<H.length;++f){let V=H[f],N=H[f+1]||A.length;if(V===0)G=`
${q}${A.slice(0,N)}`;else{if(K==="quoted"&&j[V])G+=`${A[V]}\\`;G+=`
${q}${A.slice(V+1,N)}`}}return G}function wlA(A,q,K){let Y=q,z=q+1,w=A[z];while(w===" "||w==="\t")if(q<z+K)w=A[++q];else{do w=A[++q];while(w&&w!==`
`);Y=q,z=q+1,w=A[z]}return Y}v53.FOLD_BLOCK="block";v53.FOLD_FLOW="flow";v53.FOLD_QUOTED="quoted";v53.foldFlowLines=N53});var dI6=C((h53)=>{var uI=GM(),Ds=_lA(),V51=(A,q)=>({indentAtStart:q?A.indent.length:A.indentAtStart,lineWidth:A.options.lineWidth,minContentWidth:A.options.minContentWidth}),N51=(A)=>/^(%|---|\.\.\.)/m.test(A);function R53(A,q,K){if(!q||q<0)return!1;let Y=q-K,z=A.length;if(z<=Y)return!1;for(let w=0,_=0;w<z;++w)if(A[w]===`
`){if(w-_>Y)return!0;if(_=w+1,z-_<=Y)return!1}return!0}function pI6(A,q){let K=JSON.stringify(A);if(q.options.doubleQuotedAsJSON)return K;let{implicitKey:Y}=q,z=q.options.doubleQuotedMinMultiLineLength,w=q.indent||(N51(A)?"  ":""),_="",$=0;for(let O=0,H=K[O];H;H=K[++O]){if(H===" "&&K[O+1]==="\\"&&K[O+2]==="n")_+=K.slice($,O)+"\\ ",O+=1,$=O,H="\\";if(H==="\\")switch(K[O+1]){case"u":{_+=K.slice($,O);let j=K.substr(O+2,4);switch(j){case"0000":_+="\\0";break;case"0007":_+="\\a";break;case"000b":_+="\\v";break;case"001b":_+="\\e";break;case"0085":_+="\\N";break;case"00a0":_+="\\_";break;case"2028":_+="\\L";break;case"2029":_+="\\P";break;default:if(j.substr(0,2)==="00")_+="\\x"+j.substr(2);else _+=K.substr(O,6)}O+=5,$=O+1}break;case"n":if(Y||K[O+2]==='"'||K.length<z)O+=1;else{_+=K.slice($,O)+`

`;while(K[O+2]==="\\"&&K[O+3]==="n"&&K[O+4]!=='"')_+=`
`,O+=2;if(_+=w,K[O+2]===" ")_+="\\";O+=1,$=O+1}break;default:O+=1}}return _=$?_+K.slice($):K,Y?_:Ds.foldFlowLines(_,w,Ds.FOLD_QUOTED,V51(q,!1))}function N18(A,q){if(q.options.singleQuote===!1||q.implicitKey&&A.includes(`
`)||/[ \t]\n|\n[ \t]/.test(A))return pI6(A,q);let K=q.indent||(N51(A)?"  ":""),Y="'"+A.replace(/'/g,"''").replace(/\n+/g,`$&
${K}`)+"'";return q.implicitKey?Y:Ds.foldFlowLines(Y,K,Ds.FOLD_FLOW,V51(q,!1))}function AD6(A,q){let{singleQuote:K}=q.options,Y;if(K===!1)Y=pI6;else{let z=A.includes('"'),w=A.includes("'");if(z&&!w)Y=N18;else if(w&&!z)Y=pI6;else Y=K?N18:pI6}return Y(A,q)}var v18;try{v18=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{v18=/\n+(?!\n|$)/g}function T51({comment:A,type:q,value:K},Y,z,w){let{blockQuote:_,commentString:$,lineWidth:O}=Y.options;if(!_||/\n[\t ]+$/.test(K))return AD6(K,Y);let H=Y.indent||(Y.forceBlockIndent||N51(K)?"  ":""),j=_==="literal"?!0:_==="folded"||q===uI.Scalar.BLOCK_FOLDED?!1:q===uI.Scalar.BLOCK_LITERAL?!0:!R53(K,O,H.length);if(!K)return j?`|
`:`>
`;let J,M;for(M=K.length;M>0;--M){let N=K[M-1];if(N!==`
`&&N!=="\t"&&N!==" ")break}let D=K.substring(M),X=D.indexOf(`
`);if(X===-1)J="-";else if(K===D||X!==D.length-1){if(J="+",w)w()}else J="";if(D){if(K=K.slice(0,-D.length),D[D.length-1]===`
`)D=D.slice(0,-1);D=D.replace(v18,`$&${H}`)}let P=!1,W,Z=-1;for(W=0;W<K.length;++W){let N=K[W];if(N===" ")P=!0;else if(N===`
`)Z=W;else break}let G=K.substring(0,Z<W?Z+1:W);if(G)K=K.substring(G.length),G=G.replace(/\n+/g,`$&${H}`);let V=(P?H?"2":"1":"")+J;if(A){if(V+=" "+$(A.replace(/ ?[\r\n]+/g," ")),z)z()}if(!j){let N=K.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${H}`),v=!1,y=V51(Y,!0);if(_!=="folded"&&q!==uI.Scalar.BLOCK_FOLDED)y.onOverflow=()=>{v=!0};let R=Ds.foldFlowLines(`${G}${N}${D}`,H,Ds.FOLD_BLOCK,y);if(!v)return`>${V}
${H}${R}`}return K=K.replace(/\n+/g,`$&${H}`),`|${V}
${H}${G}${K}${D}`}function S53(A,q,K,Y){let{type:z,value:w}=A,{actualString:_,implicitKey:$,indent:O,indentStep:H,inFlow:j}=q;if($&&w.includes(`
`)||j&&/[[\]{},]/.test(w))return AD6(w,q);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(w))return $||j||!w.includes(`
`)?AD6(w,q):T51(A,q,K,Y);if(!$&&!j&&z!==uI.Scalar.PLAIN&&w.includes(`
`))return T51(A,q,K,Y);if(N51(w)){if(O==="")return q.forceBlockIndent=!0,T51(A,q,K,Y);else if($&&O===H)return AD6(w,q)}let J=w.replace(/\n+/g,`$&
${O}`);if(_){let M=(P)=>P.default&&P.tag!=="tag:yaml.org,2002:str"&&P.test?.test(J),{compat:D,tags:X}=q.doc.schema;if(X.some(M)||D?.some(M))return AD6(w,q)}return $?J:Ds.foldFlowLines(J,O,Ds.FOLD_FLOW,V51(q,!1))}function C53(A,q,K,Y){let{implicitKey:z,inFlow:w}=q,_=typeof A.value==="string"?A:Object.assign({},A,{value:String(A.value)}),{type:$}=A;if($!==uI.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(_.value))$=uI.Scalar.QUOTE_DOUBLE}let O=(j)=>{switch(j){case uI.Scalar.BLOCK_FOLDED:case uI.Scalar.BLOCK_LITERAL:return z||w?AD6(_.value,q):T51(_,q,K,Y);case uI.Scalar.QUOTE_DOUBLE:return pI6(_.value,q);case uI.Scalar.QUOTE_SINGLE:return N18(_.value,q);case uI.Scalar.PLAIN:return S53(_,q,K,Y);default:return null}},H=O($);if(H===null){let{defaultKeyType:j,defaultStringType:J}=q.options,M=z&&j||J;if(H=O(M),H===null)throw Error(`Unsupported default string type ${M}`)}return H}h53.stringifyString=C53});var cI6=C((Q53)=>{var b53=W51(),Xs=Yz(),x53=UI6(),u53=dI6();function B53(A,q){let K=Object.assign({blockQuote:!0,commentString:x53.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},A.schema.toStringOptions,q),Y;switch(K.collectionStyle){case"block":Y=!1;break;case"flow":Y=!0;break;default:Y=null}return{anchors:new Set,doc:A,flowCollectionPadding:K.flowCollectionPadding?" ":"",indent:"",indentStep:typeof K.indent==="number"?" ".repeat(K.indent):"  ",inFlow:Y,options:K}}function m53(A,q){if(q.tag){let z=A.filter((w)=>w.tag===q.tag);if(z.length>0)return z.find((w)=>w.format===q.format)??z[0]}let K=void 0,Y;if(Xs.isScalar(q)){Y=q.value;let z=A.filter((w)=>w.identify?.(Y));if(z.length>1){let w=z.filter((_)=>_.test);if(w.length>0)z=w}K=z.find((w)=>w.format===q.format)??z.find((w)=>!w.format)}else Y=q,K=A.find((z)=>z.nodeClass&&Y instanceof z.nodeClass);if(!K){let z=Y?.constructor?.name??(Y===null?"null":typeof Y);throw Error(`Tag not resolved for ${z} value`)}return K}function g53(A,q,{anchors:K,doc:Y}){if(!Y.directives)return"";let z=[],w=(Xs.isScalar(A)||Xs.isCollection(A))&&A.anchor;if(w&&b53.anchorIsValid(w))K.add(w),z.push(`&${w}`);let _=A.tag??(q.default?null:q.tag);if(_)z.push(Y.directives.tagString(_));return z.join(" ")}function F53(A,q,K,Y){if(Xs.isPair(A))return A.toString(q,K,Y);if(Xs.isAlias(A)){if(q.doc.directives)return A.toString(q);if(q.resolvedAliases?.has(A))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(q.resolvedAliases)q.resolvedAliases.add(A);else q.resolvedAliases=new Set([A]);A=A.resolve(q.doc)}}let z=void 0,w=Xs.isNode(A)?A:q.doc.createNode(A,{onTagObj:(O)=>z=O});z??(z=m53(q.doc.schema.tags,w));let _=g53(w,z,q);if(_.length>0)q.indentAtStart=(q.indentAtStart??0)+_.length+1;let $=typeof z.stringify==="function"?z.stringify(w,q,K,Y):Xs.isScalar(w)?u53.stringifyString(w,q,K,Y):w.toString(q,K,Y);if(!_)return $;return Xs.isScalar(w)||$[0]==="{"||$[0]==="["?`${_} ${$}`:`${_}
${q.indent}${$}`}Q53.createStringifyContext=B53;Q53.stringify=F53});var HlA=C((c53)=>{var Sd=Yz(),$lA=GM(),OlA=cI6(),lI6=UI6();function d53({key:A,value:q},K,Y,z){let{allNullValues:w,doc:_,indent:$,indentStep:O,options:{commentString:H,indentSeq:j,simpleKeys:J}}=K,M=Sd.isNode(A)&&A.comment||null;if(J){if(M)throw Error("With simple keys, key nodes cannot have comments");if(Sd.isCollection(A)||!Sd.isNode(A)&&typeof A==="object")throw Error("With simple keys, collection cannot be used as a key value")}let D=!J&&(!A||M&&q==null&&!K.inFlow||Sd.isCollection(A)||(Sd.isScalar(A)?A.type===$lA.Scalar.BLOCK_FOLDED||A.type===$lA.Scalar.BLOCK_LITERAL:typeof A==="object"));K=Object.assign({},K,{allNullValues:!1,implicitKey:!D&&(J||!w),indent:$+O});let X=!1,P=!1,W=OlA.stringify(A,K,()=>X=!0,()=>P=!0);if(!D&&!K.inFlow&&W.length>1024){if(J)throw Error("With simple keys, single line scalar must not span more than 1024 characters");D=!0}if(K.inFlow){if(w||q==null){if(X&&Y)Y();return W===""?"?":D?`? ${W}`:W}}else if(w&&!J||q==null&&D){if(W=`? ${W}`,M&&!X)W+=lI6.lineComment(W,K.indent,H(M));else if(P&&z)z();return W}if(X)M=null;if(D){if(M)W+=lI6.lineComment(W,K.indent,H(M));W=`? ${W}
${$}:`}else if(W=`${W}:`,M)W+=lI6.lineComment(W,K.indent,H(M));let Z,G,f;if(Sd.isNode(q))Z=!!q.spaceBefore,G=q.commentBefore,f=q.comment;else if(Z=!1,G=null,f=null,q&&typeof q==="object")q=_.createNode(q);if(K.implicitKey=!1,!D&&!M&&Sd.isScalar(q))K.indentAtStart=W.length+1;if(P=!1,!j&&O.length>=2&&!K.inFlow&&!D&&Sd.isSeq(q)&&!q.flow&&!q.tag&&!q.anchor)K.indent=K.indent.substring(2);let V=!1,N=OlA.stringify(q,K,()=>V=!0,()=>P=!0),v=" ";if(M||Z||G){if(v=Z?`
`:"",G){let y=H(G);v+=`
${lI6.indentComment(y,K.indent)}`}if(N===""&&!K.inFlow){if(v===`
`)v=`

`}else v+=`
${K.indent}`}else if(!D&&Sd.isCollection(q)){let y=N[0],R=N.indexOf(`
`),h=R!==-1,B=K.inFlow??q.flow??q.items.length===0;if(h||!B){let x=!1;if(h&&(y==="&"||y==="!")){let F=N.indexOf(" ");if(y==="&"&&F!==-1&&F<R&&N[F+1]==="!")F=N.indexOf(" ",F+1);if(F===-1||R<F)x=!0}if(!x)v=`
${K.indent}`}}else if(N===""||N[0]===`
`)v="";if(W+=v+N,K.inFlow){if(V&&Y)Y()}else if(f&&!V)W+=lI6.lineComment(W,K.indent,H(f));else if(P&&z)z();return W}c53.stringifyPair=d53});var k18=C((r53)=>{var jlA=g6("process");function i53(A,...q){if(A==="debug")console.log(...q)}function n53(A,q){if(A==="debug"||A==="warn")if(typeof jlA.emitWarning==="function")jlA.emitWarning(q);else console.warn(q)}r53.debug=i53;r53.warn=n53});var E51=C((t53)=>{var iI6=Yz(),JlA=GM(),v51="<<",k51={identify:(A)=>A===v51||typeof A==="symbol"&&A.description===v51,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new JlA.Scalar(Symbol(v51)),{addToJSMap:MlA}),stringify:()=>v51},s53=(A,q)=>(k51.identify(q)||iI6.isScalar(q)&&(!q.type||q.type===JlA.Scalar.PLAIN)&&k51.identify(q.value))&&A?.doc.schema.tags.some((K)=>K.tag===k51.tag&&K.default);function MlA(A,q,K){if(K=A&&iI6.isAlias(K)?K.resolve(A.doc):K,iI6.isSeq(K))for(let Y of K.items)E18(A,q,Y);else if(Array.isArray(K))for(let Y of K)E18(A,q,Y);else E18(A,q,K)}function E18(A,q,K){let Y=A&&iI6.isAlias(K)?K.resolve(A.doc):K;if(!iI6.isMap(Y))throw Error("Merge sources must be maps or map aliases");let z=Y.toJSON(null,A,Map);for(let[w,_]of z)if(q instanceof Map){if(!q.has(w))q.set(w,_)}else if(q instanceof Set)q.add(w);else if(!Object.prototype.hasOwnProperty.call(q,w))Object.defineProperty(q,w,{value:_,writable:!0,enumerable:!0,configurable:!0});return q}t53.addMergeToJSMap=MlA;t53.isMergeKey=s53;t53.merge=k51});var y18=C((_93)=>{var K93=k18(),DlA=E51(),Y93=cI6(),XlA=Yz(),L18=Ms();function z93(A,q,{key:K,value:Y}){if(XlA.isNode(K)&&K.addToJSMap)K.addToJSMap(A,q,Y);else if(DlA.isMergeKey(A,K))DlA.addMergeToJSMap(A,q,Y);else{let z=L18.toJS(K,"",A);if(q instanceof Map)q.set(z,L18.toJS(Y,z,A));else if(q instanceof Set)q.add(z);else{let w=w93(K,z,A),_=L18.toJS(Y,w,A);if(w in q)Object.defineProperty(q,w,{value:_,writable:!0,enumerable:!0,configurable:!0});else q[w]=_}}return q}function w93(A,q,K){if(q===null)return"";if(typeof q!=="object")return String(q);if(XlA.isNode(A)&&K?.doc){let Y=Y93.createStringifyContext(K.doc,{});Y.anchors=new Set;for(let w of K.anchors.keys())Y.anchors.add(w.anchor);Y.inFlow=!0,Y.inStringifyKey=!0;let z=A.toString(Y);if(!K.mapKeyWarned){let w=JSON.stringify(z);if(w.length>40)w=w.substring(0,36)+'..."';K93.warn(K.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${w}. Set mapAsMap: true to use object keys.`),K.mapKeyWarned=!0}return z}return JSON.stringify(q)}_93.addPairToJSMap=z93});var Ps=C((J93)=>{var PlA=QI6(),O93=HlA(),H93=y18(),L51=Yz();function j93(A,q,K){let Y=PlA.createNode(A,void 0,K),z=PlA.createNode(q,void 0,K);return new y51(Y,z)}class y51{constructor(A,q=null){Object.defineProperty(this,L51.NODE_TYPE,{value:L51.PAIR}),this.key=A,this.value=q}clone(A){let{key:q,value:K}=this;if(L51.isNode(q))q=q.clone(A);if(L51.isNode(K))K=K.clone(A);return new y51(q,K)}toJSON(A,q){let K=q?.mapAsMap?new Map:{};return H93.addPairToJSMap(q,K,this)}toString(A,q,K){return A?.doc?O93.stringifyPair(this,A,q,K):JSON.stringify(this)}}J93.Pair=y51;J93.createPair=j93});var R18=C((Z93)=>{var hK6=Yz(),WlA=cI6(),R51=UI6();function X93(A,q,K){return(q.inFlow??A.flow?W93:P93)(A,q,K)}function P93({comment:A,items:q},K,{blockItemPrefix:Y,flowChars:z,itemIndent:w,onChompKeep:_,onComment:$}){let{indent:O,options:{commentString:H}}=K,j=Object.assign({},K,{indent:w,type:null}),J=!1,M=[];for(let X=0;X<q.length;++X){let P=q[X],W=null;if(hK6.isNode(P)){if(!J&&P.spaceBefore)M.push("");if(S51(K,M,P.commentBefore,J),P.comment)W=P.comment}else if(hK6.isPair(P)){let G=hK6.isNode(P.key)?P.key:null;if(G){if(!J&&G.spaceBefore)M.push("");S51(K,M,G.commentBefore,J)}}J=!1;let Z=WlA.stringify(P,j,()=>W=null,()=>J=!0);if(W)Z+=R51.lineComment(Z,w,H(W));if(J&&W)J=!1;M.push(Y+Z)}let D;if(M.length===0)D=z.start+z.end;else{D=M[0];for(let X=1;X<M.length;++X){let P=M[X];D+=P?`
${O}${P}`:`
`}}if(A){if(D+=`
`+R51.indentComment(H(A),O),$)$()}else if(J&&_)_();return D}function W93({items:A},q,{flowChars:K,itemIndent:Y}){let{indent:z,indentStep:w,flowCollectionPadding:_,options:{commentString:$}}=q;Y+=w;let O=Object.assign({},q,{indent:Y,inFlow:!0,type:null}),H=!1,j=0,J=[];for(let X=0;X<A.length;++X){let P=A[X],W=null;if(hK6.isNode(P)){if(P.spaceBefore)J.push("");if(S51(q,J,P.commentBefore,!1),P.comment)W=P.comment}else if(hK6.isPair(P)){let G=hK6.isNode(P.key)?P.key:null;if(G){if(G.spaceBefore)J.push("");if(S51(q,J,G.commentBefore,!1),G.comment)H=!0}let f=hK6.isNode(P.value)?P.value:null;if(f){if(f.comment)W=f.comment;if(f.commentBefore)H=!0}else if(P.value==null&&G?.comment)W=G.comment}if(W)H=!0;let Z=WlA.stringify(P,O,()=>W=null);if(X<A.length-1)Z+=",";if(W)Z+=R51.lineComment(Z,Y,$(W));if(!H&&(J.length>j||Z.includes(`
`)))H=!0;J.push(Z),j=J.length}let{start:M,end:D}=K;if(J.length===0)return M+D;else{if(!H){let X=J.reduce((P,W)=>P+W.length+2,2);H=q.options.lineWidth>0&&X>q.options.lineWidth}if(H){let X=M;for(let P of J)X+=P?`
${w}${z}${P}`:`
`;return`${X}
${z}${D}`}else return`${M}${_}${J.join(" ")}${_}${D}`}}function S51({indent:A,options:{commentString:q}},K,Y,z){if(Y&&z)Y=Y.replace(/^\n+/,"");if(Y){let w=R51.indentComment(q(Y),A);K.push(w.trimStart())}}Z93.stringifyCollection=X93});var Zs=C((v93)=>{var f93=R18(),T93=y18(),V93=f51(),Ws=Yz(),C51=Ps(),N93=GM();function nI6(A,q){let K=Ws.isScalar(q)?q.value:q;for(let Y of A)if(Ws.isPair(Y)){if(Y.key===q||Y.key===K)return Y;if(Ws.isScalar(Y.key)&&Y.key.value===K)return Y}return}class ZlA extends V93.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(A){super(Ws.MAP,A);this.items=[]}static from(A,q,K){let{keepUndefined:Y,replacer:z}=K,w=new this(A),_=($,O)=>{if(typeof z==="function")O=z.call(q,$,O);else if(Array.isArray(z)&&!z.includes($))return;if(O!==void 0||Y)w.items.push(C51.createPair($,O,K))};if(q instanceof Map)for(let[$,O]of q)_($,O);else if(q&&typeof q==="object")for(let $ of Object.keys(q))_($,q[$]);if(typeof A.sortMapEntries==="function")w.items.sort(A.sortMapEntries);return w}add(A,q){let K;if(Ws.isPair(A))K=A;else if(!A||typeof A!=="object"||!("key"in A))K=new C51.Pair(A,A?.value);else K=new C51.Pair(A.key,A.value);let Y=nI6(this.items,K.key),z=this.schema?.sortMapEntries;if(Y){if(!q)throw Error(`Key ${K.key} already set`);if(Ws.isScalar(Y.value)&&N93.isScalarValue(K.value))Y.value.value=K.value;else Y.value=K.value}else if(z){let w=this.items.findIndex((_)=>z(K,_)<0);if(w===-1)this.items.push(K);else this.items.splice(w,0,K)}else this.items.push(K)}delete(A){let q=nI6(this.items,A);if(!q)return!1;return this.items.splice(this.items.indexOf(q),1).length>0}get(A,q){let Y=nI6(this.items,A)?.value;return(!q&&Ws.isScalar(Y)?Y.value:Y)??void 0}has(A){return!!nI6(this.items,A)}set(A,q){this.add(new C51.Pair(A,q),!0)}toJSON(A,q,K){let Y=K?new K:q?.mapAsMap?new Map:{};if(q?.onCreate)q.onCreate(Y);for(let z of this.items)T93.addPairToJSMap(q,Y,z);return Y}toString(A,q,K){if(!A)return JSON.stringify(this);for(let Y of this.items)if(!Ws.isPair(Y))throw Error(`Map items must all be pairs; found ${JSON.stringify(Y)} instead`);if(!A.allNullValues&&this.hasAllNullValues(!1))A=Object.assign({},A,{allNullValues:!0});return f93.stringifyCollection(this,A,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:A.indent||"",onChompKeep:K,onComment:q})}}v93.YAMLMap=ZlA;v93.findPair=nI6});var qD6=C((R93)=>{var L93=Yz(),GlA=Zs(),y93={collection:"map",default:!0,nodeClass:GlA.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(A,q){if(!L93.isMap(A))q("Expected a mapping for this tag");return A},createNode:(A,q,K)=>GlA.YAMLMap.from(A,q,K)};R93.map=y93});var Gs=C((u93)=>{var C93=QI6(),h93=R18(),I93=f51(),I51=Yz(),b93=GM(),x93=Ms();class flA extends I93.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(A){super(I51.SEQ,A);this.items=[]}add(A){this.items.push(A)}delete(A){let q=h51(A);if(typeof q!=="number")return!1;return this.items.splice(q,1).length>0}get(A,q){let K=h51(A);if(typeof K!=="number")return;let Y=this.items[K];return!q&&I51.isScalar(Y)?Y.value:Y}has(A){let q=h51(A);return typeof q==="number"&&q<this.items.length}set(A,q){let K=h51(A);if(typeof K!=="number")throw Error(`Expected a valid index, not ${A}.`);let Y=this.items[K];if(I51.isScalar(Y)&&b93.isScalarValue(q))Y.value=q;else this.items[K]=q}toJSON(A,q){let K=[];if(q?.onCreate)q.onCreate(K);let Y=0;for(let z of this.items)K.push(x93.toJS(z,String(Y++),q));return K}toString(A,q,K){if(!A)return JSON.stringify(this);return h93.stringifyCollection(this,A,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(A.indent||"")+"  ",onChompKeep:K,onComment:q})}static from(A,q,K){let{replacer:Y}=K,z=new this(A);if(q&&Symbol.iterator in Object(q)){let w=0;for(let _ of q){if(typeof Y==="function"){let $=q instanceof Set?_:String(w++);_=Y.call(q,$,_)}z.items.push(C93.createNode(_,void 0,K))}}return z}}function h51(A){let q=I51.isScalar(A)?A.value:A;if(q&&typeof q==="string")q=Number(q);return typeof q==="number"&&Number.isInteger(q)&&q>=0?q:null}u93.YAMLSeq=flA});var KD6=C((F93)=>{var m93=Yz(),TlA=Gs(),g93={collection:"seq",default:!0,nodeClass:TlA.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(A,q){if(!m93.isSeq(A))q("Expected a sequence for this tag");return A},createNode:(A,q,K)=>TlA.YAMLSeq.from(A,q,K)};F93.seq=g93});var rI6=C((d93)=>{var U93=dI6(),p93={identify:(A)=>typeof A==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(A)=>A,stringify(A,q,K,Y){return q=Object.assign({actualString:!0},q),U93.stringifyString(A,q,K,Y)}};d93.string=p93});var b51=C((l93)=>{var VlA=GM(),NlA={identify:(A)=>A==null,createNode:()=>new VlA.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new VlA.Scalar(null),stringify:({source:A},q)=>typeof A==="string"&&NlA.test.test(A)?A:q.options.nullStr};l93.nullTag=NlA});var S18=C((r93)=>{var n93=GM(),vlA={identify:(A)=>typeof A==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(A)=>new n93.Scalar(A[0]==="t"||A[0]==="T"),stringify({source:A,value:q},K){if(A&&vlA.test.test(A)){let Y=A[0]==="t"||A[0]==="T";if(q===Y)return A}return q?K.options.trueStr:K.options.falseStr}};r93.boolTag=vlA});var YD6=C((s93)=>{function a93({format:A,minFractionDigits:q,tag:K,value:Y}){if(typeof Y==="bigint")return String(Y);let z=typeof Y==="number"?Y:Number(Y);if(!isFinite(z))return isNaN(z)?".nan":z<0?"-.inf":".inf";let w=JSON.stringify(Y);if(!A&&q&&(!K||K==="tag:yaml.org,2002:float")&&/^\d/.test(w)){let _=w.indexOf(".");if(_<0)_=w.length,w+=".";let $=q-(w.length-_-1);while($-- >0)w+="0"}return w}s93.stringifyNumber=a93});var h18=C((YY3)=>{var e93=GM(),C18=YD6(),AY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(A)=>A.slice(-3).toLowerCase()==="nan"?NaN:A[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:C18.stringifyNumber},qY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(A)=>parseFloat(A),stringify(A){let q=Number(A.value);return isFinite(q)?q.toExponential():C18.stringifyNumber(A)}},KY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(A){let q=new e93.Scalar(parseFloat(A)),K=A.indexOf(".");if(K!==-1&&A[A.length-1]==="0")q.minFractionDigits=A.length-K-1;return q},stringify:C18.stringifyNumber};YY3.float=KY3;YY3.floatExp=qY3;YY3.floatNaN=AY3});var b18=C((jY3)=>{var klA=YD6(),x51=(A)=>typeof A==="bigint"||Number.isInteger(A),I18=(A,q,K,{intAsBigInt:Y})=>Y?BigInt(A):parseInt(A.substring(q),K);function ElA(A,q,K){let{value:Y}=A;if(x51(Y)&&Y>=0)return K+Y.toString(q);return klA.stringifyNumber(A)}var $Y3={identify:(A)=>x51(A)&&A>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(A,q,K)=>I18(A,2,8,K),stringify:(A)=>ElA(A,8,"0o")},OY3={identify:x51,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(A,q,K)=>I18(A,0,10,K),stringify:klA.stringifyNumber},HY3={identify:(A)=>x51(A)&&A>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(A,q,K)=>I18(A,2,16,K),stringify:(A)=>ElA(A,16,"0x")};jY3.int=OY3;jY3.intHex=HY3;jY3.intOct=$Y3});var LlA=C((TY3)=>{var XY3=qD6(),PY3=b51(),WY3=KD6(),ZY3=rI6(),GY3=S18(),x18=h18(),u18=b18(),fY3=[XY3.map,WY3.seq,ZY3.string,PY3.nullTag,GY3.boolTag,u18.intOct,u18.int,u18.intHex,x18.floatNaN,x18.floatExp,x18.float];TY3.schema=fY3});var RlA=C((RY3)=>{var NY3=GM(),vY3=qD6(),kY3=KD6();function ylA(A){return typeof A==="bigint"||Number.isInteger(A)}var u51=({value:A})=>JSON.stringify(A),EY3=[{identify:(A)=>typeof A==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(A)=>A,stringify:u51},{identify:(A)=>A==null,createNode:()=>new NY3.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:u51},{identify:(A)=>typeof A==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(A)=>A==="true",stringify:u51},{identify:ylA,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(A,q,{intAsBigInt:K})=>K?BigInt(A):parseInt(A,10),stringify:({value:A})=>ylA(A)?A.toString():JSON.stringify(A)},{identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(A)=>parseFloat(A),stringify:u51}],LY3={default:!0,tag:"",test:/^/,resolve(A,q){return q(`Unresolved plain scalar ${JSON.stringify(A)}`),A}},yY3=[vY3.map,kY3.seq].concat(EY3,LY3);RY3.schema=yY3});var m18=C((IY3)=>{var oI6=g6("buffer"),B18=GM(),CY3=dI6(),hY3={identify:(A)=>A instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(A,q){if(typeof oI6.Buffer==="function")return oI6.Buffer.from(A,"base64");else if(typeof atob==="function"){let K=atob(A.replace(/[\n\r]/g,"")),Y=new Uint8Array(K.length);for(let z=0;z<K.length;++z)Y[z]=K.charCodeAt(z);return Y}else return q("This environment does not support reading binary tags; either Buffer or atob is required"),A},stringify({comment:A,type:q,value:K},Y,z,w){if(!K)return"";let _=K,$;if(typeof oI6.Buffer==="function")$=_ instanceof oI6.Buffer?_.toString("base64"):oI6.Buffer.from(_.buffer).toString("base64");else if(typeof btoa==="function"){let O="";for(let H=0;H<_.length;++H)O+=String.fromCharCode(_[H]);$=btoa(O)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(q??(q=B18.Scalar.BLOCK_LITERAL),q!==B18.Scalar.QUOTE_DOUBLE){let O=Math.max(Y.options.lineWidth-Y.indent.length,Y.options.minContentWidth),H=Math.ceil($.length/O),j=Array(H);for(let J=0,M=0;J<H;++J,M+=O)j[J]=$.substr(M,O);$=j.join(q===B18.Scalar.BLOCK_LITERAL?`
`:" ")}return CY3.stringifyString({comment:A,type:q,value:$},Y,z,w)}};IY3.binary=hY3});var m51=C((mY3)=>{var B51=Yz(),g18=Ps(),xY3=GM(),uY3=Gs();function SlA(A,q){if(B51.isSeq(A))for(let K=0;K<A.items.length;++K){let Y=A.items[K];if(B51.isPair(Y))continue;else if(B51.isMap(Y)){if(Y.items.length>1)q("Each pair must have its own sequence indicator");let z=Y.items[0]||new g18.Pair(new xY3.Scalar(null));if(Y.commentBefore)z.key.commentBefore=z.key.commentBefore?`${Y.commentBefore}
${z.key.commentBefore}`:Y.commentBefore;if(Y.comment){let w=z.value??z.key;w.comment=w.comment?`${Y.comment}
${w.comment}`:Y.comment}Y=z}A.items[K]=B51.isPair(Y)?Y:new g18.Pair(Y)}else q("Expected a sequence for this tag");return A}function ClA(A,q,K){let{replacer:Y}=K,z=new uY3.YAMLSeq(A);z.tag="tag:yaml.org,2002:pairs";let w=0;if(q&&Symbol.iterator in Object(q))for(let _ of q){if(typeof Y==="function")_=Y.call(q,String(w++),_);let $,O;if(Array.isArray(_))if(_.length===2)$=_[0],O=_[1];else throw TypeError(`Expected [key, value] tuple: ${_}`);else if(_&&_ instanceof Object){let H=Object.keys(_);if(H.length===1)$=H[0],O=_[$];else throw TypeError(`Expected tuple with one key, not ${H.length} keys`)}else $=_;z.items.push(g18.createPair($,O,K))}return z}var BY3={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:SlA,createNode:ClA};mY3.createPairs=ClA;mY3.pairs=BY3;mY3.resolvePairs=SlA});var Q18=C((dY3)=>{var hlA=Yz(),F18=Ms(),aI6=Zs(),UY3=Gs(),IlA=m51();class IK6 extends UY3.YAMLSeq{constructor(){super();this.add=aI6.YAMLMap.prototype.add.bind(this),this.delete=aI6.YAMLMap.prototype.delete.bind(this),this.get=aI6.YAMLMap.prototype.get.bind(this),this.has=aI6.YAMLMap.prototype.has.bind(this),this.set=aI6.YAMLMap.prototype.set.bind(this),this.tag=IK6.tag}toJSON(A,q){if(!q)return super.toJSON(A);let K=new Map;if(q?.onCreate)q.onCreate(K);for(let Y of this.items){let z,w;if(hlA.isPair(Y))z=F18.toJS(Y.key,"",q),w=F18.toJS(Y.value,z,q);else z=F18.toJS(Y,"",q);if(K.has(z))throw Error("Ordered maps must not include duplicate keys");K.set(z,w)}return K}static from(A,q,K){let Y=IlA.createPairs(A,q,K),z=new this;return z.items=Y.items,z}}IK6.tag="tag:yaml.org,2002:omap";var pY3={collection:"seq",identify:(A)=>A instanceof Map,nodeClass:IK6,default:!1,tag:"tag:yaml.org,2002:omap",resolve(A,q){let K=IlA.resolvePairs(A,q),Y=[];for(let{key:z}of K.items)if(hlA.isScalar(z))if(Y.includes(z.value))q(`Ordered maps must not include duplicate keys: ${z.value}`);else Y.push(z.value);return Object.assign(new IK6,K)},createNode:(A,q,K)=>IK6.from(A,q,K)};dY3.YAMLOMap=IK6;dY3.omap=pY3});var mlA=C((iY3)=>{var blA=GM();function xlA({value:A,source:q},K){if(q&&(A?ulA:BlA).test.test(q))return q;return A?K.options.trueStr:K.options.falseStr}var ulA={identify:(A)=>A===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new blA.Scalar(!0),stringify:xlA},BlA={identify:(A)=>A===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new blA.Scalar(!1),stringify:xlA};iY3.falseTag=BlA;iY3.trueTag=ulA});var glA=C((eY3)=>{var oY3=GM(),U18=YD6(),aY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(A)=>A.slice(-3).toLowerCase()==="nan"?NaN:A[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U18.stringifyNumber},sY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(A)=>parseFloat(A.replace(/_/g,"")),stringify(A){let q=Number(A.value);return isFinite(q)?q.toExponential():U18.stringifyNumber(A)}},tY3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(A){let q=new oY3.Scalar(parseFloat(A.replace(/_/g,""))),K=A.indexOf(".");if(K!==-1){let Y=A.substring(K+1).replace(/_/g,"");if(Y[Y.length-1]==="0")q.minFractionDigits=Y.length}return q},stringify:U18.stringifyNumber};eY3.float=tY3;eY3.floatExp=sY3;eY3.floatNaN=aY3});var QlA=C(($z3)=>{var FlA=YD6(),sI6=(A)=>typeof A==="bigint"||Number.isInteger(A);function g51(A,q,K,{intAsBigInt:Y}){let z=A[0];if(z==="-"||z==="+")q+=1;if(A=A.substring(q).replace(/_/g,""),Y){switch(K){case 2:A=`0b${A}`;break;case 8:A=`0o${A}`;break;case 16:A=`0x${A}`;break}let _=BigInt(A);return z==="-"?BigInt(-1)*_:_}let w=parseInt(A,K);return z==="-"?-1*w:w}function p18(A,q,K){let{value:Y}=A;if(sI6(Y)){let z=Y.toString(q);return Y<0?"-"+K+z.substr(1):K+z}return FlA.stringifyNumber(A)}var Yz3={identify:sI6,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(A,q,K)=>g51(A,2,2,K),stringify:(A)=>p18(A,2,"0b")},zz3={identify:sI6,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(A,q,K)=>g51(A,1,8,K),stringify:(A)=>p18(A,8,"0")},wz3={identify:sI6,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(A,q,K)=>g51(A,0,10,K),stringify:FlA.stringifyNumber},_z3={identify:sI6,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(A,q,K)=>g51(A,2,16,K),stringify:(A)=>p18(A,16,"0x")};$z3.int=wz3;$z3.intBin=Yz3;$z3.intHex=_z3;$z3.intOct=zz3});var d18=C((Dz3)=>{var U51=Yz(),F51=Ps(),Q51=Zs();class bK6 extends Q51.YAMLMap{constructor(A){super(A);this.tag=bK6.tag}add(A){let q;if(U51.isPair(A))q=A;else if(A&&typeof A==="object"&&"key"in A&&"value"in A&&A.value===null)q=new F51.Pair(A.key,null);else q=new F51.Pair(A,null);if(!Q51.findPair(this.items,q.key))this.items.push(q)}get(A,q){let K=Q51.findPair(this.items,A);return!q&&U51.isPair(K)?U51.isScalar(K.key)?K.key.value:K.key:K}set(A,q){if(typeof q!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let K=Q51.findPair(this.items,A);if(K&&!q)this.items.splice(this.items.indexOf(K),1);else if(!K&&q)this.items.push(new F51.Pair(A))}toJSON(A,q){return super.toJSON(A,q,Set)}toString(A,q,K){if(!A)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},A,{allNullValues:!0}),q,K);else throw Error("Set items must all have null values")}static from(A,q,K){let{replacer:Y}=K,z=new this(A);if(q&&Symbol.iterator in Object(q))for(let w of q){if(typeof Y==="function")w=Y.call(q,w,w);z.items.push(F51.createPair(w,null,K))}return z}}bK6.tag="tag:yaml.org,2002:set";var Mz3={collection:"map",identify:(A)=>A instanceof Set,nodeClass:bK6,default:!1,tag:"tag:yaml.org,2002:set",createNode:(A,q,K)=>bK6.from(A,q,K),resolve(A,q){if(U51.isMap(A))if(A.hasAllNullValues(!0))return Object.assign(new bK6,A);else q("Set items must all have null values");else q("Expected a mapping for this tag");return A}};Dz3.YAMLSet=bK6;Dz3.set=Mz3});var l18=C((fz3)=>{var Wz3=YD6();function c18(A,q){let K=A[0],Y=K==="-"||K==="+"?A.substring(1):A,z=(_)=>q?BigInt(_):Number(_),w=Y.replace(/_/g,"").split(":").reduce((_,$)=>_*z(60)+z($),z(0));return K==="-"?z(-1)*w:w}function UlA(A){let{value:q}=A,K=(_)=>_;if(typeof q==="bigint")K=(_)=>BigInt(_);else if(isNaN(q)||!isFinite(q))return Wz3.stringifyNumber(A);let Y="";if(q<0)Y="-",q*=K(-1);let z=K(60),w=[q%z];if(q<60)w.unshift(0);else if(q=(q-w[0])/z,w.unshift(q%z),q>=60)q=(q-w[0])/z,w.unshift(q);return Y+w.map((_)=>String(_).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Zz3={identify:(A)=>typeof A==="bigint"||Number.isInteger(A),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(A,q,{intAsBigInt:K})=>c18(A,K),stringify:UlA},Gz3={identify:(A)=>typeof A==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(A)=>c18(A,!1),stringify:UlA},plA={identify:(A)=>A instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(A){let q=A.match(plA.test);if(!q)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,K,Y,z,w,_,$]=q.map(Number),O=q[7]?Number((q[7]+"00").substr(1,3)):0,H=Date.UTC(K,Y-1,z,w||0,_||0,$||0,O),j=q[8];if(j&&j!=="Z"){let J=c18(j,!1);if(Math.abs(J)<30)J*=60;H-=60000*J}return new Date(H)},stringify:({value:A})=>A?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};fz3.floatTime=Gz3;fz3.intTime=Zz3;fz3.timestamp=plA});var clA=C((bz3)=>{var vz3=qD6(),kz3=b51(),Ez3=KD6(),Lz3=rI6(),yz3=m18(),dlA=mlA(),i18=glA(),p51=QlA(),Rz3=E51(),Sz3=Q18(),Cz3=m51(),hz3=d18(),n18=l18(),Iz3=[vz3.map,Ez3.seq,Lz3.string,kz3.nullTag,dlA.trueTag,dlA.falseTag,p51.intBin,p51.intOct,p51.int,p51.intHex,i18.floatNaN,i18.floatExp,i18.float,yz3.binary,Rz3.merge,Sz3.omap,Cz3.pairs,hz3.set,n18.intTime,n18.floatTime,n18.timestamp];bz3.schema=Iz3});var AiA=C((pz3)=>{var rlA=qD6(),uz3=b51(),olA=KD6(),Bz3=rI6(),mz3=S18(),r18=h18(),o18=b18(),gz3=LlA(),Fz3=RlA(),alA=m18(),tI6=E51(),slA=Q18(),tlA=m51(),llA=clA(),elA=d18(),d51=l18(),ilA=new Map([["core",gz3.schema],["failsafe",[rlA.map,olA.seq,Bz3.string]],["json",Fz3.schema],["yaml11",llA.schema],["yaml-1.1",llA.schema]]),nlA={binary:alA.binary,bool:mz3.boolTag,float:r18.float,floatExp:r18.floatExp,floatNaN:r18.floatNaN,floatTime:d51.floatTime,int:o18.int,intHex:o18.intHex,intOct:o18.intOct,intTime:d51.intTime,map:rlA.map,merge:tI6.merge,null:uz3.nullTag,omap:slA.omap,pairs:tlA.pairs,seq:olA.seq,set:elA.set,timestamp:d51.timestamp},Qz3={"tag:yaml.org,2002:binary":alA.binary,"tag:yaml.org,2002:merge":tI6.merge,"tag:yaml.org,2002:omap":slA.omap,"tag:yaml.org,2002:pairs":tlA.pairs,"tag:yaml.org,2002:set":elA.set,"tag:yaml.org,2002:timestamp":d51.timestamp};function Uz3(A,q,K){let Y=ilA.get(q);if(Y&&!A)return K&&!Y.includes(tI6.merge)?Y.concat(tI6.merge):Y.slice();let z=Y;if(!z)if(Array.isArray(A))z=[];else{let w=Array.from(ilA.keys()).filter((_)=>_!=="yaml11").map((_)=>JSON.stringify(_)).join(", ");throw Error(`Unknown schema "${q}"; use one of ${w} or define customTags array`)}if(Array.isArray(A))for(let w of A)z=z.concat(w);else if(typeof A==="function")z=A(z.slice());if(K)z=z.concat(tI6.merge);return z.reduce((w,_)=>{let $=typeof _==="string"?nlA[_]:_;if(!$){let O=JSON.stringify(_),H=Object.keys(nlA).map((j)=>JSON.stringify(j)).join(", ");throw Error(`Unknown custom tag ${O}; use one of ${H}`)}if(!w.includes($))w.push($);return w},[])}pz3.coreKnownTags=Qz3;pz3.getTags=Uz3});var t18=C((oz3)=>{var a18=Yz(),lz3=qD6(),iz3=KD6(),nz3=rI6(),c51=AiA(),rz3=(A,q)=>A.key<q.key?-1:A.key>q.key?1:0;class s18{constructor({compat:A,customTags:q,merge:K,resolveKnownTags:Y,schema:z,sortMapEntries:w,toStringDefaults:_}){this.compat=Array.isArray(A)?c51.getTags(A,"compat"):A?c51.getTags(null,A):null,this.name=typeof z==="string"&&z||"core",this.knownTags=Y?c51.coreKnownTags:{},this.tags=c51.getTags(q,this.name,K),this.toStringOptions=_??null,Object.defineProperty(this,a18.MAP,{value:lz3.map}),Object.defineProperty(this,a18.SCALAR,{value:nz3.string}),Object.defineProperty(this,a18.SEQ,{value:iz3.seq}),this.sortMapEntries=typeof w==="function"?w:w===!0?rz3:null}clone(){let A=Object.create(s18.prototype,Object.getOwnPropertyDescriptors(this));return A.tags=this.tags.slice(),A}}oz3.Schema=s18});var qiA=C((ez3)=>{var sz3=Yz(),e18=cI6(),eI6=UI6();function tz3(A,q){let K=[],Y=q.directives===!0;if(q.directives!==!1&&A.directives){let O=A.directives.toString(A);if(O)K.push(O),Y=!0;else if(A.directives.docStart)Y=!0}if(Y)K.push("---");let z=e18.createStringifyContext(A,q),{commentString:w}=z.options;if(A.commentBefore){if(K.length!==1)K.unshift("");let O=w(A.commentBefore);K.unshift(eI6.indentComment(O,""))}let _=!1,$=null;if(A.contents){if(sz3.isNode(A.contents)){if(A.contents.spaceBefore&&Y)K.push("");if(A.contents.commentBefore){let j=w(A.contents.commentBefore);K.push(eI6.indentComment(j,""))}z.forceBlockIndent=!!A.comment,$=A.contents.comment}let O=$?void 0:()=>_=!0,H=e18.stringify(A.contents,z,()=>$=null,O);if($)H+=eI6.lineComment(H,"",w($));if((H[0]==="|"||H[0]===">")&&K[K.length-1]==="---")K[K.length-1]=`--- ${H}`;else K.push(H)}else K.push(e18.stringify(A.contents,z));if(A.directives?.docEnd)if(A.comment){let O=w(A.comment);if(O.includes(`
`))K.push("..."),K.push(eI6.indentComment(O,""));else K.push(`... ${O}`)}else K.push("...");else{let O=A.comment;if(O&&_)O=O.replace(/^\n+/,"");if(O){if((!_||$)&&K[K.length-1]!=="")K.push("");K.push(eI6.indentComment(w(O),""))}}return K.join(`
`)+`
`}ez3.stringifyDocument=tz3});var Ab6=C((Ow3)=>{var qw3=FI6(),zD6=f51(),_R=Yz(),Kw3=Ps(),Yw3=Ms(),zw3=t18(),ww3=qiA(),A88=W51(),_w3=f18(),$w3=QI6(),q88=G18();class K88{constructor(A,q,K){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_R.NODE_TYPE,{value:_R.DOC});let Y=null;if(typeof q==="function"||Array.isArray(q))Y=q;else if(K===void 0&&q)K=q,q=void 0;let z=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},K);this.options=z;let{version:w}=z;if(K?._directives){if(this.directives=K._directives.atDocument(),this.directives.yaml.explicit)w=this.directives.yaml.version}else this.directives=new q88.Directives({version:w});this.setSchema(w,K),this.contents=A===void 0?null:this.createNode(A,Y,K)}clone(){let A=Object.create(K88.prototype,{[_R.NODE_TYPE]:{value:_R.DOC}});if(A.commentBefore=this.commentBefore,A.comment=this.comment,A.errors=this.errors.slice(),A.warnings=this.warnings.slice(),A.options=Object.assign({},this.options),this.directives)A.directives=this.directives.clone();if(A.schema=this.schema.clone(),A.contents=_R.isNode(this.contents)?this.contents.clone(A.schema):this.contents,this.range)A.range=this.range.slice();return A}add(A){if(wD6(this.contents))this.contents.add(A)}addIn(A,q){if(wD6(this.contents))this.contents.addIn(A,q)}createAlias(A,q){if(!A.anchor){let K=A88.anchorNames(this);A.anchor=!q||K.has(q)?A88.findNewAnchor(q||"a",K):q}return new qw3.Alias(A.anchor)}createNode(A,q,K){let Y=void 0;if(typeof q==="function")A=q.call({"":A},"",A),Y=q;else if(Array.isArray(q)){let P=(Z)=>typeof Z==="number"||Z instanceof String||Z instanceof Number,W=q.filter(P).map(String);if(W.length>0)q=q.concat(W);Y=q}else if(K===void 0&&q)K=q,q=void 0;let{aliasDuplicateObjects:z,anchorPrefix:w,flow:_,keepUndefined:$,onTagObj:O,tag:H}=K??{},{onAnchor:j,setAnchors:J,sourceObjects:M}=A88.createNodeAnchors(this,w||"a"),D={aliasDuplicateObjects:z??!0,keepUndefined:$??!1,onAnchor:j,onTagObj:O,replacer:Y,schema:this.schema,sourceObjects:M},X=$w3.createNode(A,H,D);if(_&&_R.isCollection(X))X.flow=!0;return J(),X}createPair(A,q,K={}){let Y=this.createNode(A,null,K),z=this.createNode(q,null,K);return new Kw3.Pair(Y,z)}delete(A){return wD6(this.contents)?this.contents.delete(A):!1}deleteIn(A){if(zD6.isEmptyPath(A)){if(this.contents==null)return!1;return this.contents=null,!0}return wD6(this.contents)?this.contents.deleteIn(A):!1}get(A,q){return _R.isCollection(this.contents)?this.contents.get(A,q):void 0}getIn(A,q){if(zD6.isEmptyPath(A))return!q&&_R.isScalar(this.contents)?this.contents.value:this.contents;return _R.isCollection(this.contents)?this.contents.getIn(A,q):void 0}has(A){return _R.isCollection(this.contents)?this.contents.has(A):!1}hasIn(A){if(zD6.isEmptyPath(A))return this.contents!==void 0;return _R.isCollection(this.contents)?this.contents.hasIn(A):!1}set(A,q){if(this.contents==null)this.contents=zD6.collectionFromPath(this.schema,[A],q);else if(wD6(this.contents))this.contents.set(A,q)}setIn(A,q){if(zD6.isEmptyPath(A))this.contents=q;else if(this.contents==null)this.contents=zD6.collectionFromPath(this.schema,Array.from(A),q);else if(wD6(this.contents))this.contents.setIn(A,q)}setSchema(A,q={}){if(typeof A==="number")A=String(A);let K;switch(A){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new q88.Directives({version:"1.1"});K={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=A;else this.directives=new q88.Directives({version:A});K={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;K=null;break;default:{let Y=JSON.stringify(A);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${Y}`)}}if(q.schema instanceof Object)this.schema=q.schema;else if(K)this.schema=new zw3.Schema(Object.assign(K,q));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:A,jsonArg:q,mapAsMap:K,maxAliasCount:Y,onAnchor:z,reviver:w}={}){let _={anchors:new Map,doc:this,keep:!A,mapAsMap:K===!0,mapKeyWarned:!1,maxAliasCount:typeof Y==="number"?Y:100},$=Yw3.toJS(this.contents,q??"",_);if(typeof z==="function")for(let{count:O,res:H}of _.anchors.values())z(H,O);return typeof w==="function"?_w3.applyReviver(w,{"":$},"",$):$}toJSON(A,q){return this.toJS({json:!0,jsonArg:A,mapAsMap:!1,onAnchor:q})}toString(A={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in A&&(!Number.isInteger(A.indent)||Number(A.indent)<=0)){let q=JSON.stringify(A.indent);throw Error(`"indent" option must be a positive integer, not ${q}`)}return ww3.stringifyDocument(this,A)}}function wD6(A){if(_R.isCollection(A))return!0;throw Error("Expected a YAML collection as document contents")}Ow3.Document=K88});var qb6=C((Jw3)=>{class l51 extends Error{constructor(A,q,K,Y){super();this.name=A,this.code=K,this.message=Y,this.pos=q}}class KiA extends l51{constructor(A,q,K){super("YAMLParseError",A,q,K)}}class YiA extends l51{constructor(A,q,K){super("YAMLWarning",A,q,K)}}var jw3=(A,q)=>(K)=>{if(K.pos[0]===-1)return;K.linePos=K.pos.map(($)=>q.linePos($));let{line:Y,col:z}=K.linePos[0];K.message+=` at line ${Y}, column ${z}`;let w=z-1,_=A.substring(q.lineStarts[Y-1],q.lineStarts[Y]).replace(/[\n\r]+$/,"");if(w>=60&&_.length>80){let $=Math.min(w-39,_.length-79);_="…"+_.substring($),w-=$-1}if(_.length>80)_=_.substring(0,79)+"…";if(Y>1&&/^ *$/.test(_.substring(0,w))){let $=A.substring(q.lineStarts[Y-2],q.lineStarts[Y-1]);if($.length>80)$=$.substring(0,79)+`…
`;_=$+_}if(/[^ ]/.test(_)){let $=1,O=K.linePos[1];if(O&&O.line===Y&&O.col>z)$=Math.max(1,Math.min(O.col-z,80-w));let H=" ".repeat(w)+"^".repeat($);K.message+=`:

${_}
${H}
`}};Jw3.YAMLError=l51;Jw3.YAMLParseError=KiA;Jw3.YAMLWarning=YiA;Jw3.prettifyError=jw3});var Kb6=C((Zw3)=>{function Ww3(A,{flow:q,indicator:K,next:Y,offset:z,onError:w,parentIndent:_,startOnNewline:$}){let O=!1,H=$,j=$,J="",M="",D=!1,X=!1,P=null,W=null,Z=null,G=null,f=null,V=null,N=null;for(let R of A){if(X){if(R.type!=="space"&&R.type!=="newline"&&R.type!=="comma")w(R.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");X=!1}if(P){if(H&&R.type!=="comment"&&R.type!=="newline")w(P,"TAB_AS_INDENT","Tabs are not allowed as indentation");P=null}switch(R.type){case"space":if(!q&&(K!=="doc-start"||Y?.type!=="flow-collection")&&R.source.includes("\t"))P=R;j=!0;break;case"comment":{if(!j)w(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let h=R.source.substring(1)||" ";if(!J)J=h;else J+=M+h;M="",H=!1;break}case"newline":if(H){if(J)J+=R.source;else if(!V||K!=="seq-item-ind")O=!0}else M+=R.source;if(H=!0,D=!0,W||Z)G=R;j=!0;break;case"anchor":if(W)w(R,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(R.source.endsWith(":"))w(R.offset+R.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);W=R,N??(N=R.offset),H=!1,j=!1,X=!0;break;case"tag":{if(Z)w(R,"MULTIPLE_TAGS","A node can have at most one tag");Z=R,N??(N=R.offset),H=!1,j=!1,X=!0;break}case K:if(W||Z)w(R,"BAD_PROP_ORDER",`Anchors and tags must be after the ${R.source} indicator`);if(V)w(R,"UNEXPECTED_TOKEN",`Unexpected ${R.source} in ${q??"collection"}`);V=R,H=K==="seq-item-ind"||K==="explicit-key-ind",j=!1;break;case"comma":if(q){if(f)w(R,"UNEXPECTED_TOKEN",`Unexpected , in ${q}`);f=R,H=!1,j=!1;break}default:w(R,"UNEXPECTED_TOKEN",`Unexpected ${R.type} token`),H=!1,j=!1}}let v=A[A.length-1],y=v?v.offset+v.source.length:z;if(X&&Y&&Y.type!=="space"&&Y.type!=="newline"&&Y.type!=="comma"&&(Y.type!=="scalar"||Y.source!==""))w(Y.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(P&&(H&&P.indent<=_||Y?.type==="block-map"||Y?.type==="block-seq"))w(P,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:f,found:V,spaceBefore:O,comment:J,hasNewline:D,anchor:W,tag:Z,newlineAfterProp:G,end:y,start:N??y}}Zw3.resolveProps=Ww3});var i51=C((fw3)=>{function Y88(A){if(!A)return null;switch(A.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(A.source.includes(`
`))return!0;if(A.end){for(let q of A.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of A.items){for(let K of q.start)if(K.type==="newline")return!0;if(q.sep){for(let K of q.sep)if(K.type==="newline")return!0}if(Y88(q.key)||Y88(q.value))return!0}return!1;default:return!0}}fw3.containsNewline=Y88});var z88=C((vw3)=>{var Vw3=i51();function Nw3(A,q,K){if(q?.type==="flow-collection"){let Y=q.end[0];if(Y.indent===A&&(Y.source==="]"||Y.source==="}")&&Vw3.containsNewline(q))K(Y,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}vw3.flowIndentCheck=Nw3});var w88=C((Lw3)=>{var ziA=Yz();function Ew3(A,q,K){let{uniqueKeys:Y}=A.options;if(Y===!1)return!1;let z=typeof Y==="function"?Y:(w,_)=>w===_||ziA.isScalar(w)&&ziA.isScalar(_)&&w.value===_.value;return q.some((w)=>z(w.key,K))}Lw3.mapIncludes=Ew3});var HiA=C((Iw3)=>{var wiA=Ps(),Rw3=Zs(),_iA=Kb6(),Sw3=i51(),$iA=z88(),Cw3=w88(),OiA="All mapping items must start at the same column";function hw3({composeNode:A,composeEmptyNode:q},K,Y,z,w){let $=new(w?.nodeClass??Rw3.YAMLMap)(K.schema);if(K.atRoot)K.atRoot=!1;let O=Y.offset,H=null;for(let j of Y.items){let{start:J,key:M,sep:D,value:X}=j,P=_iA.resolveProps(J,{indicator:"explicit-key-ind",next:M??D?.[0],offset:O,onError:z,parentIndent:Y.indent,startOnNewline:!0}),W=!P.found;if(W){if(M){if(M.type==="block-seq")z(O,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in M&&M.indent!==Y.indent)z(O,"BAD_INDENT",OiA)}if(!P.anchor&&!P.tag&&!D){if(H=P.end,P.comment)if($.comment)$.comment+=`
`+P.comment;else $.comment=P.comment;continue}if(P.newlineAfterProp||Sw3.containsNewline(M))z(M??J[J.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(P.found?.indent!==Y.indent)z(O,"BAD_INDENT",OiA);K.atKey=!0;let Z=P.end,G=M?A(K,M,P,z):q(K,Z,J,null,P,z);if(K.schema.compat)$iA.flowIndentCheck(Y.indent,M,z);if(K.atKey=!1,Cw3.mapIncludes(K,$.items,G))z(Z,"DUPLICATE_KEY","Map keys must be unique");let f=_iA.resolveProps(D??[],{indicator:"map-value-ind",next:X,offset:G.range[2],onError:z,parentIndent:Y.indent,startOnNewline:!M||M.type==="block-scalar"});if(O=f.end,f.found){if(W){if(X?.type==="block-map"&&!f.hasNewline)z(O,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(K.options.strict&&P.start<f.found.offset-1024)z(G.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let V=X?A(K,X,f,z):q(K,O,D,null,f,z);if(K.schema.compat)$iA.flowIndentCheck(Y.indent,X,z);O=V.range[2];let N=new wiA.Pair(G,V);if(K.options.keepSourceTokens)N.srcToken=j;$.items.push(N)}else{if(W)z(G.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(f.comment)if(G.comment)G.comment+=`
`+f.comment;else G.comment=f.comment;let V=new wiA.Pair(G);if(K.options.keepSourceTokens)V.srcToken=j;$.items.push(V)}}if(H&&H<O)z(H,"IMPOSSIBLE","Map comment with trailing content");return $.range=[Y.offset,O,H??O],$}Iw3.resolveBlockMap=hw3});var jiA=C((gw3)=>{var xw3=Gs(),uw3=Kb6(),Bw3=z88();function mw3({composeNode:A,composeEmptyNode:q},K,Y,z,w){let $=new(w?.nodeClass??xw3.YAMLSeq)(K.schema);if(K.atRoot)K.atRoot=!1;if(K.atKey)K.atKey=!1;let O=Y.offset,H=null;for(let{start:j,value:J}of Y.items){let M=uw3.resolveProps(j,{indicator:"seq-item-ind",next:J,offset:O,onError:z,parentIndent:Y.indent,startOnNewline:!0});if(!M.found)if(M.anchor||M.tag||J)if(J&&J.type==="block-seq")z(M.end,"BAD_INDENT","All sequence items must start at the same column");else z(O,"MISSING_CHAR","Sequence item without - indicator");else{if(H=M.end,M.comment)$.comment=M.comment;continue}let D=J?A(K,J,M,z):q(K,M.end,j,null,M,z);if(K.schema.compat)Bw3.flowIndentCheck(Y.indent,J,z);O=D.range[2],$.items.push(D)}return $.range=[Y.offset,O,H??O],$}gw3.resolveBlockSeq=mw3});var _D6=C((Uw3)=>{function Qw3(A,q,K,Y){let z="";if(A){let w=!1,_="";for(let $ of A){let{source:O,type:H}=$;switch(H){case"space":w=!0;break;case"comment":{if(K&&!w)Y($,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let j=O.substring(1)||" ";if(!z)z=j;else z+=_+j;_="";break}case"newline":if(z)_+=O;w=!0;break;default:Y($,"UNEXPECTED_TOKEN",`Unexpected ${H} at node end`)}q+=O.length}}return{comment:z,offset:q}}Uw3.resolveEnd=Qw3});var DiA=C((aw3)=>{var dw3=Yz(),cw3=Ps(),JiA=Zs(),lw3=Gs(),iw3=_D6(),MiA=Kb6(),nw3=i51(),rw3=w88(),_88="Block collections are not allowed within flow collections",$88=(A)=>A&&(A.type==="block-map"||A.type==="block-seq");function ow3({composeNode:A,composeEmptyNode:q},K,Y,z,w){let _=Y.start.source==="{",$=_?"flow map":"flow sequence",H=new(w?.nodeClass??(_?JiA.YAMLMap:lw3.YAMLSeq))(K.schema);H.flow=!0;let j=K.atRoot;if(j)K.atRoot=!1;if(K.atKey)K.atKey=!1;let J=Y.offset+Y.start.source.length;for(let W=0;W<Y.items.length;++W){let Z=Y.items[W],{start:G,key:f,sep:V,value:N}=Z,v=MiA.resolveProps(G,{flow:$,indicator:"explicit-key-ind",next:f??V?.[0],offset:J,onError:z,parentIndent:Y.indent,startOnNewline:!1});if(!v.found){if(!v.anchor&&!v.tag&&!V&&!N){if(W===0&&v.comma)z(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${$}`);else if(W<Y.items.length-1)z(v.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${$}`);if(v.comment)if(H.comment)H.comment+=`
`+v.comment;else H.comment=v.comment;J=v.end;continue}if(!_&&K.options.strict&&nw3.containsNewline(f))z(f,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(W===0){if(v.comma)z(v.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${$}`)}else{if(!v.comma)z(v.start,"MISSING_CHAR",`Missing , between ${$} items`);if(v.comment){let y="";A:for(let R of G)switch(R.type){case"comma":case"space":break;case"comment":y=R.source.substring(1);break A;default:break A}if(y){let R=H.items[H.items.length-1];if(dw3.isPair(R))R=R.value??R.key;if(R.comment)R.comment+=`
`+y;else R.comment=y;v.comment=v.comment.substring(y.length+1)}}}if(!_&&!V&&!v.found){let y=N?A(K,N,v,z):q(K,v.end,V,null,v,z);if(H.items.push(y),J=y.range[2],$88(N))z(y.range,"BLOCK_IN_FLOW",_88)}else{K.atKey=!0;let y=v.end,R=f?A(K,f,v,z):q(K,y,G,null,v,z);if($88(f))z(R.range,"BLOCK_IN_FLOW",_88);K.atKey=!1;let h=MiA.resolveProps(V??[],{flow:$,indicator:"map-value-ind",next:N,offset:R.range[2],onError:z,parentIndent:Y.indent,startOnNewline:!1});if(h.found){if(!_&&!v.found&&K.options.strict){if(V)for(let F of V){if(F===h.found)break;if(F.type==="newline"){z(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(v.start<h.found.offset-1024)z(h.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(N)if("source"in N&&N.source&&N.source[0]===":")z(N,"MISSING_CHAR",`Missing space after : in ${$}`);else z(h.start,"MISSING_CHAR",`Missing , or : between ${$} items`);let B=N?A(K,N,h,z):h.found?q(K,h.end,V,null,h,z):null;if(B){if($88(N))z(B.range,"BLOCK_IN_FLOW",_88)}else if(h.comment)if(R.comment)R.comment+=`
`+h.comment;else R.comment=h.comment;let x=new cw3.Pair(R,B);if(K.options.keepSourceTokens)x.srcToken=Z;if(_){let F=H;if(rw3.mapIncludes(K,F.items,R))z(y,"DUPLICATE_KEY","Map keys must be unique");F.items.push(x)}else{let F=new JiA.YAMLMap(K.schema);F.flow=!0,F.items.push(x);let g=(B??R).range;F.range=[R.range[0],g[1],g[2]],H.items.push(F)}J=B?B.range[2]:h.end}}let M=_?"}":"]",[D,...X]=Y.end,P=J;if(D&&D.source===M)P=D.offset+D.source.length;else{let W=$[0].toUpperCase()+$.substring(1),Z=j?`${W} must end with a ${M}`:`${W} in block collection must be sufficiently indented and end with a ${M}`;if(z(J,j?"MISSING_CHAR":"BAD_INDENT",Z),D&&D.source.length!==1)X.unshift(D)}if(X.length>0){let W=iw3.resolveEnd(X,P,K.options.strict,z);if(W.comment)if(H.comment)H.comment+=`
`+W.comment;else H.comment=W.comment;H.range=[Y.offset,P,W.offset]}else H.range=[Y.offset,P,P];return H}aw3.resolveFlowCollection=ow3});var XiA=C((_23)=>{var tw3=Yz(),ew3=GM(),A23=Zs(),q23=Gs(),K23=HiA(),Y23=jiA(),z23=DiA();function O88(A,q,K,Y,z,w){let _=K.type==="block-map"?K23.resolveBlockMap(A,q,K,Y,w):K.type==="block-seq"?Y23.resolveBlockSeq(A,q,K,Y,w):z23.resolveFlowCollection(A,q,K,Y,w),$=_.constructor;if(z==="!"||z===$.tagName)return _.tag=$.tagName,_;if(z)_.tag=z;return _}function w23(A,q,K,Y,z){let w=Y.tag,_=!w?null:q.directives.tagName(w.source,(M)=>z(w,"TAG_RESOLVE_FAILED",M));if(K.type==="block-seq"){let{anchor:M,newlineAfterProp:D}=Y,X=M&&w?M.offset>w.offset?M:w:M??w;if(X&&(!D||D.offset<X.offset))z(X,"MISSING_CHAR","Missing newline after block sequence props")}let $=K.type==="block-map"?"map":K.type==="block-seq"?"seq":K.start.source==="{"?"map":"seq";if(!w||!_||_==="!"||_===A23.YAMLMap.tagName&&$==="map"||_===q23.YAMLSeq.tagName&&$==="seq")return O88(A,q,K,z,_);let O=q.schema.tags.find((M)=>M.tag===_&&M.collection===$);if(!O){let M=q.schema.knownTags[_];if(M&&M.collection===$)q.schema.tags.push(Object.assign({},M,{default:!1})),O=M;else{if(M)z(w,"BAD_COLLECTION_TYPE",`${M.tag} used for ${$} collection, but expects ${M.collection??"scalar"}`,!0);else z(w,"TAG_RESOLVE_FAILED",`Unresolved tag: ${_}`,!0);return O88(A,q,K,z,_)}}let H=O88(A,q,K,z,_,O),j=O.resolve?.(H,(M)=>z(w,"TAG_RESOLVE_FAILED",M),q.options)??H,J=tw3.isNode(j)?j:new ew3.Scalar(j);if(J.range=H.range,J.tag=_,O?.format)J.format=O.format;return J}_23.composeCollection=w23});var j88=C((J23)=>{var H88=GM();function O23(A,q,K){let Y=q.offset,z=H23(q,A.options.strict,K);if(!z)return{value:"",type:null,comment:"",range:[Y,Y,Y]};let w=z.mode===">"?H88.Scalar.BLOCK_FOLDED:H88.Scalar.BLOCK_LITERAL,_=q.source?j23(q.source):[],$=_.length;for(let P=_.length-1;P>=0;--P){let W=_[P][1];if(W===""||W==="\r")$=P;else break}if($===0){let P=z.chomp==="+"&&_.length>0?`
`.repeat(Math.max(1,_.length-1)):"",W=Y+z.length;if(q.source)W+=q.source.length;return{value:P,type:w,comment:z.comment,range:[Y,W,W]}}let O=q.indent+z.indent,H=q.offset+z.length,j=0;for(let P=0;P<$;++P){let[W,Z]=_[P];if(Z===""||Z==="\r"){if(z.indent===0&&W.length>O)O=W.length}else{if(W.length<O)K(H+W.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(z.indent===0)O=W.length;if(j=P,O===0&&!A.atRoot)K(H,"BAD_INDENT","Block scalar values in collections must be indented");break}H+=W.length+Z.length+1}for(let P=_.length-1;P>=$;--P)if(_[P][0].length>O)$=P+1;let J="",M="",D=!1;for(let P=0;P<j;++P)J+=_[P][0].slice(O)+`
`;for(let P=j;P<$;++P){let[W,Z]=_[P];H+=W.length+Z.length+1;let G=Z[Z.length-1]==="\r";if(G)Z=Z.slice(0,-1);if(Z&&W.length<O){let V=`Block scalar lines must not be less indented than their ${z.indent?"explicit indentation indicator":"first line"}`;K(H-Z.length-(G?2:1),"BAD_INDENT",V),W=""}if(w===H88.Scalar.BLOCK_LITERAL)J+=M+W.slice(O)+Z,M=`
`;else if(W.length>O||Z[0]==="\t"){if(M===" ")M=`
`;else if(!D&&M===`
`)M=`

`;J+=M+W.slice(O)+Z,M=`
`,D=!0}else if(Z==="")if(M===`
`)J+=`
`;else M=`
`;else J+=M+Z,M=" ",D=!1}switch(z.chomp){case"-":break;case"+":for(let P=$;P<_.length;++P)J+=`
`+_[P][0].slice(O);if(J[J.length-1]!==`
`)J+=`
`;break;default:J+=`
`}let X=Y+z.length+q.source.length;return{value:J,type:w,comment:z.comment,range:[Y,X,X]}}function H23({offset:A,props:q},K,Y){if(q[0].type!=="block-scalar-header")return Y(q[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:z}=q[0],w=z[0],_=0,$="",O=-1;for(let M=1;M<z.length;++M){let D=z[M];if(!$&&(D==="-"||D==="+"))$=D;else{let X=Number(D);if(!_&&X)_=X;else if(O===-1)O=A+M}}if(O!==-1)Y(O,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${z}`);let H=!1,j="",J=z.length;for(let M=1;M<q.length;++M){let D=q[M];switch(D.type){case"space":H=!0;case"newline":J+=D.source.length;break;case"comment":if(K&&!H)Y(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");J+=D.source.length,j=D.source.substring(1);break;case"error":Y(D,"UNEXPECTED_TOKEN",D.message),J+=D.source.length;break;default:{let X=`Unexpected token in block scalar header: ${D.type}`;Y(D,"UNEXPECTED_TOKEN",X);let P=D.source;if(P&&typeof P==="string")J+=P.length}}}return{mode:w,indent:_,chomp:$,comment:j,length:J}}function j23(A){let q=A.split(/\n( *)/),K=q[0],Y=K.match(/^( *)/),w=[Y?.[1]?[Y[1],K.slice(Y[1].length)]:["",K]];for(let _=1;_<q.length;_+=2)w.push([q[_],q[_+1]]);return w}J23.resolveBlockScalar=O23});var M88=C((V23)=>{var J88=GM(),D23=_D6();function X23(A,q,K){let{offset:Y,type:z,source:w,end:_}=A,$,O,H=(M,D,X)=>K(Y+M,D,X);switch(z){case"scalar":$=J88.Scalar.PLAIN,O=P23(w,H);break;case"single-quoted-scalar":$=J88.Scalar.QUOTE_SINGLE,O=W23(w,H);break;case"double-quoted-scalar":$=J88.Scalar.QUOTE_DOUBLE,O=Z23(w,H);break;default:return K(A,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${z}`),{value:"",type:null,comment:"",range:[Y,Y+w.length,Y+w.length]}}let j=Y+w.length,J=D23.resolveEnd(_,j,q,K);return{value:O,type:$,comment:J.comment,range:[Y,j,J.offset]}}function P23(A,q){let K="";switch(A[0]){case"\t":K="a tab character";break;case",":K="flow indicator character ,";break;case"%":K="directive indicator character %";break;case"|":case">":{K=`block scalar indicator ${A[0]}`;break}case"@":case"`":{K=`reserved character ${A[0]}`;break}}if(K)q(0,"BAD_SCALAR_START",`Plain value cannot start with ${K}`);return PiA(A)}function W23(A,q){if(A[A.length-1]!=="'"||A.length===1)q(A.length,"MISSING_CHAR","Missing closing 'quote");return PiA(A.slice(1,-1)).replace(/''/g,"'")}function PiA(A){let q,K;try{q=new RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,"sy"),K=new RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,"sy")}catch{q=/(.*?)[ \t]*\r?\n/sy,K=/[ \t]*(.*?)[ \t]*\r?\n/sy}let Y=q.exec(A);if(!Y)return A;let z=Y[1],w=" ",_=q.lastIndex;K.lastIndex=_;while(Y=K.exec(A)){if(Y[1]==="")if(w===`
`)z+=w;else w=`
`;else z+=w+Y[1],w=" ";_=K.lastIndex}let $=/[ \t]*(.*)/sy;return $.lastIndex=_,Y=$.exec(A),z+w+(Y?.[1]??"")}function Z23(A,q){let K="";for(let Y=1;Y<A.length-1;++Y){let z=A[Y];if(z==="\r"&&A[Y+1]===`
`)continue;if(z===`
`){let{fold:w,offset:_}=G23(A,Y);K+=w,Y=_}else if(z==="\\"){let w=A[++Y],_=f23[w];if(_)K+=_;else if(w===`
`){w=A[Y+1];while(w===" "||w==="\t")w=A[++Y+1]}else if(w==="\r"&&A[Y+1]===`
`){w=A[++Y+1];while(w===" "||w==="\t")w=A[++Y+1]}else if(w==="x"||w==="u"||w==="U"){let $={x:2,u:4,U:8}[w];K+=T23(A,Y+1,$,q),Y+=$}else{let $=A.substr(Y-1,2);q(Y-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${$}`),K+=$}}else if(z===" "||z==="\t"){let w=Y,_=A[Y+1];while(_===" "||_==="\t")_=A[++Y+1];if(_!==`
`&&!(_==="\r"&&A[Y+2]===`
`))K+=Y>w?A.slice(w,Y+1):z}else K+=z}if(A[A.length-1]!=='"'||A.length===1)q(A.length,"MISSING_CHAR",'Missing closing "quote');return K}function G23(A,q){let K="",Y=A[q+1];while(Y===" "||Y==="\t"||Y===`
`||Y==="\r"){if(Y==="\r"&&A[q+2]!==`
`)break;if(Y===`
`)K+=`
`;q+=1,Y=A[q+1]}if(!K)K=" ";return{fold:K,offset:q}}var f23={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"\t",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function T23(A,q,K,Y){let z=A.substr(q,K),_=z.length===K&&/^[0-9a-fA-F]+$/.test(z)?parseInt(z,16):NaN;if(isNaN(_)){let $=A.substr(q-2,K+2);return Y(q-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${$}`),$}return String.fromCodePoint(_)}V23.resolveFlowScalar=X23});var ZiA=C((R23)=>{var xK6=Yz(),WiA=GM(),v23=j88(),k23=M88();function E23(A,q,K,Y){let{value:z,type:w,comment:_,range:$}=q.type==="block-scalar"?v23.resolveBlockScalar(A,q,Y):k23.resolveFlowScalar(q,A.options.strict,Y),O=K?A.directives.tagName(K.source,(J)=>Y(K,"TAG_RESOLVE_FAILED",J)):null,H;if(A.options.stringKeys&&A.atKey)H=A.schema[xK6.SCALAR];else if(O)H=L23(A.schema,z,O,K,Y);else if(q.type==="scalar")H=y23(A,z,q,Y);else H=A.schema[xK6.SCALAR];let j;try{let J=H.resolve(z,(M)=>Y(K??q,"TAG_RESOLVE_FAILED",M),A.options);j=xK6.isScalar(J)?J:new WiA.Scalar(J)}catch(J){let M=J instanceof Error?J.message:String(J);Y(K??q,"TAG_RESOLVE_FAILED",M),j=new WiA.Scalar(z)}if(j.range=$,j.source=z,w)j.type=w;if(O)j.tag=O;if(H.format)j.format=H.format;if(_)j.comment=_;return j}function L23(A,q,K,Y,z){if(K==="!")return A[xK6.SCALAR];let w=[];for(let $ of A.tags)if(!$.collection&&$.tag===K)if($.default&&$.test)w.push($);else return $;for(let $ of w)if($.test?.test(q))return $;let _=A.knownTags[K];if(_&&!_.collection)return A.tags.push(Object.assign({},_,{default:!1,test:void 0})),_;return z(Y,"TAG_RESOLVE_FAILED",`Unresolved tag: ${K}`,K!=="tag:yaml.org,2002:str"),A[xK6.SCALAR]}function y23({atKey:A,directives:q,schema:K},Y,z,w){let _=K.tags.find(($)=>($.default===!0||A&&$.default==="key")&&$.test?.test(Y))||K[xK6.SCALAR];if(K.compat){let $=K.compat.find((O)=>O.default&&O.test?.test(Y))??K[xK6.SCALAR];if(_.tag!==$.tag){let O=q.tagString(_.tag),H=q.tagString($.tag),j=`Value may be parsed as either ${O} or ${H}`;w(z,"TAG_RESOLVE_FAILED",j,!0)}}return _}R23.composeScalar=E23});var GiA=C((h23)=>{function C23(A,q,K){if(q){K??(K=q.length);for(let Y=K-1;Y>=0;--Y){let z=q[Y];switch(z.type){case"space":case"comment":case"newline":A-=z.source.length;continue}z=q[++Y];while(z?.type==="space")A+=z.source.length,z=q[++Y];break}}return A}h23.emptyScalarPosition=C23});var ViA=C((Q23)=>{var b23=FI6(),x23=Yz(),u23=XiA(),fiA=ZiA(),B23=_D6(),m23=GiA(),g23={composeNode:TiA,composeEmptyNode:D88};function TiA(A,q,K,Y){let z=A.atKey,{spaceBefore:w,comment:_,anchor:$,tag:O}=K,H,j=!0;switch(q.type){case"alias":if(H=F23(A,q,Y),$||O)Y(q,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(H=fiA.composeScalar(A,q,O,Y),$)H.anchor=$.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(H=u23.composeCollection(g23,A,q,K,Y),$)H.anchor=$.source.substring(1);break;default:{let J=q.type==="error"?q.message:`Unsupported token (type: ${q.type})`;Y(q,"UNEXPECTED_TOKEN",J),H=D88(A,q.offset,void 0,null,K,Y),j=!1}}if($&&H.anchor==="")Y($,"BAD_ALIAS","Anchor cannot be an empty string");if(z&&A.options.stringKeys&&(!x23.isScalar(H)||typeof H.value!=="string"||H.tag&&H.tag!=="tag:yaml.org,2002:str"))Y(O??q,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(w)H.spaceBefore=!0;if(_)if(q.type==="scalar"&&q.source==="")H.comment=_;else H.commentBefore=_;if(A.options.keepSourceTokens&&j)H.srcToken=q;return H}function D88(A,q,K,Y,{spaceBefore:z,comment:w,anchor:_,tag:$,end:O},H){let j={type:"scalar",offset:m23.emptyScalarPosition(q,K,Y),indent:-1,source:""},J=fiA.composeScalar(A,j,$,H);if(_){if(J.anchor=_.source.substring(1),J.anchor==="")H(_,"BAD_ALIAS","Anchor cannot be an empty string")}if(z)J.spaceBefore=!0;if(w)J.comment=w,J.range[2]=O;return J}function F23({options:A},{offset:q,source:K,end:Y},z){let w=new b23.Alias(K.substring(1));if(w.source==="")z(q,"BAD_ALIAS","Alias cannot be an empty string");if(w.source.endsWith(":"))z(q+K.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let _=q+K.length,$=B23.resolveEnd(Y,_,A.strict,z);if(w.range=[q,_,$.offset],$.comment)w.comment=$.comment;return w}Q23.composeEmptyNode=D88;Q23.composeNode=TiA});var viA=C((n23)=>{var d23=Ab6(),NiA=ViA(),c23=_D6(),l23=Kb6();function i23(A,q,{offset:K,start:Y,value:z,end:w},_){let $=Object.assign({_directives:q},A),O=new d23.Document(void 0,$),H={atKey:!1,atRoot:!0,directives:O.directives,options:O.options,schema:O.schema},j=l23.resolveProps(Y,{indicator:"doc-start",next:z??w?.[0],offset:K,onError:_,parentIndent:0,startOnNewline:!0});if(j.found){if(O.directives.docStart=!0,z&&(z.type==="block-map"||z.type==="block-seq")&&!j.hasNewline)_(j.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}O.contents=z?NiA.composeNode(H,z,j,_):NiA.composeEmptyNode(H,j.end,Y,null,j,_);let J=O.contents.range[2],M=c23.resolveEnd(w,J,!1,_);if(M.comment)O.comment=M.comment;return O.range=[K,J,M.offset],O}n23.composeDoc=i23});var X88=C((A_3)=>{var o23=g6("process"),a23=G18(),s23=Ab6(),Yb6=qb6(),kiA=Yz(),t23=viA(),e23=_D6();function zb6(A){if(typeof A==="number")return[A,A+1];if(Array.isArray(A))return A.length===2?A:[A[0],A[1]];let{offset:q,source:K}=A;return[q,q+(typeof K==="string"?K.length:1)]}function EiA(A){let q="",K=!1,Y=!1;for(let z=0;z<A.length;++z){let w=A[z];switch(w[0]){case"#":q+=(q===""?"":Y?`

`:`
`)+(w.substring(1)||" "),K=!0,Y=!1;break;case"%":if(A[z+1]?.[0]!=="#")z+=1;K=!1;break;default:if(!K)Y=!0;K=!1}}return{comment:q,afterEmptyLine:Y}}class LiA{constructor(A={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(q,K,Y,z)=>{let w=zb6(q);if(z)this.warnings.push(new Yb6.YAMLWarning(w,K,Y));else this.errors.push(new Yb6.YAMLParseError(w,K,Y))},this.directives=new a23.Directives({version:A.version||"1.2"}),this.options=A}decorate(A,q){let{comment:K,afterEmptyLine:Y}=EiA(this.prelude);if(K){let z=A.contents;if(q)A.comment=A.comment?`${A.comment}
${K}`:K;else if(Y||A.directives.docStart||!z)A.commentBefore=K;else if(kiA.isCollection(z)&&!z.flow&&z.items.length>0){let w=z.items[0];if(kiA.isPair(w))w=w.key;let _=w.commentBefore;w.commentBefore=_?`${K}
${_}`:K}else{let w=z.commentBefore;z.commentBefore=w?`${K}
${w}`:K}}if(q)Array.prototype.push.apply(A.errors,this.errors),Array.prototype.push.apply(A.warnings,this.warnings);else A.errors=this.errors,A.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:EiA(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(A,q=!1,K=-1){for(let Y of A)yield*this.next(Y);yield*this.end(q,K)}*next(A){if(o23.env.LOG_STREAM)console.dir(A,{depth:null});switch(A.type){case"directive":this.directives.add(A.source,(q,K,Y)=>{let z=zb6(A);z[0]+=q,this.onError(z,"BAD_DIRECTIVE",K,Y)}),this.prelude.push(A.source),this.atDirectives=!0;break;case"document":{let q=t23.composeDoc(this.options,this.directives,A,this.onError);if(this.atDirectives&&!q.directives.docStart)this.onError(A,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(q,!1),this.doc)yield this.doc;this.doc=q,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(A.source);break;case"error":{let q=A.source?`${A.message}: ${JSON.stringify(A.source)}`:A.message,K=new Yb6.YAMLParseError(zb6(A),"UNEXPECTED_TOKEN",q);if(this.atDirectives||!this.doc)this.errors.push(K);else this.doc.errors.push(K);break}case"doc-end":{if(!this.doc){this.errors.push(new Yb6.YAMLParseError(zb6(A),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let q=e23.resolveEnd(A.end,A.offset+A.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),q.comment){let K=this.doc.comment;this.doc.comment=K?`${K}
${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new Yb6.YAMLParseError(zb6(A),"UNEXPECTED_TOKEN",`Unsupported token ${A.type}`))}}*end(A=!1,q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(A){let K=Object.assign({_directives:this.directives},this.options),Y=new s23.Document(void 0,K);if(this.atDirectives)this.onError(q,"MISSING_CHAR","Missing directives-end indicator line");Y.range=[0,q,q],this.decorate(Y,!1),yield Y}}}A_3.Composer=LiA});var SiA=C((H_3)=>{var K_3=j88(),Y_3=M88(),z_3=qb6(),yiA=dI6();function w_3(A,q=!0,K){if(A){let Y=(z,w,_)=>{let $=typeof z==="number"?z:Array.isArray(z)?z[0]:z.offset;if(K)K($,w,_);else throw new z_3.YAMLParseError([$,$+1],w,_)};switch(A.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Y_3.resolveFlowScalar(A,q,Y);case"block-scalar":return K_3.resolveBlockScalar({options:{strict:q}},A,Y)}}return null}function __3(A,q){let{implicitKey:K=!1,indent:Y,inFlow:z=!1,offset:w=-1,type:_="PLAIN"}=q,$=yiA.stringifyString({type:_,value:A},{implicitKey:K,indent:Y>0?" ".repeat(Y):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}}),O=q.end??[{type:"newline",offset:-1,indent:Y,source:`
`}];switch($[0]){case"|":case">":{let H=$.indexOf(`
`),j=$.substring(0,H),J=$.substring(H+1)+`
`,M=[{type:"block-scalar-header",offset:w,indent:Y,source:j}];if(!RiA(M,O))M.push({type:"newline",offset:-1,indent:Y,source:`
`});return{type:"block-scalar",offset:w,indent:Y,props:M,source:J}}case'"':return{type:"double-quoted-scalar",offset:w,indent:Y,source:$,end:O};case"'":return{type:"single-quoted-scalar",offset:w,indent:Y,source:$,end:O};default:return{type:"scalar",offset:w,indent:Y,source:$,end:O}}}function $_3(A,q,K={}){let{afterKey:Y=!1,implicitKey:z=!1,inFlow:w=!1,type:_}=K,$="indent"in A?A.indent:null;if(Y&&typeof $==="number")$+=2;if(!_)switch(A.type){case"single-quoted-scalar":_="QUOTE_SINGLE";break;case"double-quoted-scalar":_="QUOTE_DOUBLE";break;case"block-scalar":{let H=A.props[0];if(H.type!=="block-scalar-header")throw Error("Invalid block scalar header");_=H.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:_="PLAIN"}let O=yiA.stringifyString({type:_,value:q},{implicitKey:z||$===null,indent:$!==null&&$>0?" ".repeat($):"",inFlow:w,options:{blockQuote:!0,lineWidth:-1}});switch(O[0]){case"|":case">":O_3(A,O);break;case'"':P88(A,O,"double-quoted-scalar");break;case"'":P88(A,O,"single-quoted-scalar");break;default:P88(A,O,"scalar")}}function O_3(A,q){let K=q.indexOf(`
`),Y=q.substring(0,K),z=q.substring(K+1)+`
`;if(A.type==="block-scalar"){let w=A.props[0];if(w.type!=="block-scalar-header")throw Error("Invalid block scalar header");w.source=Y,A.source=z}else{let{offset:w}=A,_="indent"in A?A.indent:-1,$=[{type:"block-scalar-header",offset:w,indent:_,source:Y}];if(!RiA($,"end"in A?A.end:void 0))$.push({type:"newline",offset:-1,indent:_,source:`
`});for(let O of Object.keys(A))if(O!=="type"&&O!=="offset")delete A[O];Object.assign(A,{type:"block-scalar",indent:_,props:$,source:z})}}function RiA(A,q){if(q)for(let K of q)switch(K.type){case"space":case"comment":A.push(K);break;case"newline":return A.push(K),!0}return!1}function P88(A,q,K){switch(A.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":A.type=K,A.source=q;break;case"block-scalar":{let Y=A.props.slice(1),z=q.length;if(A.props[0].type==="block-scalar-header")z-=A.props[0].source.length;for(let w of Y)w.offset+=z;delete A.props,Object.assign(A,{type:K,source:q,end:Y});break}case"block-map":case"block-seq":{let z={type:"newline",offset:A.offset+q.length,indent:A.indent,source:`
`};delete A.items,Object.assign(A,{type:K,source:q,end:[z]});break}default:{let Y="indent"in A?A.indent:-1,z="end"in A&&Array.isArray(A.end)?A.end.filter((w)=>w.type==="space"||w.type==="comment"||w.type==="newline"):[];for(let w of Object.keys(A))if(w!=="type"&&w!=="offset")delete A[w];Object.assign(A,{type:K,indent:Y,source:q,end:z})}}}H_3.createScalarToken=__3;H_3.resolveAsScalar=w_3;H_3.setScalarValue=$_3});var CiA=C((X_3)=>{var D_3=(A)=>("type"in A)?r51(A):n51(A);function r51(A){switch(A.type){case"block-scalar":{let q="";for(let K of A.props)q+=r51(K);return q+A.source}case"block-map":case"block-seq":{let q="";for(let K of A.items)q+=n51(K);return q}case"flow-collection":{let q=A.start.source;for(let K of A.items)q+=n51(K);for(let K of A.end)q+=K.source;return q}case"document":{let q=n51(A);if(A.end)for(let K of A.end)q+=K.source;return q}default:{let q=A.source;if("end"in A&&A.end)for(let K of A.end)q+=K.source;return q}}}function n51({start:A,key:q,sep:K,value:Y}){let z="";for(let w of A)z+=w.source;if(q)z+=r51(q);if(K)for(let w of K)z+=w.source;if(Y)z+=r51(Y);return z}X_3.stringify=D_3});var biA=C((Z_3)=>{var W88=Symbol("break visit"),W_3=Symbol("skip children"),hiA=Symbol("remove item");function uK6(A,q){if("type"in A&&A.type==="document")A={start:A.start,value:A.value};IiA(Object.freeze([]),A,q)}uK6.BREAK=W88;uK6.SKIP=W_3;uK6.REMOVE=hiA;uK6.itemAtPath=(A,q)=>{let K=A;for(let[Y,z]of q){let w=K?.[Y];if(w&&"items"in w)K=w.items[z];else return}return K};uK6.parentCollection=(A,q)=>{let K=uK6.itemAtPath(A,q.slice(0,-1)),Y=q[q.length-1][0],z=K?.[Y];if(z&&"items"in z)return z;throw Error("Parent collection not found")};function IiA(A,q,K){let Y=K(q,A);if(typeof Y==="symbol")return Y;for(let z of["key","value"]){let w=q[z];if(w&&"items"in w){for(let _=0;_<w.items.length;++_){let $=IiA(Object.freeze(A.concat([[z,_]])),w.items[_],K);if(typeof $==="number")_=$-1;else if($===W88)return W88;else if($===hiA)w.items.splice(_,1),_-=1}if(typeof Y==="function"&&z==="key")Y=Y(q,A)}}return typeof Y==="function"?Y(q,A):Y}Z_3.visit=uK6});var o51=C((E_3)=>{var Z88=SiA(),f_3=CiA(),T_3=biA(),G88="\uFEFF",f88="\x02",T88="\x18",V88="\x1F",V_3=(A)=>!!A&&("items"in A),N_3=(A)=>!!A&&(A.type==="scalar"||A.type==="single-quoted-scalar"||A.type==="double-quoted-scalar"||A.type==="block-scalar");function v_3(A){switch(A){case G88:return"<BOM>";case f88:return"<DOC>";case T88:return"<FLOW_END>";case V88:return"<SCALAR>";default:return JSON.stringify(A)}}function k_3(A){switch(A){case G88:return"byte-order-mark";case f88:return"doc-mode";case T88:return"flow-error-end";case V88:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(A[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}E_3.createScalarToken=Z88.createScalarToken;E_3.resolveAsScalar=Z88.resolveAsScalar;E_3.setScalarValue=Z88.setScalarValue;E_3.stringify=f_3.stringify;E_3.visit=T_3.visit;E_3.BOM=G88;E_3.DOCUMENT=f88;E_3.FLOW_END=T88;E_3.SCALAR=V88;E_3.isCollection=V_3;E_3.isScalar=N_3;E_3.prettyToken=v_3;E_3.tokenType=k_3});var v88=C((U_3)=>{var wb6=o51();function BI(A){switch(A){case void 0:case" ":case`
`:case"\r":case"\t":return!0;default:return!1}}var xiA=new Set("0123456789ABCDEFabcdef"),F_3=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),a51=new Set(",[]{}"),Q_3=new Set(` ,[]{}
\r	`),N88=(A)=>!A||Q_3.has(A);class uiA{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(A,q=!1){if(A){if(typeof A!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+A:A,this.lineEndPos=null}this.atEnd=!q;let K=this.next??"stream";while(K&&(q||this.hasChars(1)))K=yield*this.parseNext(K)}atLineEnd(){let A=this.pos,q=this.buffer[A];while(q===" "||q==="\t")q=this.buffer[++A];if(!q||q==="#"||q===`
`)return!0;if(q==="\r")return this.buffer[A+1]===`
`;return!1}charAt(A){return this.buffer[this.pos+A]}continueScalar(A){let q=this.buffer[A];if(this.indentNext>0){let K=0;while(q===" ")q=this.buffer[++K+A];if(q==="\r"){let Y=this.buffer[K+A+1];if(Y===`
`||!Y&&!this.atEnd)return A+K+1}return q===`
`||K>=this.indentNext||!q&&!this.atEnd?A+K:-1}if(q==="-"||q==="."){let K=this.buffer.substr(A,3);if((K==="---"||K==="...")&&BI(this.buffer[A+3]))return-1}return A}getLine(){let A=this.lineEndPos;if(typeof A!=="number"||A!==-1&&A<this.pos)A=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=A;if(A===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[A-1]==="\r")A-=1;return this.buffer.substring(this.pos,A)}hasChars(A){return this.pos+A<=this.buffer.length}setNext(A){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=A,null}peek(A){return this.buffer.substr(this.pos,A)}*parseNext(A){switch(A){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let A=this.getLine();if(A===null)return this.setNext("stream");if(A[0]===wb6.BOM)yield*this.pushCount(1),A=A.substring(1);if(A[0]==="%"){let q=A.length,K=A.indexOf("#");while(K!==-1){let z=A[K-1];if(z===" "||z==="\t"){q=K-1;break}else K=A.indexOf("#",K+1)}while(!0){let z=A[q-1];if(z===" "||z==="\t")q-=1;else break}let Y=(yield*this.pushCount(q))+(yield*this.pushSpaces(!0));return yield*this.pushCount(A.length-Y),this.pushNewline(),"stream"}if(this.atLineEnd()){let q=yield*this.pushSpaces(!0);return yield*this.pushCount(A.length-q),yield*this.pushNewline(),"stream"}return yield wb6.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let A=this.charAt(0);if(!A&&!this.atEnd)return this.setNext("line-start");if(A==="-"||A==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let q=this.peek(3);if((q==="---"||q==="...")&&BI(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,q==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!BI(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[A,q]=this.peek(2);if(!q&&!this.atEnd)return this.setNext("block-start");if((A==="-"||A==="?"||A===":")&&BI(q)){let K=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=K,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let A=this.getLine();if(A===null)return this.setNext("doc");let q=yield*this.pushIndicators();switch(A[q]){case"#":yield*this.pushCount(A.length-q);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(N88),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return q+=yield*this.parseBlockScalarHeader(),q+=yield*this.pushSpaces(!0),yield*this.pushCount(A.length-q),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let A,q,K=-1;do{if(A=yield*this.pushNewline(),A>0)q=yield*this.pushSpaces(!1),this.indentValue=K=q;else q=0;q+=yield*this.pushSpaces(!0)}while(A+q>0);let Y=this.getLine();if(Y===null)return this.setNext("flow");if(K!==-1&&K<this.indentNext&&Y[0]!=="#"||K===0&&(Y.startsWith("---")||Y.startsWith("..."))&&BI(Y[3])){if(!(K===this.indentNext-1&&this.flowLevel===1&&(Y[0]==="]"||Y[0]==="}")))return this.flowLevel=0,yield wb6.FLOW_END,yield*this.parseLineStart()}let z=0;while(Y[z]===",")z+=yield*this.pushCount(1),z+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(z+=yield*this.pushIndicators(),Y[z]){case void 0:return"flow";case"#":return yield*this.pushCount(Y.length-z),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(N88),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let w=this.charAt(1);if(this.flowKey||BI(w)||w===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let A=this.charAt(0),q=this.buffer.indexOf(A,this.pos+1);if(A==="'")while(q!==-1&&this.buffer[q+1]==="'")q=this.buffer.indexOf("'",q+2);else while(q!==-1){let z=0;while(this.buffer[q-1-z]==="\\")z+=1;if(z%2===0)break;q=this.buffer.indexOf('"',q+1)}let K=this.buffer.substring(0,q),Y=K.indexOf(`
`,this.pos);if(Y!==-1){while(Y!==-1){let z=this.continueScalar(Y+1);if(z===-1)break;Y=K.indexOf(`
`,z)}if(Y!==-1)q=Y-(K[Y-1]==="\r"?2:1)}if(q===-1){if(!this.atEnd)return this.setNext("quoted-scalar");q=this.buffer.length}return yield*this.pushToIndex(q+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let A=this.pos;while(!0){let q=this.buffer[++A];if(q==="+")this.blockScalarKeep=!0;else if(q>"0"&&q<="9")this.blockScalarIndent=Number(q)-1;else if(q!=="-")break}return yield*this.pushUntil((q)=>BI(q)||q==="#")}*parseBlockScalar(){let A=this.pos-1,q=0,K;A:for(let z=this.pos;K=this.buffer[z];++z)switch(K){case" ":q+=1;break;case`
`:A=z,q=0;break;case"\r":{let w=this.buffer[z+1];if(!w&&!this.atEnd)return this.setNext("block-scalar");if(w===`
`)break}default:break A}if(!K&&!this.atEnd)return this.setNext("block-scalar");if(q>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=q;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let z=this.continueScalar(A+1);if(z===-1)break;A=this.buffer.indexOf(`
`,z)}while(A!==-1);if(A===-1){if(!this.atEnd)return this.setNext("block-scalar");A=this.buffer.length}}let Y=A+1;K=this.buffer[Y];while(K===" ")K=this.buffer[++Y];if(K==="\t"){while(K==="\t"||K===" "||K==="\r"||K===`
`)K=this.buffer[++Y];A=Y-1}else if(!this.blockScalarKeep)do{let z=A-1,w=this.buffer[z];if(w==="\r")w=this.buffer[--z];let _=z;while(w===" ")w=this.buffer[--z];if(w===`
`&&z>=this.pos&&z+1+q>_)A=z;else break}while(!0);return yield wb6.SCALAR,yield*this.pushToIndex(A+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let A=this.flowLevel>0,q=this.pos-1,K=this.pos-1,Y;while(Y=this.buffer[++K])if(Y===":"){let z=this.buffer[K+1];if(BI(z)||A&&a51.has(z))break;q=K}else if(BI(Y)){let z=this.buffer[K+1];if(Y==="\r")if(z===`
`)K+=1,Y=`
`,z=this.buffer[K+1];else q=K;if(z==="#"||A&&a51.has(z))break;if(Y===`
`){let w=this.continueScalar(K+1);if(w===-1)break;K=Math.max(K,w-2)}}else{if(A&&a51.has(Y))break;q=K}if(!Y&&!this.atEnd)return this.setNext("plain-scalar");return yield wb6.SCALAR,yield*this.pushToIndex(q+1,!0),A?"flow":"doc"}*pushCount(A){if(A>0)return yield this.buffer.substr(this.pos,A),this.pos+=A,A;return 0}*pushToIndex(A,q){let K=this.buffer.slice(this.pos,A);if(K)return yield K,this.pos+=K.length,K.length;else if(q)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(N88))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let A=this.flowLevel>0,q=this.charAt(1);if(BI(q)||A&&a51.has(q)){if(!A)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let A=this.pos+2,q=this.buffer[A];while(!BI(q)&&q!==">")q=this.buffer[++A];return yield*this.pushToIndex(q===">"?A+1:A,!1)}else{let A=this.pos+1,q=this.buffer[A];while(q)if(F_3.has(q))q=this.buffer[++A];else if(q==="%"&&xiA.has(this.buffer[A+1])&&xiA.has(this.buffer[A+2]))q=this.buffer[A+=3];else break;return yield*this.pushToIndex(A,!1)}}*pushNewline(){let A=this.buffer[this.pos];if(A===`
`)return yield*this.pushCount(1);else if(A==="\r"&&this.charAt(1)===`
`)return yield*this.pushCount(2);else return 0}*pushSpaces(A){let q=this.pos-1,K;do K=this.buffer[++q];while(K===" "||A&&K==="\t");let Y=q-this.pos;if(Y>0)yield this.buffer.substr(this.pos,Y),this.pos=q;return Y}*pushUntil(A){let q=this.pos,K=this.buffer[q];while(!A(K))K=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}U_3.Lexer=uiA});var k88=C((d_3)=>{class BiA{constructor(){this.lineStarts=[],this.addNewLine=(A)=>this.lineStarts.push(A),this.linePos=(A)=>{let q=0,K=this.lineStarts.length;while(q<K){let z=q+K>>1;if(this.lineStarts[z]<A)q=z+1;else K=z}if(this.lineStarts[q]===A)return{line:q+1,col:1};if(q===0)return{line:0,col:A};let Y=this.lineStarts[q-1];return{line:q,col:A-Y+1}}}}d_3.LineCounter=BiA});var E88=C((n_3)=>{var l_3=g6("process"),miA=o51(),i_3=v88();function Ts(A,q){for(let K=0;K<A.length;++K)if(A[K].type===q)return!0;return!1}function giA(A){for(let q=0;q<A.length;++q)switch(A[q].type){case"space":case"comment":case"newline":break;default:return q}return-1}function QiA(A){switch(A?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function s51(A){switch(A.type){case"document":return A.start;case"block-map":{let q=A.items[A.items.length-1];return q.sep??q.start}case"block-seq":return A.items[A.items.length-1].start;default:return[]}}function $D6(A){if(A.length===0)return[];let q=A.length;A:while(--q>=0)switch(A[q].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break A}while(A[++q]?.type==="space");return A.splice(q,A.length)}function FiA(A){if(A.start.type==="flow-seq-start"){for(let q of A.items)if(q.sep&&!q.value&&!Ts(q.start,"explicit-key-ind")&&!Ts(q.sep,"map-value-ind")){if(q.key)q.value=q.key;if(delete q.key,QiA(q.value))if(q.value.end)Array.prototype.push.apply(q.value.end,q.sep);else q.value.end=q.sep;else Array.prototype.push.apply(q.start,q.sep);delete q.sep}}}class UiA{constructor(A){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new i_3.Lexer,this.onNewLine=A}*parse(A,q=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let K of this.lexer.lex(A,q))yield*this.next(K);if(!q)yield*this.end()}*next(A){if(this.source=A,l_3.env.LOG_TOKENS)console.log("|",miA.prettyToken(A));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=A.length;return}let q=miA.tokenType(A);if(!q){let K=`Not a YAML token: ${A}`;yield*this.pop({type:"error",offset:this.offset,message:K,source:A}),this.offset+=A.length}else if(q==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=q,yield*this.step(),q){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+A.length);break;case"space":if(this.atNewLine&&A[0]===" ")this.indent+=A.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=A.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=A.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let A=this.peek(1);if(this.type==="doc-end"&&(!A||A.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!A)return yield*this.stream();switch(A.type){case"document":return yield*this.document(A);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(A);case"block-scalar":return yield*this.blockScalar(A);case"block-map":return yield*this.blockMap(A);case"block-seq":return yield*this.blockSequence(A);case"flow-collection":return yield*this.flowCollection(A);case"doc-end":return yield*this.documentEnd(A)}yield*this.pop()}peek(A){return this.stack[this.stack.length-A]}*pop(A){let q=A??this.stack.pop();if(!q)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield q;else{let K=this.peek(1);if(q.type==="block-scalar")q.indent="indent"in K?K.indent:0;else if(q.type==="flow-collection"&&K.type==="document")q.indent=0;if(q.type==="flow-collection")FiA(q);switch(K.type){case"document":K.value=q;break;case"block-scalar":K.props.push(q);break;case"block-map":{let Y=K.items[K.items.length-1];if(Y.value){K.items.push({start:[],key:q,sep:[]}),this.onKeyLine=!0;return}else if(Y.sep)Y.value=q;else{Object.assign(Y,{key:q,sep:[]}),this.onKeyLine=!Y.explicitKey;return}break}case"block-seq":{let Y=K.items[K.items.length-1];if(Y.value)K.items.push({start:[],value:q});else Y.value=q;break}case"flow-collection":{let Y=K.items[K.items.length-1];if(!Y||Y.value)K.items.push({start:[],key:q,sep:[]});else if(Y.sep)Y.value=q;else Object.assign(Y,{key:q,sep:[]});return}default:yield*this.pop(),yield*this.pop(q)}if((K.type==="document"||K.type==="block-map"||K.type==="block-seq")&&(q.type==="block-map"||q.type==="block-seq")){let Y=q.items[q.items.length-1];if(Y&&!Y.sep&&!Y.value&&Y.start.length>0&&giA(Y.start)===-1&&(q.indent===0||Y.start.every((z)=>z.type!=="comment"||z.indent<q.indent))){if(K.type==="document")K.end=Y.start;else K.items.push({start:Y.start});q.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let A={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")A.start.push(this.sourceToken);this.stack.push(A);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(A){if(A.value)return yield*this.lineEnd(A);switch(this.type){case"doc-start":{if(giA(A.start)!==-1)yield*this.pop(),yield*this.step();else A.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":A.start.push(this.sourceToken);return}let q=this.startBlockValue(A);if(q)this.stack.push(q);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(A){if(this.type==="map-value-ind"){let q=s51(this.peek(2)),K=$D6(q),Y;if(A.end)Y=A.end,Y.push(this.sourceToken),delete A.end;else Y=[this.sourceToken];let z={type:"block-map",offset:A.offset,indent:A.indent,items:[{start:K,key:A,sep:Y}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd(A)}*blockScalar(A){switch(this.type){case"space":case"comment":case"newline":A.props.push(this.sourceToken);return;case"scalar":if(A.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let q=this.source.indexOf(`
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
`,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(A){let q=A.items[A.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let K="end"in q.value?q.value.end:void 0;if((Array.isArray(K)?K[K.length-1]:void 0)?.type==="comment")K?.push(this.sourceToken);else A.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)A.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,A.indent)){let Y=A.items[A.items.length-2]?.value?.end;if(Array.isArray(Y)){Array.prototype.push.apply(Y,q.start),Y.push(this.sourceToken),A.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=A.indent){let K=!this.onKeyLine&&this.indent===A.indent,Y=K&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",z=[];if(Y&&q.sep&&!q.value){let w=[];for(let _=0;_<q.sep.length;++_){let $=q.sep[_];switch($.type){case"newline":w.push(_);break;case"space":break;case"comment":if($.indent>A.indent)w.length=0;break;default:w.length=0}}if(w.length>=2)z=q.sep.splice(w[1])}switch(this.type){case"anchor":case"tag":if(Y||q.value)z.push(this.sourceToken),A.items.push({start:z}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(Y||q.value)z.push(this.sourceToken),A.items.push({start:z,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(q.explicitKey)if(!q.sep)if(Ts(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let w=$D6(q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:w,key:null,sep:[this.sourceToken]}]})}else if(q.value)A.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ts(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]});else if(QiA(q.key)&&!Ts(q.sep,"newline")){let w=$D6(q.start),_=q.key,$=q.sep;$.push(this.sourceToken),delete q.key,delete q.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:w,key:_,sep:$}]})}else if(z.length>0)q.sep=q.sep.concat(z,this.sourceToken);else q.sep.push(this.sourceToken);else if(!q.sep)Object.assign(q,{key:null,sep:[this.sourceToken]});else if(q.value||Y)A.items.push({start:z,key:null,sep:[this.sourceToken]});else if(Ts(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else q.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let w=this.flowScalar(this.type);if(Y||q.value)A.items.push({start:z,key:w,sep:[]}),this.onKeyLine=!0;else if(q.sep)this.stack.push(w);else Object.assign(q,{key:w,sep:[]}),this.onKeyLine=!0;return}default:{let w=this.startBlockValue(A);if(w){if(w.type==="block-seq"){if(!q.explicitKey&&q.sep&&!Ts(q.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(K)A.items.push({start:z});this.stack.push(w);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(A){let q=A.items[A.items.length-1];switch(this.type){case"newline":if(q.value){let K="end"in q.value?q.value.end:void 0;if((Array.isArray(K)?K[K.length-1]:void 0)?.type==="comment")K?.push(this.sourceToken);else A.items.push({start:[this.sourceToken]})}else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)A.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(q.start,A.indent)){let Y=A.items[A.items.length-2]?.value?.end;if(Array.isArray(Y)){Array.prototype.push.apply(Y,q.start),Y.push(this.sourceToken),A.items.pop();return}}q.start.push(this.sourceToken)}return;case"anchor":case"tag":if(q.value||this.indent<=A.indent)break;q.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==A.indent)break;if(q.value||Ts(q.start,"seq-item-ind"))A.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return}if(this.indent>A.indent){let K=this.startBlockValue(A);if(K){this.stack.push(K);return}}yield*this.pop(),yield*this.step()}*flowCollection(A){let q=A.items[A.items.length-1];if(this.type==="flow-error-end"){let K;do yield*this.pop(),K=this.peek(1);while(K&&K.type==="flow-collection")}else if(A.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!q||q.sep)A.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return;case"map-value-ind":if(!q||q.value)A.items.push({start:[],key:null,sep:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else Object.assign(q,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!q||q.value)A.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Y=this.flowScalar(this.type);if(!q||q.value)A.items.push({start:[],key:Y,sep:[]});else if(q.sep)this.stack.push(Y);else Object.assign(q,{key:Y,sep:[]});return}case"flow-map-end":case"flow-seq-end":A.end.push(this.sourceToken);return}let K=this.startBlockValue(A);if(K)this.stack.push(K);else yield*this.pop(),yield*this.step()}else{let K=this.peek(2);if(K.type==="block-map"&&(this.type==="map-value-ind"&&K.indent===A.indent||this.type==="newline"&&!K.items[K.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&K.type!=="flow-collection"){let Y=s51(K),z=$D6(Y);FiA(A);let w=A.end.splice(1,A.end.length);w.push(this.sourceToken);let _={type:"block-map",offset:A.offset,indent:A.indent,items:[{start:z,key:A,sep:w}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=_}else yield*this.lineEnd(A)}}flowScalar(A){if(this.onNewLine){let q=this.source.indexOf(`
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
`,q)+1}return{type:A,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(A){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let q=s51(A),K=$D6(q);return K.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:K,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let q=s51(A),K=$D6(q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:K,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(A,q){if(this.type!=="comment")return!1;if(this.indent<=q)return!1;return A.every((K)=>K.type==="newline"||K.type==="space")}*documentEnd(A){if(this.type!=="doc-mode"){if(A.end)A.end.push(this.sourceToken);else A.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(A){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(A.end)A.end.push(this.sourceToken);else A.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}n_3.Parser=UiA});var iiA=C((K$3)=>{var piA=X88(),o_3=Ab6(),_b6=qb6(),a_3=k18(),s_3=Yz(),t_3=k88(),diA=E88();function ciA(A){let q=A.prettyErrors!==!1;return{lineCounter:A.lineCounter||q&&new t_3.LineCounter||null,prettyErrors:q}}function e_3(A,q={}){let{lineCounter:K,prettyErrors:Y}=ciA(q),z=new diA.Parser(K?.addNewLine),w=new piA.Composer(q),_=Array.from(w.compose(z.parse(A)));if(Y&&K)for(let $ of _)$.errors.forEach(_b6.prettifyError(A,K)),$.warnings.forEach(_b6.prettifyError(A,K));if(_.length>0)return _;return Object.assign([],{empty:!0},w.streamInfo())}function liA(A,q={}){let{lineCounter:K,prettyErrors:Y}=ciA(q),z=new diA.Parser(K?.addNewLine),w=new piA.Composer(q),_=null;for(let $ of w.compose(z.parse(A),!0,A.length))if(!_)_=$;else if(_.options.logLevel!=="silent"){_.errors.push(new _b6.YAMLParseError($.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(Y&&K)_.errors.forEach(_b6.prettifyError(A,K)),_.warnings.forEach(_b6.prettifyError(A,K));return _}function A$3(A,q,K){let Y=void 0;if(typeof q==="function")Y=q;else if(K===void 0&&q&&typeof q==="object")K=q;let z=liA(A,K);if(!z)return null;if(z.warnings.forEach((w)=>a_3.warn(z.options.logLevel,w)),z.errors.length>0)if(z.options.logLevel!=="silent")throw z.errors[0];else z.errors=[];return z.toJS(Object.assign({reviver:Y},K))}function q$3(A,q,K){let Y=null;if(typeof q==="function"||Array.isArray(q))Y=q;else if(K===void 0&&q)K=q;if(typeof K==="string")K=K.length;if(typeof K==="number"){let z=Math.round(K);K=z<1?void 0:z>8?{indent:8}:{indent:z}}if(A===void 0){let{keepUndefined:z}=K??q??{};if(!z)return}if(s_3.isDocument(A)&&!Y)return A.toString(K);return new o_3.Document(A,Y,K).toString(K)}K$3.parse=A$3;K$3.parseAllDocuments=e_3;K$3.parseDocument=liA;K$3.stringify=q$3});var $$3,O$3,H$3,L88,j$3,Vs,J$3,M$3,D$3,X$3,flw,P$3,W$3,Z$3,t51,niA,G$3,f$3,T$3,V$3,N$3,v$3,k$3,E$3,L$3,y$3,R$3,S$3,C$3,h$3,I$3,b$3,x$3,u$3,B$3,m$3,g$3,F$3,y88,Q$3,U$3,p$3,d$3,c$3;var riA=k(()=>{$$3=X88(),O$3=Ab6(),H$3=t18(),L88=qb6(),j$3=FI6(),Vs=Yz(),J$3=Ps(),M$3=GM(),D$3=Zs(),X$3=Gs(),flw=o51(),P$3=v88(),W$3=k88(),Z$3=E88(),t51=iiA(),niA=mI6();G$3=$$3.Composer,f$3=O$3.Document,T$3=H$3.Schema,V$3=L88.YAMLError,N$3=L88.YAMLParseError,v$3=L88.YAMLWarning,k$3=j$3.Alias,E$3=Vs.isAlias,L$3=Vs.isCollection,y$3=Vs.isDocument,R$3=Vs.isMap,S$3=Vs.isNode,C$3=Vs.isPair,h$3=Vs.isScalar,I$3=Vs.isSeq,b$3=J$3.Pair,x$3=M$3.Scalar,u$3=D$3.YAMLMap,B$3=X$3.YAMLSeq,m$3=P$3.Lexer,g$3=W$3.LineCounter,F$3=Z$3.Parser,y88=t51.parse,Q$3=t51.parseAllDocuments,U$3=t51.parseDocument,p$3=t51.stringify,d$3=niA.visit,c$3=niA.visitAsync});function R88(A){if(typeof Bun<"u")return Bun.YAML.parse(A);return y88(A)}var oiA=k(()=>{riA()});function i$3(A){let q=A.split(`
`),K=[];for(let Y of q){let z=Y.match(/^([a-zA-Z_-]+):\s+(.+)$/);if(z){let[,w,_]=z;if(!w||!_){K.push(Y);continue}if(_.startsWith('"')&&_.endsWith('"')||_.startsWith("'")&&_.endsWith("'")){K.push(Y);continue}if(l$3.test(_)){let $=_.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");K.push(`${w}: "${$}"`);continue}}K.push(Y)}return K.join(`
`)}function fJ(A,q){let K=/^---\s*\n([\s\S]*?)---\s*\n?/,Y=A.match(K);if(!Y)return{frontmatter:{},content:A};let z=Y[1]||"",w=A.slice(Y[0].length),_={};try{let $=R88(z);if($&&typeof $==="object"&&!Array.isArray($))_=$}catch{try{let $=i$3(z),O=R88($);if(O&&typeof O==="object"&&!Array.isArray(O))_=O}catch($){let O=q?` in ${q}`:"";L(`Failed to parse YAML frontmatter${O}: ${$ instanceof Error?$.message:$}`,{level:"warn"})}}return{frontmatter:_,content:w}}function e51(A){let q=[],K="",Y=0;for(let w=0;w<A.length;w++){let _=A[w];if(_==="{")Y++,K+=_;else if(_==="}")Y--,K+=_;else if(_===","&&Y===0){let $=K.trim();if($)q.push($);K=""}else K+=_}let z=K.trim();if(z)q.push(z);return q.filter((w)=>w.length>0).flatMap((w)=>aiA(w))}function aiA(A){let q=A.match(/^([^{]*)\{([^}]+)\}(.*)$/);if(!q)return[A];let K=q[1]||"",Y=q[2]||"",z=q[3]||"",w=Y.split(",").map(($)=>$.trim()),_=[];for(let $ of w){let O=K+$+z,H=aiA(O);_.push(...H)}return _}function siA(A){if(A===void 0||A===null)return;let q=typeof A==="number"?A:parseInt(String(A),10);if(Number.isInteger(q)&&q>0)return q;return}function $R(A,q,K){if(A==null)return null;if(typeof A==="string")return A.trim()||null;if(typeof A==="number"||typeof A==="boolean")return String(A);let Y=K?`${K}:${q}`:q??"unknown";return L(`Description invalid for ${Y} - omitting`,{level:"warn"}),null}var l$3;var iV=k(()=>{oiA();G1();l$3=/[{}[\]*&#!|>%@`]|: /});function Ob6(){return HA("policySettings")?.allowManagedPermissionRulesOnly===!0}function Ns(){return!Ob6()}function r$3(A){let q=X2(A);if(!q)return null;try{let{resolvedPath:K}=d$(P1(),q),Y=bj(K);if(Y.trim()==="")return{};let z=q3(Y,!1);return z&&typeof z==="object"?z:null}catch{return null}}function o$3(A,q){if(!A||!A.permissions)return[];let{permissions:K}=A,Y=[];for(let z of n$3){let w=K[z];if(w)for(let _ of w)Y.push({source:q,ruleBehavior:z,ruleValue:Sj(_)})}return Y}function A91(){if(Ob6())return $b6("policySettings");let A=[];for(let q of Td())A.push(...$b6(q));return A}function $b6(A){let q=HA(A);return o$3(q,A)}function tiA(A){if(!a$3.includes(A.source))return!1;let q=K5(A.ruleValue),K=HA(A.source);if(!K||!K.permissions)return!1;let Y=K.permissions[A.ruleBehavior];if(!Y)return!1;let z=(w)=>K5(Sj(w));if(!Y.some((w)=>z(w)===q))return!1;try{let w={...K,permissions:{...K.permissions,[A.ruleBehavior]:Y.filter(($)=>z($)!==q)}},{error:_}=xA(A.source,w);if(_)return!1;return!0}catch(w){return $6(w),!1}}function s$3(){return{permissions:{}}}function eiA({ruleValues:A,ruleBehavior:q},K){if(Ob6())return!1;if(A.length<1)return!0;let Y=A.map(K5),z=HA(K)||r$3(K)||s$3();try{let w=z.permissions||{},_=w[q]||[],$=new Set(_.map((J)=>K5(Sj(J)))),O=Y.filter((J)=>!$.has(J));if(O.length===0)return!0;let H={...z,permissions:{...w,[q]:[..._,...O]}},j=xA(K,H);if(j.error)throw j.error;return!0}catch(w){return $6(w),!1}}var n$3,a$3;var Xm=k(()=>{x1();E0();F2();GA();Y7();p7();J2();n$3=["allow","deny","ask"];a$3=["userSettings","projectSettings","localSettings"]});import{posix as t$3}from"path";function vs(A){if(!A)return[];return A.flatMap((q)=>{switch(q.type){case"addRules":return q.rules;default:return[]}})}function nz(A,q){switch(q.type){case"setMode":return L(`Applying permission update: Setting mode to '${q.mode}'`),{...A,mode:q.mode};case"addRules":{let K=q.rules.map((z)=>K5(z));L(`Applying permission update: Adding ${q.rules.length} ${q.behavior} rule(s) to destination '${q.destination}': ${U6(K)}`);let Y=q.behavior==="allow"?"alwaysAllowRules":q.behavior==="deny"?"alwaysDenyRules":"alwaysAskRules";return{...A,[Y]:{...A[Y],[q.destination]:[...A[Y][q.destination]||[],...K]}}}case"replaceRules":{let K=q.rules.map((z)=>K5(z));L(`Replacing all ${q.behavior} rules for destination '${q.destination}' with ${q.rules.length} rule(s): ${U6(K)}`);let Y=q.behavior==="allow"?"alwaysAllowRules":q.behavior==="deny"?"alwaysDenyRules":"alwaysAskRules";return{...A,[Y]:{...A[Y],[q.destination]:K}}}case"addDirectories":{L(`Applying permission update: Adding ${q.directories.length} director${q.directories.length===1?"y":"ies"} with destination '${q.destination}': ${U6(q.directories)}`);let K=new Map(A.additionalWorkingDirectories);for(let Y of q.directories)K.set(Y,{path:Y,source:q.destination});return{...A,additionalWorkingDirectories:K}}case"removeRules":{let K=q.rules.map(($)=>K5($));L(`Applying permission update: Removing ${q.rules.length} ${q.behavior} rule(s) from source '${q.destination}': ${U6(K)}`);let Y=q.behavior==="allow"?"alwaysAllowRules":q.behavior==="deny"?"alwaysDenyRules":"alwaysAskRules",z=A[Y][q.destination]||[],w=new Set(K),_=z.filter(($)=>!w.has($));return{...A,[Y]:{...A[Y],[q.destination]:_}}}case"removeDirectories":{L(`Applying permission update: Removing ${q.directories.length} director${q.directories.length===1?"y":"ies"}: ${U6(q.directories)}`);let K=new Map(A.additionalWorkingDirectories);for(let Y of q.directories)K.delete(Y);return{...A,additionalWorkingDirectories:K}}default:return A}}function nV(A,q){let K=A;for(let Y of q)K=nz(K,Y);return K}function S88(A){return A==="localSettings"||A==="userSettings"||A==="projectSettings"}function Pm(A){if(!S88(A.destination))return;switch(L(`Persisting permission update: ${A.type} to source '${A.destination}'`),A.type){case"addRules":{L(`Persisting ${A.rules.length} ${A.behavior} rule(s) to ${A.destination}`),eiA({ruleValues:A.rules,ruleBehavior:A.behavior},A.destination);break}case"addDirectories":{L(`Persisting ${A.directories.length} director${A.directories.length===1?"y":"ies"} to ${A.destination}`);let K=HA(A.destination)?.permissions?.additionalDirectories||[],Y=A.directories.filter((z)=>!K.includes(z));if(Y.length>0){let z=[...K,...Y];xA(A.destination,{permissions:{additionalDirectories:z}})}break}case"removeRules":{L(`Removing ${A.rules.length} ${A.behavior} rule(s) from ${A.destination}`);let Y=(HA(A.destination)?.permissions||{})[A.behavior]||[],z=new Set(A.rules.map(K5)),w=Y.filter((_)=>{let $=K5(Sj(_));return!z.has($)});xA(A.destination,{permissions:{[A.behavior]:w}});break}case"removeDirectories":{L(`Removing ${A.directories.length} director${A.directories.length===1?"y":"ies"} from ${A.destination}`);let K=HA(A.destination)?.permissions?.additionalDirectories||[],Y=new Set(A.directories),z=K.filter((w)=>!Y.has(w));xA(A.destination,{permissions:{additionalDirectories:z}});break}case"setMode":{L(`Persisting mode '${A.mode}' to ${A.destination}`),xA(A.destination,{permissions:{defaultMode:A.mode}});break}case"replaceRules":{L(`Replacing all ${A.behavior} rules in ${A.destination} with ${A.rules.length} rule(s)`);let q=A.rules.map(K5);xA(A.destination,{permissions:{[A.behavior]:q}});break}}}function mI(A){for(let q of A)Pm(q)}function q91(A,q="session"){let K=AnA(A);if(K==="/")return;return{type:"addRules",rules:[{toolName:"Read",ruleContent:t$3.isAbsolute(K)?`/${K}/**`:`${K}/**`}],behavior:"allow",destination:q}}var xH=k(()=>{E0();G1();GA();Xm();iz();a1()});function w4(A,q,K,Y,z){if(Y==="m")throw TypeError("Private method is not writable");if(Y==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof q==="function"?A!==q||!z:!q.has(A))throw TypeError("Cannot write private member to an object whose class did not declare it");return Y==="a"?z.call(A,K):z?z.value=K:q.set(A,K),K}function b8(A,q,K,Y){if(K==="a"&&!Y)throw TypeError("Private accessor was defined without a getter");if(typeof q==="function"?A!==q||!Y:!q.has(A))throw TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?Y:K==="a"?Y.call(A):Y?Y.value:q.get(A)}var Cd=()=>{};var C88=function(){let{crypto:A}=globalThis;if(A?.randomUUID)return C88=A.randomUUID.bind(A),A.randomUUID();let q=new Uint8Array(1),K=A?()=>A.getRandomValues(q)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(Y)=>(+Y^K()&15>>+Y/4).toString(16))};function hd(A){return typeof A==="object"&&A!==null&&(("name"in A)&&A.name==="AbortError"||("message"in A)&&String(A.message).includes("FetchRequestCanceledException"))}var Hb6=(A)=>{if(A instanceof Error)return A;if(typeof A==="object"&&A!==null){try{if(Object.prototype.toString.call(A)==="[object Error]"){let q=Error(A.message,A.cause?{cause:A.cause}:{});if(A.stack)q.stack=A.stack;if(A.cause&&!q.cause)q.cause=A.cause;if(A.name)q.name=A.name;return q}}catch{}try{return Error(JSON.stringify(A))}catch{}}return Error(A)};var _4,V4,Rz,bZ,Wm,jb6,BK6,Jb6,mK6,Mb6,Db6,Xb6,Pb6;var xZ=k(()=>{_4=class _4 extends Error{};V4=class V4 extends _4{constructor(A,q,K,Y){super(`${V4.makeMessage(A,q,K)}`);this.status=A,this.headers=Y,this.requestID=Y?.get("request-id"),this.error=q}static makeMessage(A,q,K){let Y=q?.message?typeof q.message==="string"?q.message:JSON.stringify(q.message):q?JSON.stringify(q):K;if(A&&Y)return`${A} ${Y}`;if(A)return`${A} status code (no body)`;if(Y)return Y;return"(no status code or body)"}static generate(A,q,K,Y){if(!A||!Y)return new bZ({message:K,cause:Hb6(q)});let z=q;if(A===400)return new jb6(A,z,K,Y);if(A===401)return new BK6(A,z,K,Y);if(A===403)return new Jb6(A,z,K,Y);if(A===404)return new mK6(A,z,K,Y);if(A===409)return new Mb6(A,z,K,Y);if(A===422)return new Db6(A,z,K,Y);if(A===429)return new Xb6(A,z,K,Y);if(A>=500)return new Pb6(A,z,K,Y);return new V4(A,z,K,Y)}};Rz=class Rz extends V4{constructor({message:A}={}){super(void 0,void 0,A||"Request was aborted.",void 0)}};bZ=class bZ extends V4{constructor({message:A,cause:q}){super(void 0,void 0,A||"Connection error.",void 0);if(q)this.cause=q}};Wm=class Wm extends bZ{constructor({message:A}={}){super({message:A??"Request timed out."})}};jb6=class jb6 extends V4{};BK6=class BK6 extends V4{};Jb6=class Jb6 extends V4{};mK6=class mK6 extends V4{};Mb6=class Mb6 extends V4{};Db6=class Db6 extends V4{};Xb6=class Xb6 extends V4{};Pb6=class Pb6 extends V4{}});function K91(A){if(typeof A!=="object")return{};return A??{}}function KnA(A){if(!A)return!0;for(let q in A)return!1;return!0}function YnA(A,q){return Object.prototype.hasOwnProperty.call(A,q)}var AO3,qnA=(A)=>{return AO3.test(A)},h88=(A)=>(h88=Array.isArray,h88(A)),I88,znA=(A,q)=>{if(typeof q!=="number"||!Number.isInteger(q))throw new _4(`${A} must be an integer`);if(q<0)throw new _4(`${A} must be a positive integer`);return q},Y91=(A)=>{try{return JSON.parse(A)}catch(q){return}};var gK6=k(()=>{xZ();AO3=/^[a-z][a-z0-9+.-]*:/i,I88=h88});var wnA=(A)=>new Promise((q)=>setTimeout(q,A));var ks="0.74.0";function qO3(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}function YO3(){if(typeof navigator>"u"||!navigator)return null;let A=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:q,pattern:K}of A){let Y=K.exec(navigator.userAgent);if(Y){let z=Y[1]||0,w=Y[2]||0,_=Y[3]||0;return{browser:q,version:`${z}.${w}.${_}`}}}return null}var HnA=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},KO3=()=>{let A=qO3();if(A==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ks,"X-Stainless-OS":$nA(Deno.build.os),"X-Stainless-Arch":_nA(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ks,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(A==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ks,"X-Stainless-OS":$nA(globalThis.process.platform??"unknown"),"X-Stainless-Arch":_nA(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let q=YO3();if(q)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ks,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${q.browser}`,"X-Stainless-Runtime-Version":q.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ks,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},_nA=(A)=>{if(A==="x32")return"x32";if(A==="x86_64"||A==="x64")return"x64";if(A==="arm")return"arm";if(A==="aarch64"||A==="arm64")return"arm64";if(A)return`other:${A}`;return"unknown"},$nA=(A)=>{if(A=A.toLowerCase(),A.includes("ios"))return"iOS";if(A==="android")return"Android";if(A==="darwin")return"MacOS";if(A==="win32")return"Windows";if(A==="freebsd")return"FreeBSD";if(A==="openbsd")return"OpenBSD";if(A==="linux")return"Linux";if(A)return`Other:${A}`;return"Unknown"},OnA,jnA=()=>{return OnA??(OnA=KO3())};var b88=()=>{};function JnA(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function x88(...A){let q=globalThis.ReadableStream;if(typeof q>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new q(...A)}function z91(A){let q=Symbol.asyncIterator in A?A[Symbol.asyncIterator]():A[Symbol.iterator]();return x88({start(){},async pull(K){let{done:Y,value:z}=await q.next();if(Y)K.close();else K.enqueue(z)},async cancel(){await q.return?.()}})}function Wb6(A){if(A[Symbol.asyncIterator])return A;let q=A.getReader();return{async next(){try{let K=await q.read();if(K?.done)q.releaseLock();return K}catch(K){throw q.releaseLock(),K}},async return(){let K=q.cancel();return q.releaseLock(),await K,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function MnA(A){if(A===null||typeof A!=="object")return;if(A[Symbol.asyncIterator]){await A[Symbol.asyncIterator]().return?.();return}let q=A.getReader(),K=q.cancel();q.releaseLock(),await K}var DnA=({headers:A,body:q})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(q)}};function WnA(A){let q=0;for(let z of A)q+=z.length;let K=new Uint8Array(q),Y=0;for(let z of A)K.set(z,Y),Y+=z.length;return K}function Zb6(A){let q;return(XnA??(q=new globalThis.TextEncoder,XnA=q.encode.bind(q)))(A)}function u88(A){let q;return(PnA??(q=new globalThis.TextDecoder,PnA=q.decode.bind(q)))(A)}var XnA,PnA;class Es{constructor(){ek.set(this,void 0),AE.set(this,void 0),w4(this,ek,new Uint8Array,"f"),w4(this,AE,null,"f")}decode(A){if(A==null)return[];let q=A instanceof ArrayBuffer?new Uint8Array(A):typeof A==="string"?Zb6(A):A;w4(this,ek,WnA([b8(this,ek,"f"),q]),"f");let K=[],Y;while((Y=_O3(b8(this,ek,"f"),b8(this,AE,"f")))!=null){if(Y.carriage&&b8(this,AE,"f")==null){w4(this,AE,Y.index,"f");continue}if(b8(this,AE,"f")!=null&&(Y.index!==b8(this,AE,"f")+1||Y.carriage)){K.push(u88(b8(this,ek,"f").subarray(0,b8(this,AE,"f")-1))),w4(this,ek,b8(this,ek,"f").subarray(b8(this,AE,"f")),"f"),w4(this,AE,null,"f");continue}let z=b8(this,AE,"f")!==null?Y.preceding-1:Y.preceding,w=u88(b8(this,ek,"f").subarray(0,z));K.push(w),w4(this,ek,b8(this,ek,"f").subarray(Y.index),"f"),w4(this,AE,null,"f")}return K}flush(){if(!b8(this,ek,"f").length)return[];return this.decode(`
`)}}function _O3(A,q){for(let z=q??0;z<A.length;z++){if(A[z]===10)return{preceding:z,index:z+1,carriage:!1};if(A[z]===13)return{preceding:z,index:z+1,carriage:!0}}return null}function ZnA(A){for(let Y=0;Y<A.length-1;Y++){if(A[Y]===10&&A[Y+1]===10)return Y+2;if(A[Y]===13&&A[Y+1]===13)return Y+2;if(A[Y]===13&&A[Y+1]===10&&Y+3<A.length&&A[Y+2]===13&&A[Y+3]===10)return Y+4}return-1}var ek,AE;var B88=k(()=>{Cd();ek=new WeakMap,AE=new WeakMap;Es.NEWLINE_CHARS=new Set([`
`,"\r"]);Es.NEWLINE_REGEXP=/\r\n|[\n\r]/g});function Gb6(){}function w91(A,q,K){if(!q||_91[A]>_91[K])return Gb6;else return q[A].bind(q)}function lX(A){let q=A.logger,K=A.logLevel??"off";if(!q)return $O3;let Y=GnA.get(q);if(Y&&Y[0]===K)return Y[1];let z={error:w91("error",q,K),warn:w91("warn",q,K),info:w91("info",q,K),debug:w91("debug",q,K)};return GnA.set(q,[K,z]),z}var _91,m88=(A,q,K)=>{if(!A)return;if(YnA(_91,A))return A;lX(K).warn(`${q} was set to ${JSON.stringify(A)}, expected one of ${JSON.stringify(Object.keys(_91))}`);return},$O3,GnA,Id=(A)=>{if(A.options)A.options={...A.options},delete A.options.headers;if(A.headers)A.headers=Object.fromEntries((A.headers instanceof Headers?[...A.headers]:Object.entries(A.headers)).map(([q,K])=>[q,q.toLowerCase()==="x-api-key"||q.toLowerCase()==="authorization"||q.toLowerCase()==="cookie"||q.toLowerCase()==="set-cookie"?"***":K]));if("retryOfRequestLogID"in A){if(A.retryOfRequestLogID)A.retryOf=A.retryOfRequestLogID;delete A.retryOfRequestLogID}return A};var $91=k(()=>{gK6();_91={off:0,error:200,warn:300,info:400,debug:500};$O3={error:Gb6,warn:Gb6,info:Gb6,debug:Gb6},GnA=new WeakMap});async function*OO3(A,q){if(!A.body){if(q.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new _4("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new _4("Attempted to iterate over a response with no body")}let K=new fnA,Y=new Es,z=Wb6(A.body);for await(let w of HO3(z))for(let _ of Y.decode(w)){let $=K.decode(_);if($)yield $}for(let w of Y.flush()){let _=K.decode(w);if(_)yield _}}async function*HO3(A){let q=new Uint8Array;for await(let K of A){if(K==null)continue;let Y=K instanceof ArrayBuffer?new Uint8Array(K):typeof K==="string"?Zb6(K):K,z=new Uint8Array(q.length+Y.length);z.set(q),z.set(Y,q.length),q=z;let w;while((w=ZnA(q))!==-1)yield q.slice(0,w),q=q.slice(w)}if(q.length>0)yield q}class fnA{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(A){if(A.endsWith("\r"))A=A.substring(0,A.length-1);if(!A){if(!this.event&&!this.data.length)return null;let z={event:this.event,data:this.data.join(`
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],z}if(this.chunks.push(A),A.startsWith(":"))return null;let[q,K,Y]=jO3(A,":");if(Y.startsWith(" "))Y=Y.substring(1);if(q==="event")this.event=Y;else if(q==="data")this.data.push(Y);return null}}function jO3(A,q){let K=A.indexOf(q);if(K!==-1)return[A.substring(0,K),q,A.substring(K+q.length)];return[A,"",""]}var fb6,mf;var g88=k(()=>{Cd();xZ();B88();gK6();$91();xZ();mf=class mf{constructor(A,q,K){this.iterator=A,fb6.set(this,void 0),this.controller=q,w4(this,fb6,K,"f")}static fromSSEResponse(A,q,K){let Y=!1,z=K?lX(K):console;async function*w(){if(Y)throw new _4("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");Y=!0;let _=!1;try{for await(let $ of OO3(A,q)){if($.event==="completion")try{yield JSON.parse($.data)}catch(O){throw z.error("Could not parse message into JSON:",$.data),z.error("From chunk:",$.raw),O}if($.event==="message_start"||$.event==="message_delta"||$.event==="message_stop"||$.event==="content_block_start"||$.event==="content_block_delta"||$.event==="content_block_stop")try{yield JSON.parse($.data)}catch(O){throw z.error("Could not parse message into JSON:",$.data),z.error("From chunk:",$.raw),O}if($.event==="ping")continue;if($.event==="error")throw new V4(void 0,Y91($.data)??$.data,void 0,A.headers)}_=!0}catch($){if(hd($))return;throw $}finally{if(!_)q.abort()}}return new mf(w,q,K)}static fromReadableStream(A,q,K){let Y=!1;async function*z(){let _=new Es,$=Wb6(A);for await(let O of $)for(let H of _.decode(O))yield H;for(let O of _.flush())yield O}async function*w(){if(Y)throw new _4("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");Y=!0;let _=!1;try{for await(let $ of z()){if(_)continue;if($)yield JSON.parse($)}_=!0}catch($){if(hd($))return;throw $}finally{if(!_)q.abort()}}return new mf(w,q,K)}[(fb6=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let A=[],q=[],K=this.iterator(),Y=(z)=>{return{next:()=>{if(z.length===0){let w=K.next();A.push(w),q.push(w)}return z.shift()}}};return[new mf(()=>Y(A),this.controller,b8(this,fb6,"f")),new mf(()=>Y(q),this.controller,b8(this,fb6,"f"))]}toReadableStream(){let A=this,q;return x88({async start(){q=A[Symbol.asyncIterator]()},async pull(K){try{let{value:Y,done:z}=await q.next();if(z)return K.close();let w=Zb6(JSON.stringify(Y)+`
`);K.enqueue(w)}catch(Y){K.error(Y)}},async cancel(){await q.return?.()}})}}});async function O91(A,q){let{response:K,requestLogID:Y,retryOfRequestLogID:z,startTime:w}=q,_=await(async()=>{if(q.options.stream){if(lX(A).debug("response",K.status,K.url,K.headers,K.body),q.options.__streamClass)return q.options.__streamClass.fromSSEResponse(K,q.controller);return mf.fromSSEResponse(K,q.controller)}if(K.status===204)return null;if(q.options.__binaryResponse)return K;let O=K.headers.get("content-type")?.split(";")[0]?.trim();if(O?.includes("application/json")||O?.endsWith("+json")){if(K.headers.get("content-length")==="0")return;let M=await K.json();return F88(M,K)}return await K.text()})();return lX(A).debug(`[${Y}] response parsed`,Id({retryOfRequestLogID:z,url:K.url,status:K.status,body:_,durationMs:Date.now()-w})),_}function F88(A,q){if(!A||typeof A!=="object"||Array.isArray(A))return A;return Object.defineProperty(A,"_request_id",{value:q.headers.get("request-id"),enumerable:!1})}var Q88=k(()=>{g88();$91()});var Tb6,FK6;var H91=k(()=>{Cd();Q88();FK6=class FK6 extends Promise{constructor(A,q,K=O91){super((Y)=>{Y(null)});this.responsePromise=q,this.parseResponse=K,Tb6.set(this,void 0),w4(this,Tb6,A,"f")}_thenUnwrap(A){return new FK6(b8(this,Tb6,"f"),this.responsePromise,async(q,K)=>F88(A(await this.parseResponse(q,K),K),K.response))}asResponse(){return this.responsePromise.then((A)=>A.response)}async withResponse(){let[A,q]=await Promise.all([this.parse(),this.asResponse()]);return{data:A,response:q,request_id:q.headers.get("request-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((A)=>this.parseResponse(b8(this,Tb6,"f"),A));return this.parsedPromise}then(A,q){return this.parse().then(A,q)}catch(A){return this.parse().catch(A)}finally(A){return this.parse().finally(A)}};Tb6=new WeakMap});var j91,U88,J91,gI,Vb6;var Zm=k(()=>{Cd();xZ();Q88();H91();gK6();U88=class U88{constructor(A,q,K,Y){j91.set(this,void 0),w4(this,j91,A,"f"),this.options=Y,this.response=q,this.body=K}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let A=this.nextPageRequestOptions();if(!A)throw new _4("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await b8(this,j91,"f").requestAPIList(this.constructor,A)}async*iterPages(){let A=this;yield A;while(A.hasNextPage())A=await A.getNextPage(),yield A}async*[(j91=new WeakMap,Symbol.asyncIterator)](){for await(let A of this.iterPages())for(let q of A.getPaginatedItems())yield q}};J91=class J91 extends FK6{constructor(A,q,K){super(A,q,async(Y,z)=>new K(Y,z.response,await O91(Y,z),z.options))}async*[Symbol.asyncIterator](){let A=await this;for await(let q of A)yield q}};gI=class gI extends U88{constructor(A,q,K,Y){super(A,q,K,Y);this.data=K.data||[],this.has_more=K.has_more||!1,this.first_id=K.first_id||null,this.last_id=K.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let q=this.first_id;if(!q)return null;return{...this.options,query:{...K91(this.options.query),before_id:q}}}let A=this.last_id;if(!A)return null;return{...this.options,query:{...K91(this.options.query),after_id:A}}}};Vb6=class Vb6 extends U88{constructor(A,q,K,Y){super(A,q,K,Y);this.data=K.data||[],this.has_more=K.has_more||!1,this.next_page=K.next_page||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){let A=this.next_page;if(!A)return null;return{...this.options,query:{...K91(this.options.query),page:A}}}}});function QK6(A,q,K){return d88(),new File(A,q??"unknown_file",K)}function Nb6(A,q){let K=typeof A==="object"&&A!==null&&(("name"in A)&&A.name&&String(A.name)||("url"in A)&&A.url&&String(A.url)||("filename"in A)&&A.filename&&String(A.filename)||("path"in A)&&A.path&&String(A.path))||"";return q?K.split(/[\\/]/).pop()||void 0:K}function MO3(A){let q=typeof A==="function"?A:A.fetch,K=TnA.get(q);if(K)return K;let Y=(async()=>{try{let z="Response"in q?q.Response:(await q("data:,")).constructor,w=new FormData;if(w.toString()===await new z(w).text())return!1;return!0}catch{return!0}})();return TnA.set(q,Y),Y}var d88=()=>{if(typeof File>"u"){let{process:A}=globalThis,q=typeof A?.versions?.node==="string"&&parseInt(A.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(q?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},c88=(A)=>A!=null&&typeof A==="object"&&typeof A[Symbol.asyncIterator]==="function",OD6=async(A,q,K=!0)=>{return{...A,body:await DO3(A.body,q,K)}},TnA,DO3=async(A,q,K=!0)=>{if(!await MO3(q))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let Y=new FormData;return await Promise.all(Object.entries(A||{}).map(([z,w])=>p88(Y,z,w,K))),Y},XO3=(A)=>A instanceof Blob&&("name"in A),p88=async(A,q,K,Y)=>{if(K===void 0)return;if(K==null)throw TypeError(`Received null for "${q}"; to pass null in FormData, you must use the string 'null'`);if(typeof K==="string"||typeof K==="number"||typeof K==="boolean")A.append(q,String(K));else if(K instanceof Response){let z={},w=K.headers.get("Content-Type");if(w)z={type:w};A.append(q,QK6([await K.blob()],Nb6(K,Y),z))}else if(c88(K))A.append(q,QK6([await new Response(z91(K)).blob()],Nb6(K,Y)));else if(XO3(K))A.append(q,QK6([K],Nb6(K,Y),{type:K.type}));else if(Array.isArray(K))await Promise.all(K.map((z)=>p88(A,q+"[]",z,Y)));else if(typeof K==="object")await Promise.all(Object.entries(K).map(([z,w])=>p88(A,`${q}[${z}]`,w,Y)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${K} instead`)};var HD6=k(()=>{TnA=new WeakMap});async function M91(A,q,K){if(d88(),A=await A,q||(q=Nb6(A,!0)),PO3(A)){if(A instanceof File&&q==null&&K==null)return A;return QK6([await A.arrayBuffer()],q??A.name,{type:A.type,lastModified:A.lastModified,...K})}if(WO3(A)){let z=await A.blob();return q||(q=new URL(A.url).pathname.split(/[\\/]/).pop()),QK6(await l88(z),q,K)}let Y=await l88(A);if(!K?.type){let z=Y.find((w)=>typeof w==="object"&&("type"in w)&&w.type);if(typeof z==="string")K={...K,type:z}}return QK6(Y,q,K)}async function l88(A){let q=[];if(typeof A==="string"||ArrayBuffer.isView(A)||A instanceof ArrayBuffer)q.push(A);else if(VnA(A))q.push(A instanceof Blob?A:await A.arrayBuffer());else if(c88(A))for await(let K of A)q.push(...await l88(K));else{let K=A?.constructor?.name;throw Error(`Unexpected data type: ${typeof A}${K?`; constructor: ${K}`:""}${ZO3(A)}`)}return q}function ZO3(A){if(typeof A!=="object"||A===null)return"";return`; props: [${Object.getOwnPropertyNames(A).map((K)=>`"${K}"`).join(", ")}]`}var VnA=(A)=>A!=null&&typeof A==="object"&&typeof A.size==="number"&&typeof A.type==="string"&&typeof A.text==="function"&&typeof A.slice==="function"&&typeof A.arrayBuffer==="function",PO3=(A)=>A!=null&&typeof A==="object"&&typeof A.name==="string"&&typeof A.lastModified==="number"&&VnA(A),WO3=(A)=>A!=null&&typeof A==="object"&&typeof A.url==="string"&&typeof A.blob==="function";var NnA=k(()=>{HD6();HD6()});var i88=k(()=>{NnA()});var vnA=()=>{};class uH{constructor(A){this._client=A}}function*fO3(A){if(!A)return;if(knA in A){let{values:Y,nulls:z}=A;yield*Y.entries();for(let w of z)yield[w,null];return}let q=!1,K;if(A instanceof Headers)K=A.entries();else if(I88(A))K=A;else q=!0,K=Object.entries(A??{});for(let Y of K){let z=Y[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let w=I88(Y[1])?Y[1]:[Y[1]],_=!1;for(let $ of w){if($===void 0)continue;if(q&&!_)_=!0,yield[z,null];yield[z,$]}}}var knA,E3=(A)=>{let q=new Headers,K=new Set;for(let Y of A){let z=new Set;for(let[w,_]of fO3(Y)){let $=w.toLowerCase();if(!z.has($))q.delete(w),z.add($);if(_===null)q.delete(w),K.add($);else q.append(w,_),K.delete($)}}return{[knA]:!0,values:q,nulls:K}};var qE=k(()=>{gK6();knA=Symbol.for("brand.privateNullableHeaders")});function D91(A){return typeof A==="object"&&A!==null&&vb6 in A}function n88(A,q){let K=new Set;if(A){for(let Y of A)if(D91(Y))K.add(Y[vb6])}if(q)for(let Y of q){if(D91(Y))K.add(Y[vb6]);if(Array.isArray(Y.content)){for(let z of Y.content)if(D91(z))K.add(z[vb6])}}return Array.from(K)}function X91(A,q){let K=n88(A,q);if(K.length===0)return{};return{"x-stainless-helper":K.join(", ")}}function EnA(A){if(D91(A))return{"x-stainless-helper":A[vb6]};return{}}var vb6;var kb6=k(()=>{vb6=Symbol("anthropic.sdk.stainlessHelper")});function ynA(A){return A.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var LnA,TO3=(A=ynA)=>function(K,...Y){if(K.length===1)return K[0];let z=!1,w=[],_=K.reduce((j,J,M)=>{if(/[?#]/.test(J))z=!0;let D=Y[M],X=(z?encodeURIComponent:A)(""+D);if(M!==Y.length&&(D==null||typeof D==="object"&&D.toString===Object.getPrototypeOf(Object.getPrototypeOf(D.hasOwnProperty??LnA)??LnA)?.toString))X=D+"",w.push({start:j.length+J.length,length:X.length,error:`Value of type ${Object.prototype.toString.call(D).slice(8,-1)} is not a valid path parameter`});return j+J+(M===Y.length?"":X)},""),$=_.split(/[?#]/,1)[0],O=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,H;while((H=O.exec($))!==null)w.push({start:H.index,length:H[0].length,error:`Value "${H[0]}" can't be safely passed as a path parameter`});if(w.sort((j,J)=>j.start-J.start),w.length>0){let j=0,J=w.reduce((M,D)=>{let X=" ".repeat(D.start-j),P="^".repeat(D.length);return j=D.start+D.length,M+X+P},"");throw new _4(`Path parameters result in path with invalid segments:
${w.map((M)=>M.error).join(`
`)}
${_}
${J}`)}return _},UO;var Ls=k(()=>{xZ();LnA=Object.freeze(Object.create(null)),UO=TO3(ynA)});var Eb6;var r88=k(()=>{Zm();qE();kb6();HD6();Ls();Eb6=class Eb6 extends uH{list(A={},q){let{betas:K,...Y}=A??{};return this._client.getAPIList("/v1/files",gI,{query:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"files-api-2025-04-14"].toString()},q?.headers])})}delete(A,q={},K){let{betas:Y}=q??{};return this._client.delete(UO`/v1/files/${A}`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"files-api-2025-04-14"].toString()},K?.headers])})}download(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/files/${A}/content`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},K?.headers]),__binaryResponse:!0})}retrieveMetadata(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/files/${A}`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"files-api-2025-04-14"].toString()},K?.headers])})}upload(A,q){let{betas:K,...Y}=A;return this._client.post("/v1/files",OD6({body:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"files-api-2025-04-14"].toString()},EnA(Y.file),q?.headers])},this._client))}}});var Lb6;var o88=k(()=>{Zm();qE();Ls();Lb6=class Lb6 extends uH{retrieve(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/models/${A}?beta=true`,{...K,headers:E3([{...Y?.toString()!=null?{"anthropic-beta":Y?.toString()}:void 0},K?.headers])})}list(A={},q){let{betas:K,...Y}=A??{};return this._client.getAPIList("/v1/models?beta=true",gI,{query:Y,...q,headers:E3([{...K?.toString()!=null?{"anthropic-beta":K?.toString()}:void 0},q?.headers])})}}});var ys=k(()=>{xZ()});var P91;var a88=k(()=>{P91={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function RnA(A){return A?.output_format??A?.output_config?.format}function s88(A,q,K){let Y=RnA(q);if(!q||!("parse"in(Y??{})))return{...A,content:A.content.map((z)=>{if(z.type==="text"){let w=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(w,"parsed",{get(){return K.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return t88(A,q,K)}function t88(A,q,K){let Y=null,z=A.content.map((w)=>{if(w.type==="text"){let _=vO3(q,w.text);if(Y===null)Y=_;let $=Object.defineProperty({...w},"parsed_output",{value:_,enumerable:!1});return Object.defineProperty($,"parsed",{get(){return K.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),_},enumerable:!1})}return w});return{...A,content:z,parsed_output:Y}}function vO3(A,q){let K=RnA(A);if(K?.type!=="json_schema")return null;try{if("parse"in K)return K.parse(q);return JSON.parse(q)}catch(Y){throw new _4(`Failed to parse structured output: ${Y}`)}}var e88=k(()=>{xZ()});var kO3=(A)=>{let q=0,K=[];while(q<A.length){let Y=A[q];if(Y==="\\"){q++;continue}if(Y==="{"){K.push({type:"brace",value:"{"}),q++;continue}if(Y==="}"){K.push({type:"brace",value:"}"}),q++;continue}if(Y==="["){K.push({type:"paren",value:"["}),q++;continue}if(Y==="]"){K.push({type:"paren",value:"]"}),q++;continue}if(Y===":"){K.push({type:"separator",value:":"}),q++;continue}if(Y===","){K.push({type:"delimiter",value:","}),q++;continue}if(Y==='"'){let $="",O=!1;Y=A[++q];while(Y!=='"'){if(q===A.length){O=!0;break}if(Y==="\\"){if(q++,q===A.length){O=!0;break}$+=Y+A[q],Y=A[++q]}else $+=Y,Y=A[++q]}if(Y=A[++q],!O)K.push({type:"string",value:$});continue}if(Y&&/\s/.test(Y)){q++;continue}let w=/[0-9]/;if(Y&&w.test(Y)||Y==="-"||Y==="."){let $="";if(Y==="-")$+=Y,Y=A[++q];while(Y&&w.test(Y)||Y===".")$+=Y,Y=A[++q];K.push({type:"number",value:$});continue}let _=/[a-z]/i;if(Y&&_.test(Y)){let $="";while(Y&&_.test(Y)){if(q===A.length)break;$+=Y,Y=A[++q]}if($=="true"||$=="false"||$==="null")K.push({type:"name",value:$});else{q++;continue}continue}q++}return K},jD6=(A)=>{if(A.length===0)return A;let q=A[A.length-1];switch(q.type){case"separator":return A=A.slice(0,A.length-1),jD6(A);break;case"number":let K=q.value[q.value.length-1];if(K==="."||K==="-")return A=A.slice(0,A.length-1),jD6(A);case"string":let Y=A[A.length-2];if(Y?.type==="delimiter")return A=A.slice(0,A.length-1),jD6(A);else if(Y?.type==="brace"&&Y.value==="{")return A=A.slice(0,A.length-1),jD6(A);break;case"delimiter":return A=A.slice(0,A.length-1),jD6(A);break}return A},EO3=(A)=>{let q=[];if(A.map((K)=>{if(K.type==="brace")if(K.value==="{")q.push("}");else q.splice(q.lastIndexOf("}"),1);if(K.type==="paren")if(K.value==="[")q.push("]");else q.splice(q.lastIndexOf("]"),1)}),q.length>0)q.reverse().map((K)=>{if(K==="}")A.push({type:"brace",value:"}"});else if(K==="]")A.push({type:"paren",value:"]"})});return A},LO3=(A)=>{let q="";return A.map((K)=>{switch(K.type){case"string":q+='"'+K.value+'"';break;default:q+=K.value;break}}),q},W91=(A)=>JSON.parse(LO3(EO3(jD6(kO3(A)))));var AA8=()=>{};var Z91=k(()=>{g88()});function InA(A){return A.type==="tool_use"||A.type==="server_tool_use"||A.type==="mcp_tool_use"}function bnA(A){}var OR,Rs,JD6,yb6,G91,Rb6,Sb6,f91,Cb6,bd,hb6,T91,V91,UK6,N91,v91,Ib6,qA8,SnA,k91,KA8,YA8,zA8,CnA,hnA="__json_buf",bb6;var xnA=k(()=>{Cd();AA8();ys();Z91();e88();bb6=class bb6{constructor(A,q){OR.add(this),this.messages=[],this.receivedMessages=[],Rs.set(this,void 0),JD6.set(this,null),this.controller=new AbortController,yb6.set(this,void 0),G91.set(this,()=>{}),Rb6.set(this,()=>{}),Sb6.set(this,void 0),f91.set(this,()=>{}),Cb6.set(this,()=>{}),bd.set(this,{}),hb6.set(this,!1),T91.set(this,!1),V91.set(this,!1),UK6.set(this,!1),N91.set(this,void 0),v91.set(this,void 0),Ib6.set(this,void 0),k91.set(this,(K)=>{if(w4(this,T91,!0,"f"),hd(K))K=new Rz;if(K instanceof Rz)return w4(this,V91,!0,"f"),this._emit("abort",K);if(K instanceof _4)return this._emit("error",K);if(K instanceof Error){let Y=new _4(K.message);return Y.cause=K,this._emit("error",Y)}return this._emit("error",new _4(String(K)))}),w4(this,yb6,new Promise((K,Y)=>{w4(this,G91,K,"f"),w4(this,Rb6,Y,"f")}),"f"),w4(this,Sb6,new Promise((K,Y)=>{w4(this,f91,K,"f"),w4(this,Cb6,Y,"f")}),"f"),b8(this,yb6,"f").catch(()=>{}),b8(this,Sb6,"f").catch(()=>{}),w4(this,JD6,A,"f"),w4(this,Ib6,q?.logger??console,"f")}get response(){return b8(this,N91,"f")}get request_id(){return b8(this,v91,"f")}async withResponse(){w4(this,UK6,!0,"f");let A=await b8(this,yb6,"f");if(!A)throw Error("Could not resolve a `Response` object");return{data:this,response:A,request_id:A.headers.get("request-id")}}static fromReadableStream(A){let q=new bb6(null);return q._run(()=>q._fromReadableStream(A)),q}static createMessage(A,q,K,{logger:Y}={}){let z=new bb6(q,{logger:Y});for(let w of q.messages)z._addMessageParam(w);return w4(z,JD6,{...q,stream:!0},"f"),z._run(()=>z._createMessage(A,{...q,stream:!0},{...K,headers:{...K?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(A){A().then(()=>{this._emitFinal(),this._emit("end")},b8(this,k91,"f"))}_addMessageParam(A){this.messages.push(A)}_addMessage(A,q=!0){if(this.receivedMessages.push(A),q)this._emit("message",A)}async _createMessage(A,q,K){let Y=K?.signal,z;if(Y){if(Y.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),Y.addEventListener("abort",z)}try{b8(this,OR,"m",KA8).call(this);let{response:w,data:_}=await A.create({...q,stream:!0},{...K,signal:this.controller.signal}).withResponse();this._connected(w);for await(let $ of _)b8(this,OR,"m",YA8).call(this,$);if(_.controller.signal?.aborted)throw new Rz;b8(this,OR,"m",zA8).call(this)}finally{if(Y&&z)Y.removeEventListener("abort",z)}}_connected(A){if(this.ended)return;w4(this,N91,A,"f"),w4(this,v91,A?.headers.get("request-id"),"f"),b8(this,G91,"f").call(this,A),this._emit("connect")}get ended(){return b8(this,hb6,"f")}get errored(){return b8(this,T91,"f")}get aborted(){return b8(this,V91,"f")}abort(){this.controller.abort()}on(A,q){return(b8(this,bd,"f")[A]||(b8(this,bd,"f")[A]=[])).push({listener:q}),this}off(A,q){let K=b8(this,bd,"f")[A];if(!K)return this;let Y=K.findIndex((z)=>z.listener===q);if(Y>=0)K.splice(Y,1);return this}once(A,q){return(b8(this,bd,"f")[A]||(b8(this,bd,"f")[A]=[])).push({listener:q,once:!0}),this}emitted(A){return new Promise((q,K)=>{if(w4(this,UK6,!0,"f"),A!=="error")this.once("error",K);this.once(A,q)})}async done(){w4(this,UK6,!0,"f"),await b8(this,Sb6,"f")}get currentMessage(){return b8(this,Rs,"f")}async finalMessage(){return await this.done(),b8(this,OR,"m",qA8).call(this)}async finalText(){return await this.done(),b8(this,OR,"m",SnA).call(this)}_emit(A,...q){if(b8(this,hb6,"f"))return;if(A==="end")w4(this,hb6,!0,"f"),b8(this,f91,"f").call(this);let K=b8(this,bd,"f")[A];if(K)b8(this,bd,"f")[A]=K.filter((Y)=>!Y.once),K.forEach(({listener:Y})=>Y(...q));if(A==="abort"){let Y=q[0];if(!b8(this,UK6,"f")&&!K?.length)Promise.reject(Y);b8(this,Rb6,"f").call(this,Y),b8(this,Cb6,"f").call(this,Y),this._emit("end");return}if(A==="error"){let Y=q[0];if(!b8(this,UK6,"f")&&!K?.length)Promise.reject(Y);b8(this,Rb6,"f").call(this,Y),b8(this,Cb6,"f").call(this,Y),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",b8(this,OR,"m",qA8).call(this))}async _fromReadableStream(A,q){let K=q?.signal,Y;if(K){if(K.aborted)this.controller.abort();Y=this.controller.abort.bind(this.controller),K.addEventListener("abort",Y)}try{b8(this,OR,"m",KA8).call(this),this._connected(null);let z=mf.fromReadableStream(A,this.controller);for await(let w of z)b8(this,OR,"m",YA8).call(this,w);if(z.controller.signal?.aborted)throw new Rz;b8(this,OR,"m",zA8).call(this)}finally{if(K&&Y)K.removeEventListener("abort",Y)}}[(Rs=new WeakMap,JD6=new WeakMap,yb6=new WeakMap,G91=new WeakMap,Rb6=new WeakMap,Sb6=new WeakMap,f91=new WeakMap,Cb6=new WeakMap,bd=new WeakMap,hb6=new WeakMap,T91=new WeakMap,V91=new WeakMap,UK6=new WeakMap,N91=new WeakMap,v91=new WeakMap,Ib6=new WeakMap,k91=new WeakMap,OR=new WeakSet,qA8=function(){if(this.receivedMessages.length===0)throw new _4("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},SnA=function(){if(this.receivedMessages.length===0)throw new _4("stream ended without producing a Message with role=assistant");let q=this.receivedMessages.at(-1).content.filter((K)=>K.type==="text").map((K)=>K.text);if(q.length===0)throw new _4("stream ended without producing a content block with type=text");return q.join(" ")},KA8=function(){if(this.ended)return;w4(this,Rs,void 0,"f")},YA8=function(q){if(this.ended)return;let K=b8(this,OR,"m",CnA).call(this,q);switch(this._emit("streamEvent",q,K),q.type){case"content_block_delta":{let Y=K.content.at(-1);switch(q.delta.type){case"text_delta":{if(Y.type==="text")this._emit("text",q.delta.text,Y.text||"");break}case"citations_delta":{if(Y.type==="text")this._emit("citation",q.delta.citation,Y.citations??[]);break}case"input_json_delta":{if(InA(Y)&&Y.input)this._emit("inputJson",q.delta.partial_json,Y.input);break}case"thinking_delta":{if(Y.type==="thinking")this._emit("thinking",q.delta.thinking,Y.thinking);break}case"signature_delta":{if(Y.type==="thinking")this._emit("signature",Y.signature);break}case"compaction_delta":{if(Y.type==="compaction"&&Y.content)this._emit("compaction",Y.content);break}default:bnA(q.delta)}break}case"message_stop":{this._addMessageParam(K),this._addMessage(s88(K,b8(this,JD6,"f"),{logger:b8(this,Ib6,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",K.content.at(-1));break}case"message_start":{w4(this,Rs,K,"f");break}case"content_block_start":case"message_delta":break}},zA8=function(){if(this.ended)throw new _4("stream has ended, this shouldn't happen");let q=b8(this,Rs,"f");if(!q)throw new _4("request ended without sending any chunks");return w4(this,Rs,void 0,"f"),s88(q,b8(this,JD6,"f"),{logger:b8(this,Ib6,"f")})},CnA=function(q){let K=b8(this,Rs,"f");if(q.type==="message_start"){if(K)throw new _4(`Unexpected event order, got ${q.type} before receiving "message_stop"`);return q.message}if(!K)throw new _4(`Unexpected event order, got ${q.type} before "message_start"`);switch(q.type){case"message_stop":return K;case"message_delta":if(K.container=q.delta.container,K.stop_reason=q.delta.stop_reason,K.stop_sequence=q.delta.stop_sequence,K.usage.output_tokens=q.usage.output_tokens,K.context_management=q.context_management,q.usage.input_tokens!=null)K.usage.input_tokens=q.usage.input_tokens;if(q.usage.cache_creation_input_tokens!=null)K.usage.cache_creation_input_tokens=q.usage.cache_creation_input_tokens;if(q.usage.cache_read_input_tokens!=null)K.usage.cache_read_input_tokens=q.usage.cache_read_input_tokens;if(q.usage.server_tool_use!=null)K.usage.server_tool_use=q.usage.server_tool_use;if(q.usage.iterations!=null)K.usage.iterations=q.usage.iterations;return K;case"content_block_start":return K.content.push(q.content_block),K;case"content_block_delta":{let Y=K.content.at(q.index);switch(q.delta.type){case"text_delta":{if(Y?.type==="text")K.content[q.index]={...Y,text:(Y.text||"")+q.delta.text};break}case"citations_delta":{if(Y?.type==="text")K.content[q.index]={...Y,citations:[...Y.citations??[],q.delta.citation]};break}case"input_json_delta":{if(Y&&InA(Y)){let z=Y[hnA]||"";z+=q.delta.partial_json;let w={...Y};if(Object.defineProperty(w,hnA,{value:z,enumerable:!1,writable:!0}),z)try{w.input=W91(z)}catch(_){let $=new _4(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${_}. JSON: ${z}`);b8(this,k91,"f").call(this,$)}K.content[q.index]=w}break}case"thinking_delta":{if(Y?.type==="thinking")K.content[q.index]={...Y,thinking:Y.thinking+q.delta.thinking};break}case"signature_delta":{if(Y?.type==="thinking")K.content[q.index]={...Y,signature:q.delta.signature};break}case"compaction_delta":{if(Y?.type==="compaction")K.content[q.index]={...Y,content:(Y.content||"")+q.delta.content};break}default:bnA(q.delta)}return K}case"content_block_stop":return K}},Symbol.asyncIterator)](){let A=[],q=[],K=!1;return this.on("streamEvent",(Y)=>{let z=q.shift();if(z)z.resolve(Y);else A.push(Y)}),this.on("end",()=>{K=!0;for(let Y of q)Y.resolve(void 0);q.length=0}),this.on("abort",(Y)=>{K=!0;for(let z of q)z.reject(Y);q.length=0}),this.on("error",(Y)=>{K=!0;for(let z of q)z.reject(Y);q.length=0}),{next:async()=>{if(!A.length){if(K)return{value:void 0,done:!0};return new Promise((z,w)=>q.push({resolve:z,reject:w})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:A.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new mf(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var MD6;var E91=k(()=>{MD6=class MD6 extends Error{constructor(A){let q=typeof A==="string"?A:A.map((K)=>{if(K.type==="text")return K.text;return`[${K.type}]`}).join(" ");super(q);this.name="ToolError",this.content=A}}});var unA=1e5,BnA=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
1. Task Overview
The user's core request and success criteria
Any clarifications or constraints they specified
2. Current State
What has been completed so far
Files created, modified, or analyzed (with paths if relevant)
Key outputs or artifacts produced
3. Important Discoveries
Technical constraints or requirements uncovered
Decisions made and their rationale
Errors encountered and how they were resolved
What approaches were tried that didn't work (and why)
4. Next Steps
Specific actions needed to complete the task
Any blockers or open questions to resolve
Priority order if multiple steps remain
5. Context to Preserve
User preferences or style requirements
Domain-specific details that aren't obvious
Any promises made to the user
Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
Wrap your summary in <summary></summary> tags.`;function gnA(){let A,q;return{promise:new Promise((Y,z)=>{A=Y,q=z}),resolve:A,reject:q}}async function yO3(A,q=A.messages.at(-1)){if(!q||q.role!=="assistant"||!q.content||typeof q.content==="string")return null;let K=q.content.filter((z)=>z.type==="tool_use");if(K.length===0)return null;return{role:"user",content:await Promise.all(K.map(async(z)=>{let w=A.tools.find((_)=>("name"in _?_.name:_.mcp_server_name)===z.name);if(!w||!("run"in w))return{type:"tool_result",tool_use_id:z.id,content:`Error: Tool '${z.name}' not found`,is_error:!0};try{let _=z.input;if("parse"in w&&w.parse)_=w.parse(_);let $=await w.run(_);return{type:"tool_result",tool_use_id:z.id,content:$}}catch(_){return{type:"tool_result",tool_use_id:z.id,content:_ instanceof MD6?_.content:`Error: ${_ instanceof Error?_.message:String(_)}`,is_error:!0}}}))}}var xb6,DD6,pK6,FD,ub6,KE,xd,Ss,Bb6,mnA,wA8,mb6;var _A8=k(()=>{Cd();E91();xZ();qE();kb6();mb6=class mb6{constructor(A,q,K){xb6.add(this),this.client=A,DD6.set(this,!1),pK6.set(this,!1),FD.set(this,void 0),ub6.set(this,void 0),KE.set(this,void 0),xd.set(this,void 0),Ss.set(this,void 0),Bb6.set(this,0),w4(this,FD,{params:{...q,messages:structuredClone(q.messages)}},"f");let z=["BetaToolRunner",...n88(q.tools,q.messages)].join(", ");w4(this,ub6,{...K,headers:E3([{"x-stainless-helper":z},K?.headers])},"f"),w4(this,Ss,gnA(),"f")}async*[(DD6=new WeakMap,pK6=new WeakMap,FD=new WeakMap,ub6=new WeakMap,KE=new WeakMap,xd=new WeakMap,Ss=new WeakMap,Bb6=new WeakMap,xb6=new WeakSet,mnA=async function(){let q=b8(this,FD,"f").params.compactionControl;if(!q||!q.enabled)return!1;let K=0;if(b8(this,KE,"f")!==void 0)try{let O=await b8(this,KE,"f");K=O.usage.input_tokens+(O.usage.cache_creation_input_tokens??0)+(O.usage.cache_read_input_tokens??0)+O.usage.output_tokens}catch{return!1}let Y=q.contextTokenThreshold??unA;if(K<Y)return!1;let z=q.model??b8(this,FD,"f").params.model,w=q.summaryPrompt??BnA,_=b8(this,FD,"f").params.messages;if(_[_.length-1].role==="assistant"){let O=_[_.length-1];if(Array.isArray(O.content)){let H=O.content.filter((j)=>j.type!=="tool_use");if(H.length===0)_.pop();else O.content=H}}let $=await this.client.beta.messages.create({model:z,messages:[..._,{role:"user",content:[{type:"text",text:w}]}],max_tokens:b8(this,FD,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if($.content[0]?.type!=="text")throw new _4("Expected text response for compaction");return b8(this,FD,"f").params.messages=[{role:"user",content:$.content}],!0},Symbol.asyncIterator)](){var A;if(b8(this,DD6,"f"))throw new _4("Cannot iterate over a consumed stream");w4(this,DD6,!0,"f"),w4(this,pK6,!0,"f"),w4(this,xd,void 0,"f");try{while(!0){let q;try{if(b8(this,FD,"f").params.max_iterations&&b8(this,Bb6,"f")>=b8(this,FD,"f").params.max_iterations)break;w4(this,pK6,!1,"f"),w4(this,xd,void 0,"f"),w4(this,Bb6,(A=b8(this,Bb6,"f"),A++,A),"f"),w4(this,KE,void 0,"f");let{max_iterations:K,compactionControl:Y,...z}=b8(this,FD,"f").params;if(z.stream)q=this.client.beta.messages.stream({...z},b8(this,ub6,"f")),w4(this,KE,q.finalMessage(),"f"),b8(this,KE,"f").catch(()=>{}),yield q;else w4(this,KE,this.client.beta.messages.create({...z,stream:!1},b8(this,ub6,"f")),"f"),yield b8(this,KE,"f");if(!await b8(this,xb6,"m",mnA).call(this)){if(!b8(this,pK6,"f")){let{role:$,content:O}=await b8(this,KE,"f");b8(this,FD,"f").params.messages.push({role:$,content:O})}let _=await b8(this,xb6,"m",wA8).call(this,b8(this,FD,"f").params.messages.at(-1));if(_)b8(this,FD,"f").params.messages.push(_);else if(!b8(this,pK6,"f"))break}}finally{if(q)q.abort()}}if(!b8(this,KE,"f"))throw new _4("ToolRunner concluded without a message from the server");b8(this,Ss,"f").resolve(await b8(this,KE,"f"))}catch(q){throw w4(this,DD6,!1,"f"),b8(this,Ss,"f").promise.catch(()=>{}),b8(this,Ss,"f").reject(q),w4(this,Ss,gnA(),"f"),q}}setMessagesParams(A){if(typeof A==="function")b8(this,FD,"f").params=A(b8(this,FD,"f").params);else b8(this,FD,"f").params=A;w4(this,pK6,!0,"f"),w4(this,xd,void 0,"f")}async generateToolResponse(){let A=await b8(this,KE,"f")??this.params.messages.at(-1);if(!A)return null;return b8(this,xb6,"m",wA8).call(this,A)}done(){return b8(this,Ss,"f").promise}async runUntilDone(){if(!b8(this,DD6,"f"))for await(let A of this);return this.done()}get params(){return b8(this,FD,"f").params}pushMessages(...A){this.setMessagesParams((q)=>({...q,messages:[...q.messages,...A]}))}then(A,q){return this.runUntilDone().then(A,q)}};wA8=async function(q){if(b8(this,xd,"f")!==void 0)return b8(this,xd,"f");return w4(this,xd,yO3(b8(this,FD,"f").params,q),"f"),b8(this,xd,"f")}});var XD6;var $A8=k(()=>{xZ();B88();XD6=class XD6{constructor(A,q){this.iterator=A,this.controller=q}async*decoder(){let A=new Es;for await(let q of this.iterator)for(let K of A.decode(q))yield JSON.parse(K);for(let q of A.flush())yield JSON.parse(q)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(A,q){if(!A.body){if(q.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new _4("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new _4("Attempted to iterate over a response with no body")}return new XD6(Wb6(A.body),q)}}});var gb6;var OA8=k(()=>{Zm();qE();$A8();ys();Ls();gb6=class gb6 extends uH{create(A,q){let{betas:K,...Y}=A;return this._client.post("/v1/messages/batches?beta=true",{body:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"message-batches-2024-09-24"].toString()},q?.headers])})}retrieve(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/messages/batches/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"message-batches-2024-09-24"].toString()},K?.headers])})}list(A={},q){let{betas:K,...Y}=A??{};return this._client.getAPIList("/v1/messages/batches?beta=true",gI,{query:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"message-batches-2024-09-24"].toString()},q?.headers])})}delete(A,q={},K){let{betas:Y}=q??{};return this._client.delete(UO`/v1/messages/batches/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"message-batches-2024-09-24"].toString()},K?.headers])})}cancel(A,q={},K){let{betas:Y}=q??{};return this._client.post(UO`/v1/messages/batches/${A}/cancel?beta=true`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"message-batches-2024-09-24"].toString()},K?.headers])})}async results(A,q={},K){let Y=await this.retrieve(A);if(!Y.results_url)throw new _4(`No batch \`results_url\`; Has it finished processing? ${Y.processing_status} - ${Y.id}`);let{betas:z}=q??{};return this._client.get(Y.results_url,{...K,headers:E3([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},K?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((w,_)=>XD6.fromResponse(_.response,_.controller))}}});function QnA(A){if(!A.output_format)return A;if(A.output_config?.format)throw new _4("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:q,...K}=A;return{...K,output_config:{...A.output_config,format:q}}}var FnA,SO3,Cs;var HA8=k(()=>{ys();a88();qE();kb6();e88();xnA();_A8();E91();OA8();OA8();_A8();E91();FnA={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},SO3=["claude-opus-4-6"];Cs=class Cs extends uH{constructor(){super(...arguments);this.batches=new gb6(this._client)}create(A,q){let K=QnA(A),{betas:Y,...z}=K;if(z.model in FnA)console.warn(`The model '${z.model}' is deprecated and will reach end-of-life on ${FnA[z.model]}
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(z.model in SO3&&z.thinking&&z.thinking.type==="enabled")console.warn(`Using Claude with ${z.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let w=this._client._options.timeout;if(!z.stream&&w==null){let $=P91[z.model]??void 0;w=this._client.calculateNonstreamingTimeout(z.max_tokens,$)}let _=X91(z.tools,z.messages);return this._client.post("/v1/messages?beta=true",{body:z,timeout:w??600000,...q,headers:E3([{...Y?.toString()!=null?{"anthropic-beta":Y?.toString()}:void 0},_,q?.headers]),stream:K.stream??!1})}parse(A,q){return q={...q,headers:E3([{"anthropic-beta":[...A.betas??[],"structured-outputs-2025-12-15"].toString()},q?.headers])},this.create(A,q).then((K)=>t88(K,A,{logger:this._client.logger??console}))}stream(A,q){return bb6.createMessage(this,A,q)}countTokens(A,q){let K=QnA(A),{betas:Y,...z}=K;return this._client.post("/v1/messages/count_tokens?beta=true",{body:z,...q,headers:E3([{"anthropic-beta":[...Y??[],"token-counting-2024-11-01"].toString()},q?.headers])})}toolRunner(A,q){return new mb6(this._client,A,q)}};Cs.Batches=gb6;Cs.BetaToolRunner=mb6;Cs.ToolError=MD6});var Fb6;var jA8=k(()=>{Zm();qE();HD6();Ls();Fb6=class Fb6 extends uH{create(A,q={},K){let{betas:Y,...z}=q??{};return this._client.post(UO`/v1/skills/${A}/versions?beta=true`,OD6({body:z,...K,headers:E3([{"anthropic-beta":[...Y??[],"skills-2025-10-02"].toString()},K?.headers])},this._client))}retrieve(A,q,K){let{skill_id:Y,betas:z}=q;return this._client.get(UO`/v1/skills/${Y}/versions/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},K?.headers])})}list(A,q={},K){let{betas:Y,...z}=q??{};return this._client.getAPIList(UO`/v1/skills/${A}/versions?beta=true`,Vb6,{query:z,...K,headers:E3([{"anthropic-beta":[...Y??[],"skills-2025-10-02"].toString()},K?.headers])})}delete(A,q,K){let{skill_id:Y,betas:z}=q;return this._client.delete(UO`/v1/skills/${Y}/versions/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},K?.headers])})}}});var PD6;var JA8=k(()=>{jA8();jA8();Zm();qE();HD6();Ls();PD6=class PD6 extends uH{constructor(){super(...arguments);this.versions=new Fb6(this._client)}create(A={},q){let{betas:K,...Y}=A??{};return this._client.post("/v1/skills?beta=true",OD6({body:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"skills-2025-10-02"].toString()},q?.headers])},this._client,!1))}retrieve(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/skills/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"skills-2025-10-02"].toString()},K?.headers])})}list(A={},q){let{betas:K,...Y}=A??{};return this._client.getAPIList("/v1/skills?beta=true",Vb6,{query:Y,...q,headers:E3([{"anthropic-beta":[...K??[],"skills-2025-10-02"].toString()},q?.headers])})}delete(A,q={},K){let{betas:Y}=q??{};return this._client.delete(UO`/v1/skills/${A}?beta=true`,{...K,headers:E3([{"anthropic-beta":[...Y??[],"skills-2025-10-02"].toString()},K?.headers])})}};PD6.Versions=Fb6});var uZ;var MA8=k(()=>{r88();r88();o88();o88();HA8();HA8();JA8();JA8();uZ=class uZ extends uH{constructor(){super(...arguments);this.models=new Lb6(this._client),this.messages=new Cs(this._client),this.files=new Eb6(this._client),this.skills=new PD6(this._client)}};uZ.Models=Lb6;uZ.Messages=Cs;uZ.Files=Eb6;uZ.Skills=PD6});var hs;var DA8=k(()=>{qE();hs=class hs extends uH{create(A,q){let{betas:K,...Y}=A;return this._client.post("/v1/complete",{body:Y,timeout:this._client._options.timeout??600000,...q,headers:E3([{...K?.toString()!=null?{"anthropic-beta":K?.toString()}:void 0},q?.headers]),stream:A.stream??!1})}}});function UnA(A){return A?.output_config?.format}function XA8(A,q,K){let Y=UnA(q);if(!q||!("parse"in(Y??{})))return{...A,content:A.content.map((z)=>{if(z.type==="text")return Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return z}),parsed_output:null};return PA8(A,q,K)}function PA8(A,q,K){let Y=null,z=A.content.map((w)=>{if(w.type==="text"){let _=bO3(q,w.text);if(Y===null)Y=_;return Object.defineProperty({...w},"parsed_output",{value:_,enumerable:!1})}return w});return{...A,content:z,parsed_output:Y}}function bO3(A,q){let K=UnA(A);if(K?.type!=="json_schema")return null;try{if("parse"in K)return K.parse(q);return JSON.parse(q)}catch(Y){throw new _4(`Failed to parse structured output: ${Y}`)}}var WA8=k(()=>{xZ()});function lnA(A){return A.type==="tool_use"||A.type==="server_tool_use"}function inA(A){}var HR,Is,WD6,Qb6,L91,Ub6,pb6,y91,db6,ud,cb6,R91,S91,dK6,C91,h91,lb6,ZA8,pnA,GA8,fA8,TA8,VA8,dnA,cnA="__json_buf",ib6;var nnA=k(()=>{Cd();ys();Z91();AA8();WA8();ib6=class ib6{constructor(A,q){HR.add(this),this.messages=[],this.receivedMessages=[],Is.set(this,void 0),WD6.set(this,null),this.controller=new AbortController,Qb6.set(this,void 0),L91.set(this,()=>{}),Ub6.set(this,()=>{}),pb6.set(this,void 0),y91.set(this,()=>{}),db6.set(this,()=>{}),ud.set(this,{}),cb6.set(this,!1),R91.set(this,!1),S91.set(this,!1),dK6.set(this,!1),C91.set(this,void 0),h91.set(this,void 0),lb6.set(this,void 0),GA8.set(this,(K)=>{if(w4(this,R91,!0,"f"),hd(K))K=new Rz;if(K instanceof Rz)return w4(this,S91,!0,"f"),this._emit("abort",K);if(K instanceof _4)return this._emit("error",K);if(K instanceof Error){let Y=new _4(K.message);return Y.cause=K,this._emit("error",Y)}return this._emit("error",new _4(String(K)))}),w4(this,Qb6,new Promise((K,Y)=>{w4(this,L91,K,"f"),w4(this,Ub6,Y,"f")}),"f"),w4(this,pb6,new Promise((K,Y)=>{w4(this,y91,K,"f"),w4(this,db6,Y,"f")}),"f"),b8(this,Qb6,"f").catch(()=>{}),b8(this,pb6,"f").catch(()=>{}),w4(this,WD6,A,"f"),w4(this,lb6,q?.logger??console,"f")}get response(){return b8(this,C91,"f")}get request_id(){return b8(this,h91,"f")}async withResponse(){w4(this,dK6,!0,"f");let A=await b8(this,Qb6,"f");if(!A)throw Error("Could not resolve a `Response` object");return{data:this,response:A,request_id:A.headers.get("request-id")}}static fromReadableStream(A){let q=new ib6(null);return q._run(()=>q._fromReadableStream(A)),q}static createMessage(A,q,K,{logger:Y}={}){let z=new ib6(q,{logger:Y});for(let w of q.messages)z._addMessageParam(w);return w4(z,WD6,{...q,stream:!0},"f"),z._run(()=>z._createMessage(A,{...q,stream:!0},{...K,headers:{...K?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(A){A().then(()=>{this._emitFinal(),this._emit("end")},b8(this,GA8,"f"))}_addMessageParam(A){this.messages.push(A)}_addMessage(A,q=!0){if(this.receivedMessages.push(A),q)this._emit("message",A)}async _createMessage(A,q,K){let Y=K?.signal,z;if(Y){if(Y.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),Y.addEventListener("abort",z)}try{b8(this,HR,"m",fA8).call(this);let{response:w,data:_}=await A.create({...q,stream:!0},{...K,signal:this.controller.signal}).withResponse();this._connected(w);for await(let $ of _)b8(this,HR,"m",TA8).call(this,$);if(_.controller.signal?.aborted)throw new Rz;b8(this,HR,"m",VA8).call(this)}finally{if(Y&&z)Y.removeEventListener("abort",z)}}_connected(A){if(this.ended)return;w4(this,C91,A,"f"),w4(this,h91,A?.headers.get("request-id"),"f"),b8(this,L91,"f").call(this,A),this._emit("connect")}get ended(){return b8(this,cb6,"f")}get errored(){return b8(this,R91,"f")}get aborted(){return b8(this,S91,"f")}abort(){this.controller.abort()}on(A,q){return(b8(this,ud,"f")[A]||(b8(this,ud,"f")[A]=[])).push({listener:q}),this}off(A,q){let K=b8(this,ud,"f")[A];if(!K)return this;let Y=K.findIndex((z)=>z.listener===q);if(Y>=0)K.splice(Y,1);return this}once(A,q){return(b8(this,ud,"f")[A]||(b8(this,ud,"f")[A]=[])).push({listener:q,once:!0}),this}emitted(A){return new Promise((q,K)=>{if(w4(this,dK6,!0,"f"),A!=="error")this.once("error",K);this.once(A,q)})}async done(){w4(this,dK6,!0,"f"),await b8(this,pb6,"f")}get currentMessage(){return b8(this,Is,"f")}async finalMessage(){return await this.done(),b8(this,HR,"m",ZA8).call(this)}async finalText(){return await this.done(),b8(this,HR,"m",pnA).call(this)}_emit(A,...q){if(b8(this,cb6,"f"))return;if(A==="end")w4(this,cb6,!0,"f"),b8(this,y91,"f").call(this);let K=b8(this,ud,"f")[A];if(K)b8(this,ud,"f")[A]=K.filter((Y)=>!Y.once),K.forEach(({listener:Y})=>Y(...q));if(A==="abort"){let Y=q[0];if(!b8(this,dK6,"f")&&!K?.length)Promise.reject(Y);b8(this,Ub6,"f").call(this,Y),b8(this,db6,"f").call(this,Y),this._emit("end");return}if(A==="error"){let Y=q[0];if(!b8(this,dK6,"f")&&!K?.length)Promise.reject(Y);b8(this,Ub6,"f").call(this,Y),b8(this,db6,"f").call(this,Y),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",b8(this,HR,"m",ZA8).call(this))}async _fromReadableStream(A,q){let K=q?.signal,Y;if(K){if(K.aborted)this.controller.abort();Y=this.controller.abort.bind(this.controller),K.addEventListener("abort",Y)}try{b8(this,HR,"m",fA8).call(this),this._connected(null);let z=mf.fromReadableStream(A,this.controller);for await(let w of z)b8(this,HR,"m",TA8).call(this,w);if(z.controller.signal?.aborted)throw new Rz;b8(this,HR,"m",VA8).call(this)}finally{if(K&&Y)K.removeEventListener("abort",Y)}}[(Is=new WeakMap,WD6=new WeakMap,Qb6=new WeakMap,L91=new WeakMap,Ub6=new WeakMap,pb6=new WeakMap,y91=new WeakMap,db6=new WeakMap,ud=new WeakMap,cb6=new WeakMap,R91=new WeakMap,S91=new WeakMap,dK6=new WeakMap,C91=new WeakMap,h91=new WeakMap,lb6=new WeakMap,GA8=new WeakMap,HR=new WeakSet,ZA8=function(){if(this.receivedMessages.length===0)throw new _4("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},pnA=function(){if(this.receivedMessages.length===0)throw new _4("stream ended without producing a Message with role=assistant");let q=this.receivedMessages.at(-1).content.filter((K)=>K.type==="text").map((K)=>K.text);if(q.length===0)throw new _4("stream ended without producing a content block with type=text");return q.join(" ")},fA8=function(){if(this.ended)return;w4(this,Is,void 0,"f")},TA8=function(q){if(this.ended)return;let K=b8(this,HR,"m",dnA).call(this,q);switch(this._emit("streamEvent",q,K),q.type){case"content_block_delta":{let Y=K.content.at(-1);switch(q.delta.type){case"text_delta":{if(Y.type==="text")this._emit("text",q.delta.text,Y.text||"");break}case"citations_delta":{if(Y.type==="text")this._emit("citation",q.delta.citation,Y.citations??[]);break}case"input_json_delta":{if(lnA(Y)&&Y.input)this._emit("inputJson",q.delta.partial_json,Y.input);break}case"thinking_delta":{if(Y.type==="thinking")this._emit("thinking",q.delta.thinking,Y.thinking);break}case"signature_delta":{if(Y.type==="thinking")this._emit("signature",Y.signature);break}default:inA(q.delta)}break}case"message_stop":{this._addMessageParam(K),this._addMessage(XA8(K,b8(this,WD6,"f"),{logger:b8(this,lb6,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",K.content.at(-1));break}case"message_start":{w4(this,Is,K,"f");break}case"content_block_start":case"message_delta":break}},VA8=function(){if(this.ended)throw new _4("stream has ended, this shouldn't happen");let q=b8(this,Is,"f");if(!q)throw new _4("request ended without sending any chunks");return w4(this,Is,void 0,"f"),XA8(q,b8(this,WD6,"f"),{logger:b8(this,lb6,"f")})},dnA=function(q){let K=b8(this,Is,"f");if(q.type==="message_start"){if(K)throw new _4(`Unexpected event order, got ${q.type} before receiving "message_stop"`);return q.message}if(!K)throw new _4(`Unexpected event order, got ${q.type} before "message_start"`);switch(q.type){case"message_stop":return K;case"message_delta":if(K.stop_reason=q.delta.stop_reason,K.stop_sequence=q.delta.stop_sequence,K.usage.output_tokens=q.usage.output_tokens,q.usage.input_tokens!=null)K.usage.input_tokens=q.usage.input_tokens;if(q.usage.cache_creation_input_tokens!=null)K.usage.cache_creation_input_tokens=q.usage.cache_creation_input_tokens;if(q.usage.cache_read_input_tokens!=null)K.usage.cache_read_input_tokens=q.usage.cache_read_input_tokens;if(q.usage.server_tool_use!=null)K.usage.server_tool_use=q.usage.server_tool_use;return K;case"content_block_start":return K.content.push({...q.content_block}),K;case"content_block_delta":{let Y=K.content.at(q.index);switch(q.delta.type){case"text_delta":{if(Y?.type==="text")K.content[q.index]={...Y,text:(Y.text||"")+q.delta.text};break}case"citations_delta":{if(Y?.type==="text")K.content[q.index]={...Y,citations:[...Y.citations??[],q.delta.citation]};break}case"input_json_delta":{if(Y&&lnA(Y)){let z=Y[cnA]||"";z+=q.delta.partial_json;let w={...Y};if(Object.defineProperty(w,cnA,{value:z,enumerable:!1,writable:!0}),z)w.input=W91(z);K.content[q.index]=w}break}case"thinking_delta":{if(Y?.type==="thinking")K.content[q.index]={...Y,thinking:Y.thinking+q.delta.thinking};break}case"signature_delta":{if(Y?.type==="thinking")K.content[q.index]={...Y,signature:q.delta.signature};break}default:inA(q.delta)}return K}case"content_block_stop":return K}},Symbol.asyncIterator)](){let A=[],q=[],K=!1;return this.on("streamEvent",(Y)=>{let z=q.shift();if(z)z.resolve(Y);else A.push(Y)}),this.on("end",()=>{K=!0;for(let Y of q)Y.resolve(void 0);q.length=0}),this.on("abort",(Y)=>{K=!0;for(let z of q)z.reject(Y);q.length=0}),this.on("error",(Y)=>{K=!0;for(let z of q)z.reject(Y);q.length=0}),{next:async()=>{if(!A.length){if(K)return{value:void 0,done:!0};return new Promise((z,w)=>q.push({resolve:z,reject:w})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:A.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new mf(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var nb6;var NA8=k(()=>{Zm();qE();$A8();ys();Ls();nb6=class nb6 extends uH{create(A,q){return this._client.post("/v1/messages/batches",{body:A,...q})}retrieve(A,q){return this._client.get(UO`/v1/messages/batches/${A}`,q)}list(A={},q){return this._client.getAPIList("/v1/messages/batches",gI,{query:A,...q})}delete(A,q){return this._client.delete(UO`/v1/messages/batches/${A}`,q)}cancel(A,q){return this._client.post(UO`/v1/messages/batches/${A}/cancel`,q)}async results(A,q){let K=await this.retrieve(A);if(!K.results_url)throw new _4(`No batch \`results_url\`; Has it finished processing? ${K.processing_status} - ${K.id}`);return this._client.get(K.results_url,{...q,headers:E3([{Accept:"application/binary"},q?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Y,z)=>XD6.fromResponse(z.response,z.controller))}}});var YE,rnA,uO3;var vA8=k(()=>{qE();kb6();nnA();WA8();NA8();NA8();a88();YE=class YE extends uH{constructor(){super(...arguments);this.batches=new nb6(this._client)}create(A,q){if(A.model in rnA)console.warn(`The model '${A.model}' is deprecated and will reach end-of-life on ${rnA[A.model]}
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(A.model in uO3&&A.thinking&&A.thinking.type==="enabled")console.warn(`Using Claude with ${A.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let K=this._client._options.timeout;if(!A.stream&&K==null){let z=P91[A.model]??void 0;K=this._client.calculateNonstreamingTimeout(A.max_tokens,z)}let Y=X91(A.tools,A.messages);return this._client.post("/v1/messages",{body:A,timeout:K??600000,...q,headers:E3([Y,q?.headers]),stream:A.stream??!1})}parse(A,q){return this.create(A,q).then((K)=>PA8(K,A,{logger:this._client.logger??console}))}stream(A,q){return ib6.createMessage(this,A,q,{logger:this._client.logger??console})}countTokens(A,q){return this._client.post("/v1/messages/count_tokens",{body:A,...q})}};rnA={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026"},uO3=["claude-opus-4-6"];YE.Batches=nb6});var ZD6;var kA8=k(()=>{Zm();qE();Ls();ZD6=class ZD6 extends uH{retrieve(A,q={},K){let{betas:Y}=q??{};return this._client.get(UO`/v1/models/${A}`,{...K,headers:E3([{...Y?.toString()!=null?{"anthropic-beta":Y?.toString()}:void 0},K?.headers])})}list(A={},q){let{betas:K,...Y}=A??{};return this._client.getAPIList("/v1/models",gI,{query:Y,...q,headers:E3([{...K?.toString()!=null?{"anthropic-beta":K?.toString()}:void 0},q?.headers])})}}});var rb6=k(()=>{MA8();DA8();vA8();kA8();vnA()});var ob6=(A)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[A]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(A)?.trim();return};class rz{constructor({baseURL:A=ob6("ANTHROPIC_BASE_URL"),apiKey:q=ob6("ANTHROPIC_API_KEY")??null,authToken:K=ob6("ANTHROPIC_AUTH_TOKEN")??null,...Y}={}){EA8.add(this),b91.set(this,void 0);let z={apiKey:q,authToken:K,...Y,baseURL:A||"https://api.anthropic.com"};if(!z.dangerouslyAllowBrowser&&HnA())throw new _4(`It looks like you're running in a browser-like environment.

This is disabled by default, as it risks exposing your secret API credentials to attackers.
If you understand the risks and have appropriate mitigations in place,
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,

new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
`);this.baseURL=z.baseURL,this.timeout=z.timeout??LA8.DEFAULT_TIMEOUT,this.logger=z.logger??console;let w="warn";this.logLevel=w,this.logLevel=m88(z.logLevel,"ClientOptions.logLevel",this)??m88(ob6("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??w,this.fetchOptions=z.fetchOptions,this.maxRetries=z.maxRetries??2,this.fetch=z.fetch??JnA(),w4(this,b91,DnA,"f"),this._options=z,this.apiKey=typeof q==="string"?q:null,this.authToken=K}withOptions(A){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...A})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:A,nulls:q}){if(A.get("x-api-key")||A.get("authorization"))return;if(this.apiKey&&A.get("x-api-key"))return;if(q.has("x-api-key"))return;if(this.authToken&&A.get("authorization"))return;if(q.has("authorization"))return;throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(A){return E3([await this.apiKeyAuth(A),await this.bearerAuth(A)])}async apiKeyAuth(A){if(this.apiKey==null)return;return E3([{"X-Api-Key":this.apiKey}])}async bearerAuth(A){if(this.authToken==null)return;return E3([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(A){return Object.entries(A).filter(([q,K])=>typeof K<"u").map(([q,K])=>{if(typeof K==="string"||typeof K==="number"||typeof K==="boolean")return`${encodeURIComponent(q)}=${encodeURIComponent(K)}`;if(K===null)return`${encodeURIComponent(q)}=`;throw new _4(`Cannot stringify type ${typeof K}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}getUserAgent(){return`${this.constructor.name}/JS ${ks}`}defaultIdempotencyKey(){return`stainless-node-retry-${C88()}`}makeStatusError(A,q,K,Y){return V4.generate(A,q,K,Y)}buildURL(A,q,K){let Y=!b8(this,EA8,"m",onA).call(this)&&K||this.baseURL,z=qnA(A)?new URL(A):new URL(Y+(Y.endsWith("/")&&A.startsWith("/")?A.slice(1):A)),w=this.defaultQuery();if(!KnA(w))q={...w,...q};if(typeof q==="object"&&q&&!Array.isArray(q))z.search=this.stringifyQuery(q);return z.toString()}_calculateNonstreamingTimeout(A){if(3600*A/128000>600)throw new _4("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600000}async prepareOptions(A){}async prepareRequest(A,{url:q,options:K}){}get(A,q){return this.methodRequest("get",A,q)}post(A,q){return this.methodRequest("post",A,q)}patch(A,q){return this.methodRequest("patch",A,q)}put(A,q){return this.methodRequest("put",A,q)}delete(A,q){return this.methodRequest("delete",A,q)}methodRequest(A,q,K){return this.request(Promise.resolve(K).then((Y)=>{return{method:A,path:q,...Y}}))}request(A,q=null){return new FK6(this,this.makeRequest(A,q,void 0))}async makeRequest(A,q,K){let Y=await A,z=Y.maxRetries??this.maxRetries;if(q==null)q=z;await this.prepareOptions(Y);let{req:w,url:_,timeout:$}=await this.buildRequest(Y,{retryCount:z-q});await this.prepareRequest(w,{url:_,options:Y});let O="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),H=K===void 0?"":`, retryOf: ${K}`,j=Date.now();if(lX(this).debug(`[${O}] sending request`,Id({retryOfRequestLogID:K,method:Y.method,url:_,options:Y,headers:w.headers})),Y.signal?.aborted)throw new Rz;let J=new AbortController,M=await this.fetchWithTimeout(_,w,$,J).catch(Hb6),D=Date.now();if(M instanceof globalThis.Error){let W=`retrying, ${q} attempts remaining`;if(Y.signal?.aborted)throw new Rz;let Z=hd(M)||/timed? ?out/i.test(String(M)+("cause"in M?String(M.cause):""));if(q)return lX(this).info(`[${O}] connection ${Z?"timed out":"failed"} - ${W}`),lX(this).debug(`[${O}] connection ${Z?"timed out":"failed"} (${W})`,Id({retryOfRequestLogID:K,url:_,durationMs:D-j,message:M.message})),this.retryRequest(Y,q,K??O);if(lX(this).info(`[${O}] connection ${Z?"timed out":"failed"} - error; no more retries left`),lX(this).debug(`[${O}] connection ${Z?"timed out":"failed"} (error; no more retries left)`,Id({retryOfRequestLogID:K,url:_,durationMs:D-j,message:M.message})),Z)throw new Wm;throw new bZ({cause:M})}let X=[...M.headers.entries()].filter(([W])=>W==="request-id").map(([W,Z])=>", "+W+": "+JSON.stringify(Z)).join(""),P=`[${O}${H}${X}] ${w.method} ${_} ${M.ok?"succeeded":"failed"} with status ${M.status} in ${D-j}ms`;if(!M.ok){let W=await this.shouldRetry(M);if(q&&W){let v=`retrying, ${q} attempts remaining`;return await MnA(M.body),lX(this).info(`${P} - ${v}`),lX(this).debug(`[${O}] response error (${v})`,Id({retryOfRequestLogID:K,url:M.url,status:M.status,headers:M.headers,durationMs:D-j})),this.retryRequest(Y,q,K??O,M.headers)}let Z=W?"error; no more retries left":"error; not retryable";lX(this).info(`${P} - ${Z}`);let G=await M.text().catch((v)=>Hb6(v).message),f=Y91(G),V=f?void 0:G;throw lX(this).debug(`[${O}] response error (${Z})`,Id({retryOfRequestLogID:K,url:M.url,status:M.status,headers:M.headers,message:V,durationMs:Date.now()-j})),this.makeStatusError(M.status,f,V,M.headers)}return lX(this).info(P),lX(this).debug(`[${O}] response start`,Id({retryOfRequestLogID:K,url:M.url,status:M.status,headers:M.headers,durationMs:D-j})),{response:M,options:Y,controller:J,requestLogID:O,retryOfRequestLogID:K,startTime:j}}getAPIList(A,q,K){return this.requestAPIList(q,K&&"then"in K?K.then((Y)=>({method:"get",path:A,...Y})):{method:"get",path:A,...K})}requestAPIList(A,q){let K=this.makeRequest(q,null,void 0);return new J91(this,K,A)}async fetchWithTimeout(A,q,K,Y){let{signal:z,method:w,..._}=q||{},$=this._makeAbort(Y);if(z)z.addEventListener("abort",$,{once:!0});let O=setTimeout($,K),H=globalThis.ReadableStream&&_.body instanceof globalThis.ReadableStream||typeof _.body==="object"&&_.body!==null&&Symbol.asyncIterator in _.body,j={signal:Y.signal,...H?{duplex:"half"}:{},method:"GET",..._};if(w)j.method=w.toUpperCase();try{return await this.fetch.call(void 0,A,j)}finally{clearTimeout(O)}}async shouldRetry(A){let q=A.headers.get("x-should-retry");if(q==="true")return!0;if(q==="false")return!1;if(A.status===408)return!0;if(A.status===409)return!0;if(A.status===429)return!0;if(A.status>=500)return!0;return!1}async retryRequest(A,q,K,Y){let z,w=Y?.get("retry-after-ms");if(w){let $=parseFloat(w);if(!Number.isNaN($))z=$}let _=Y?.get("retry-after");if(_&&!z){let $=parseFloat(_);if(!Number.isNaN($))z=$*1000;else z=Date.parse(_)-Date.now()}if(!(z&&0<=z&&z<60000)){let $=A.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis(q,$)}return await wnA(z),this.makeRequest(A,q-1,K)}calculateDefaultRetryTimeoutMillis(A,q){let z=q-A,w=Math.min(0.5*Math.pow(2,z),8),_=1-Math.random()*0.25;return w*_*1000}calculateNonstreamingTimeout(A,q){if(3600000*A/128000>600000||q!=null&&A>q)throw new _4("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 600000}async buildRequest(A,{retryCount:q=0}={}){let K={...A},{method:Y,path:z,query:w,defaultBaseURL:_}=K,$=this.buildURL(z,w,_);if("timeout"in K)znA("timeout",K.timeout);K.timeout=K.timeout??this.timeout;let{bodyHeaders:O,body:H}=this.buildBody({options:K}),j=await this.buildHeaders({options:A,method:Y,bodyHeaders:O,retryCount:q});return{req:{method:Y,headers:j,...K.signal&&{signal:K.signal},...globalThis.ReadableStream&&H instanceof globalThis.ReadableStream&&{duplex:"half"},...H&&{body:H},...this.fetchOptions??{},...K.fetchOptions??{}},url:$,timeout:K.timeout}}async buildHeaders({options:A,method:q,bodyHeaders:K,retryCount:Y}){let z={};if(this.idempotencyHeader&&q!=="get"){if(!A.idempotencyKey)A.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=A.idempotencyKey}let w=E3([z,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(Y),...A.timeout?{"X-Stainless-Timeout":String(Math.trunc(A.timeout/1000))}:{},...jnA(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(A),this._options.defaultHeaders,K,A.headers]);return this.validateHeaders(w),w.values}_makeAbort(A){return()=>A.abort()}buildBody({options:{body:A,headers:q}}){if(!A)return{bodyHeaders:void 0,body:void 0};let K=E3([q]);if(ArrayBuffer.isView(A)||A instanceof ArrayBuffer||A instanceof DataView||typeof A==="string"&&K.values.has("content-type")||globalThis.Blob&&A instanceof globalThis.Blob||A instanceof FormData||A instanceof URLSearchParams||globalThis.ReadableStream&&A instanceof globalThis.ReadableStream)return{bodyHeaders:void 0,body:A};else if(typeof A==="object"&&((Symbol.asyncIterator in A)||(Symbol.iterator in A)&&("next"in A)&&typeof A.next==="function"))return{bodyHeaders:void 0,body:z91(A)};else return b8(this,b91,"f").call(this,{body:A,headers:K})}}var EA8,LA8,b91,onA,anA="\\n\\nHuman:",snA="\\n\\nAssistant:",FI;var Bd=k(()=>{Cd();gK6();b88();xZ();Zm();i88();rb6();H91();DA8();kA8();MA8();vA8();b88();qE();$91();gK6();LA8=rz,b91=new WeakMap,EA8=new WeakSet,onA=function(){return this.baseURL!=="https://api.anthropic.com"};rz.Anthropic=LA8;rz.HUMAN_PROMPT=anA;rz.AI_PROMPT=snA;rz.DEFAULT_TIMEOUT=600000;rz.AnthropicError=_4;rz.APIError=V4;rz.APIConnectionError=bZ;rz.APIConnectionTimeoutError=Wm;rz.APIUserAbortError=Rz;rz.NotFoundError=mK6;rz.ConflictError=Mb6;rz.RateLimitError=Xb6;rz.BadRequestError=jb6;rz.AuthenticationError=BK6;rz.InternalServerError=Pb6;rz.PermissionDeniedError=Jb6;rz.UnprocessableEntityError=Db6;rz.toFile=M91;FI=class FI extends rz{constructor(){super(...arguments);this.completions=new hs(this),this.messages=new YE(this),this.models=new ZD6(this),this.beta=new uZ(this)}};FI.Completions=hs;FI.Messages=YE;FI.Models=ZD6;FI.Beta=uZ});var rV=k(()=>{Bd();i88();H91();Bd();Zm();xZ()});var f4="Bash";function fA(A,q){if(!process.env.SRT_DEBUG)return;let K=q?.level||"info",Y="[SandboxDebug]";switch(K){case"error":console.error(`${Y} ${A}`);break;case"warn":console.warn(`${Y} ${A}`);break;default:console.error(`${Y} ${A}`)}}import{Agent as BO3,createServer as mO3}from"node:http";import{request as tnA}from"node:http";import{request as gO3}from"node:https";import{connect as enA}from"node:net";import{URL as FO3}from"node:url";function ArA(A){let q=mO3();return q.on("connect",async(K,Y)=>{Y.on("error",(z)=>{fA(`Client socket error: ${z.message}`,{level:"error"})});try{let[z,w]=K.url.split(":"),_=w===void 0?void 0:parseInt(w,10);if(!z||!_){fA(`Invalid CONNECT request: ${K.url}`,{level:"error"}),Y.end(`HTTP/1.1 400 Bad Request\r
\r
`);return}if(!await A.filter(_,z,Y)){fA(`Connection blocked to ${z}:${_}`,{level:"error"}),Y.end(`HTTP/1.1 403 Forbidden\r
Content-Type: text/plain\r
X-Proxy-Error: blocked-by-allowlist\r
\r
Connection blocked by network allowlist`);return}let O=A.getMitmSocketPath?.(z);if(O){fA(`Routing CONNECT ${z}:${_} through MITM proxy at ${O}`);let H=enA({path:O},()=>{H.write(`CONNECT ${z}:${_} HTTP/1.1\r
Host: ${z}:${_}\r
\r
`)}),j="",J=(M)=>{j+=M.toString();let D=j.indexOf(`\r
\r
`);if(D!==-1){H.removeListener("data",J);let X=j.substring(0,j.indexOf(`\r
`));if(X.includes(" 200 ")){Y.write(`HTTP/1.1 200 Connection Established\r
\r
`);let P=j.substring(D+4);if(P.length>0)Y.write(P);H.pipe(Y),Y.pipe(H)}else fA(`MITM proxy rejected CONNECT: ${X}`,{level:"error"}),Y.end(`HTTP/1.1 502 Bad Gateway\r
\r
`),H.destroy()}};H.on("data",J),H.on("error",(M)=>{fA(`MITM proxy connection failed: ${M.message}`,{level:"error"}),Y.end(`HTTP/1.1 502 Bad Gateway\r
\r
`)}),Y.on("error",(M)=>{fA(`Client socket error: ${M.message}`,{level:"error"}),H.destroy()}),Y.on("end",()=>H.end()),H.on("end",()=>Y.end())}else{let H=enA(_,z,()=>{Y.write(`HTTP/1.1 200 Connection Established\r
\r
`),H.pipe(Y),Y.pipe(H)});H.on("error",(j)=>{fA(`CONNECT tunnel failed: ${j.message}`,{level:"error"}),Y.end(`HTTP/1.1 502 Bad Gateway\r
\r
`)}),Y.on("error",(j)=>{fA(`Client socket error: ${j.message}`,{level:"error"}),H.destroy()}),Y.on("end",()=>H.end()),H.on("end",()=>Y.end())}}catch(z){fA(`Error handling CONNECT: ${z}`,{level:"error"}),Y.end(`HTTP/1.1 500 Internal Server Error\r
\r
`)}}),q.on("request",async(K,Y)=>{try{let z=new FO3(K.url),w=z.hostname,_=z.port?parseInt(z.port,10):z.protocol==="https:"?443:80;if(!await A.filter(_,w,K.socket)){fA(`HTTP request blocked to ${w}:${_}`,{level:"error"}),Y.writeHead(403,{"Content-Type":"text/plain","X-Proxy-Error":"blocked-by-allowlist"}),Y.end("Connection blocked by network allowlist");return}let O=A.getMitmSocketPath?.(w);if(O){fA(`Routing HTTP ${K.method} ${w}:${_} through MITM proxy at ${O}`);let H=new BO3({socketPath:O}),j=tnA({agent:H,path:K.url,method:K.method,headers:{...K.headers,host:z.host}},(J)=>{Y.writeHead(J.statusCode,J.headers),J.pipe(Y)});j.on("error",(J)=>{if(fA(`MITM proxy request failed: ${J.message}`,{level:"error"}),!Y.headersSent)Y.writeHead(502,{"Content-Type":"text/plain"}),Y.end("Bad Gateway")}),K.pipe(j)}else{let j=(z.protocol==="https:"?gO3:tnA)({hostname:w,port:_,path:z.pathname+z.search,method:K.method,headers:{...K.headers,host:z.host}},(J)=>{Y.writeHead(J.statusCode,J.headers),J.pipe(Y)});j.on("error",(J)=>{if(fA(`Proxy request failed: ${J.message}`,{level:"error"}),!Y.headersSent)Y.writeHead(502,{"Content-Type":"text/plain"}),Y.end("Bad Gateway")}),K.pipe(j)}}catch(z){fA(`Error handling HTTP request: ${z}`,{level:"error"}),Y.writeHead(500,{"Content-Type":"text/plain"}),Y.end("Internal Server Error")}}),q}var qrA=()=>{};var OrA=C((Tow,$rA)=>{var{create:QO3,defineProperty:x91,getOwnPropertyDescriptor:UO3,getOwnPropertyNames:pO3,getPrototypeOf:dO3}=Object,cO3=Object.prototype.hasOwnProperty,lO3=(A,q)=>{for(var K in q)x91(A,K,{get:q[K],enumerable:!0})},KrA=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of pO3(q))if(!cO3.call(A,z)&&z!==K)x91(A,z,{get:()=>q[z],enumerable:!(Y=UO3(q,z))||Y.enumerable})}return A},YrA=(A,q,K)=>(K=A!=null?QO3(dO3(A)):{},KrA(q||!A||!A.__esModule?x91(K,"default",{value:A,enumerable:!0}):K,A)),iO3=(A)=>KrA(x91({},"__esModule",{value:!0}),A),zrA={};lO3(zrA,{Socks5Server:()=>_rA,createServer:()=>aO3,defaultConnectionHandler:()=>RA8});$rA.exports=iO3(zrA);var nO3=YrA(g6("net")),wrA=((A)=>{return A[A.connect=1]="connect",A[A.bind=2]="bind",A[A.udp=3]="udp",A})(wrA||{}),yA8=((A)=>{return A[A.REQUEST_GRANTED=0]="REQUEST_GRANTED",A[A.GENERAL_FAILURE=1]="GENERAL_FAILURE",A[A.CONNECTION_NOT_ALLOWED=2]="CONNECTION_NOT_ALLOWED",A[A.NETWORK_UNREACHABLE=3]="NETWORK_UNREACHABLE",A[A.HOST_UNREACHABLE=4]="HOST_UNREACHABLE",A[A.CONNECTION_REFUSED=5]="CONNECTION_REFUSED",A[A.TTL_EXPIRED=6]="TTL_EXPIRED",A[A.COMMAND_NOT_SUPPORTED=7]="COMMAND_NOT_SUPPORTED",A[A.ADDRESS_TYPE_NOT_SUPPORTED=8]="ADDRESS_TYPE_NOT_SUPPORTED",A})(yA8||{}),rO3=class{constructor(A,q){this.errorHandler=()=>{},this.metadata={},this.socket=q,this.server=A,q.on("error",this.errorHandler),q.pause(),this.handleGreeting()}readBytes(A){return new Promise((q)=>{let K=Buffer.allocUnsafe(A),Y=0,z=(w)=>{let _=Math.min(w.length,A-Y);if(w.copy(K,Y,0,_),Y+=_,Y<A)return;this.socket.removeListener("data",z),this.socket.push(w.subarray(_)),q(K),this.socket.pause()};this.socket.on("data",z),this.socket.resume()})}async handleGreeting(){if((await this.readBytes(1)).readUInt8()!==5)return this.socket.destroy();let q=(await this.readBytes(1)).readUInt8();if(q>128||q===0)return this.socket.destroy();let K=await this.readBytes(q),Y=this.server.authHandler?2:0;if(!K.includes(Y))return this.socket.write(Buffer.from([5,255])),this.socket.destroy();if(this.socket.write(Buffer.from([5,Y])),this.server.authHandler)this.handleUserPassword();else this.handleConnectionRequest()}async handleUserPassword(){await this.readBytes(1);let A=(await this.readBytes(1)).readUint8(),q=(await this.readBytes(A)).toString(),K=(await this.readBytes(1)).readUint8(),Y=(await this.readBytes(K)).toString();this.username=q,this.password=Y;let z=!1,w=()=>{if(z)return;z=!0,this.socket.write(Buffer.from([1,0])),this.handleConnectionRequest()},_=()=>{if(z)return;z=!0,this.socket.write(Buffer.from([1,1])),this.socket.destroy()},$=await this.server.authHandler(this,w,_);if($===!0)w();else if($===!1)_()}async handleConnectionRequest(){await this.readBytes(1);let A=(await this.readBytes(1))[0],q=wrA[A];if(!q)return this.socket.destroy();this.command=q,await this.readBytes(1);let K=(await this.readBytes(1)).readUInt8(),Y="";switch(K){case 1:Y=(await this.readBytes(4)).join(".");break;case 3:let H=(await this.readBytes(1)).readUInt8();Y=(await this.readBytes(H)).toString();break;case 4:let j=await this.readBytes(16);for(let J=0;J<16;J++){if(J%2===0&&J>0)Y+=":";Y+=`${j[J]<16?"0":""}${j[J].toString(16)}`}break;default:this.socket.destroy();return}let z=(await this.readBytes(2)).readUInt16BE();if(!this.server.supportedCommands.has(q))return this.socket.write(Buffer.from([5,7])),this.socket.destroy();this.destAddress=Y,this.destPort=z;let w=!1,_=()=>{if(w)return;w=!0,this.connect()};if(!this.server.rulesetValidator)return _();let $=()=>{if(w)return;w=!0,this.socket.write(Buffer.from([5,2,0,1,0,0,0,0,0,0])),this.socket.destroy()},O=await this.server.rulesetValidator(this,_,$);if(O===!0)_();else if(O===!1)$()}connect(){this.socket.removeListener("error",this.errorHandler),this.server.connectionHandler(this,(A)=>{if(yA8[A]===void 0)throw Error(`"${A}" is not a valid status.`);if(this.socket.write(Buffer.from([5,yA8[A],0,1,0,0,0,0,0,0])),A!=="REQUEST_GRANTED")this.socket.destroy()}),this.socket.resume()}},oO3=YrA(g6("net"));function RA8(A,q){if(A.command!=="connect")return q("COMMAND_NOT_SUPPORTED");A.socket.on("error",()=>{});let K=oO3.default.createConnection({host:A.destAddress,port:A.destPort});K.setNoDelay();let Y=!1;return K.on("error",(z)=>{if(!Y)switch(z.code){case"EINVAL":case"ENOENT":case"ENOTFOUND":case"ETIMEDOUT":case"EADDRNOTAVAIL":case"EHOSTUNREACH":q("HOST_UNREACHABLE");break;case"ENETUNREACH":q("NETWORK_UNREACHABLE");break;case"ECONNREFUSED":q("CONNECTION_REFUSED");break;default:q("GENERAL_FAILURE")}}),K.on("ready",()=>{Y=!0,q("REQUEST_GRANTED"),A.socket.pipe(K).pipe(A.socket)}),A.socket.on("close",()=>K.destroy()),K}var _rA=class{constructor(){this.supportedCommands=new Set(["connect"]),this.connectionHandler=RA8,this.server=nO3.default.createServer((A)=>{A.setNoDelay(),this._handleConnection(A)})}listen(...A){return this.server.listen(...A),this}close(A){return this.server.close(A),this}setAuthHandler(A){return this.authHandler=A,this}disableAuthHandler(){return this.authHandler=void 0,this}setRulesetValidator(A){return this.rulesetValidator=A,this}disableRulesetValidator(){return this.rulesetValidator=void 0,this}setConnectionHandler(A){return this.connectionHandler=A,this}useDefaultConnectionHandler(){return this.connectionHandler=RA8,this}_handleConnection(A){return new rO3(this,A),this}};function aO3(A){let q=new _rA;if(A?.auth)q.setAuthHandler((K)=>{return K.username===A.auth.username&&K.password===A.auth.password});if(A?.port)q.listen(A.port,A.hostname);return q}});function jrA(A){let q=HrA.createServer();return q.setRulesetValidator(async(K)=>{try{let{destAddress:Y,destPort:z}=K;if(fA(`Connection request to ${Y}:${z}`),!await A.filter(z,Y))return fA(`Connection blocked to ${Y}:${z}`,{level:"error"}),!1;return fA(`Connection allowed to ${Y}:${z}`),!0}catch(Y){return fA(`Error validating connection: ${Y}`,{level:"error"}),!1}}),{server:q,getPort(){try{let K=q?.server;if(K&&typeof K?.address==="function"){let Y=K.address();if(Y&&typeof Y==="object"&&"port"in Y)return Y.port}}catch(K){fA(`Error getting port: ${K}`,{level:"error"})}return},listen(K,Y){return new Promise((z,w)=>{let _=()=>{let $=this.getPort();if($)fA(`SOCKS proxy listening on ${Y}:${$}`),z($);else w(Error("Failed to get SOCKS proxy server port"))};q.listen(K,Y,_)})},async close(){return new Promise((K,Y)=>{q.close((z)=>{if(z){let w=z.message?.toLowerCase()||"";if(!(w.includes("not running")||w.includes("already closed")||w.includes("not listening"))){Y(z);return}}K()})})},unref(){try{let K=q?.server;if(K&&typeof K?.unref==="function")K.unref()}catch(K){fA(`Error calling unref: ${K}`,{level:"error"})}}}}var HrA;var JrA=k(()=>{HrA=e(OrA(),1)});import{spawnSync as sO3}from"node:child_process";function md(A){if(typeof globalThis.Bun<"u")return globalThis.Bun.which(A);let q=sO3("which",[A],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:1000});if(q.status===0&&q.stdout)return q.stdout.trim();return null}var ab6=()=>{};function tO3(){this.__data__=[],this.size=0}var MrA;var DrA=k(()=>{MrA=tO3});function eO3(A,q){return A===q||A!==A&&q!==q}var u91;var SA8=k(()=>{u91=eO3});function AH3(A,q){var K=A.length;while(K--)if(u91(A[K][0],q))return K;return-1}var bs;var sb6=k(()=>{SA8();bs=AH3});function YH3(A){var q=this.__data__,K=bs(q,A);if(K<0)return!1;var Y=q.length-1;if(K==Y)q.pop();else KH3.call(q,K,1);return--this.size,!0}var qH3,KH3,XrA;var PrA=k(()=>{sb6();qH3=Array.prototype,KH3=qH3.splice;XrA=YH3});function zH3(A){var q=this.__data__,K=bs(q,A);return K<0?void 0:q[K][1]}var WrA;var ZrA=k(()=>{sb6();WrA=zH3});function wH3(A){return bs(this.__data__,A)>-1}var GrA;var frA=k(()=>{sb6();GrA=wH3});function _H3(A,q){var K=this.__data__,Y=bs(K,A);if(Y<0)++this.size,K.push([A,q]);else K[Y][1]=q;return this}var TrA;var VrA=k(()=>{sb6();TrA=_H3});function GD6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var xs;var tb6=k(()=>{DrA();PrA();ZrA();frA();VrA();GD6.prototype.clear=MrA;GD6.prototype.delete=XrA;GD6.prototype.get=WrA;GD6.prototype.has=GrA;GD6.prototype.set=TrA;xs=GD6});function $H3(){this.__data__=new xs,this.size=0}var NrA;var vrA=k(()=>{tb6();NrA=$H3});function OH3(A){var q=this.__data__,K=q.delete(A);return this.size=q.size,K}var krA;var ErA=k(()=>{krA=OH3});function HH3(A){return this.__data__.get(A)}var LrA;var yrA=k(()=>{LrA=HH3});function jH3(A){return this.__data__.has(A)}var RrA;var SrA=k(()=>{RrA=jH3});var JH3,B91;var CA8=k(()=>{JH3=typeof global=="object"&&global&&global.Object===Object&&global,B91=JH3});var MH3,DH3,fM;var QI=k(()=>{CA8();MH3=typeof self=="object"&&self&&self.Object===Object&&self,DH3=B91||MH3||Function("return this")(),fM=DH3});var XH3,gd;var m91=k(()=>{QI();XH3=fM.Symbol,gd=XH3});function ZH3(A){var q=PH3.call(A,eb6),K=A[eb6];try{A[eb6]=void 0;var Y=!0}catch(w){}var z=WH3.call(A);if(Y)if(q)A[eb6]=K;else delete A[eb6];return z}var CrA,PH3,WH3,eb6,hrA;var IrA=k(()=>{m91();CrA=Object.prototype,PH3=CrA.hasOwnProperty,WH3=CrA.toString,eb6=gd?gd.toStringTag:void 0;hrA=ZH3});function TH3(A){return fH3.call(A)}var GH3,fH3,brA;var xrA=k(()=>{GH3=Object.prototype,fH3=GH3.toString;brA=TH3});function vH3(A){if(A==null)return A===void 0?NH3:VH3;return urA&&urA in Object(A)?hrA(A):brA(A)}var VH3="[object Null]",NH3="[object Undefined]",urA,Fd;var Ax6=k(()=>{m91();IrA();xrA();urA=gd?gd.toStringTag:void 0;Fd=vH3});function kH3(A){var q=typeof A;return A!=null&&(q=="object"||q=="function")}var Gm;var fD6=k(()=>{Gm=kH3});function SH3(A){if(!Gm(A))return!1;var q=Fd(A);return q==LH3||q==yH3||q==EH3||q==RH3}var EH3="[object AsyncFunction]",LH3="[object Function]",yH3="[object GeneratorFunction]",RH3="[object Proxy]",g91;var hA8=k(()=>{Ax6();fD6();g91=SH3});var CH3,F91;var BrA=k(()=>{QI();CH3=fM["__core-js_shared__"],F91=CH3});function hH3(A){return!!mrA&&mrA in A}var mrA,grA;var FrA=k(()=>{BrA();mrA=function(){var A=/[^.]+$/.exec(F91&&F91.keys&&F91.keys.IE_PROTO||"");return A?"Symbol(src)_1."+A:""}();grA=hH3});function xH3(A){if(A!=null){try{return bH3.call(A)}catch(q){}try{return A+""}catch(q){}}return""}var IH3,bH3,Qd;var IA8=k(()=>{IH3=Function.prototype,bH3=IH3.toString;Qd=xH3});function pH3(A){if(!Gm(A)||grA(A))return!1;var q=g91(A)?UH3:BH3;return q.test(Qd(A))}var uH3,BH3,mH3,gH3,FH3,QH3,UH3,QrA;var UrA=k(()=>{hA8();FrA();fD6();IA8();uH3=/[\\^$.*+?()[\]{}|]/g,BH3=/^\[object .+?Constructor\]$/,mH3=Function.prototype,gH3=Object.prototype,FH3=mH3.toString,QH3=gH3.hasOwnProperty,UH3=RegExp("^"+FH3.call(QH3).replace(uH3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");QrA=pH3});function dH3(A,q){return A==null?void 0:A[q]}var prA;var drA=k(()=>{prA=dH3});function cH3(A,q){var K=prA(A,q);return QrA(K)?K:void 0}var oV;var us=k(()=>{UrA();drA();oV=cH3});var lH3,Bs;var Q91=k(()=>{us();QI();lH3=oV(fM,"Map"),Bs=lH3});var iH3,Ud;var qx6=k(()=>{us();iH3=oV(Object,"create"),Ud=iH3});function nH3(){this.__data__=Ud?Ud(null):{},this.size=0}var crA;var lrA=k(()=>{qx6();crA=nH3});function rH3(A){var q=this.has(A)&&delete this.__data__[A];return this.size-=q?1:0,q}var irA;var nrA=k(()=>{irA=rH3});function tH3(A){var q=this.__data__;if(Ud){var K=q[A];return K===oH3?void 0:K}return sH3.call(q,A)?q[A]:void 0}var oH3="__lodash_hash_undefined__",aH3,sH3,rrA;var orA=k(()=>{qx6();aH3=Object.prototype,sH3=aH3.hasOwnProperty;rrA=tH3});function qj3(A){var q=this.__data__;return Ud?q[A]!==void 0:Aj3.call(q,A)}var eH3,Aj3,arA;var srA=k(()=>{qx6();eH3=Object.prototype,Aj3=eH3.hasOwnProperty;arA=qj3});function Yj3(A,q){var K=this.__data__;return this.size+=this.has(A)?0:1,K[A]=Ud&&q===void 0?Kj3:q,this}var Kj3="__lodash_hash_undefined__",trA;var erA=k(()=>{qx6();trA=Yj3});function TD6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var bA8;var AoA=k(()=>{lrA();nrA();orA();srA();erA();TD6.prototype.clear=crA;TD6.prototype.delete=irA;TD6.prototype.get=rrA;TD6.prototype.has=arA;TD6.prototype.set=trA;bA8=TD6});function zj3(){this.size=0,this.__data__={hash:new bA8,map:new(Bs||xs),string:new bA8}}var qoA;var KoA=k(()=>{AoA();tb6();Q91();qoA=zj3});function wj3(A){var q=typeof A;return q=="string"||q=="number"||q=="symbol"||q=="boolean"?A!=="__proto__":A===null}var YoA;var zoA=k(()=>{YoA=wj3});function _j3(A,q){var K=A.__data__;return YoA(q)?K[typeof q=="string"?"string":"hash"]:K.map}var ms;var Kx6=k(()=>{zoA();ms=_j3});function $j3(A){var q=ms(this,A).delete(A);return this.size-=q?1:0,q}var woA;var _oA=k(()=>{Kx6();woA=$j3});function Oj3(A){return ms(this,A).get(A)}var $oA;var OoA=k(()=>{Kx6();$oA=Oj3});function Hj3(A){return ms(this,A).has(A)}var HoA;var joA=k(()=>{Kx6();HoA=Hj3});function jj3(A,q){var K=ms(this,A),Y=K.size;return K.set(A,q),this.size+=K.size==Y?0:1,this}var JoA;var MoA=k(()=>{Kx6();JoA=jj3});function VD6(A){var q=-1,K=A==null?0:A.length;this.clear();while(++q<K){var Y=A[q];this.set(Y[0],Y[1])}}var DoA;var XoA=k(()=>{KoA();_oA();OoA();joA();MoA();VD6.prototype.clear=qoA;VD6.prototype.delete=woA;VD6.prototype.get=$oA;VD6.prototype.has=HoA;VD6.prototype.set=JoA;DoA=VD6});function Mj3(A,q){var K=this.__data__;if(K instanceof xs){var Y=K.__data__;if(!Bs||Y.length<Jj3-1)return Y.push([A,q]),this.size=++K.size,this;K=this.__data__=new DoA(Y)}return K.set(A,q),this.size=K.size,this}var Jj3=200,PoA;var WoA=k(()=>{tb6();Q91();XoA();PoA=Mj3});function ND6(A){var q=this.__data__=new xs(A);this.size=q.size}var ZoA;var GoA=k(()=>{tb6();vrA();ErA();yrA();SrA();WoA();ND6.prototype.clear=NrA;ND6.prototype.delete=krA;ND6.prototype.get=LrA;ND6.prototype.has=RrA;ND6.prototype.set=PoA;ZoA=ND6});function Dj3(A,q){var K=-1,Y=A==null?0:A.length;while(++K<Y)if(q(A[K],K,A)===!1)break;return A}var foA;var ToA=k(()=>{foA=Dj3});var Xj3,xA8;var VoA=k(()=>{us();Xj3=function(){try{var A=oV(Object,"defineProperty");return A({},"",{}),A}catch(q){}}(),xA8=Xj3});function Pj3(A,q,K){if(q=="__proto__"&&xA8)xA8(A,q,{configurable:!0,enumerable:!0,value:K,writable:!0});else A[q]=K}var U91;var uA8=k(()=>{VoA();U91=Pj3});function Gj3(A,q,K){var Y=A[q];if(!(Zj3.call(A,q)&&u91(Y,K))||K===void 0&&!(q in A))U91(A,q,K)}var Wj3,Zj3,p91;var BA8=k(()=>{uA8();SA8();Wj3=Object.prototype,Zj3=Wj3.hasOwnProperty;p91=Gj3});function fj3(A,q,K,Y){var z=!K;K||(K={});var w=-1,_=q.length;while(++w<_){var $=q[w],O=Y?Y(K[$],A[$],$,K,A):void 0;if(O===void 0)O=A[$];if(z)U91(K,$,O);else p91(K,$,O)}return K}var gs;var Yx6=k(()=>{BA8();uA8();gs=fj3});function Tj3(A,q){var K=-1,Y=Array(A);while(++K<A)Y[K]=q(K);return Y}var NoA;var voA=k(()=>{NoA=Tj3});function Vj3(A){return A!=null&&typeof A=="object"}var fm;var vD6=k(()=>{fm=Vj3});function vj3(A){return fm(A)&&Fd(A)==Nj3}var Nj3="[object Arguments]",mA8;var koA=k(()=>{Ax6();vD6();mA8=vj3});var EoA,kj3,Ej3,Lj3,LoA;var yoA=k(()=>{koA();vD6();EoA=Object.prototype,kj3=EoA.hasOwnProperty,Ej3=EoA.propertyIsEnumerable,Lj3=mA8(function(){return arguments}())?mA8:function(A){return fm(A)&&kj3.call(A,"callee")&&!Ej3.call(A,"callee")},LoA=Lj3});var yj3,kD6;var d91=k(()=>{yj3=Array.isArray,kD6=yj3});function Rj3(){return!1}var RoA;var SoA=k(()=>{RoA=Rj3});var l91={};m1(l91,{default:()=>zx6});var IoA,CoA,Sj3,hoA,Cj3,hj3,zx6;var gA8=k(()=>{QI();SoA();IoA=typeof l91=="object"&&l91&&!l91.nodeType&&l91,CoA=IoA&&typeof c91=="object"&&c91&&!c91.nodeType&&c91,Sj3=CoA&&CoA.exports===IoA,hoA=Sj3?fM.Buffer:void 0,Cj3=hoA?hoA.isBuffer:void 0,hj3=Cj3||RoA,zx6=hj3});function xj3(A,q){var K=typeof A;return q=q==null?Ij3:q,!!q&&(K=="number"||K!="symbol"&&bj3.test(A))&&(A>-1&&A%1==0&&A<q)}var Ij3=9007199254740991,bj3,boA;var xoA=k(()=>{bj3=/^(?:0|[1-9]\d*)$/;boA=xj3});function Bj3(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=uj3}var uj3=9007199254740991,i91;var FA8=k(()=>{i91=Bj3});function $J3(A){return fm(A)&&i91(A.length)&&!!r$[Fd(A)]}var mj3="[object Arguments]",gj3="[object Array]",Fj3="[object Boolean]",Qj3="[object Date]",Uj3="[object Error]",pj3="[object Function]",dj3="[object Map]",cj3="[object Number]",lj3="[object Object]",ij3="[object RegExp]",nj3="[object Set]",rj3="[object String]",oj3="[object WeakMap]",aj3="[object ArrayBuffer]",sj3="[object DataView]",tj3="[object Float32Array]",ej3="[object Float64Array]",AJ3="[object Int8Array]",qJ3="[object Int16Array]",KJ3="[object Int32Array]",YJ3="[object Uint8Array]",zJ3="[object Uint8ClampedArray]",wJ3="[object Uint16Array]",_J3="[object Uint32Array]",r$,uoA;var BoA=k(()=>{Ax6();FA8();vD6();r$={};r$[tj3]=r$[ej3]=r$[AJ3]=r$[qJ3]=r$[KJ3]=r$[YJ3]=r$[zJ3]=r$[wJ3]=r$[_J3]=!0;r$[mj3]=r$[gj3]=r$[aj3]=r$[Fj3]=r$[sj3]=r$[Qj3]=r$[Uj3]=r$[pj3]=r$[dj3]=r$[cj3]=r$[lj3]=r$[ij3]=r$[nj3]=r$[rj3]=r$[oj3]=!1;uoA=$J3});function OJ3(A){return function(q){return A(q)}}var ED6;var n91=k(()=>{ED6=OJ3});var o91={};m1(o91,{default:()=>Tm});var moA,wx6,HJ3,QA8,jJ3,Tm;var a91=k(()=>{CA8();moA=typeof o91=="object"&&o91&&!o91.nodeType&&o91,wx6=moA&&typeof r91=="object"&&r91&&!r91.nodeType&&r91,HJ3=wx6&&wx6.exports===moA,QA8=HJ3&&B91.process,jJ3=function(){try{var A=wx6&&wx6.require&&wx6.require("util").types;if(A)return A;return QA8&&QA8.binding&&QA8.binding("util")}catch(q){}}(),Tm=jJ3});var goA,JJ3,FoA;var QoA=k(()=>{BoA();n91();a91();goA=Tm&&Tm.isTypedArray,JJ3=goA?ED6(goA):uoA,FoA=JJ3});function XJ3(A,q){var K=kD6(A),Y=!K&&LoA(A),z=!K&&!Y&&zx6(A),w=!K&&!Y&&!z&&FoA(A),_=K||Y||z||w,$=_?NoA(A.length,String):[],O=$.length;for(var H in A)if((q||DJ3.call(A,H))&&!(_&&(H=="length"||z&&(H=="offset"||H=="parent")||w&&(H=="buffer"||H=="byteLength"||H=="byteOffset")||boA(H,O))))$.push(H);return $}var MJ3,DJ3,s91;var UA8=k(()=>{voA();yoA();d91();gA8();xoA();QoA();MJ3=Object.prototype,DJ3=MJ3.hasOwnProperty;s91=XJ3});function WJ3(A){var q=A&&A.constructor,K=typeof q=="function"&&q.prototype||PJ3;return A===K}var PJ3,LD6;var t91=k(()=>{PJ3=Object.prototype;LD6=WJ3});function ZJ3(A,q){return function(K){return A(q(K))}}var e91;var pA8=k(()=>{e91=ZJ3});var GJ3,UoA;var poA=k(()=>{pA8();GJ3=e91(Object.keys,Object),UoA=GJ3});function VJ3(A){if(!LD6(A))return UoA(A);var q=[];for(var K in Object(A))if(TJ3.call(A,K)&&K!="constructor")q.push(K);return q}var fJ3,TJ3,doA;var coA=k(()=>{t91();poA();fJ3=Object.prototype,TJ3=fJ3.hasOwnProperty;doA=VJ3});function NJ3(A){return A!=null&&i91(A.length)&&!g91(A)}var AY1;var dA8=k(()=>{hA8();FA8();AY1=NJ3});function vJ3(A){return AY1(A)?s91(A):doA(A)}var yD6;var qY1=k(()=>{UA8();coA();dA8();yD6=vJ3});function kJ3(A,q){return A&&gs(q,yD6(q),A)}var loA;var ioA=k(()=>{Yx6();qY1();loA=kJ3});function EJ3(A){var q=[];if(A!=null)for(var K in Object(A))q.push(K);return q}var noA;var roA=k(()=>{noA=EJ3});function RJ3(A){if(!Gm(A))return noA(A);var q=LD6(A),K=[];for(var Y in A)if(!(Y=="constructor"&&(q||!yJ3.call(A,Y))))K.push(Y);return K}var LJ3,yJ3,ooA;var aoA=k(()=>{fD6();t91();roA();LJ3=Object.prototype,yJ3=LJ3.hasOwnProperty;ooA=RJ3});function SJ3(A){return AY1(A)?s91(A,!0):ooA(A)}var RD6;var KY1=k(()=>{UA8();aoA();dA8();RD6=SJ3});function CJ3(A,q){return A&&gs(q,RD6(q),A)}var soA;var toA=k(()=>{Yx6();KY1();soA=CJ3});var zY1={};m1(zY1,{default:()=>cA8});function IJ3(A,q){if(q)return A.slice();var K=A.length,Y=qaA?qaA(K):new A.constructor(K);return A.copy(Y),Y}var KaA,eoA,hJ3,AaA,qaA,cA8;var YaA=k(()=>{QI();KaA=typeof zY1=="object"&&zY1&&!zY1.nodeType&&zY1,eoA=KaA&&typeof YY1=="object"&&YY1&&!YY1.nodeType&&YY1,hJ3=eoA&&eoA.exports===KaA,AaA=hJ3?fM.Buffer:void 0,qaA=AaA?AaA.allocUnsafe:void 0;cA8=IJ3});function bJ3(A,q){var K=-1,Y=A.length;q||(q=Array(Y));while(++K<Y)q[K]=A[K];return q}var zaA;var waA=k(()=>{zaA=bJ3});function xJ3(A,q){var K=-1,Y=A==null?0:A.length,z=0,w=[];while(++K<Y){var _=A[K];if(q(_,K,A))w[z++]=_}return w}var _aA;var $aA=k(()=>{_aA=xJ3});function uJ3(){return[]}var wY1;var lA8=k(()=>{wY1=uJ3});var BJ3,mJ3,OaA,gJ3,SD6;var _Y1=k(()=>{$aA();lA8();BJ3=Object.prototype,mJ3=BJ3.propertyIsEnumerable,OaA=Object.getOwnPropertySymbols,gJ3=!OaA?wY1:function(A){if(A==null)return[];return A=Object(A),_aA(OaA(A),function(q){return mJ3.call(A,q)})},SD6=gJ3});function FJ3(A,q){return gs(A,SD6(A),q)}var HaA;var jaA=k(()=>{Yx6();_Y1();HaA=FJ3});function QJ3(A,q){var K=-1,Y=q.length,z=A.length;while(++K<Y)A[z+K]=q[K];return A}var $Y1;var iA8=k(()=>{$Y1=QJ3});var UJ3,OY1;var nA8=k(()=>{pA8();UJ3=e91(Object.getPrototypeOf,Object),OY1=UJ3});var pJ3,dJ3,HY1;var rA8=k(()=>{iA8();nA8();_Y1();lA8();pJ3=Object.getOwnPropertySymbols,dJ3=!pJ3?wY1:function(A){var q=[];while(A)$Y1(q,SD6(A)),A=OY1(A);return q},HY1=dJ3});function cJ3(A,q){return gs(A,HY1(A),q)}var JaA;var MaA=k(()=>{Yx6();rA8();JaA=cJ3});function lJ3(A,q,K){var Y=q(A);return kD6(A)?Y:$Y1(Y,K(A))}var jY1;var oA8=k(()=>{iA8();d91();jY1=lJ3});function iJ3(A){return jY1(A,yD6,SD6)}var DaA;var XaA=k(()=>{oA8();_Y1();qY1();DaA=iJ3});function nJ3(A){return jY1(A,RD6,HY1)}var PaA;var WaA=k(()=>{oA8();rA8();KY1();PaA=nJ3});var rJ3,JY1;var ZaA=k(()=>{us();QI();rJ3=oV(fM,"DataView"),JY1=rJ3});var oJ3,MY1;var GaA=k(()=>{us();QI();oJ3=oV(fM,"Promise"),MY1=oJ3});var aJ3,DY1;var faA=k(()=>{us();QI();aJ3=oV(fM,"Set"),DY1=aJ3});var sJ3,XY1;var TaA=k(()=>{us();QI();sJ3=oV(fM,"WeakMap"),XY1=sJ3});var VaA="[object Map]",tJ3="[object Object]",NaA="[object Promise]",vaA="[object Set]",kaA="[object WeakMap]",EaA="[object DataView]",eJ3,AM3,qM3,KM3,YM3,cK6,CD6;var PY1=k(()=>{ZaA();Q91();GaA();faA();TaA();Ax6();IA8();eJ3=Qd(JY1),AM3=Qd(Bs),qM3=Qd(MY1),KM3=Qd(DY1),YM3=Qd(XY1),cK6=Fd;if(JY1&&cK6(new JY1(new ArrayBuffer(1)))!=EaA||Bs&&cK6(new Bs)!=VaA||MY1&&cK6(MY1.resolve())!=NaA||DY1&&cK6(new DY1)!=vaA||XY1&&cK6(new XY1)!=kaA)cK6=function(A){var q=Fd(A),K=q==tJ3?A.constructor:void 0,Y=K?Qd(K):"";if(Y)switch(Y){case eJ3:return EaA;case AM3:return VaA;case qM3:return NaA;case KM3:return vaA;case YM3:return kaA}return q};CD6=cK6});function _M3(A){var q=A.length,K=new A.constructor(q);if(q&&typeof A[0]=="string"&&wM3.call(A,"index"))K.index=A.index,K.input=A.input;return K}var zM3,wM3,LaA;var yaA=k(()=>{zM3=Object.prototype,wM3=zM3.hasOwnProperty;LaA=_M3});var $M3,aA8;var RaA=k(()=>{QI();$M3=fM.Uint8Array,aA8=$M3});function OM3(A){var q=new A.constructor(A.byteLength);return new aA8(q).set(new aA8(A)),q}var hD6;var WY1=k(()=>{RaA();hD6=OM3});function HM3(A,q){var K=q?hD6(A.buffer):A.buffer;return new A.constructor(K,A.byteOffset,A.byteLength)}var SaA;var CaA=k(()=>{WY1();SaA=HM3});function JM3(A){var q=new A.constructor(A.source,jM3.exec(A));return q.lastIndex=A.lastIndex,q}var jM3,haA;var IaA=k(()=>{jM3=/\w*$/;haA=JM3});function MM3(A){return xaA?Object(xaA.call(A)):{}}var baA,xaA,uaA;var BaA=k(()=>{m91();baA=gd?gd.prototype:void 0,xaA=baA?baA.valueOf:void 0;uaA=MM3});function DM3(A,q){var K=q?hD6(A.buffer):A.buffer;return new A.constructor(K,A.byteOffset,A.length)}var maA;var gaA=k(()=>{WY1();maA=DM3});function bM3(A,q,K){var Y=A.constructor;switch(q){case NM3:return hD6(A);case XM3:case PM3:return new Y(+A);case vM3:return SaA(A,K);case kM3:case EM3:case LM3:case yM3:case RM3:case SM3:case CM3:case hM3:case IM3:return maA(A,K);case WM3:return new Y;case ZM3:case TM3:return new Y(A);case GM3:return haA(A);case fM3:return new Y;case VM3:return uaA(A)}}var XM3="[object Boolean]",PM3="[object Date]",WM3="[object Map]",ZM3="[object Number]",GM3="[object RegExp]",fM3="[object Set]",TM3="[object String]",VM3="[object Symbol]",NM3="[object ArrayBuffer]",vM3="[object DataView]",kM3="[object Float32Array]",EM3="[object Float64Array]",LM3="[object Int8Array]",yM3="[object Int16Array]",RM3="[object Int32Array]",SM3="[object Uint8Array]",CM3="[object Uint8ClampedArray]",hM3="[object Uint16Array]",IM3="[object Uint32Array]",FaA;var QaA=k(()=>{WY1();CaA();IaA();BaA();gaA();FaA=bM3});var UaA,xM3,paA;var daA=k(()=>{fD6();UaA=Object.create,xM3=function(){function A(){}return function(q){if(!Gm(q))return{};if(UaA)return UaA(q);A.prototype=q;var K=new A;return A.prototype=void 0,K}}(),paA=xM3});function uM3(A){return typeof A.constructor=="function"&&!LD6(A)?paA(OY1(A)):{}}var caA;var laA=k(()=>{daA();nA8();t91();caA=uM3});function mM3(A){return fm(A)&&CD6(A)==BM3}var BM3="[object Map]",iaA;var naA=k(()=>{PY1();vD6();iaA=mM3});var raA,gM3,oaA;var aaA=k(()=>{naA();n91();a91();raA=Tm&&Tm.isMap,gM3=raA?ED6(raA):iaA,oaA=gM3});function QM3(A){return fm(A)&&CD6(A)==FM3}var FM3="[object Set]",saA;var taA=k(()=>{PY1();vD6();saA=QM3});var eaA,UM3,AsA;var qsA=k(()=>{taA();n91();a91();eaA=Tm&&Tm.isSet,UM3=eaA?ED6(eaA):saA,AsA=UM3});function ZY1(A,q,K,Y,z,w){var _,$=q&pM3,O=q&dM3,H=q&cM3;if(K)_=z?K(A,Y,z,w):K(A);if(_!==void 0)return _;if(!Gm(A))return A;var j=kD6(A);if(j){if(_=LaA(A),!$)return zaA(A,_)}else{var J=CD6(A),M=J==YsA||J==oM3;if(zx6(A))return cA8(A,$);if(J==zsA||J==KsA||M&&!z){if(_=O||M?{}:caA(A),!$)return O?JaA(A,soA(_,A)):HaA(A,loA(_,A))}else{if(!_$[J])return z?A:{};_=FaA(A,J,$)}}w||(w=new ZoA);var D=w.get(A);if(D)return D;if(w.set(A,_),AsA(A))A.forEach(function(W){_.add(ZY1(W,q,K,W,A,w))});else if(oaA(A))A.forEach(function(W,Z){_.set(Z,ZY1(W,q,K,Z,A,w))});var X=H?O?PaA:DaA:O?RD6:yD6,P=j?void 0:X(A);return foA(P||A,function(W,Z){if(P)Z=W,W=A[Z];p91(_,Z,ZY1(W,q,K,Z,A,w))}),_}var pM3=1,dM3=2,cM3=4,KsA="[object Arguments]",lM3="[object Array]",iM3="[object Boolean]",nM3="[object Date]",rM3="[object Error]",YsA="[object Function]",oM3="[object GeneratorFunction]",aM3="[object Map]",sM3="[object Number]",zsA="[object Object]",tM3="[object RegExp]",eM3="[object Set]",AD3="[object String]",qD3="[object Symbol]",KD3="[object WeakMap]",YD3="[object ArrayBuffer]",zD3="[object DataView]",wD3="[object Float32Array]",_D3="[object Float64Array]",$D3="[object Int8Array]",OD3="[object Int16Array]",HD3="[object Int32Array]",jD3="[object Uint8Array]",JD3="[object Uint8ClampedArray]",MD3="[object Uint16Array]",DD3="[object Uint32Array]",_$,wsA;var _sA=k(()=>{GoA();ToA();BA8();ioA();toA();YaA();waA();jaA();MaA();XaA();WaA();PY1();yaA();QaA();laA();d91();gA8();aaA();fD6();qsA();qY1();KY1();_$={};_$[KsA]=_$[lM3]=_$[YD3]=_$[zD3]=_$[iM3]=_$[nM3]=_$[wD3]=_$[_D3]=_$[$D3]=_$[OD3]=_$[HD3]=_$[aM3]=_$[sM3]=_$[zsA]=_$[tM3]=_$[eM3]=_$[AD3]=_$[qD3]=_$[jD3]=_$[JD3]=_$[MD3]=_$[DD3]=!0;_$[rM3]=_$[YsA]=_$[KD3]=!1;wsA=ZY1});function WD3(A){return wsA(A,XD3|PD3)}var XD3=1,PD3=4,sA8;var $sA=k(()=>{_sA();sA8=WD3});var OsA=k(()=>{$sA()});import*as HsA from"fs";function tA8(){if(process.platform!=="linux")return;try{let A=HsA.readFileSync("/proc/version",{encoding:"utf8"}),q=A.match(/WSL(\d+)/i);if(q&&q[1])return q[1];if(A.toLowerCase().includes("microsoft"))return"1";return}catch{return}}function aV(){switch(process.platform){case"darwin":return"macos";case"linux":return"linux";case"win32":return"windows";default:return"unknown"}}var GY1=()=>{};import{execFile as ZD3}from"child_process";async function jsA(A,q,K,Y={command:"rg"}){let{command:z,args:w=[]}=Y;return new Promise((_,$)=>{ZD3(z,[...w,...A,q],{maxBuffer:20000000,signal:K,timeout:1e4},(O,H,j)=>{if(!O){_(H.trim().split(`
`).filter(Boolean));return}if(O.code===1){_([]);return}$(Error(`ripgrep failed with exit code ${O.code}: ${j||O.message}`))})})}var JsA=k(()=>{ab6()});import{homedir as eA8}from"os";import*as gf from"path";import*as lK6 from"fs";function TY1(){return[...GD3.filter((A)=>A!==".git"),".claude/commands",".claude/agents"]}function A78(A){return A.toLowerCase()}function zE(A){return A.includes("*")||A.includes("?")||A.includes("[")||A.includes("]")}function iK6(A){return A.replace(/\/\*\*$/,"")||"/"}function fY1(A,q){let K=gf.normalize(A),Y=gf.normalize(q);if(Y===K)return!1;if(K.startsWith("/tmp/")&&Y==="/private"+K)return!1;if(K.startsWith("/var/")&&Y==="/private"+K)return!1;if(K.startsWith("/private/tmp/")&&Y===K)return!1;if(K.startsWith("/private/var/")&&Y===K)return!1;if(Y==="/")return!0;if(Y.split("/").filter(Boolean).length<=1)return!0;if(K.startsWith(Y+"/"))return!0;let w=K;if(K.startsWith("/tmp/"))w="/private"+K;else if(K.startsWith("/var/"))w="/private"+K;if(w!==K&&w.startsWith(Y+"/"))return!0;let _=Y.startsWith(K+"/"),$=w!==K&&Y.startsWith(w+"/");if(Y!==K&&!(w!==K&&Y===w)&&!_&&!$)return!0;return!1}function jR(A){let q=process.cwd(),K=A;if(A==="~")K=eA8();else if(A.startsWith("~/"))K=eA8()+A.slice(1);else if(A.startsWith("./")||A.startsWith("../"))K=gf.resolve(q,A);else if(!gf.isAbsolute(A))K=gf.resolve(q,A);if(zE(K)){let Y=K.split(/[*?[\]]/)[0];if(Y&&Y!=="/"){let z=Y.endsWith("/")?Y.slice(0,-1):gf.dirname(Y);try{let w=lK6.realpathSync(z);if(!fY1(z,w)){let _=K.slice(z.length);return w+_}}catch{}}return K}try{let Y=lK6.realpathSync(K);if(fY1(K,Y));else K=Y}catch{}return K}function $x6(){let A=eA8();return["/dev/stdout","/dev/stderr","/dev/null","/dev/tty","/dev/dtracehelper","/dev/autofs_nowait","/tmp/claude","/private/tmp/claude",gf.join(A,".npm/_logs"),gf.join(A,".claude/debug")]}function VY1(A,q){let Y=["SANDBOX_RUNTIME=1",`TMPDIR=${process.env.CLAUDE_TMPDIR||"/tmp/claude"}`];if(!A&&!q)return Y;let z=["localhost","127.0.0.1","::1","*.local",".local","169.254.0.0/16","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"].join(",");if(Y.push(`NO_PROXY=${z}`),Y.push(`no_proxy=${z}`),A)Y.push(`HTTP_PROXY=http://localhost:${A}`),Y.push(`HTTPS_PROXY=http://localhost:${A}`),Y.push(`http_proxy=http://localhost:${A}`),Y.push(`https_proxy=http://localhost:${A}`);if(q){if(Y.push(`ALL_PROXY=socks5h://localhost:${q}`),Y.push(`all_proxy=socks5h://localhost:${q}`),aV()==="macos")Y.push(`GIT_SSH_COMMAND=ssh -o ProxyCommand='nc -X 5 -x localhost:${q} %h %p'`);if(Y.push(`FTP_PROXY=socks5h://localhost:${q}`),Y.push(`ftp_proxy=socks5h://localhost:${q}`),Y.push(`RSYNC_PROXY=localhost:${q}`),Y.push(`DOCKER_HTTP_PROXY=http://localhost:${A||q}`),Y.push(`DOCKER_HTTPS_PROXY=http://localhost:${A||q}`),A)Y.push("CLOUDSDK_PROXY_TYPE=https"),Y.push("CLOUDSDK_PROXY_ADDRESS=localhost"),Y.push(`CLOUDSDK_PROXY_PORT=${A}`);Y.push(`GRPC_PROXY=socks5h://localhost:${q}`),Y.push(`grpc_proxy=socks5h://localhost:${q}`)}return Y}function NY1(A){let q=A.slice(0,100);return Buffer.from(q).toString("base64")}function MsA(A){return Buffer.from(A,"base64").toString("utf8")}function ID6(A){return"^"+A.replace(/[.^$+{}()|\\]/g,"\\$&").replace(/\[([^\]]*?)$/g,"\\[$1").replace(/\*\*\//g,"__GLOBSTAR_SLASH__").replace(/\*\*/g,"__GLOBSTAR__").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]").replace(/__GLOBSTAR_SLASH__/g,"(.*/)?").replace(/__GLOBSTAR__/g,".*")+"$"}function q78(A){let q=jR(A),K=q.split(/[*?[\]]/)[0];if(!K||K==="/")return fA(`[Sandbox] Glob pattern too broad, skipping: ${A}`),[];let Y=K.endsWith("/")?K.slice(0,-1):gf.dirname(K);if(!lK6.existsSync(Y))return fA(`[Sandbox] Base directory for glob does not exist: ${Y}`),[];let z=new RegExp(ID6(q)),w=[];try{let _=lK6.readdirSync(Y,{recursive:!0,withFileTypes:!0});for(let $ of _){let O=$.parentPath??$.path??Y,H=gf.join(O,$.name);if(z.test(H))w.push(H)}}catch(_){fA(`[Sandbox] Error expanding glob pattern ${A}: ${_}`)}return w}var _x6,GD3;var bD6=k(()=>{GY1();_x6=[".gitconfig",".gitmodules",".bashrc",".bash_profile",".zshrc",".zprofile",".profile",".ripgreprc",".mcp.json"],GD3=[".git",".vscode",".idea"]});import{join as JR,dirname as fD3}from"node:path";import{fileURLToPath as TD3}from"node:url";import*as nK6 from"node:fs";import{execSync as VD3}from"node:child_process";import{homedir as ND3}from"node:os";function DsA(){if(z78)return z78;let A=[];try{let K=VD3("npm root -g",{encoding:"utf8",timeout:5000,stdio:["pipe","pipe","ignore"]}).trim();if(K)A.push(JR(K,"@anthropic-ai","sandbox-runtime"))}catch{}let q=ND3();return A.push(JR("/usr","lib","node_modules","@anthropic-ai","sandbox-runtime"),JR("/usr","local","lib","node_modules","@anthropic-ai","sandbox-runtime"),JR("/opt","homebrew","lib","node_modules","@anthropic-ai","sandbox-runtime"),JR(q,".npm","lib","node_modules","@anthropic-ai","sandbox-runtime"),JR(q,".npm-global","lib","node_modules","@anthropic-ai","sandbox-runtime")),z78=A,A}function w78(){let A=process.arch;switch(A){case"x64":case"x86_64":return"x64";case"arm64":case"aarch64":return"arm64";case"ia32":case"x86":return fA("[SeccompFilter] 32-bit x86 (ia32) is not currently supported due to missing socketcall() syscall blocking. The current seccomp filter only blocks socket(AF_UNIX, ...), but on 32-bit x86, socketcall() can be used to bypass this.",{level:"error"}),null;default:return fA(`[SeccompFilter] Unsupported architecture: ${A}. Only x64 and arm64 are supported.`),null}}function XsA(A){let q=w78();if(!q)return[];let K=fD3(TD3(import.meta.url)),Y=JR("vendor","seccomp",q,A);return[JR(K,Y),JR(K,"..","..",Y),JR(K,"..",Y)]}function _78(A){let q=A??"";if(K78.has(q))return K78.get(q);let K=vD3(A);return K78.set(q,K),K}function vD3(A){if(A){if(nK6.existsSync(A))return fA(`[SeccompFilter] Using BPF filter from explicit path: ${A}`),A;fA(`[SeccompFilter] Explicit path provided but file not found: ${A}`)}let q=w78();if(!q)return fA(`[SeccompFilter] Cannot find pre-generated BPF filter: unsupported architecture ${process.arch}`),null;fA(`[SeccompFilter] Detected architecture: ${q}`);for(let K of XsA("unix-block.bpf"))if(nK6.existsSync(K))return fA(`[SeccompFilter] Found pre-generated BPF filter: ${K} (${q})`),K;for(let K of DsA()){let Y=JR(K,"vendor","seccomp",q,"unix-block.bpf");if(nK6.existsSync(Y))return fA(`[SeccompFilter] Found pre-generated BPF filter in global install: ${Y} (${q})`),Y}return fA(`[SeccompFilter] Pre-generated BPF filter not found in any expected location (${q})`),null}function Ox6(A){let q=A??"";if(Y78.has(q))return Y78.get(q);let K=kD3(A);return Y78.set(q,K),K}function kD3(A){if(A){if(nK6.existsSync(A))return fA(`[SeccompFilter] Using apply-seccomp binary from explicit path: ${A}`),A;fA(`[SeccompFilter] Explicit path provided but file not found: ${A}`)}let q=w78();if(!q)return fA(`[SeccompFilter] Cannot find apply-seccomp binary: unsupported architecture ${process.arch}`),null;fA(`[SeccompFilter] Looking for apply-seccomp binary for architecture: ${q}`);for(let K of XsA("apply-seccomp"))if(nK6.existsSync(K))return fA(`[SeccompFilter] Found apply-seccomp binary: ${K} (${q})`),K;for(let K of DsA()){let Y=JR(K,"vendor","seccomp",q,"apply-seccomp");if(nK6.existsSync(Y))return fA(`[SeccompFilter] Found apply-seccomp binary in global install: ${Y} (${q})`),Y}return fA(`[SeccompFilter] apply-seccomp binary not found in any expected location (${q})`),null}function PsA(A){let q=_78(A);if(q)return fA("[SeccompFilter] Using pre-generated BPF filter"),q;return fA("[SeccompFilter] Pre-generated BPF filter not available for this architecture. Only x64 and arm64 are supported.",{level:"error"}),null}function $78(A){}var K78,Y78,z78=null;var WsA=k(()=>{K78=new Map,Y78=new Map});import{randomBytes as ED3}from"node:crypto";import*as Q2 from"fs";import{spawn as ZsA}from"node:child_process";import{tmpdir as O78}from"node:os";import TM,{join as GsA}from"node:path";function LD3(A,q){let K=A.split(TM.sep),Y="";for(let z of K){if(!z)continue;let w=Y+TM.sep+z;try{if(Q2.lstatSync(w).isSymbolicLink()){if(q.some((O)=>w.startsWith(O+"/")||w===O))return w}}catch{break}Y=w}return null}function yD3(A){let q=A.split(TM.sep),K="";for(let Y of q){if(!Y)continue;let z=K+TM.sep+Y;try{let w=Q2.statSync(z);if(w.isFile()||w.isSymbolicLink())return!0}catch{break}K=z}return!1}function RD3(A){let q=A.split(TM.sep),K="";for(let Y of q){if(!Y)continue;let z=K+TM.sep+Y;if(!Q2.existsSync(z))return z;K=z}return A}async function SD3(A={command:"rg"},q=J78,K=!1,Y){let z=process.cwd(),w=new AbortController,_=Y??w.signal,$=TY1(),O=[..._x6.map((D)=>TM.resolve(z,D)),...$.map((D)=>TM.resolve(z,D))],H=TM.resolve(z,".git"),j=!1;try{j=Q2.statSync(H).isDirectory()}catch{}if(j){if(O.push(TM.resolve(z,".git/hooks")),!K)O.push(TM.resolve(z,".git/config"))}let J=[];for(let D of _x6)J.push("--iglob",D);for(let D of $)J.push("--iglob",`**/${D}/**`);if(J.push("--iglob","**/.git/hooks/**"),!K)J.push("--iglob","**/.git/config");let M=[];try{M=await jsA(["--files","--hidden","--max-depth",String(q),...J,"-g","!**/node_modules/**"],z,_,A)}catch(D){fA(`[Sandbox] ripgrep scan failed: ${D}`)}for(let D of M){let X=TM.resolve(z,D),P=!1;for(let W of[...$,".git"]){let Z=A78(W),G=X.split(TM.sep),f=G.findIndex((V)=>A78(V)===Z);if(f!==-1){if(W===".git"){let V=G.slice(0,f+1).join(TM.sep);if(D.includes(".git/hooks"))O.push(TM.join(V,"hooks"));else if(D.includes(".git/config"))O.push(TM.join(V,"config"))}else O.push(G.slice(0,f+1).join(TM.sep));P=!0;break}}if(!P)O.push(X)}return[...new Set(O)]}function j78(){if(fsA)return;process.on("exit",()=>{for(let A of H78)try{$78(A)}catch{}M78()}),fsA=!0}function M78(){for(let A of vY1)try{let q=Q2.statSync(A);if(q.isFile()&&q.size===0)Q2.unlinkSync(A),fA(`[Sandbox Linux] Cleaned up bwrap mount point (file): ${A}`);else if(q.isDirectory()){if(Q2.readdirSync(A).length===0)Q2.rmdirSync(A),fA(`[Sandbox Linux] Cleaned up bwrap mount point (dir): ${A}`)}}catch{}vY1.clear()}function TsA(A){let q=[],K=[];if(md("bwrap")===null)q.push("bubblewrap (bwrap) not installed");if(md("socat")===null)q.push("socat not installed");let Y=_78(A?.bpfPath)!==null,z=Ox6(A?.applyPath)!==null;if(!Y||!z)K.push("seccomp not available - unix socket access not restricted");return{warnings:K,errors:q}}async function VsA(A,q){let K=ED3(8).toString("hex"),Y=GsA(O78(),`claude-http-${K}.sock`),z=GsA(O78(),`claude-socks-${K}.sock`),w=[`UNIX-LISTEN:${Y},fork,reuseaddr`,`TCP:localhost:${A},keepalive,keepidle=10,keepintvl=5,keepcnt=3`];fA(`Starting HTTP bridge: socat ${w.join(" ")}`);let _=ZsA("socat",w,{stdio:"ignore"});if(!_.pid)throw Error("Failed to start HTTP bridge process");_.on("error",(j)=>{fA(`HTTP bridge process error: ${j}`,{level:"error"})}),_.on("exit",(j,J)=>{fA(`HTTP bridge process exited with code ${j}, signal ${J}`,{level:j===0?"info":"error"})});let $=[`UNIX-LISTEN:${z},fork,reuseaddr`,`TCP:localhost:${q},keepalive,keepidle=10,keepintvl=5,keepcnt=3`];fA(`Starting SOCKS bridge: socat ${$.join(" ")}`);let O=ZsA("socat",$,{stdio:"ignore"});if(!O.pid){if(_.pid)try{process.kill(_.pid,"SIGTERM")}catch{}throw Error("Failed to start SOCKS bridge process")}O.on("error",(j)=>{fA(`SOCKS bridge process error: ${j}`,{level:"error"})}),O.on("exit",(j,J)=>{fA(`SOCKS bridge process exited with code ${j}, signal ${J}`,{level:j===0?"info":"error"})});let H=5;for(let j=0;j<H;j++){if(!_.pid||_.killed||!O.pid||O.killed)throw Error("Linux bridge process died unexpectedly");try{if(Q2.existsSync(Y)&&Q2.existsSync(z)){fA(`Linux bridges ready after ${j+1} attempts`);break}}catch(J){fA(`Error checking sockets (attempt ${j+1}): ${J}`,{level:"error"})}if(j===H-1){if(_.pid)try{process.kill(_.pid,"SIGTERM")}catch{}if(O.pid)try{process.kill(O.pid,"SIGTERM")}catch{}throw Error(`Failed to create bridge sockets after ${H} attempts`)}await new Promise((J)=>setTimeout(J,j*100))}return{httpSocketPath:Y,socksSocketPath:z,httpBridgeProcess:_,socksBridgeProcess:O,httpProxyPort:A,socksProxyPort:q}}function CD3(A,q,K,Y,z,w){let _=z||"bash",$=[`socat TCP-LISTEN:3128,fork,reuseaddr UNIX-CONNECT:${A} >/dev/null 2>&1 &`,`socat TCP-LISTEN:1080,fork,reuseaddr UNIX-CONNECT:${q} >/dev/null 2>&1 &`,'trap "kill %1 %2 2>/dev/null; exit" EXIT'];if(Y){let O=Ox6(w);if(!O)throw Error("apply-seccomp binary not found. This should have been caught earlier. Ensure vendor/seccomp/{x64,arm64}/apply-seccomp binaries are included in the package.");let H=rK6.default.quote([O,Y,_,"-c",K]),j=[...$,H].join(`
`);return`${_} -c ${rK6.default.quote([j])}`}else{let O=[...$,`eval ${rK6.default.quote([K])}`].join(`
`);return`${_} -c ${rK6.default.quote([O])}`}}async function hD3(A,q,K={command:"rg"},Y=J78,z=!1,w){let _=[];if(q){_.push("--ro-bind","/","/");let O=[];for(let j of q.allowOnly||[]){let J=jR(j);if(fA(`[Sandbox Linux] Processing write path: ${j} -> ${J}`),J.startsWith("/dev/")){fA(`[Sandbox Linux] Skipping /dev path: ${J}`);continue}if(!Q2.existsSync(J)){fA(`[Sandbox Linux] Skipping non-existent write path: ${J}`);continue}try{let M=Q2.realpathSync(J),D=J.replace(/\/+$/,"");if(M!==D&&fY1(J,M)){fA(`[Sandbox Linux] Skipping symlink write path pointing outside expected location: ${j} -> ${M}`);continue}}catch{fA(`[Sandbox Linux] Skipping write path that could not be resolved: ${J}`);continue}_.push("--bind",J,J),O.push(J)}let H=[...q.denyWithinAllow||[],...await SD3(K,Y,z,w)];for(let j of H){let J=jR(j);if(J.startsWith("/dev/"))continue;let M=LD3(J,O);if(M){_.push("--ro-bind","/dev/null",M),fA(`[Sandbox Linux] Mounted /dev/null at symlink ${M} to prevent symlink replacement attack`);continue}if(!Q2.existsSync(J)){if(yD3(J)){fA(`[Sandbox Linux] Skipping deny path with file ancestor (cannot create paths under a file): ${J}`);continue}let X=TM.dirname(J);while(X!=="/"&&!Q2.existsSync(X))X=TM.dirname(X);if(O.some((W)=>X.startsWith(W+"/")||X===W||J.startsWith(W+"/"))){let W=RD3(J);if(W!==J){let Z=Q2.mkdtempSync(TM.join(O78(),"claude-empty-"));_.push("--ro-bind",Z,W),vY1.add(W),j78(),fA(`[Sandbox Linux] Mounted empty dir at ${W} to block creation of ${J}`)}else _.push("--ro-bind","/dev/null",W),vY1.add(W),j78(),fA(`[Sandbox Linux] Mounted /dev/null at ${W} to block creation of ${J}`)}else fA(`[Sandbox Linux] Skipping non-existent deny path not within allowed paths: ${J}`);continue}if(O.some((X)=>J.startsWith(X+"/")||J===X))_.push("--ro-bind",J,J);else fA(`[Sandbox Linux] Skipping deny path not within allowed paths: ${J}`)}}else _.push("--bind","/","/");let $=[...A?.denyOnly||[]];if(Q2.existsSync("/etc/ssh/ssh_config.d"))$.push("/etc/ssh/ssh_config.d");for(let O of $){let H=jR(O);if(!Q2.existsSync(H)){fA(`[Sandbox Linux] Skipping non-existent read deny path: ${H}`);continue}if(Q2.statSync(H).isDirectory())_.push("--tmpfs",H);else _.push("--ro-bind","/dev/null",H)}return _}async function NsA(A){let{command:q,needsNetworkRestriction:K,httpSocketPath:Y,socksSocketPath:z,httpProxyPort:w,socksProxyPort:_,readConfig:$,writeConfig:O,enableWeakerNestedSandbox:H,allowAllUnixSockets:j,binShell:J,ripgrepConfig:M={command:"rg"},mandatoryDenySearchDepth:D=J78,allowGitConfig:X=!1,seccompConfig:P,abortSignal:W}=A,Z=$&&$.denyOnly.length>0,G=O!==void 0;if(!K&&!Z&&!G)return q;let f=["--new-session","--die-with-parent"],V=void 0;try{if(!j){V=PsA(P?.bpfPath)??void 0;let B=Ox6(P?.applyPath);if(!V||!B)fA("[Sandbox Linux] Seccomp binaries not available - unix socket blocking disabled. Install @anthropic-ai/sandbox-runtime globally for full protection.",{level:"warn"}),V=void 0;else{if(!V.includes("/vendor/seccomp/"))H78.add(V),j78();fA("[Sandbox Linux] Generated seccomp BPF filter for Unix socket blocking")}}else fA("[Sandbox Linux] Skipping seccomp filter - allowAllUnixSockets is enabled");if(K){if(f.push("--unshare-net"),Y&&z){if(!Q2.existsSync(Y))throw Error(`Linux HTTP bridge socket does not exist: ${Y}. The bridge process may have died. Try reinitializing the sandbox.`);if(!Q2.existsSync(z))throw Error(`Linux SOCKS bridge socket does not exist: ${z}. The bridge process may have died. Try reinitializing the sandbox.`);f.push("--bind",Y,Y),f.push("--bind",z,z);let B=VY1(3128,1080);if(f.push(...B.flatMap((x)=>{let F=x.indexOf("="),g=x.slice(0,F),b=x.slice(F+1);return["--setenv",g,b]})),w!==void 0)f.push("--setenv","CLAUDE_CODE_HOST_HTTP_PROXY_PORT",String(w));if(_!==void 0)f.push("--setenv","CLAUDE_CODE_HOST_SOCKS_PROXY_PORT",String(_))}}let N=await hD3($,O,M,D,X,W);if(f.push(...N),f.push("--dev","/dev"),f.push("--unshare-pid"),!H)f.push("--proc","/proc");let v=J||"bash",y=md(v);if(!y)throw Error(`Shell '${v}' not found in PATH`);if(f.push("--",y,"-c"),K&&Y&&z){let B=CD3(Y,z,q,V,y,P?.applyPath);f.push(B)}else if(V){let B=Ox6(P?.applyPath);if(!B)throw Error("apply-seccomp binary not found. This should have been caught earlier. Ensure vendor/seccomp/{x64,arm64}/apply-seccomp binaries are included in the package.");let x=rK6.default.quote([B,V,y,"-c",q]);f.push(x)}else f.push(q);let R=rK6.default.quote(["bwrap",...f]),h=[];if(K)h.push("network");if(Z||G)h.push("filesystem");if(V)h.push("seccomp(unix-block)");return fA(`[Sandbox Linux] Wrapped command with bwrap (${h.join(", ")} restrictions)`),R}catch(N){if(V&&!V.includes("/vendor/seccomp/")){H78.delete(V);try{$78(V)}catch(v){fA(`[Sandbox Linux] Failed to clean up seccomp filter on error: ${v}`,{level:"error"})}}throw N}}var rK6,J78=3,H78,vY1,fsA=!1;var vsA=k(()=>{ab6();JsA();bD6();WsA();rK6=e(z51(),1);H78=new Set,vY1=new Set});import{spawn as ID3}from"child_process";import*as pd from"path";function bD3(A=!1){let q=process.cwd(),K=[];for(let Y of _x6)K.push(pd.resolve(q,Y)),K.push(`**/${Y}`);for(let Y of TY1())K.push(pd.resolve(q,Y)),K.push(`**/${Y}/**`);if(K.push(pd.resolve(q,".git/hooks")),K.push("**/.git/hooks/**"),!A)K.push(pd.resolve(q,".git/config")),K.push("**/.git/config");return[...new Set(K)]}function xD3(A){return`CMD64_${NY1(A)}_END_${LsA}`}function ksA(A){let q=[],K=pd.dirname(A);while(K!=="/"&&K!=="."){q.push(K);let Y=pd.dirname(K);if(Y===K)break;K=Y}return q}function ysA(A,q){let K=[];for(let Y of A){let z=jR(Y);if(zE(z)){let w=ID6(z);K.push("(deny file-write-unlink",`  (regex ${sV(w)})`,`  (with message "${q}"))`);let _=z.split(/[*?[\]]/)[0];if(_&&_!=="/"){let $=_.endsWith("/")?_.slice(0,-1):pd.dirname(_);K.push("(deny file-write-unlink",`  (literal ${sV($)})`,`  (with message "${q}"))`);for(let O of ksA($))K.push("(deny file-write-unlink",`  (literal ${sV(O)})`,`  (with message "${q}"))`)}}else{K.push("(deny file-write-unlink",`  (subpath ${sV(z)})`,`  (with message "${q}"))`);for(let w of ksA(z))K.push("(deny file-write-unlink",`  (literal ${sV(w)})`,`  (with message "${q}"))`)}}return K}function uD3(A,q){if(!A)return["(allow file-read*)"];let K=[];K.push("(allow file-read*)");for(let Y of A.denyOnly||[]){let z=jR(Y);if(zE(z)){let w=ID6(z);K.push("(deny file-read*",`  (regex ${sV(w)})`,`  (with message "${q}"))`)}else K.push("(deny file-read*",`  (subpath ${sV(z)})`,`  (with message "${q}"))`)}return K.push(...ysA(A.denyOnly||[],q)),K}function BD3(A,q,K=!1){if(!A)return["(allow file-write*)"];let Y=[],z=gD3();for(let _ of z){let $=jR(_);Y.push("(allow file-write*",`  (subpath ${sV($)})`,`  (with message "${q}"))`)}for(let _ of A.allowOnly||[]){let $=jR(_);if(zE($)){let O=ID6($);Y.push("(allow file-write*",`  (regex ${sV(O)})`,`  (with message "${q}"))`)}else Y.push("(allow file-write*",`  (subpath ${sV($)})`,`  (with message "${q}"))`)}let w=[...A.denyWithinAllow||[],...bD3(K)];for(let _ of w){let $=jR(_);if(zE($)){let O=ID6($);Y.push("(deny file-write*",`  (regex ${sV(O)})`,`  (with message "${q}"))`)}else Y.push("(deny file-write*",`  (subpath ${sV($)})`,`  (with message "${q}"))`)}return Y.push(...ysA(w,q)),Y}function mD3({readConfig:A,writeConfig:q,httpProxyPort:K,socksProxyPort:Y,needsNetworkRestriction:z,allowUnixSockets:w,allowAllUnixSockets:_,allowLocalBinding:$,allowPty:O,allowGitConfig:H=!1,enableWeakerNetworkIsolation:j=!1,logTag:J}){let M=["(version 1)",`(deny default (with message "${J}"))`,"",`; LogTag: ${J}`,"","; Essential permissions - based on Chrome sandbox policy","; Process permissions","(allow process-exec)","(allow process-fork)","(allow process-info* (target same-sandbox))","(allow signal (target same-sandbox))","(allow mach-priv-task-port (target same-sandbox))","","; User preferences","(allow user-preference-read)","","; Mach IPC - specific services only (no wildcard)","(allow mach-lookup",'  (global-name "com.apple.audio.systemsoundserver")','  (global-name "com.apple.distributed_notifications@Uv3")','  (global-name "com.apple.FontObjectsServer")','  (global-name "com.apple.fonts")','  (global-name "com.apple.logd")','  (global-name "com.apple.lsd.mapdb")','  (global-name "com.apple.PowerManagement.control")','  (global-name "com.apple.system.logger")','  (global-name "com.apple.system.notification_center")','  (global-name "com.apple.system.opendirectoryd.libinfo")','  (global-name "com.apple.system.opendirectoryd.membership")','  (global-name "com.apple.bsd.dirhelper")','  (global-name "com.apple.securityd.xpc")','  (global-name "com.apple.coreservices.launchservicesd")',")","",...j?["; trustd.agent - needed for Go TLS certificate verification (weaker network isolation)",'(allow mach-lookup (global-name "com.apple.trustd.agent"))']:[],"","; POSIX IPC - shared memory","(allow ipc-posix-shm)","","; POSIX IPC - semaphores for Python multiprocessing","(allow ipc-posix-sem)","","; IOKit - specific operations only","(allow iokit-open",'  (iokit-registry-entry-class "IOSurfaceRootUserClient")','  (iokit-registry-entry-class "RootDomainUserClient")','  (iokit-user-client-class "IOSurfaceSendRight")',")","","; IOKit properties","(allow iokit-get-properties)","","; Specific safe system-sockets, doesn't allow network access","(allow system-socket (require-all (socket-domain AF_SYSTEM) (socket-protocol 2)))","","; sysctl - specific sysctls only","(allow sysctl-read",'  (sysctl-name "hw.activecpu")','  (sysctl-name "hw.busfrequency_compat")','  (sysctl-name "hw.byteorder")','  (sysctl-name "hw.cacheconfig")','  (sysctl-name "hw.cachelinesize_compat")','  (sysctl-name "hw.cpufamily")','  (sysctl-name "hw.cpufrequency")','  (sysctl-name "hw.cpufrequency_compat")','  (sysctl-name "hw.cputype")','  (sysctl-name "hw.l1dcachesize_compat")','  (sysctl-name "hw.l1icachesize_compat")','  (sysctl-name "hw.l2cachesize_compat")','  (sysctl-name "hw.l3cachesize_compat")','  (sysctl-name "hw.logicalcpu")','  (sysctl-name "hw.logicalcpu_max")','  (sysctl-name "hw.machine")','  (sysctl-name "hw.memsize")','  (sysctl-name "hw.ncpu")','  (sysctl-name "hw.nperflevels")','  (sysctl-name "hw.packages")','  (sysctl-name "hw.pagesize_compat")','  (sysctl-name "hw.pagesize")','  (sysctl-name "hw.physicalcpu")','  (sysctl-name "hw.physicalcpu_max")','  (sysctl-name "hw.tbfrequency_compat")','  (sysctl-name "hw.vectorunit")','  (sysctl-name "kern.argmax")','  (sysctl-name "kern.bootargs")','  (sysctl-name "kern.hostname")','  (sysctl-name "kern.maxfiles")','  (sysctl-name "kern.maxfilesperproc")','  (sysctl-name "kern.maxproc")','  (sysctl-name "kern.ngroups")','  (sysctl-name "kern.osproductversion")','  (sysctl-name "kern.osrelease")','  (sysctl-name "kern.ostype")','  (sysctl-name "kern.osvariant_status")','  (sysctl-name "kern.osversion")','  (sysctl-name "kern.secure_kernel")','  (sysctl-name "kern.tcsm_available")','  (sysctl-name "kern.tcsm_enable")','  (sysctl-name "kern.usrstack64")','  (sysctl-name "kern.version")','  (sysctl-name "kern.willshutdown")','  (sysctl-name "machdep.cpu.brand_string")','  (sysctl-name "machdep.ptrauth_enabled")','  (sysctl-name "security.mac.lockdown_mode_state")','  (sysctl-name "sysctl.proc_cputype")','  (sysctl-name "vm.loadavg")','  (sysctl-name-prefix "hw.optional.arm")','  (sysctl-name-prefix "hw.optional.arm.")','  (sysctl-name-prefix "hw.optional.armv8_")','  (sysctl-name-prefix "hw.perflevel")','  (sysctl-name-prefix "kern.proc.all")','  (sysctl-name-prefix "kern.proc.pgrp.")','  (sysctl-name-prefix "kern.proc.pid.")','  (sysctl-name-prefix "machdep.cpu.")','  (sysctl-name-prefix "net.routetable.")',")","","; V8 thread calculations","(allow sysctl-write",'  (sysctl-name "kern.tcsm_enable")',")","","; Distributed notifications","(allow distributed-notification-post)","","; Specific mach-lookup permissions for security operations",'(allow mach-lookup (global-name "com.apple.SecurityServer"))',"","; File I/O on device files",'(allow file-ioctl (literal "/dev/null"))','(allow file-ioctl (literal "/dev/zero"))','(allow file-ioctl (literal "/dev/random"))','(allow file-ioctl (literal "/dev/urandom"))','(allow file-ioctl (literal "/dev/dtracehelper"))','(allow file-ioctl (literal "/dev/tty"))',"","(allow file-ioctl file-read-data file-write-data","  (require-all",'    (literal "/dev/null")',"    (vnode-type CHARACTER-DEVICE)","  )",")",""];if(M.push("; Network"),!z)M.push("(allow network*)");else{if($)M.push('(allow network-bind (local ip "*:*"))'),M.push('(allow network-inbound (local ip "*:*"))'),M.push('(allow network-outbound (local ip "*:*"))');if(_)M.push("(allow system-socket (socket-domain AF_UNIX))"),M.push('(allow network-bind (local unix-socket (path-regex #"^/")))'),M.push('(allow network-outbound (remote unix-socket (path-regex #"^/")))');else if(w&&w.length>0){M.push("(allow system-socket (socket-domain AF_UNIX))");for(let D of w){let X=jR(D);M.push(`(allow network-bind (local unix-socket (subpath ${sV(X)})))`),M.push(`(allow network-outbound (remote unix-socket (subpath ${sV(X)})))`)}}if(K!==void 0)M.push(`(allow network-bind (local ip "localhost:${K}"))`),M.push(`(allow network-inbound (local ip "localhost:${K}"))`),M.push(`(allow network-outbound (remote ip "localhost:${K}"))`);if(Y!==void 0)M.push(`(allow network-bind (local ip "localhost:${Y}"))`),M.push(`(allow network-inbound (local ip "localhost:${Y}"))`),M.push(`(allow network-outbound (remote ip "localhost:${Y}"))`)}if(M.push(""),M.push("; File read"),M.push(...uD3(A,J)),M.push(""),M.push("; File write"),M.push(...BD3(q,J,H)),O)M.push(""),M.push("; Pseudo-terminal (pty) support"),M.push("(allow pseudo-tty)"),M.push("(allow file-ioctl"),M.push('  (literal "/dev/ptmx")'),M.push('  (regex #"^/dev/ttys")'),M.push(")"),M.push("(allow file-read* file-write*"),M.push('  (literal "/dev/ptmx")'),M.push('  (regex #"^/dev/ttys")'),M.push(")");return M.join(`
`)}function sV(A){return JSON.stringify(A)}function gD3(){let A=process.env.TMPDIR;if(!A)return[];if(!A.match(/^\/(private\/)?var\/folders\/[^/]{2}\/[^/]+\/T\/?$/))return[];let K=A.replace(/\/T\/?$/,"");if(K.startsWith("/private/var/"))return[K,K.replace("/private","")];else if(K.startsWith("/var/"))return[K,"/private"+K];return[K]}function RsA(A){let{command:q,needsNetworkRestriction:K,httpProxyPort:Y,socksProxyPort:z,allowUnixSockets:w,allowAllUnixSockets:_,allowLocalBinding:$,readConfig:O,writeConfig:H,allowPty:j,allowGitConfig:J=!1,enableWeakerNetworkIsolation:M=!1,binShell:D}=A,X=O&&O.denyOnly.length>0;if(!K&&!X&&H===void 0)return q;let W=xD3(q),Z=mD3({readConfig:O,writeConfig:H,httpProxyPort:Y,socksProxyPort:z,needsNetworkRestriction:K,allowUnixSockets:w,allowAllUnixSockets:_,allowLocalBinding:$,allowPty:j,allowGitConfig:J,enableWeakerNetworkIsolation:M,logTag:W}),G=VY1(Y,z),f=D||"bash",V=md(f);if(!V)throw Error(`Shell '${f}' not found in PATH`);let N=EsA.default.quote(["env",...G,"sandbox-exec","-p",Z,V,"-c",q]);return fA(`[Sandbox macOS] Applied restrictions - network: ${!!(Y||z)}, read: ${O?"allowAllExcept"in O?"allowAllExcept":"denyAllExcept":"none"}, write: ${H?"allowAllExcept"in H?"allowAllExcept":"denyAllExcept":"none"}`),N}function SsA(A,q){let K=/CMD64_(.+?)_END/,Y=/Sandbox:\s+(.+)$/,z=q?.["*"]||[],w=q?Object.entries(q).filter(([$])=>$!=="*"):[],_=ID3("log",["stream","--predicate",`(eventMessage ENDSWITH "${LsA}")`,"--style","compact"]);return _.stdout?.on("data",($)=>{let O=$.toString().split(`
`),H=O.find((P)=>P.includes("Sandbox:")&&P.includes("deny")),j=O.find((P)=>P.startsWith("CMD64_"));if(!H)return;let J=H.match(Y);if(!J?.[1])return;let M=J[1],D,X;if(j){if(X=j.match(K)?.[1],X)try{D=MsA(X)}catch{}}if(M.includes("mDNSResponder")||M.includes("mach-lookup com.apple.diagnosticd")||M.includes("mach-lookup com.apple.analyticsd"))return;if(q&&D){if(z.length>0){if(z.some((W)=>M.includes(W)))return}for(let[P,W]of w)if(D.includes(P)){if(W.some((G)=>M.includes(G)))return}}A({line:M,command:D,encodedCommand:X,timestamp:new Date})}),_.stderr?.on("data",($)=>{fA(`[Sandbox Monitor] Log stream stderr: ${$.toString()}`)}),_.on("error",($)=>{fA(`[Sandbox Monitor] Failed to start log stream: ${$.message}`)}),_.on("exit",($)=>{fA(`[Sandbox Monitor] Log stream exited with code: ${$}`)}),()=>{fA("[Sandbox Monitor] Stopping log monitor"),_.kill("SIGTERM")}}var EsA,LsA;var CsA=k(()=>{ab6();bD6();EsA=e(z51(),1);LsA=`_${Math.random().toString(36).slice(2,11)}_SBX`});class xD6{constructor(){this.violations=[],this.totalCount=0,this.maxSize=100,this.listeners=new Set}addViolation(A){if(this.violations.push(A),this.totalCount++,this.violations.length>this.maxSize)this.violations=this.violations.slice(-this.maxSize);this.notifyListeners()}getViolations(A){if(A===void 0)return[...this.violations];return this.violations.slice(-A)}getCount(){return this.violations.length}getTotalCount(){return this.totalCount}getViolationsForCommand(A){let q=NY1(A);return this.violations.filter((K)=>K.encodedCommand===q)}clear(){this.violations=[],this.notifyListeners()}subscribe(A){return this.listeners.add(A),A(this.getViolations()),()=>{this.listeners.delete(A)}}notifyListeners(){let A=this.getViolations();this.listeners.forEach((q)=>q(A))}}var D78=k(()=>{bD6()});import*as P78 from"fs";import{EOL as X78}from"node:os";function FD3(){if(hsA)return;let A=()=>Z78().catch((q)=>{fA(`Cleanup failed in registerCleanup ${q}`,{level:"error"})});process.once("exit",A),process.once("SIGINT",A),process.once("SIGTERM",A),hsA=!0}function W78(A,q){if(q.startsWith("*.")){let K=q.substring(2);return A.toLowerCase().endsWith("."+K.toLowerCase())}return A.toLowerCase()===q.toLowerCase()}async function xsA(A,q,K){if(!Y5)return fA("No config available, denying network request"),!1;for(let Y of Y5.network.deniedDomains)if(W78(q,Y))return fA(`Denied by config rule: ${q}:${A}`),!1;for(let Y of Y5.network.allowedDomains)if(W78(q,Y))return fA(`Allowed by config rule: ${q}:${A}`),!0;if(!K)return fA(`No matching config rule, denying: ${q}:${A}`),!1;fA(`No matching config rule, asking user: ${q}:${A}`);try{if(await K({host:q,port:A}))return fA(`User allowed: ${q}:${A}`),!0;else return fA(`User denied: ${q}:${A}`),!1}catch(Y){return fA(`Error in permission callback: ${Y}`,{level:"error"}),!1}}function QD3(A){if(!Y5?.network.mitmProxy)return;let{socketPath:q,domains:K}=Y5.network.mitmProxy;for(let Y of K)if(W78(A,Y))return fA(`Host ${A} matches MITM pattern ${Y}`),q;return}async function UD3(A){return uD6=ArA({filter:(q,K)=>xsA(q,K,A),getMitmSocketPath:QD3}),new Promise((q,K)=>{if(!uD6){K(Error("HTTP proxy server undefined before listen"));return}let Y=uD6;Y.once("error",K),Y.once("listening",()=>{let z=Y.address();if(z&&typeof z==="object")Y.unref(),fA(`HTTP proxy listening on localhost:${z.port}`),q(z.port);else K(Error("Failed to get proxy server address"))}),Y.listen(0,"127.0.0.1")})}async function pD3(A){return oK6=jrA({filter:(q,K)=>xsA(q,K,A)}),new Promise((q,K)=>{if(!oK6){K(Error("SOCKS proxy server undefined before listen"));return}oK6.listen(0,"127.0.0.1").then((Y)=>{oK6?.unref(),q(Y)}).catch(K)})}async function dD3(A,q,K=!1){if(Fs){await Fs;return}Y5=A;let Y=BsA();if(Y.errors.length>0)throw Error(`Sandbox dependencies not available: ${Y.errors.join(", ")}`);if(K&&aV()==="macos")kY1=SsA(EY1.addViolation.bind(EY1),Y5.ignoreViolations),fA("Started macOS sandbox log monitor");FD3(),Fs=(async()=>{try{let z;if(Y5.network.httpProxyPort!==void 0)z=Y5.network.httpProxyPort,fA(`Using external HTTP proxy on port ${z}`);else z=await UD3(q);let w;if(Y5.network.socksProxyPort!==void 0)w=Y5.network.socksProxyPort,fA(`Using external SOCKS proxy on port ${w}`);else w=await pD3(q);let _;if(aV()==="linux")_=await VsA(z,w);let $={httpProxyPort:z,socksProxyPort:w,linuxBridge:_};return MR=$,fA("Network infrastructure initialized"),$}catch(z){throw Fs=void 0,MR=void 0,Z78().catch((w)=>{fA(`Cleanup failed in initializationPromise ${w}`,{level:"error"})}),z}})(),await Fs}function usA(){let A=aV();if(A==="linux")return tA8()!=="1";return A==="macos"}function cD3(){return Y5!==void 0}function BsA(A){if(!usA())return{errors:["Unsupported platform"],warnings:[]};let q=[],K=[],Y=A??Y5?.ripgrep??{command:"rg"};if(md(Y.command)===null)q.push(`ripgrep (${Y.command}) not found`);if(aV()==="linux"){let w=TsA(Y5?.seccomp);q.push(...w.errors),K.push(...w.warnings)}return{errors:q,warnings:K}}function lD3(){if(!Y5)return{denyOnly:[]};let A=[];for(let q of Y5.filesystem.denyRead){let K=iK6(q);if(aV()==="linux"&&zE(K)){let Y=q78(q);fA(`[Sandbox] Expanded glob pattern "${q}" to ${Y.length} paths on Linux`),A.push(...Y)}else A.push(K)}return{denyOnly:A}}function iD3(){if(!Y5)return{allowOnly:$x6(),denyWithinAllow:[]};let A=Y5.filesystem.allowWrite.map((Y)=>iK6(Y)).filter((Y)=>{if(aV()==="linux"&&zE(Y))return fA(`Skipping glob pattern on Linux/WSL: ${Y}`),!1;return!0}),q=Y5.filesystem.denyWrite.map((Y)=>iK6(Y)).filter((Y)=>{if(aV()==="linux"&&zE(Y))return fA(`Skipping glob pattern on Linux/WSL: ${Y}`),!1;return!0});return{allowOnly:[...$x6(),...A],denyWithinAllow:q}}function nD3(){if(!Y5)return{};let A=Y5.network.allowedDomains,q=Y5.network.deniedDomains;return{...A.length>0&&{allowedHosts:A},...q.length>0&&{deniedHosts:q}}}function msA(){return Y5?.network?.allowUnixSockets}function IsA(){return Y5?.network?.allowAllUnixSockets}function gsA(){return Y5?.network?.allowLocalBinding}function FsA(){return Y5?.ignoreViolations}function QsA(){return Y5?.enableWeakerNestedSandbox}function rD3(){return Y5?.enableWeakerNetworkIsolation}function oD3(){return Y5?.ripgrep??{command:"rg"}}function aD3(){return Y5?.mandatoryDenySearchDepth??3}function bsA(){return Y5?.filesystem?.allowGitConfig??!1}function sD3(){return Y5?.seccomp}function UsA(){return MR?.httpProxyPort}function psA(){return MR?.socksProxyPort}function dsA(){return MR?.linuxBridge?.httpSocketPath}function csA(){return MR?.linuxBridge?.socksSocketPath}async function lsA(){if(!Y5)return!1;if(Fs)try{return await Fs,!0}catch{return!1}return MR!==void 0}async function tD3(A,q,K,Y){let z=aV(),w=(P)=>P.map((W)=>iK6(W)).filter((W)=>{if(aV()==="linux"&&zE(W))return fA(`[Sandbox] Skipping glob write pattern on Linux: ${W}`),!1;return!0}),_=w(K?.filesystem?.allowWrite??Y5?.filesystem.allowWrite??[]),$={allowOnly:[...$x6(),..._],denyWithinAllow:w(K?.filesystem?.denyWrite??Y5?.filesystem.denyWrite??[])},O=K?.filesystem?.denyRead??Y5?.filesystem.denyRead??[],H=[];for(let P of O){let W=iK6(P);if(aV()==="linux"&&zE(W))H.push(...q78(P));else H.push(W)}let j={denyOnly:H},J=K?.network?.allowedDomains!==void 0||Y5?.network?.allowedDomains!==void 0,M=J,D=J;if(D)await lsA();let X=K?.allowPty??Y5?.allowPty;switch(z){case"macos":return RsA({command:A,needsNetworkRestriction:M,httpProxyPort:D?UsA():void 0,socksProxyPort:D?psA():void 0,readConfig:j,writeConfig:$,allowUnixSockets:msA(),allowAllUnixSockets:IsA(),allowLocalBinding:gsA(),ignoreViolations:FsA(),allowPty:X,allowGitConfig:bsA(),enableWeakerNetworkIsolation:rD3(),binShell:q});case"linux":return NsA({command:A,needsNetworkRestriction:M,httpSocketPath:D?dsA():void 0,socksSocketPath:D?csA():void 0,httpProxyPort:D?MR?.httpProxyPort:void 0,socksProxyPort:D?MR?.socksProxyPort:void 0,readConfig:j,writeConfig:$,enableWeakerNestedSandbox:QsA(),allowAllUnixSockets:IsA(),binShell:q,ripgrepConfig:oD3(),mandatoryDenySearchDepth:aD3(),allowGitConfig:bsA(),seccompConfig:sD3(),abortSignal:Y});default:throw Error(`Sandbox configuration is not supported on platform: ${z}`)}}function eD3(){return Y5}function AX3(A){Y5=sA8(A),fA("Sandbox configuration updated")}function isA(){M78()}async function Z78(){if(isA(),kY1)kY1(),kY1=void 0;if(MR?.linuxBridge){let{httpSocketPath:q,socksSocketPath:K,httpBridgeProcess:Y,socksBridgeProcess:z}=MR.linuxBridge,w=[];if(Y.pid&&!Y.killed)try{process.kill(Y.pid,"SIGTERM"),fA("Sent SIGTERM to HTTP bridge process"),w.push(new Promise((_)=>{Y.once("exit",()=>{fA("HTTP bridge process exited"),_()}),setTimeout(()=>{if(!Y.killed){fA("HTTP bridge did not exit, forcing SIGKILL",{level:"warn"});try{if(Y.pid)process.kill(Y.pid,"SIGKILL")}catch{}}_()},5000)}))}catch(_){if(_.code!=="ESRCH")fA(`Error killing HTTP bridge: ${_}`,{level:"error"})}if(z.pid&&!z.killed)try{process.kill(z.pid,"SIGTERM"),fA("Sent SIGTERM to SOCKS bridge process"),w.push(new Promise((_)=>{z.once("exit",()=>{fA("SOCKS bridge process exited"),_()}),setTimeout(()=>{if(!z.killed){fA("SOCKS bridge did not exit, forcing SIGKILL",{level:"warn"});try{if(z.pid)process.kill(z.pid,"SIGKILL")}catch{}}_()},5000)}))}catch(_){if(_.code!=="ESRCH")fA(`Error killing SOCKS bridge: ${_}`,{level:"error"})}if(await Promise.all(w),q)try{P78.rmSync(q,{force:!0}),fA("Cleaned up HTTP socket")}catch(_){fA(`HTTP socket cleanup error: ${_}`,{level:"error"})}if(K)try{P78.rmSync(K,{force:!0}),fA("Cleaned up SOCKS socket")}catch(_){fA(`SOCKS socket cleanup error: ${_}`,{level:"error"})}}let A=[];if(uD6){let q=uD6,K=new Promise((Y)=>{q.close((z)=>{if(z&&z.message!=="Server is not running.")fA(`Error closing HTTP proxy server: ${z.message}`,{level:"error"});Y()})});A.push(K)}if(oK6){let q=oK6.close().catch((K)=>{fA(`Error closing SOCKS proxy server: ${K.message}`,{level:"error"})});A.push(q)}await Promise.all(A),uD6=void 0,oK6=void 0,MR=void 0,Fs=void 0}function qX3(){return EY1}function KX3(A,q){if(!Y5)return q;let K=EY1.getViolationsForCommand(A);if(K.length===0)return q;let Y=q;Y+=X78+"<sandbox_violations>"+X78;for(let z of K)Y+=z.line+X78;return Y+="</sandbox_violations>",Y}function YX3(){if(aV()!=="linux"||!Y5)return[];let A=[],q=[...Y5.filesystem.allowWrite,...Y5.filesystem.denyWrite];for(let K of q){let Y=iK6(K);if(zE(Y))A.push(K)}return A}var Y5,uD6,oK6,MR,Fs,hsA=!1,kY1,EY1,pO;var nsA=k(()=>{qrA();JrA();ab6();OsA();GY1();vsA();CsA();bD6();D78();EY1=new xD6;pO={initialize:dD3,isSupportedPlatform:usA,isSandboxingEnabled:cD3,checkDependencies:BsA,getFsReadConfig:lD3,getFsWriteConfig:iD3,getNetworkRestrictionConfig:nD3,getAllowUnixSockets:msA,getAllowLocalBinding:gsA,getIgnoreViolations:FsA,getEnableWeakerNestedSandbox:QsA,getProxyPort:UsA,getSocksProxyPort:psA,getLinuxHttpSocketPath:dsA,getLinuxSocksSocketPath:csA,waitForNetworkInitialization:lsA,wrapWithSandbox:tD3,cleanupAfterCommand:isA,reset:Z78,getSandboxViolationStore:qX3,annotateStderrWithSandboxFailures:KX3,getLinuxGlobPatternWarnings:YX3,getConfig:eD3,updateConfig:AX3}});var aK6=k(()=>{_l1();_l1()});var f78,G78,zX3,osA,asA,ssA,tsA,wX3,T78;var esA=k(()=>{aK6();f78=$q.string().refine((A)=>{if(A.includes("://")||A.includes("/")||A.includes(":"))return!1;if(A==="localhost")return!0;if(A.startsWith("*.")){let q=A.slice(2);if(!q.includes(".")||q.startsWith(".")||q.endsWith("."))return!1;let K=q.split(".");return K.length>=2&&K.every((Y)=>Y.length>0)}if(A.includes("*"))return!1;return A.includes(".")&&!A.startsWith(".")&&!A.endsWith(".")},{message:'Invalid domain pattern. Must be a valid domain (e.g., "example.com") or wildcard (e.g., "*.example.com"). Overly broad patterns like "*.com" or "*" are not allowed for security reasons.'}),G78=$q.string().min(1,"Path cannot be empty"),zX3=$q.object({socketPath:$q.string().min(1).describe("Unix socket path to the MITM proxy"),domains:$q.array(f78).min(1).describe('Domains to route through the MITM proxy (e.g., ["api.example.com", "*.internal.org"])')}),osA=$q.object({allowedDomains:$q.array(f78).describe('List of allowed domains (e.g., ["github.com", "*.npmjs.org"])'),deniedDomains:$q.array(f78).describe("List of denied domains"),allowUnixSockets:$q.array($q.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:$q.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:$q.boolean().optional().describe("Whether to allow binding to local ports (default: false)"),httpProxyPort:$q.number().int().min(1).max(65535).optional().describe("Port of an external HTTP proxy to use instead of starting a local one. When provided, the library will skip starting its own HTTP proxy and use this port. The external proxy must handle domain filtering."),socksProxyPort:$q.number().int().min(1).max(65535).optional().describe("Port of an external SOCKS proxy to use instead of starting a local one. When provided, the library will skip starting its own SOCKS proxy and use this port. The external proxy must handle domain filtering."),mitmProxy:zX3.optional().describe("Optional MITM proxy configuration. Routes matching domains through an upstream proxy via Unix socket while SRT still handles allow/deny filtering.")}),asA=$q.object({denyRead:$q.array(G78).describe("Paths denied for reading"),allowWrite:$q.array(G78).describe("Paths allowed for writing"),denyWrite:$q.array(G78).describe("Paths denied for writing (takes precedence over allowWrite)"),allowGitConfig:$q.boolean().optional().describe("Allow writes to .git/config files (default: false). Enables git remote URL updates while keeping .git/hooks protected.")}),ssA=$q.record($q.string(),$q.array($q.string())).describe('Map of command patterns to filesystem paths to ignore violations for. Use "*" to match all commands'),tsA=$q.object({command:$q.string().describe('The ripgrep command to execute (e.g., "rg", "claude")'),args:$q.array($q.string()).optional().describe('Additional arguments to pass before ripgrep args (e.g., ["--ripgrep"])')}),wX3=$q.object({bpfPath:$q.string().optional().describe("Path to the unix-block.bpf filter file"),applyPath:$q.string().optional().describe("Path to the apply-seccomp binary")}),T78=$q.object({network:osA.describe("Network restrictions configuration"),filesystem:asA.describe("Filesystem restrictions configuration"),ignoreViolations:ssA.optional().describe("Optional configuration for ignoring specific violations"),enableWeakerNestedSandbox:$q.boolean().optional().describe("Enable weaker nested sandbox mode (for Docker environments)"),enableWeakerNetworkIsolation:$q.boolean().optional().describe("Enable weaker network isolation to allow access to com.apple.trustd.agent (macOS only). This is needed for Go programs (gh, gcloud, terraform, kubectl, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. Enabling this opens a potential data exfiltration vector through the trustd service. Only enable if you need Go TLS verification."),ripgrep:tsA.optional().describe('Custom ripgrep configuration (default: { command: "rg" })'),mandatoryDenySearchDepth:$q.number().int().min(1).max(10).optional().describe("Maximum directory depth to search for dangerous files on Linux (default: 3). Higher values provide more protection but slower performance."),allowPty:$q.boolean().optional().describe("Allow pseudo-terminal (pty) operations (macOS only)"),seccomp:wX3.optional().describe("Custom seccomp binary paths (Linux only).")})});var AtA=k(()=>{nsA();D78();esA();bD6();GY1()});function qtA(A,q,K){return`
Web page content:
---
${A}
---

${q}

${K?"Provide a concise response based on the content above. Include relevant details, code examples, and documentation excerpts as needed.":`Provide a concise response based only on the content above. In your response:
 - Enforce a strict 125-character maximum for quotes from any source document. Open Source Software is ok as long as we respect the license.
 - Use quotation marks for exact language from articles; any language outside of the quotation should never be word-for-word the same.
 - You are not a lawyer and never comment on the legality of your own prompts and responses.
 - Never produce or reproduce exact song lyrics.`}
`}var VM="WebFetch",V78=`
- Fetches content from a specified URL and processes it using an AI model
- Takes a URL and a prompt as input
- Fetches the URL content, converts HTML to markdown
- Processes the content with the prompt using a small, fast model
- Returns the model's response about the content
- Use this tool when you need to retrieve and analyze web content

Usage notes:
  - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
  - The URL must be a fully-formed valid URL
  - HTTP URLs will be automatically upgraded to HTTPS
  - The prompt should describe what information you want to extract from the page
  - This tool is read-only and does not modify any files
  - Results may be summarized if the content is very large
  - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
  - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
  - For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
`;var Yq="Edit",LY1="/.claude/**",yY1="~/.claude/**",Hx6="File has been unexpectedly modified. Read it again before attempting to write it.";function N78(A){let q=A.trim();if(!q)return null;if(q.endsWith("-")){let w=parseInt(q.slice(0,-1),10);if(isNaN(w)||w<1)return null;return{firstPage:w,lastPage:1/0}}let K=q.indexOf("-");if(K===-1){let w=parseInt(q,10);if(isNaN(w)||w<1)return null;return{firstPage:w,lastPage:w}}let Y=parseInt(q.slice(0,K),10),z=parseInt(q.slice(K+1),10);if(isNaN(Y)||isNaN(z)||Y<1||z<1||z<Y)return null;return{firstPage:Y,lastPage:z}}function jx6(){return D7()==="firstParty"}function BD6(A){let q=A.startsWith(".")?A.slice(1):A;return _X3.has(q.toLowerCase())}var _X3;var RY1=k(()=>{yz();_X3=new Set(["pdf"])});var u4="Read",Jx6=2000,$X3=2000,KtA="Read a file from the local filesystem.",OX3="- Results are returned using cat -n format, with line numbers starting at 1",YtA;var U2=k(()=>{RY1();YtA=`Reads a file from the local filesystem. You can access any file directly by using this tool.
Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.

Usage:
- The file_path parameter must be an absolute path, not a relative path
- By default, it reads up to ${Jx6} lines starting from the beginning of the file
- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
- Any lines longer than ${$X3} characters will be truncated
${OX3}
- This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${jx6()?`
- This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.`:""}
- This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
- This tool can only read files, not directories. To read a directory, use an ls command via the ${f4} tool.
- You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`});var _tA={};m1(_tA,{shouldAllowManagedSandboxDomainsOnly:()=>eK6,resolvePathPatternForSandbox:()=>tK6,convertToSandboxRuntimeConfig:()=>SY1,addToExcludedCommands:()=>L78,SandboxViolationStore:()=>xD6,SandboxRuntimeConfigSchema:()=>T78,SandboxManager:()=>mA});import{resolve as sK6,join as HX3}from"path";import{readFile as jX3}from"fs/promises";function mD6(A){let q=A.match(/^([^(]+)\(([^)]+)\)$/);if(!q)return{toolName:A};let K=q[1],Y=q[2];if(!K||!Y)return{toolName:A};return{toolName:K,ruleContent:Y}}function JX3(A){return A.match(/^(.+):\*$/)?.[1]??null}function tK6(A,q){if(A.startsWith("//"))return A.slice(1);if(A.startsWith("/")&&!A.startsWith("//")){let K=FD6(q);return sK6(K,A.slice(1))}return A}function eK6(){return HA("policySettings")?.sandbox?.network?.allowManagedDomainsOnly===!0}function SY1(A){let q=A.permissions||{},K=[],Y=[];if(eK6()){let W=HA("policySettings");for(let Z of W?.sandbox?.network?.allowedDomains||[])K.push(Z);for(let Z of W?.permissions?.allow||[]){let G=mD6(Z);if(G.toolName===VM&&G.ruleContent?.startsWith("domain:"))K.push(G.ruleContent.substring(7))}}else{for(let W of A.sandbox?.network?.allowedDomains||[])K.push(W);for(let W of q.allow||[]){let Z=mD6(W);if(Z.toolName===VM&&Z.ruleContent?.startsWith("domain:"))K.push(Z.ruleContent.substring(7))}}for(let W of q.deny||[]){let Z=mD6(W);if(Z.toolName===VM&&Z.ruleContent?.startsWith("domain:"))Y.push(Z.ruleContent.substring(7))}let z=[".",wE()],w=[],_=[],$=hf.map((W)=>X2(W)).filter((W)=>W!==void 0);w.push(...$);let O=ah(),H=DA();if(O!==H)w.push(sK6(O,".claude","settings.json")),w.push(sK6(O,".claude","settings.local.json"));if(w.push(sK6(H,".claude","skills")),O!==H)w.push(sK6(O,".claude","skills"));let j=["HEAD","objects","refs","hooks","config"];for(let W of j)if(w.push(sK6(H,W)),O!==H)w.push(sK6(O,W));if(gD6&&gD6!==O)z.push(gD6);let J=new Set([...A.permissions?.additionalDirectories||[],...EV()]);z.push(...J);for(let W of hf){let Z=HA(W);if(Z?.permissions){for(let f of Z.permissions.allow||[]){let V=mD6(f);if(V.toolName===Yq&&V.ruleContent)z.push(tK6(V.ruleContent,W))}for(let f of Z.permissions.deny||[]){let V=mD6(f);if(V.toolName===Yq&&V.ruleContent)w.push(tK6(V.ruleContent,W));if(V.toolName===u4&&V.ruleContent)_.push(tK6(V.ruleContent,W))}}let G=Z?.sandbox?.filesystem;if(G){for(let f of G.allowWrite||[])z.push(tK6(f,W));for(let f of G.denyWrite||[])w.push(tK6(f,W));for(let f of G.denyRead||[])_.push(tK6(f,W))}}let{rgPath:M,rgArgs:D,argv0:X}=wM6(),P=A.sandbox?.ripgrep??(X?void 0:{command:M,args:D});return{network:{allowedDomains:K,deniedDomains:Y,allowUnixSockets:A.sandbox?.network?.allowUnixSockets,allowAllUnixSockets:A.sandbox?.network?.allowAllUnixSockets,allowLocalBinding:A.sandbox?.network?.allowLocalBinding,httpProxyPort:A.sandbox?.network?.httpProxyPort,socksProxyPort:A.sandbox?.network?.socksProxyPort},filesystem:{denyRead:_,allowWrite:z,denyWrite:w},ignoreViolations:A.sandbox?.ignoreViolations,enableWeakerNestedSandbox:A.sandbox?.enableWeakerNestedSandbox,enableWeakerNetworkIsolation:A.sandbox?.enableWeakerNetworkIsolation,ripgrep:P}}async function MX3(A){let q=HX3(A,".git");try{let Y=(await jX3(q,{encoding:"utf8"})).match(/^gitdir:\s*(.+)$/m);if(Y?.[1]){let z=Y[1].trim(),w=z.indexOf(".git");if(w>0)return z.substring(0,w-1)}return null}catch{return null}}function ztA(){try{return BA()?.sandbox?.enabled??!1}catch(A){return L(`Failed to get settings for sandbox check: ${A}`),!1}}function DX3(){return BA()?.sandbox?.autoAllowBashIfSandboxed??!0}function XX3(){return BA()?.sandbox?.allowUnsandboxedCommands??!0}function wtA(){try{let q=h7()?.sandbox?.enabledPlatforms;if(q===void 0)return!0;if(q.length===0)return!1;let K=c8();return q.includes(K)}catch(A){return L(`Failed to check enabledPlatforms: ${A}`),!0}}function CY1(){if(!E78())return!1;if(k78().errors.length>0)return!1;if(!wtA())return!1;return ztA()}function PX3(){let A=c8();if(A!=="linux"&&A!=="wsl")return[];try{let q=BA();if(!q?.sandbox?.enabled)return[];let K=q?.permissions||{},Y=[],z=(w)=>{let _=w.replace(/\/\*\*$/,"");return/[*?[\]]/.test(_)};for(let w of[...K.allow||[],...K.deny||[]]){let _=mD6(w);if((_.toolName===Yq||_.toolName===u4)&&_.ruleContent&&z(_.ruleContent))Y.push(w)}return Y}catch(q){return L(`Failed to get Linux glob pattern warnings: ${q}`),[]}}function WX3(){let A=["flagSettings","policySettings"];for(let q of A){let K=HA(q);if(K?.sandbox?.enabled!==void 0||K?.sandbox?.autoAllowBashIfSandboxed!==void 0||K?.sandbox?.allowUnsandboxedCommands!==void 0)return!0}return!1}async function ZX3(A){let q=HA("localSettings");xA("localSettings",{sandbox:{...q?.sandbox,...A.enabled!==void 0&&{enabled:A.enabled},...A.autoAllowBashIfSandboxed!==void 0&&{autoAllowBashIfSandboxed:A.autoAllowBashIfSandboxed},...A.allowUnsandboxedCommands!==void 0&&{allowUnsandboxedCommands:A.allowUnsandboxedCommands}}})}function GX3(){return BA()?.sandbox?.excludedCommands??[]}async function fX3(A,q,K,Y){if(CY1())if(Qs)await Qs;else throw Error("Sandbox failed to initialize. ");return pO.wrapWithSandbox(A,q,K,Y)}async function TX3(A){if(Qs)return Qs;if(!CY1())return;let q=A?async(K)=>{if(eK6())return L(`[sandbox] Blocked network request to ${K.host} (allowManagedDomainsOnly)`),!1;return A(K)}:void 0;return Qs=(async()=>{try{if(gD6===void 0)gD6=await MX3(ah());let K=BA(),Y=SY1(K);await pO.initialize(Y,q),v78=o$.subscribe(()=>{let z=BA(),w=SY1(z);pO.updateConfig(w),L("Sandbox configuration updated from settings change")})}catch(K){Qs=void 0,L(`Failed to initialize sandbox: ${D1(K)}`)}})(),Qs}function VX3(){if(!CY1())return;let A=BA(),q=SY1(A);pO.updateConfig(q)}async function NX3(){return v78?.(),v78=void 0,gD6=void 0,k78.cache.clear?.(),E78.cache.clear?.(),Qs=void 0,pO.reset()}function L78(A,q){let K=HA("localSettings"),Y=K?.sandbox?.excludedCommands||[],z=A;if(q){let w=q.filter((_)=>_.type==="addRules"&&_.rules.some(($)=>$.toolName===f4));if(w.length>0&&w[0].type==="addRules"){let _=w[0].rules.find(($)=>$.toolName===f4);if(_?.ruleContent)z=JX3(_.ruleContent)||_.ruleContent}}if(!Y.includes(z))xA("localSettings",{sandbox:{...K?.sandbox,excludedCommands:[...Y,z]}});return z}var Qs,v78,gD6,k78,E78,mA;var Pw=k(()=>{AtA();uK();GA();F2();Q1();G1();Vm();WK1();U2();EI();iz();MA();k78=T8(()=>{let{rgPath:A,rgArgs:q,argv0:K}=wM6();return pO.checkDependencies(K?void 0:{command:A,args:q})});E78=T8(()=>{return pO.isSupportedPlatform()});mA={initialize:TX3,isSandboxingEnabled:CY1,isSandboxEnabledInSettings:ztA,isPlatformInEnabledList:wtA,isAutoAllowBashIfSandboxedEnabled:DX3,areUnsandboxedCommandsAllowed:XX3,areSandboxSettingsLockedByPolicy:WX3,setSandboxSettings:ZX3,getExcludedCommands:GX3,wrapWithSandbox:fX3,refreshConfig:VX3,reset:NX3,checkDependencies:k78,getFsReadConfig:pO.getFsReadConfig,getFsWriteConfig:pO.getFsWriteConfig,getNetworkRestrictionConfig:pO.getNetworkRestrictionConfig,getIgnoreViolations:pO.getIgnoreViolations,getLinuxGlobPatternWarnings:PX3,isSupportedPlatform:E78,getAllowUnixSockets:pO.getAllowUnixSockets,getAllowLocalBinding:pO.getAllowLocalBinding,getEnableWeakerNestedSandbox:pO.getEnableWeakerNestedSandbox,getProxyPort:pO.getProxyPort,getSocksProxyPort:pO.getSocksProxyPort,getLinuxHttpSocketPath:pO.getLinuxHttpSocketPath,getLinuxSocksSocketPath:pO.getLinuxSocksSocketPath,waitForNetworkInitialization:pO.waitForNetworkInitialization,getSandboxViolationStore:pO.getSandboxViolationStore,annotateStderrWithSandboxFailures:pO.annotateStderrWithSandboxFailures,cleanupAfterCommand:pO.cleanupAfterCommand}});var W6=C((FX3)=>{var S78=Symbol.for("react.transitional.element"),vX3=Symbol.for("react.portal"),kX3=Symbol.for("react.fragment"),EX3=Symbol.for("react.strict_mode"),LX3=Symbol.for("react.profiler"),yX3=Symbol.for("react.consumer"),RX3=Symbol.for("react.context"),SX3=Symbol.for("react.forward_ref"),CX3=Symbol.for("react.suspense"),hX3=Symbol.for("react.memo"),JtA=Symbol.for("react.lazy"),IX3=Symbol.for("react.activity"),$tA=Symbol.iterator;function bX3(A){if(A===null||typeof A!=="object")return null;return A=$tA&&A[$tA]||A["@@iterator"],typeof A==="function"?A:null}var MtA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DtA=Object.assign,XtA={};function UD6(A,q,K){this.props=A,this.context=q,this.refs=XtA,this.updater=K||MtA}UD6.prototype.isReactComponent={};UD6.prototype.setState=function(A,q){if(typeof A!=="object"&&typeof A!=="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,q,"setState")};UD6.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function PtA(){}PtA.prototype=UD6.prototype;function C78(A,q,K){this.props=A,this.context=q,this.refs=XtA,this.updater=K||MtA}var h78=C78.prototype=new PtA;h78.constructor=C78;DtA(h78,UD6.prototype);h78.isPureReactComponent=!0;var OtA=Array.isArray;function R78(){}var a$={H:null,A:null,T:null,S:null},WtA=Object.prototype.hasOwnProperty;function I78(A,q,K){var Y=K.ref;return{$$typeof:S78,type:A,key:q,ref:Y!==void 0?Y:null,props:K}}function xX3(A,q){return I78(A.type,q,A.props)}function b78(A){return typeof A==="object"&&A!==null&&A.$$typeof===S78}function uX3(A){var q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(K){return q[K]})}var HtA=/\/+/g;function y78(A,q){return typeof A==="object"&&A!==null&&A.key!=null?uX3(""+A.key):q.toString(36)}function BX3(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status==="string"?A.then(R78,R78):(A.status="pending",A.then(function(q){A.status==="pending"&&(A.status="fulfilled",A.value=q)},function(q){A.status==="pending"&&(A.status="rejected",A.reason=q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function QD6(A,q,K,Y,z){var w=typeof A;if(w==="undefined"||w==="boolean")A=null;var _=!1;if(A===null)_=!0;else switch(w){case"bigint":case"string":case"number":_=!0;break;case"object":switch(A.$$typeof){case S78:case vX3:_=!0;break;case JtA:return _=A._init,QD6(_(A._payload),q,K,Y,z)}}if(_)return z=z(A),_=Y===""?"."+y78(A,0):Y,OtA(z)?(K="",_!=null&&(K=_.replace(HtA,"$&/")+"/"),QD6(z,q,K,"",function(H){return H})):z!=null&&(b78(z)&&(z=xX3(z,K+(z.key==null||A&&A.key===z.key?"":(""+z.key).replace(HtA,"$&/")+"/")+_)),q.push(z)),1;_=0;var $=Y===""?".":Y+":";if(OtA(A))for(var O=0;O<A.length;O++)Y=A[O],w=$+y78(Y,O),_+=QD6(Y,q,K,w,z);else if(O=bX3(A),typeof O==="function")for(A=O.call(A),O=0;!(Y=A.next()).done;)Y=Y.value,w=$+y78(Y,O++),_+=QD6(Y,q,K,w,z);else if(w==="object"){if(typeof A.then==="function")return QD6(BX3(A),q,K,Y,z);throw q=String(A),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return _}function hY1(A,q,K){if(A==null)return A;var Y=[],z=0;return QD6(A,Y,"","",function(w){return q.call(K,w,z++)}),Y}function mX3(A){if(A._status===-1){var q=A._result;q=q(),q.then(function(K){if(A._status===0||A._status===-1)A._status=1,A._result=K},function(K){if(A._status===0||A._status===-1)A._status=2,A._result=K}),A._status===-1&&(A._status=0,A._result=q)}if(A._status===1)return A._result.default;throw A._result}var jtA=typeof reportError==="function"?reportError:function(A){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A==="object"&&A!==null&&typeof A.message==="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(q))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",A);return}console.error(A)},gX3={map:hY1,forEach:function(A,q,K){hY1(A,function(){q.apply(this,arguments)},K)},count:function(A){var q=0;return hY1(A,function(){q++}),q},toArray:function(A){return hY1(A,function(q){return q})||[]},only:function(A){if(!b78(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};FX3.Activity=IX3;FX3.Children=gX3;FX3.Component=UD6;FX3.Fragment=kX3;FX3.Profiler=LX3;FX3.PureComponent=C78;FX3.StrictMode=EX3;FX3.Suspense=CX3;FX3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a$;FX3.__COMPILER_RUNTIME={__proto__:null,c:function(A){return a$.H.useMemoCache(A)}};FX3.cache=function(A){return function(){return A.apply(null,arguments)}};FX3.cacheSignal=function(){return null};FX3.cloneElement=function(A,q,K){if(A===null||A===void 0)throw Error("The argument must be a React element, but you passed "+A+".");var Y=DtA({},A.props),z=A.key;if(q!=null)for(w in q.key!==void 0&&(z=""+q.key),q)!WtA.call(q,w)||w==="key"||w==="__self"||w==="__source"||w==="ref"&&q.ref===void 0||(Y[w]=q[w]);var w=arguments.length-2;if(w===1)Y.children=K;else if(1<w){for(var _=Array(w),$=0;$<w;$++)_[$]=arguments[$+2];Y.children=_}return I78(A.type,z,Y)};FX3.createContext=function(A){return A={$$typeof:RX3,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:yX3,_context:A},A};FX3.createElement=function(A,q,K){var Y,z={},w=null;if(q!=null)for(Y in q.key!==void 0&&(w=""+q.key),q)WtA.call(q,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(z[Y]=q[Y]);var _=arguments.length-2;if(_===1)z.children=K;else if(1<_){for(var $=Array(_),O=0;O<_;O++)$[O]=arguments[O+2];z.children=$}if(A&&A.defaultProps)for(Y in _=A.defaultProps,_)z[Y]===void 0&&(z[Y]=_[Y]);return I78(A,w,z)};FX3.createRef=function(){return{current:null}};FX3.forwardRef=function(A){return{$$typeof:SX3,render:A}};FX3.isValidElement=b78;FX3.lazy=function(A){return{$$typeof:JtA,_payload:{_status:-1,_result:A},_init:mX3}};FX3.memo=function(A,q){return{$$typeof:hX3,type:A,compare:q===void 0?null:q}};FX3.startTransition=function(A){var q=a$.T,K={};a$.T=K;try{var Y=A(),z=a$.S;z!==null&&z(K,Y),typeof Y==="object"&&Y!==null&&typeof Y.then==="function"&&Y.then(R78,jtA)}catch(w){jtA(w)}finally{q!==null&&K.types!==null&&(q.types=K.types),a$.T=q}};FX3.unstable_useCacheRefresh=function(){return a$.H.useCacheRefresh()};FX3.use=function(A){return a$.H.use(A)};FX3.useActionState=function(A,q,K){return a$.H.useActionState(A,q,K)};FX3.useCallback=function(A,q){return a$.H.useCallback(A,q)};FX3.useContext=function(A){return a$.H.useContext(A)};FX3.useDebugValue=function(){};FX3.useDeferredValue=function(A,q){return a$.H.useDeferredValue(A,q)};FX3.useEffect=function(A,q){return a$.H.useEffect(A,q)};FX3.useEffectEvent=function(A){return a$.H.useEffectEvent(A)};FX3.useId=function(){return a$.H.useId()};FX3.useImperativeHandle=function(A,q,K){return a$.H.useImperativeHandle(A,q,K)};FX3.useInsertionEffect=function(A,q){return a$.H.useInsertionEffect(A,q)};FX3.useLayoutEffect=function(A,q){return a$.H.useLayoutEffect(A,q)};FX3.useMemo=function(A,q){return a$.H.useMemo(A,q)};FX3.useOptimistic=function(A,q){return a$.H.useOptimistic(A,q)};FX3.useReducer=function(A,q,K){return a$.H.useReducer(A,q,K)};FX3.useRef=function(A){return a$.H.useRef(A)};FX3.useState=function(A){return a$.H.useState(A)};FX3.useSyncExternalStore=function(A,q,K){return a$.H.useSyncExternalStore(A,q,K)};FX3.useTransition=function(){return a$.H.useTransition()};FX3.version="19.2.0"});import{randomBytes as RP3}from"crypto";function hP3(){return RP3(8).toString("hex")}function bP3(A,q){let K=!1,Y=!1;for(let z=0;z<q;z++){let w=A[z];if(K){if(w==="'")K=!1;continue}if(Y){if(w==="\\"){z++;continue}if(w==='"')Y=!1;continue}let _=0;for(let $=z-1;$>=0&&A[$]==="\\";$--)_++;if(_%2===1)continue;if(w==="'")K=!0;else if(w==='"')Y=!0}return K||Y}function xP3(A,q){let K=A.lastIndexOf(`
`,q-1)+1,Y=!1,z=!1;for(let w=0;w<q;w++){let _=A[w];if(Y){if(_==="'")Y=!1;continue}if(z){if(_==="\\"){w++;continue}if(_==='"')z=!1;continue}let $=0;for(let O=w-1;O>=0&&A[O]==="\\";O--)$++;if($%2===1)continue;if(_==="'")Y=!0;else if(_==='"')z=!0;else if(w>=K&&_==="#")return!0}return!1}function A36(A,q){let K=new Map;if(!A.includes("<<"))return{processedCommand:A,heredocs:K};if(/\$['"]/.test(A))return{processedCommand:A,heredocs:K};let Y=A.indexOf("<<");if(Y>0&&A.slice(0,Y).includes("`"))return{processedCommand:A,heredocs:K};if(Y>0){let M=A.slice(0,Y),D=(M.match(/\(\(/g)||[]).length,X=(M.match(/\)\)/g)||[]).length;if(D>X)return{processedCommand:A,heredocs:K}}let z=new RegExp(IP3.source,"g"),w=[],_=[],$;while(($=z.exec(A))!==null){let M=$.index;if(bP3(A,M))continue;let D=0;for(let H6=M-1;H6>=0&&A[H6]==="\\";H6--)D++;if(D%2===1)continue;if(xP3(A,M))continue;let X=!1;for(let H6 of _)if(M>H6.contentStartIndex&&M<H6.contentEndIndex){X=!0;break}if(X)continue;let P=$[0],W=$[1]==="-",Z=$[3]||$[4],G=M+P.length,f=$[2];if(f&&A[G-1]!==f)continue;let V=P.includes("\\"),N=!!f||V;if(G<A.length){let H6=A[G];if(!/^[ \t\n|&;()<>]$/.test(H6))continue}let v=-1;{let H6=!1,Z6=!1;for(let G6=G;G6<A.length;G6++){let q6=A[G6];if(H6){if(q6==="'")H6=!1;continue}if(Z6){if(q6==="\\"){G6++;continue}if(q6==='"')Z6=!1;continue}if(q6===`
`){v=G6-G;break}let w6=0;for(let j6=G6-1;j6>=G&&A[j6]==="\\";j6--)w6++;if(w6%2===1)continue;if(q6==="'")H6=!0;else if(q6==='"')Z6=!0}}if(v===-1)continue;let y=A.slice(G,G+v),R=0;for(let H6=y.length-1;H6>=0;H6--)if(y[H6]==="\\")R++;else break;if(R%2===1)continue;let h=G+v,x=A.slice(h+1).split(`
`),F=-1;for(let H6=0;H6<x.length;H6++){let Z6=x[H6];if(W){if(Z6.replace(/^\t*/,"")===Z){F=H6;break}}else if(Z6===Z){F=H6;break}let G6=W?Z6.replace(/^\t*/,""):Z6;if(G6.length>Z.length&&G6.startsWith(Z)){let q6=G6[Z.length];if(/^[)}`|&;(<>]$/.test(q6)){F=-1;break}}}if(q?.quotedOnly&&!N){let H6;if(F===-1)H6=A.length;else{let G6=x.slice(0,F+1).join(`
`).length;H6=h+1+G6}_.push({contentStartIndex:h,contentEndIndex:H6});continue}if(F===-1)continue;let b=x.slice(0,F+1).join(`
`).length,U=h+1+b,d=!1;for(let H6 of _)if(h<H6.contentEndIndex&&H6.contentStartIndex<U){d=!0;break}if(d)continue;let l=A.slice(M,G),t=A.slice(h,U),s=l+t;w.push({fullText:s,delimiter:Z,operatorStartIndex:M,operatorEndIndex:G,contentStartIndex:h,contentEndIndex:U})}if(w.length===0)return{processedCommand:A,heredocs:K};let O=w.filter((M,D,X)=>{for(let P of X){if(M===P)continue;if(M.operatorStartIndex>P.contentStartIndex&&M.operatorStartIndex<P.contentEndIndex)return!1}return!0});if(O.length===0)return{processedCommand:A,heredocs:K};if(new Set(O.map((M)=>M.contentStartIndex)).size<O.length)return{processedCommand:A,heredocs:K};O.sort((M,D)=>D.contentEndIndex-M.contentEndIndex);let j=hP3(),J=A;return O.forEach((M,D)=>{let X=O.length-1-D,P=`${SP3}${X}_${j}${CP3}`;K.set(P,M),J=J.slice(0,M.operatorStartIndex)+P+J.slice(M.operatorEndIndex,M.contentStartIndex)+J.slice(M.contentEndIndex)}),{processedCommand:J,heredocs:K}}function uP3(A,q){let K=A;for(let[Y,z]of q)K=K.replaceAll(Y,z.fullText);return K}function x78(A,q){if(q.size===0)return A;return A.map((K)=>uP3(K,q))}var SP3="__HEREDOC_",CP3="__",IP3;var u78=k(()=>{IP3=/(?<!<)<<(?!<)(-)?[ \t]*(?:(['"])(\\?\w+)\2|\\?(\w+))/});var BP3=null,dd;var pD6=k(()=>{dd=[f4,BP3].filter((A)=>A!=null)});var zz="Glob",B78=`- Fast file pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
- Returns matching file paths sorted by modification time
- Use this tool when you need to find files by name patterns
- When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
- You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.`;function m78(){return`A powerful search tool built on ripgrep

  Usage:
  - ALWAYS use ${fY} for search tasks. NEVER invoke \`grep\` or \`rg\` as a ${f4} command. The ${fY} tool has been optimized for correct permissions and access.
  - Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
  - Filter files with glob parameter (e.g., "*.js", "**/*.tsx") or type parameter (e.g., "js", "py", "rust")
  - Output modes: "content" shows matching lines, "files_with_matches" shows only file paths (default), "count" shows match counts
  - Use ${Tq} tool for open-ended searches requiring multiple rounds
  - Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
  - Multiline matching: By default patterns match within single lines only. For cross-line patterns like \`struct \\{[\\s\\S]*?field\`, use \`multiline: true\`
`}var fY="Grep";var BZ=()=>{};function mP3(){return`
- If this is an existing file, you MUST use the ${u4} tool first to read the file's contents. This tool will fail if you did not read the file first.`}function ZtA(){return`Writes a file to the local filesystem.

Usage:
- This tool will overwrite the existing file if there is one at the provided path.${mP3()}
- Prefer the Edit tool for modifying existing files — it only sends the diff. Only use this tool to create new files or for complete rewrites.
- NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`}var Y3="Write";var BH=k(()=>{U2()});var NM="NotebookEdit";function dD6(){let A=new Date,q=A.getFullYear(),K=String(A.getMonth()+1).padStart(2,"0"),Y=String(A.getDate()).padStart(2,"0");return`${q}-${K}-${Y}`}function GtA(){return new Date().toLocaleString("en-US",{month:"long",year:"numeric"})}function ftA(){return`
- Allows Claude to search the web and use the results to inform responses
- Provides up-to-date information for current events and recent data
- Returns search result information formatted as search result blocks, including links as markdown hyperlinks
- Use this tool for accessing information beyond Claude's knowledge cutoff
- Searches are performed automatically within a single API call

CRITICAL REQUIREMENT - You MUST follow this:
  - After answering the user's question, you MUST include a "Sources:" section at the end of your response
  - In the Sources section, list all relevant URLs from the search results as markdown hyperlinks: [Title](URL)
  - This is MANDATORY - never skip including sources in your response
  - Example format:

    [Your answer here]

    Sources:
    - [Source Title 1](https://example.com/1)
    - [Source Title 2](https://example.com/2)

Usage notes:
  - Domain filtering is supported to include or block specific websites
  - Web search is only available in the US

IMPORTANT - Use the correct year in search queries:
  - The current month is ${GtA()}. You MUST use this year when searching for recent information, documentation, or current events.
  - Example: If the user asks for "latest React docs", search for "React documentation" with the current year, NOT last year
`}var tV="WebSearch";var q36=()=>{};function NtA(A){let{hasThinking:q=!1}=A??{},K=[];if(q&&p8("tengu_marble_anvil",!1))K.push({type:"clear_thinking_20251015",keep:"all"});return K.length>0?{edits:K}:void 0}var TtA=180000,VtA=40000,gP3,FP3;var vtA=k(()=>{Z8();rA();pD6();BZ();U2();BH();q36();gP3=[...dd,zz,fY,u4,VM,tV],FP3=[Yq,Y3,NM]});function DR(A){let q=A.toLowerCase();if($1(process.env.CLAUDE_CODE_ALWAYS_ENABLE_EFFORT))return!0;if(q.includes("opus-4-6")||q.includes("sonnet-4-6"))return!0;if(q.includes("haiku")||q.includes("sonnet")||q.includes("opus"))return!1;return D7()==="firstParty"}function QP3(A){return cD6.includes(A)}function cd(A){if(A===void 0||A===null||A==="")return;let q=typeof A==="number"?A:parseInt(String(A),10);if(!isNaN(q)&&UP3(q))return q;if(typeof A==="string"&&QP3(A))return A;return}function g78(){let A=h7();return cd(A.effortLevel)}function IY1(){let A=process.env.CLAUDE_CODE_EFFORT_LEVEL;return A==="unset"?null:cd(A)}function UP3(A){return Number.isInteger(A)}function _E(A){if(typeof A==="string")return A;return"high"}function Mx6(){let A=p8("tengu_grey_step2",ktA);return{...ktA,...A}}function ld(A){if(A.toLowerCase().includes("opus-4-6")){if(nd())return"medium";if(Mx6().enabled&&(XR()||Dx6()))return"medium"}if(id()&&DR(A))return"medium";return}var cD6,ktA;var eV=k(()=>{UI();GA();bA();rA();yz();Z8();cD6=["low","medium","high","max"];ktA={enabled:!1,dialogTitle:"",dialogDescription:""}});function xY1(A){if(D7()==="vertex")return F78;if(A?.isNonInteractive){if(A.hasAppendSystemPrompt)return EtA;return LtA}return F78}function dP3(){if(dz(process.env.CLAUDE_CODE_ATTRIBUTION_HEADER))return!1;return p8("tengu_attribution_header",!0)}function uY1(A){if(!dP3())return"";let q=`${{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION}.${A}`,K=process.env.CLAUDE_CODE_ENTRYPOINT??"unknown",Y=" cch=00000;",z=M31(),w=z?` cc_workload=${z};`:"",_=`x-anthropic-billing-header: cc_version=${q}; cc_entrypoint=${K};${Y}${w}`;return L(`attribution header ${_}`),_}var F78="You are Claude Code, Anthropic's official CLI for Claude.",EtA="You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.",LtA="You are a Claude agent, built on Anthropic's Claude Agent SDK.",pP3,bY1;var BY1=k(()=>{yz();G1();rA();Z8();JK6();pP3=[F78,EtA,LtA],bY1=new Set(pP3)});import{createHash as cP3}from"crypto";function iP3(A){let q=A.find((Y)=>Y.type==="user");if(!q)return"";let K=q.message.content;if(typeof K==="string")return K;if(Array.isArray(K)){let Y=K.find((z)=>z.type==="text");if(Y&&Y.type==="text")return Y.text}return""}function Q78(A,q){let Y=[4,7,20].map((_)=>A[_]||"0").join(""),z=`${lP3}${Y}${q}`;return cP3("sha256").update(z).digest("hex").slice(0,3)}function ytA(A){let q=iP3(A);return Q78(q,{ISSUES_EXPLAINER:"report the issue at https://github.com/anthropics/claude-code/issues",PACKAGE_URL:"@anthropic-ai/claude-code",README_URL:"https://code.claude.com/docs/en/overview",VERSION:"2.1.71",FEEDBACK_CHANNEL:"https://github.com/anthropics/claude-code/issues",BUILD_TIME:"2026-03-06T22:45:36Z"}.VERSION)}var lP3="59cf53e54c78";var U78=()=>{};function Us(A){return A.filter((q)=>q.data?.type!=="hook_progress")}function R5(A,q){return A.name===q||(A.aliases?.includes(q)??!1)}function z5(A,q){return A.find((K)=>R5(K,q))}var QD=()=>({mode:"default",additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!1});function rd(A){let q=RtA.get(A);if(q)return q;let K=gp(A);return RtA.set(A,K),K}var RtA;var mY1=k(()=>{B7();RtA=new WeakMap});import{extname as nP3,join as rP3,normalize as StA}from"path";function aP3(A){let q=nP3(A).toLowerCase();return oP3.has(q)}function htA(A){return CtA?.get(StA(A))}async function ItA(A){if(p8("tengu_granite_whisper",!1))return c("tengu_repo_text_file_size",{skipped:!0}),null;try{let q=Fw(A);if(!q)return null;let{stdout:K,code:Y}=await z7(nA(),["ls-tree","-r","-l","-z","HEAD"],{timeout:30000,cwd:q});if(Y!==0)return null;let z=0,w=0,_=new Map,$=K.split("\x00");for(let O of $){if(!O)continue;let H=O.indexOf("\t");if(H===-1)continue;let j=O.slice(H+1);if(!aP3(j))continue;let J=O.slice(0,H).split(/\s+/),M=J[2],D=parseInt(J[3]??"",10);if(M&&!isNaN(D))z+=D,w++,_.set(StA(rP3(q,j)),M)}return CtA=_,c("tengu_repo_text_file_size",{total_bytes:z,total_files:w}),z}catch(q){return L(`[repoTextSize] Failed to calculate repo text size: ${q}`,{level:"error"}),null}}var oP3,CtA=null;var p78=k(()=>{aq();U3();B1();G1();rA();oP3=new Set([".md",".tsx",".py",".ts",".js",".php",".cs",".java",".dart",".go",".vue",".jsx",".swift",".rs",".css",".sql",".kt",".cpp",".sh",".rb",".c",".h",".scss",".prisma",".tf",".ex",".lua",".tex",".ps1",".r",".scala",".hpp",".jsp",".cc"])});import{createHash as btA}from"crypto";function sP3(A){return btA("sha256").update(A).digest("hex").slice(0,16)}function tP3(A){return btA("sha256").update(A).digest("hex")}function pI(A){let q={operation:A.operation,tool:A.tool,filePathHash:sP3(A.filePath)};if(A.content!==void 0&&A.content.length<=eP3)q.contentHash=tP3(A.content);let K=htA(A.filePath);if(K!==void 0)q.repo_blob_sha=K;if(A.type!==void 0)q.type=A.type;c("tengu_file_operation",q)}var eP3=102400;var gY1=k(()=>{B1();p78()});class K36{diff(A,q,K={}){let Y;if(typeof K==="function")Y=K,K={};else if("callback"in K)Y=K.callback;let z=this.castInput(A,K),w=this.castInput(q,K),_=this.removeEmpty(this.tokenize(z,K)),$=this.removeEmpty(this.tokenize(w,K));return this.diffWithOptionsObj(_,$,K,Y)}diffWithOptionsObj(A,q,K,Y){var z;let w=(Z)=>{if(Z=this.postProcess(Z,K),Y){setTimeout(function(){Y(Z)},0);return}else return Z},_=q.length,$=A.length,O=1,H=_+$;if(K.maxEditLength!=null)H=Math.min(H,K.maxEditLength);let j=(z=K.timeout)!==null&&z!==void 0?z:1/0,J=Date.now()+j,M=[{oldPos:-1,lastComponent:void 0}],D=this.extractCommon(M[0],q,A,0,K);if(M[0].oldPos+1>=$&&D+1>=_)return w(this.buildValues(M[0].lastComponent,q,A));let X=-1/0,P=1/0,W=()=>{for(let Z=Math.max(X,-O);Z<=Math.min(P,O);Z+=2){let G,f=M[Z-1],V=M[Z+1];if(f)M[Z-1]=void 0;let N=!1;if(V){let y=V.oldPos-Z;N=V&&0<=y&&y<_}let v=f&&f.oldPos+1<$;if(!N&&!v){M[Z]=void 0;continue}if(!v||N&&f.oldPos<V.oldPos)G=this.addToPath(V,!0,!1,0,K);else G=this.addToPath(f,!1,!0,1,K);if(D=this.extractCommon(G,q,A,Z,K),G.oldPos+1>=$&&D+1>=_)return w(this.buildValues(G.lastComponent,q,A))||!0;else{if(M[Z]=G,G.oldPos+1>=$)P=Math.min(P,Z-1);if(D+1>=_)X=Math.max(X,Z+1)}}O++};if(Y)(function Z(){setTimeout(function(){if(O>H||Date.now()>J)return Y(void 0);if(!W())Z()},0)})();else while(O<=H&&Date.now()<=J){let Z=W();if(Z)return Z}}addToPath(A,q,K,Y,z){let w=A.lastComponent;if(w&&!z.oneChangePerToken&&w.added===q&&w.removed===K)return{oldPos:A.oldPos+Y,lastComponent:{count:w.count+1,added:q,removed:K,previousComponent:w.previousComponent}};else return{oldPos:A.oldPos+Y,lastComponent:{count:1,added:q,removed:K,previousComponent:w}}}extractCommon(A,q,K,Y,z){let w=q.length,_=K.length,$=A.oldPos,O=$-Y,H=0;while(O+1<w&&$+1<_&&this.equals(K[$+1],q[O+1],z))if(O++,$++,H++,z.oneChangePerToken)A.lastComponent={count:1,previousComponent:A.lastComponent,added:!1,removed:!1};if(H&&!z.oneChangePerToken)A.lastComponent={count:H,previousComponent:A.lastComponent,added:!1,removed:!1};return A.oldPos=$,O}equals(A,q,K){if(K.comparator)return K.comparator(A,q);else return A===q||!!K.ignoreCase&&A.toLowerCase()===q.toLowerCase()}removeEmpty(A){let q=[];for(let K=0;K<A.length;K++)if(A[K])q.push(A[K]);return q}castInput(A,q){return A}tokenize(A,q){return Array.from(A)}join(A){return A.join("")}postProcess(A,q){return A}get useLongestToken(){return!1}buildValues(A,q,K){let Y=[],z;while(A)Y.push(A),z=A.previousComponent,delete A.previousComponent,A=z;Y.reverse();let w=Y.length,_=0,$=0,O=0;for(;_<w;_++){let H=Y[_];if(!H.removed){if(!H.added&&this.useLongestToken){let j=q.slice($,$+H.count);j=j.map(function(J,M){let D=K[O+M];return D.length>J.length?D:J}),H.value=this.join(j)}else H.value=this.join(q.slice($,$+H.count));if($+=H.count,!H.added)O+=H.count}else H.value=this.join(K.slice(O,O+H.count)),O+=H.count}return Y}}function d78(A,q){let K;for(K=0;K<A.length&&K<q.length;K++)if(A[K]!=q[K])return A.slice(0,K);return A.slice(0,K)}function c78(A,q){let K;if(!A||!q||A[A.length-1]!=q[q.length-1])return"";for(K=0;K<A.length&&K<q.length;K++)if(A[A.length-(K+1)]!=q[q.length-(K+1)])return A.slice(-K);return A.slice(-K)}function FY1(A,q,K){if(A.slice(0,q.length)!=q)throw Error(`string ${JSON.stringify(A)} doesn't start with prefix ${JSON.stringify(q)}; this is a bug`);return K+A.slice(q.length)}function QY1(A,q,K){if(!q)return A+K;if(A.slice(-q.length)!=q)throw Error(`string ${JSON.stringify(A)} doesn't end with suffix ${JSON.stringify(q)}; this is a bug`);return A.slice(0,-q.length)+K}function lD6(A,q){return FY1(A,q,"")}function Xx6(A,q){return QY1(A,q,"")}function l78(A,q){return q.slice(0,A03(A,q))}function A03(A,q){let K=0;if(A.length>q.length)K=A.length-q.length;let Y=q.length;if(A.length<q.length)Y=A.length;let z=Array(Y),w=0;z[0]=0;for(let _=1;_<Y;_++){if(q[_]==q[w])z[_]=z[w];else z[_]=w;while(w>0&&q[_]!=q[w])w=z[w];if(q[_]==q[w])w++}w=0;for(let _=K;_<A.length;_++){while(w>0&&A[_]!=q[w])w=z[w];if(A[_]==q[w])w++}return w}function iD6(A){let q;for(q=A.length-1;q>=0;q--)if(!A[q].match(/\s/))break;return A.substring(q+1)}function od(A){let q=A.match(/^\s*/);return q?q[0]:""}function xtA(A,q,K,Y){if(q&&K){let z=od(q.value),w=iD6(q.value),_=od(K.value),$=iD6(K.value);if(A){let O=d78(z,_);A.value=QY1(A.value,_,O),q.value=lD6(q.value,O),K.value=lD6(K.value,O)}if(Y){let O=c78(w,$);Y.value=FY1(Y.value,$,O),q.value=Xx6(q.value,O),K.value=Xx6(K.value,O)}}else if(K){if(A){let z=od(K.value);K.value=K.value.substring(z.length)}if(Y){let z=od(Y.value);Y.value=Y.value.substring(z.length)}}else if(A&&Y){let z=od(Y.value),w=od(q.value),_=iD6(q.value),$=d78(z,w);q.value=lD6(q.value,$);let O=c78(lD6(z,$),_);q.value=Xx6(q.value,O),Y.value=FY1(Y.value,z,O),A.value=QY1(A.value,z,z.slice(0,z.length-O.length))}else if(Y){let z=od(Y.value),w=iD6(q.value),_=l78(w,z);q.value=Xx6(q.value,_)}else if(A){let z=iD6(A.value),w=od(q.value),_=l78(z,w);q.value=lD6(q.value,_)}}function i78(A,q,K){return mtA.diff(A,q,K)}var UY1="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",q03,utA,K03,BtA,mtA;var gtA=k(()=>{q03=new RegExp(`[${UY1}]+|\\s+|[^${UY1}]`,"ug");utA=class utA extends K36{equals(A,q,K){if(K.ignoreCase)A=A.toLowerCase(),q=q.toLowerCase();return A.trim()===q.trim()}tokenize(A,q={}){let K;if(q.intlSegmenter){let w=q.intlSegmenter;if(w.resolvedOptions().granularity!="word")throw Error('The segmenter passed must have a granularity of "word"');K=[];for(let _ of Array.from(w.segment(A))){let $=_.segment;if(K.length&&/\s/.test(K[K.length-1])&&/\s/.test($))K[K.length-1]+=$;else K.push($)}}else K=A.match(q03)||[];let Y=[],z=null;return K.forEach((w)=>{if(/\s/.test(w))if(z==null)Y.push(w);else Y.push(Y.pop()+w);else if(z!=null&&/\s/.test(z))if(Y[Y.length-1]==z)Y.push(Y.pop()+w);else Y.push(z+w);else Y.push(w);z=w}),Y}join(A){return A.map((q,K)=>{if(K==0)return q;else return q.replace(/^\s+/,"")}).join("")}postProcess(A,q){if(!A||q.oneChangePerToken)return A;let K=null,Y=null,z=null;if(A.forEach((w)=>{if(w.added)Y=w;else if(w.removed)z=w;else{if(Y||z)xtA(K,z,Y,w);K=w,Y=null,z=null}}),Y||z)xtA(K,z,Y,null);return A}};K03=new utA;BtA=class BtA extends K36{tokenize(A){let q=new RegExp(`(\\r?\\n)|[${UY1}]+|[^\\S\\n\\r]+|[^${UY1}]`,"ug");return A.match(q)||[]}};mtA=new BtA});function ps(A,q,K){return QtA.diff(A,q,K)}function Y03(A,q){if(q.stripTrailingCr)A=A.replace(/\r\n/g,`
`);let K=[],Y=A.split(/(\n|\r\n)/);if(!Y[Y.length-1])Y.pop();for(let z=0;z<Y.length;z++){let w=Y[z];if(z%2&&!q.newlineIsToken)K[K.length-1]+=w;else K.push(w)}return K}var FtA,QtA;var n78=k(()=>{FtA=class FtA extends K36{constructor(){super(...arguments);this.tokenize=Y03}equals(A,q,K){if(K.ignoreWhitespace){if(!K.newlineIsToken||!A.includes(`
`))A=A.trim();if(!K.newlineIsToken||!q.includes(`
`))q=q.trim()}else if(K.ignoreNewlineAtEof&&!K.newlineIsToken){if(A.endsWith(`
`))A=A.slice(0,-1);if(q.endsWith(`
`))q=q.slice(0,-1)}return super.equals(A,q,K)}};QtA=new FtA});function nD6(A,q,K,Y,z,w,_){let $;if(!_)$={};else if(typeof _==="function")$={callback:_};else $=_;if(typeof $.context>"u")$.context=4;let O=$.context;if($.newlineIsToken)throw Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(!$.callback)return H(ps(K,Y,$));else{let{callback:j}=$;ps(K,Y,Object.assign(Object.assign({},$),{callback:(J)=>{let M=H(J);j(M)}}))}function H(j){if(!j)return;j.push({value:"",lines:[]});function J(G){return G.map(function(f){return" "+f})}let M=[],D=0,X=0,P=[],W=1,Z=1;for(let G=0;G<j.length;G++){let f=j[G],V=f.lines||z03(f.value);if(f.lines=V,f.added||f.removed){if(!D){let N=j[G-1];if(D=W,X=Z,N)P=O>0?J(N.lines.slice(-O)):[],D-=P.length,X-=P.length}for(let N of V)P.push((f.added?"+":"-")+N);if(f.added)Z+=V.length;else W+=V.length}else{if(D)if(V.length<=O*2&&G<j.length-2)for(let N of J(V))P.push(N);else{let N=Math.min(V.length,O);for(let y of J(V.slice(0,N)))P.push(y);let v={oldStart:D,oldLines:W-D+N,newStart:X,newLines:Z-X+N,lines:P};M.push(v),D=0,X=0,P=[]}W+=V.length,Z+=V.length}}for(let G of M)for(let f=0;f<G.lines.length;f++)if(G.lines[f].endsWith(`
`))G.lines[f]=G.lines[f].slice(0,-1);else G.lines.splice(f+1,0,"\\ No newline at end of file"),f++;return{oldFileName:A,newFileName:q,oldHeader:z,newHeader:w,hunks:M}}}function z03(A){let q=A.endsWith(`
`),K=A.split(`
`).map((Y)=>Y+`
`);if(q)K.pop();else K.push(K.pop().slice(0,-1));return K}var UtA=k(()=>{n78()});var rD6=k(()=>{gtA();n78();UtA()});function $03(){let A=new Map;for(let[q,K]of Object.entries(dO)){for(let[Y,z]of Object.entries(K))dO[Y]={open:`\x1B[${z[0]}m`,close:`\x1B[${z[1]}m`},K[Y]=dO[Y],A.set(z[0],z[1]);Object.defineProperty(dO,q,{value:K,enumerable:!1})}return Object.defineProperty(dO,"codes",{value:A,enumerable:!1}),dO.color.close="\x1B[39m",dO.bgColor.close="\x1B[49m",dO.color.ansi=ptA(),dO.color.ansi256=dtA(),dO.color.ansi16m=ctA(),dO.bgColor.ansi=ptA(10),dO.bgColor.ansi256=dtA(10),dO.bgColor.ansi16m=ctA(10),Object.defineProperties(dO,{rgbToAnsi256:{value(q,K,Y){if(q===K&&K===Y){if(q<8)return 16;if(q>248)return 231;return Math.round((q-8)/247*24)+232}return 16+36*Math.round(q/255*5)+6*Math.round(K/255*5)+Math.round(Y/255*5)},enumerable:!1},hexToRgb:{value(q){let K=/[a-f\d]{6}|[a-f\d]{3}/i.exec(q.toString(16));if(!K)return[0,0,0];let[Y]=K;if(Y.length===3)Y=[...Y].map((w)=>w+w).join("");let z=Number.parseInt(Y,16);return[z>>16&255,z>>8&255,z&255]},enumerable:!1},hexToAnsi256:{value:(q)=>dO.rgbToAnsi256(...dO.hexToRgb(q)),enumerable:!1},ansi256ToAnsi:{value(q){if(q<8)return 30+q;if(q<16)return 90+(q-8);let K,Y,z;if(q>=232)K=((q-232)*10+8)/255,Y=K,z=K;else{q-=16;let $=q%36;K=Math.floor(q/36)/5,Y=Math.floor($/6)/5,z=$%6/5}let w=Math.max(K,Y,z)*2;if(w===0)return 30;let _=30+(Math.round(z)<<2|Math.round(Y)<<1|Math.round(K));if(w===2)_+=60;return _},enumerable:!1},rgbToAnsi:{value:(q,K,Y)=>dO.ansi256ToAnsi(dO.rgbToAnsi256(q,K,Y)),enumerable:!1},hexToAnsi:{value:(q)=>dO.ansi256ToAnsi(dO.hexToAnsi256(q)),enumerable:!1}}),dO}var ptA=(A=0)=>(q)=>`\x1B[${q+A}m`,dtA=(A=0)=>(q)=>`\x1B[${38+A};5;${q}m`,ctA=(A=0)=>(q,K,Y)=>`\x1B[${38+A};2;${q};${K};${Y}m`,dO,f$2,w03,_03,T$2,O03,dI;var ltA=k(()=>{dO={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},f$2=Object.keys(dO.modifier),w03=Object.keys(dO.color),_03=Object.keys(dO.bgColor),T$2=[...w03,..._03];O03=$03(),dI=O03});import r78 from"node:process";import H03 from"node:os";import itA from"node:tty";function PR(A,q=globalThis.Deno?globalThis.Deno.args:r78.argv){let K=A.startsWith("-")?"":A.length===1?"-":"--",Y=q.indexOf(K+A),z=q.indexOf("--");return Y!==-1&&(z===-1||Y<z)}function j03(){if("FORCE_COLOR"in xj){if(xj.FORCE_COLOR==="true")return 1;if(xj.FORCE_COLOR==="false")return 0;return xj.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(xj.FORCE_COLOR,10),3)}}function J03(A){if(A===0)return!1;return{level:A,hasBasic:!0,has256:A>=2,has16m:A>=3}}function M03(A,{streamIsTTY:q,sniffFlags:K=!0}={}){let Y=j03();if(Y!==void 0)pY1=Y;let z=K?pY1:Y;if(z===0)return 0;if(K){if(PR("color=16m")||PR("color=full")||PR("color=truecolor"))return 3;if(PR("color=256"))return 2}if("TF_BUILD"in xj&&"AGENT_NAME"in xj)return 1;if(A&&!q&&z===void 0)return 0;let w=z||0;if(xj.TERM==="dumb")return w;if(r78.platform==="win32"){let _=H03.release().split(".");if(Number(_[0])>=10&&Number(_[2])>=10586)return Number(_[2])>=14931?3:2;return 1}if("CI"in xj){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((_)=>(_ in xj)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((_)=>(_ in xj))||xj.CI_NAME==="codeship")return 1;return w}if("TEAMCITY_VERSION"in xj)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xj.TEAMCITY_VERSION)?1:0;if(xj.COLORTERM==="truecolor")return 3;if(xj.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in xj){let _=Number.parseInt((xj.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xj.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(xj.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xj.TERM))return 1;if("COLORTERM"in xj)return 1;return w}function ntA(A,q={}){let K=M03(A,{streamIsTTY:A&&A.isTTY,...q});return J03(K)}var xj,pY1,D03,rtA;var otA=k(()=>{({env:xj}=r78);if(PR("no-color")||PR("no-colors")||PR("color=false")||PR("color=never"))pY1=0;else if(PR("color")||PR("colors")||PR("color=true")||PR("color=always"))pY1=1;D03={stdout:ntA({isTTY:itA.isatty(1)}),stderr:ntA({isTTY:itA.isatty(2)})},rtA=D03});function atA(A,q,K){let Y=A.indexOf(q);if(Y===-1)return A;let z=q.length,w=0,_="";do _+=A.slice(w,Y)+q+K,w=Y+z,Y=A.indexOf(q,w);while(Y!==-1);return _+=A.slice(w),_}function stA(A,q,K,Y){let z=0,w="";do{let _=A[Y-1]==="\r";w+=A.slice(z,_?Y-1:Y)+q+(_?`\r
`:`
`)+K,z=Y+1,Y=A.indexOf(`
`,z)}while(Y!==-1);return w+=A.slice(z),w}class t78{constructor(A){return qeA(A)}}function Wx6(A){return qeA(A)}var ttA,etA,o78,oD6,Px6,AeA,aD6,X03=(A,q={})=>{if(q.level&&!(Number.isInteger(q.level)&&q.level>=0&&q.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let K=ttA?ttA.level:0;A.level=q.level===void 0?K:q.level},qeA=(A)=>{let q=(...K)=>K.join(" ");return X03(q,A),Object.setPrototypeOf(q,Wx6.prototype),q},a78=(A,q,K,...Y)=>{if(A==="rgb"){if(q==="ansi16m")return dI[K].ansi16m(...Y);if(q==="ansi256")return dI[K].ansi256(dI.rgbToAnsi256(...Y));return dI[K].ansi(dI.rgbToAnsi(...Y))}if(A==="hex")return a78("rgb",q,K,...dI.hexToRgb(...Y));return dI[K][A](...Y)},P03,W03,s78=(A,q,K)=>{let Y,z;if(K===void 0)Y=A,z=q;else Y=K.openAll+A,z=q+K.closeAll;return{open:A,close:q,openAll:Y,closeAll:z,parent:K}},dY1=(A,q,K)=>{let Y=(...z)=>Z03(Y,z.length===1?""+z[0]:z.join(" "));return Object.setPrototypeOf(Y,W03),Y[o78]=A,Y[oD6]=q,Y[Px6]=K,Y},Z03=(A,q)=>{if(A.level<=0||!q)return A[Px6]?"":q;let K=A[oD6];if(K===void 0)return q;let{openAll:Y,closeAll:z}=K;if(q.includes("\x1B"))while(K!==void 0)q=atA(q,K.close,K.open),K=K.parent;let w=q.indexOf(`
`);if(w!==-1)q=stA(q,z,Y,w);return Y+q+z},G03,C$2,M1;var iK=k(()=>{ltA();otA();({stdout:ttA,stderr:etA}=rtA),o78=Symbol("GENERATOR"),oD6=Symbol("STYLER"),Px6=Symbol("IS_EMPTY"),AeA=["ansi","ansi","ansi256","ansi16m"],aD6=Object.create(null);Object.setPrototypeOf(Wx6.prototype,Function.prototype);for(let[A,q]of Object.entries(dI))aD6[A]={get(){let K=dY1(this,s78(q.open,q.close,this[oD6]),this[Px6]);return Object.defineProperty(this,A,{value:K}),K}};aD6.visible={get(){let A=dY1(this,this[oD6],!0);return Object.defineProperty(this,"visible",{value:A}),A}};P03=["rgb","hex","ansi256"];for(let A of P03){aD6[A]={get(){let{level:K}=this;return function(...Y){let z=s78(a78(A,AeA[K],"color",...Y),dI.color.close,this[oD6]);return dY1(this,z,this[Px6])}}};let q="bg"+A[0].toUpperCase()+A.slice(1);aD6[q]={get(){let{level:K}=this;return function(...Y){let z=s78(a78(A,AeA[K],"bgColor",...Y),dI.bgColor.close,this[oD6]);return dY1(this,z,this[Px6])}}}}W03=Object.defineProperties(()=>{},{...aD6,level:{enumerable:!0,get(){return this[o78].level},set(A){this[o78].level=A}}});Object.defineProperties(Wx6.prototype,aD6);G03=Wx6(),C$2=Wx6({level:etA?etA.level:0}),M1=G03});var zeA=C((AN)=>{var f03=AN&&AN.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),T03=AN&&AN.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),KeA=AN&&AN.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))f03(q,A,K)}return T03(q,A),q};Object.defineProperty(AN,"__esModule",{value:!0});AN.req=AN.json=AN.toBuffer=void 0;var V03=KeA(g6("http")),N03=KeA(g6("https"));async function YeA(A){let q=0,K=[];for await(let Y of A)q+=Y.length,K.push(Y);return Buffer.concat(K,q)}AN.toBuffer=YeA;async function v03(A){let K=(await YeA(A)).toString("utf8");try{return JSON.parse(K)}catch(Y){let z=Y;throw z.message+=` (input: ${K})`,z}}AN.json=v03;function k03(A,q={}){let Y=((typeof A==="string"?A:A.href).startsWith("https:")?N03:V03).request(A,q),z=new Promise((w,_)=>{Y.once("response",w).once("error",_).end()});return Y.then=z.then.bind(z),Y}AN.req=k03});var e78=C(($E)=>{var _eA=$E&&$E.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),E03=$E&&$E.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),$eA=$E&&$E.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))_eA(q,A,K)}return E03(q,A),q},L03=$E&&$E.__exportStar||function(A,q){for(var K in A)if(K!=="default"&&!Object.prototype.hasOwnProperty.call(q,K))_eA(q,A,K)};Object.defineProperty($E,"__esModule",{value:!0});$E.Agent=void 0;var y03=$eA(g6("net")),weA=$eA(g6("http")),R03=g6("https");L03(zeA(),$E);var Nm=Symbol("AgentBaseInternalState");class OeA extends weA.Agent{constructor(A){super(A);this[Nm]={}}isSecureEndpoint(A){if(A){if(typeof A.secureEndpoint==="boolean")return A.secureEndpoint;if(typeof A.protocol==="string")return A.protocol==="https:"}let{stack:q}=Error();if(typeof q!=="string")return!1;return q.split(`
`).some((K)=>K.indexOf("(https.js:")!==-1||K.indexOf("node:https:")!==-1)}incrementSockets(A){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[A])this.sockets[A]=[];let q=new y03.Socket({writable:!1});return this.sockets[A].push(q),this.totalSocketCount++,q}decrementSockets(A,q){if(!this.sockets[A]||q===null)return;let K=this.sockets[A],Y=K.indexOf(q);if(Y!==-1){if(K.splice(Y,1),this.totalSocketCount--,K.length===0)delete this.sockets[A]}}getName(A){if(typeof A.secureEndpoint==="boolean"?A.secureEndpoint:this.isSecureEndpoint(A))return R03.Agent.prototype.getName.call(this,A);return super.getName(A)}createSocket(A,q,K){let Y={...q,secureEndpoint:this.isSecureEndpoint(q)},z=this.getName(Y),w=this.incrementSockets(z);Promise.resolve().then(()=>this.connect(A,Y)).then((_)=>{if(this.decrementSockets(z,w),_ instanceof weA.Agent)try{return _.addRequest(A,Y)}catch($){return K($)}this[Nm].currentSocket=_,super.createSocket(A,q,K)},(_)=>{this.decrementSockets(z,w),K(_)})}createConnection(){let A=this[Nm].currentSocket;if(this[Nm].currentSocket=void 0,!A)throw Error("No socket was returned in the `connect()` function");return A}get defaultPort(){return this[Nm].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(A){if(this[Nm])this[Nm].defaultPort=A}get protocol(){return this[Nm].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(A){if(this[Nm])this[Nm].protocol=A}}$E.Agent=OeA});var HeA=C((sD6)=>{var S03=sD6&&sD6.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(sD6,"__esModule",{value:!0});sD6.parseProxyResponse=void 0;var C03=S03(Vq6()),cY1=(0,C03.default)("https-proxy-agent:parse-proxy-response");function h03(A){return new Promise((q,K)=>{let Y=0,z=[];function w(){let j=A.read();if(j)H(j);else A.once("readable",w)}function _(){A.removeListener("end",$),A.removeListener("error",O),A.removeListener("readable",w)}function $(){_(),cY1("onend"),K(Error("Proxy connection ended before receiving CONNECT response"))}function O(j){_(),cY1("onerror %o",j),K(j)}function H(j){z.push(j),Y+=j.length;let J=Buffer.concat(z,Y),M=J.indexOf(`\r
\r
`);if(M===-1){cY1("have not received end of HTTP headers yet..."),w();return}let D=J.slice(0,M).toString("ascii").split(`\r
`),X=D.shift();if(!X)return A.destroy(),K(Error("No header received from proxy CONNECT response"));let P=X.split(" "),W=+P[1],Z=P.slice(2).join(" "),G={};for(let f of D){if(!f)continue;let V=f.indexOf(":");if(V===-1)return A.destroy(),K(Error(`Invalid header from proxy CONNECT response: "${f}"`));let N=f.slice(0,V).toLowerCase(),v=f.slice(V+1).trimStart(),y=G[N];if(typeof y==="string")G[N]=[y,v];else if(Array.isArray(y))y.push(v);else G[N]=v}cY1("got proxy server response: %o %o",X,G),_(),q({connect:{statusCode:W,statusText:Z,headers:G},buffered:J})}A.on("error",O),A.on("end",$),w()})}sD6.parseProxyResponse=h03});var Gx6=C((WR)=>{var I03=WR&&WR.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),b03=WR&&WR.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),DeA=WR&&WR.__importStar||function(A){if(A&&A.__esModule)return A;var q={};if(A!=null){for(var K in A)if(K!=="default"&&Object.prototype.hasOwnProperty.call(A,K))I03(q,A,K)}return b03(q,A),q},XeA=WR&&WR.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(WR,"__esModule",{value:!0});WR.HttpsProxyAgent=void 0;var lY1=DeA(g6("net")),jeA=DeA(g6("tls")),x03=XeA(g6("assert")),u03=XeA(Vq6()),B03=e78(),m03=g6("url"),g03=HeA(),Zx6=(0,u03.default)("https-proxy-agent"),JeA=(A)=>{if(A.servername===void 0&&A.host&&!lY1.isIP(A.host))return{...A,servername:A.host};return A};class A48 extends B03.Agent{constructor(A,q){super(q);this.options={path:void 0},this.proxy=typeof A==="string"?new m03.URL(A):A,this.proxyHeaders=q?.headers??{},Zx6("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let K=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),Y=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...q?MeA(q,"headers"):null,host:K,port:Y}}async connect(A,q){let{proxy:K}=this;if(!q.host)throw TypeError('No "host" provided');let Y;if(K.protocol==="https:")Zx6("Creating `tls.Socket`: %o",this.connectOpts),Y=jeA.connect(JeA(this.connectOpts));else Zx6("Creating `net.Socket`: %o",this.connectOpts),Y=lY1.connect(this.connectOpts);let z=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},w=lY1.isIPv6(q.host)?`[${q.host}]`:q.host,_=`CONNECT ${w}:${q.port} HTTP/1.1\r
`;if(K.username||K.password){let J=`${decodeURIComponent(K.username)}:${decodeURIComponent(K.password)}`;z["Proxy-Authorization"]=`Basic ${Buffer.from(J).toString("base64")}`}if(z.Host=`${w}:${q.port}`,!z["Proxy-Connection"])z["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let J of Object.keys(z))_+=`${J}: ${z[J]}\r
`;let $=(0,g03.parseProxyResponse)(Y);Y.write(`${_}\r
`);let{connect:O,buffered:H}=await $;if(A.emit("proxyConnect",O),this.emit("proxyConnect",O,A),O.statusCode===200){if(A.once("socket",F03),q.secureEndpoint)return Zx6("Upgrading socket connection to TLS"),jeA.connect({...MeA(JeA(q),"host","path","port"),socket:Y});return Y}Y.destroy();let j=new lY1.Socket({writable:!1});return j.readable=!0,A.once("socket",(J)=>{Zx6("Replaying proxy buffer for failed request"),(0,x03.default)(J.listenerCount("data")>0),J.push(H),J.push(null)}),j}}A48.protocols=["http","https"];WR.HttpsProxyAgent=A48;function F03(A){A.resume()}function MeA(A,...q){let K={},Y;for(Y in A)if(!q.includes(Y))K[Y]=A[Y];return K}});var cO=C((B$2,PeA)=>{PeA.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Ww=C((m$2,meA)=>{class uj extends Error{constructor(A){super(A);this.name="UndiciError",this.code="UND_ERR"}}class WeA extends uj{constructor(A){super(A);this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}}class ZeA extends uj{constructor(A){super(A);this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}}class GeA extends uj{constructor(A){super(A);this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}}class feA extends uj{constructor(A){super(A);this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}}class TeA extends uj{constructor(A,q,K,Y){super(A);this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=Y,this.status=q,this.statusCode=q,this.headers=K}}class VeA extends uj{constructor(A){super(A);this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}}class NeA extends uj{constructor(A){super(A);this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}}class q48 extends uj{constructor(A){super(A);this.name="AbortError",this.message=A||"The operation was aborted"}}class veA extends q48{constructor(A){super(A);this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}}class keA extends uj{constructor(A){super(A);this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}}class EeA extends uj{constructor(A){super(A);this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}}class LeA extends uj{constructor(A){super(A);this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}}class yeA extends uj{constructor(A){super(A);this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}}class ReA extends uj{constructor(A){super(A);this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}}class SeA extends uj{constructor(A,q){super(A);this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=q}}class CeA extends uj{constructor(A){super(A);this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}}class heA extends uj{constructor(A){super(A);this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}}class IeA extends Error{constructor(A,q,K){super(A);this.name="HTTPParserError",this.code=q?`HPE_${q}`:void 0,this.data=K?K.toString():void 0}}class beA extends uj{constructor(A){super(A);this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}}class xeA extends uj{constructor(A,q,{headers:K,data:Y}){super(A);this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=q,this.data=Y,this.headers=K}}class ueA extends uj{constructor(A,q,{headers:K,data:Y}){super(A);this.name="ResponseError",this.message=A||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=q,this.data=Y,this.headers=K}}class BeA extends uj{constructor(A,q,K){super(q,{cause:A,...K??{}});this.name="SecureProxyConnectionError",this.message=q||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=A}}meA.exports={AbortError:q48,HTTPParserError:IeA,UndiciError:uj,HeadersTimeoutError:ZeA,HeadersOverflowError:GeA,BodyTimeoutError:feA,RequestContentLengthMismatchError:EeA,ConnectTimeoutError:WeA,ResponseStatusCodeError:TeA,InvalidArgumentError:VeA,InvalidReturnValueError:NeA,RequestAbortedError:veA,ClientDestroyedError:yeA,ClientClosedError:ReA,InformationalError:keA,SocketError:SeA,NotSupportedError:CeA,ResponseContentLengthMismatchError:LeA,BalancedPoolMissingUpstreamError:heA,ResponseExceededMaxSizeError:beA,RequestRetryError:xeA,ResponseError:ueA,SecureProxyConnectionError:BeA}});var nY1=C((g$2,geA)=>{var iY1={},K48=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let A=0;A<K48.length;++A){let q=K48[A],K=q.toLowerCase();iY1[q]=iY1[K]=K}Object.setPrototypeOf(iY1,null);geA.exports={wellknownHeaderNames:K48,headerNameLowerCasedRecord:iY1}});var peA=C((F$2,UeA)=>{var{wellknownHeaderNames:FeA,headerNameLowerCasedRecord:Q03}=nY1();class tD6{value=null;left=null;middle=null;right=null;code;constructor(A,q,K){if(K===void 0||K>=A.length)throw TypeError("Unreachable");if((this.code=A.charCodeAt(K))>127)throw TypeError("key must be ascii string");if(A.length!==++K)this.middle=new tD6(A,q,K);else this.value=q}add(A,q){let K=A.length;if(K===0)throw TypeError("Unreachable");let Y=0,z=this;while(!0){let w=A.charCodeAt(Y);if(w>127)throw TypeError("key must be ascii string");if(z.code===w)if(K===++Y){z.value=q;break}else if(z.middle!==null)z=z.middle;else{z.middle=new tD6(A,q,Y);break}else if(z.code<w)if(z.left!==null)z=z.left;else{z.left=new tD6(A,q,Y);break}else if(z.right!==null)z=z.right;else{z.right=new tD6(A,q,Y);break}}}search(A){let q=A.length,K=0,Y=this;while(Y!==null&&K<q){let z=A[K];if(z<=90&&z>=65)z|=32;while(Y!==null){if(z===Y.code){if(q===++K)return Y;Y=Y.middle;break}Y=Y.code<z?Y.left:Y.right}}return null}}class Y48{node=null;insert(A,q){if(this.node===null)this.node=new tD6(A,q,0);else this.node.add(A,q)}lookup(A){return this.node?.search(A)?.value??null}}var QeA=new Y48;for(let A=0;A<FeA.length;++A){let q=Q03[FeA[A]];QeA.insert(q,q)}UeA.exports={TernarySearchTree:Y48,tree:QeA}});var x9=C((Q$2,z67)=>{var fx6=g6("node:assert"),{kDestroyed:ceA,kBodyUsed:eD6,kListeners:z48,kBody:deA}=cO(),{IncomingMessage:U03}=g6("node:http"),oY1=g6("node:stream"),p03=g6("node:net"),{Blob:d03}=g6("node:buffer"),c03=g6("node:util"),{stringify:l03}=g6("node:querystring"),{EventEmitter:i03}=g6("node:events"),{InvalidArgumentError:iX}=Ww(),{headerNameLowerCasedRecord:n03}=nY1(),{tree:leA}=peA(),[r03,o03]=process.versions.node.split(".").map((A)=>Number(A));class w48{constructor(A){this[deA]=A,this[eD6]=!1}async*[Symbol.asyncIterator](){fx6(!this[eD6],"disturbed"),this[eD6]=!0,yield*this[deA]}}function a03(A){if(aY1(A)){if(aeA(A)===0)A.on("data",function(){fx6(!1)});if(typeof A.readableDidRead!=="boolean")A[eD6]=!1,i03.prototype.on.call(A,"data",function(){this[eD6]=!0});return A}else if(A&&typeof A.pipeTo==="function")return new w48(A);else if(A&&typeof A!=="string"&&!ArrayBuffer.isView(A)&&oeA(A))return new w48(A);else return A}function s03(){}function aY1(A){return A&&typeof A==="object"&&typeof A.pipe==="function"&&typeof A.on==="function"}function ieA(A){if(A===null)return!1;else if(A instanceof d03)return!0;else if(typeof A!=="object")return!1;else{let q=A[Symbol.toStringTag];return(q==="Blob"||q==="File")&&(("stream"in A)&&typeof A.stream==="function"||("arrayBuffer"in A)&&typeof A.arrayBuffer==="function")}}function t03(A,q){if(A.includes("?")||A.includes("#"))throw Error('Query params cannot be passed when url already contains "?" or "#".');let K=l03(q);if(K)A+="?"+K;return A}function neA(A){let q=parseInt(A,10);return q===Number(A)&&q>=0&&q<=65535}function rY1(A){return A!=null&&A[0]==="h"&&A[1]==="t"&&A[2]==="t"&&A[3]==="p"&&(A[4]===":"||A[4]==="s"&&A[5]===":")}function reA(A){if(typeof A==="string"){if(A=new URL(A),!rY1(A.origin||A.protocol))throw new iX("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}if(!A||typeof A!=="object")throw new iX("Invalid URL: The URL argument must be a non-null object.");if(!(A instanceof URL)){if(A.port!=null&&A.port!==""&&neA(A.port)===!1)throw new iX("Invalid URL: port must be a valid integer or a string representation of an integer.");if(A.path!=null&&typeof A.path!=="string")throw new iX("Invalid URL path: the path must be a string or null/undefined.");if(A.pathname!=null&&typeof A.pathname!=="string")throw new iX("Invalid URL pathname: the pathname must be a string or null/undefined.");if(A.hostname!=null&&typeof A.hostname!=="string")throw new iX("Invalid URL hostname: the hostname must be a string or null/undefined.");if(A.origin!=null&&typeof A.origin!=="string")throw new iX("Invalid URL origin: the origin must be a string or null/undefined.");if(!rY1(A.origin||A.protocol))throw new iX("Invalid URL protocol: the URL must start with `http:` or `https:`.");let q=A.port!=null?A.port:A.protocol==="https:"?443:80,K=A.origin!=null?A.origin:`${A.protocol||""}//${A.hostname||""}:${q}`,Y=A.path!=null?A.path:`${A.pathname||""}${A.search||""}`;if(K[K.length-1]==="/")K=K.slice(0,K.length-1);if(Y&&Y[0]!=="/")Y=`/${Y}`;return new URL(`${K}${Y}`)}if(!rY1(A.origin||A.protocol))throw new iX("Invalid URL protocol: the URL must start with `http:` or `https:`.");return A}function e03(A){if(A=reA(A),A.pathname!=="/"||A.search||A.hash)throw new iX("invalid url");return A}function AW3(A){if(A[0]==="["){let K=A.indexOf("]");return fx6(K!==-1),A.substring(1,K)}let q=A.indexOf(":");if(q===-1)return A;return A.substring(0,q)}function qW3(A){if(!A)return null;fx6(typeof A==="string");let q=AW3(A);if(p03.isIP(q))return"";return q}function KW3(A){return JSON.parse(JSON.stringify(A))}function YW3(A){return A!=null&&typeof A[Symbol.asyncIterator]==="function"}function oeA(A){return A!=null&&(typeof A[Symbol.iterator]==="function"||typeof A[Symbol.asyncIterator]==="function")}function aeA(A){if(A==null)return 0;else if(aY1(A)){let q=A._readableState;return q&&q.objectMode===!1&&q.ended===!0&&Number.isFinite(q.length)?q.length:null}else if(ieA(A))return A.size!=null?A.size:null;else if(eeA(A))return A.byteLength;return null}function seA(A){return A&&!!(A.destroyed||A[ceA]||oY1.isDestroyed?.(A))}function zW3(A,q){if(A==null||!aY1(A)||seA(A))return;if(typeof A.destroy==="function"){if(Object.getPrototypeOf(A).constructor===U03)A.socket=null;A.destroy(q)}else if(q)queueMicrotask(()=>{A.emit("error",q)});if(A.destroyed!==!0)A[ceA]=!0}var wW3=/timeout=(\d+)/;function _W3(A){let q=A.toString().match(wW3);return q?parseInt(q[1],10)*1000:null}function teA(A){return typeof A==="string"?n03[A]??A.toLowerCase():leA.lookup(A)??A.toString("latin1").toLowerCase()}function $W3(A){return leA.lookup(A)??A.toString("latin1").toLowerCase()}function OW3(A,q){if(q===void 0)q={};for(let K=0;K<A.length;K+=2){let Y=teA(A[K]),z=q[Y];if(z){if(typeof z==="string")z=[z],q[Y]=z;z.push(A[K+1].toString("utf8"))}else{let w=A[K+1];if(typeof w==="string")q[Y]=w;else q[Y]=Array.isArray(w)?w.map((_)=>_.toString("utf8")):w.toString("utf8")}}if("content-length"in q&&"content-disposition"in q)q["content-disposition"]=Buffer.from(q["content-disposition"]).toString("latin1");return q}function HW3(A){let q=A.length,K=Array(q),Y=!1,z=-1,w,_,$=0;for(let O=0;O<A.length;O+=2){if(w=A[O],_=A[O+1],typeof w!=="string"&&(w=w.toString()),typeof _!=="string"&&(_=_.toString("utf8")),$=w.length,$===14&&w[7]==="-"&&(w==="content-length"||w.toLowerCase()==="content-length"))Y=!0;else if($===19&&w[7]==="-"&&(w==="content-disposition"||w.toLowerCase()==="content-disposition"))z=O+1;K[O]=w,K[O+1]=_}if(Y&&z!==-1)K[z]=Buffer.from(K[z]).toString("latin1");return K}function eeA(A){return A instanceof Uint8Array||Buffer.isBuffer(A)}function jW3(A,q,K){if(!A||typeof A!=="object")throw new iX("handler must be an object");if(typeof A.onConnect!=="function")throw new iX("invalid onConnect method");if(typeof A.onError!=="function")throw new iX("invalid onError method");if(typeof A.onBodySent!=="function"&&A.onBodySent!==void 0)throw new iX("invalid onBodySent method");if(K||q==="CONNECT"){if(typeof A.onUpgrade!=="function")throw new iX("invalid onUpgrade method")}else{if(typeof A.onHeaders!=="function")throw new iX("invalid onHeaders method");if(typeof A.onData!=="function")throw new iX("invalid onData method");if(typeof A.onComplete!=="function")throw new iX("invalid onComplete method")}}function JW3(A){return!!(A&&(oY1.isDisturbed(A)||A[eD6]))}function MW3(A){return!!(A&&oY1.isErrored(A))}function DW3(A){return!!(A&&oY1.isReadable(A))}function XW3(A){return{localAddress:A.localAddress,localPort:A.localPort,remoteAddress:A.remoteAddress,remotePort:A.remotePort,remoteFamily:A.remoteFamily,timeout:A.timeout,bytesWritten:A.bytesWritten,bytesRead:A.bytesRead}}function PW3(A){let q;return new ReadableStream({async start(){q=A[Symbol.asyncIterator]()},async pull(K){let{done:Y,value:z}=await q.next();if(Y)queueMicrotask(()=>{K.close(),K.byobRequest?.respond(0)});else{let w=Buffer.isBuffer(z)?z:Buffer.from(z);if(w.byteLength)K.enqueue(new Uint8Array(w))}return K.desiredSize>0},async cancel(K){await q.return()},type:"bytes"})}function WW3(A){return A&&typeof A==="object"&&typeof A.append==="function"&&typeof A.delete==="function"&&typeof A.get==="function"&&typeof A.getAll==="function"&&typeof A.has==="function"&&typeof A.set==="function"&&A[Symbol.toStringTag]==="FormData"}function ZW3(A,q){if("addEventListener"in A)return A.addEventListener("abort",q,{once:!0}),()=>A.removeEventListener("abort",q);return A.addListener("abort",q),()=>A.removeListener("abort",q)}var GW3=typeof String.prototype.toWellFormed==="function",fW3=typeof String.prototype.isWellFormed==="function";function A67(A){return GW3?`${A}`.toWellFormed():c03.toUSVString(A)}function TW3(A){return fW3?`${A}`.isWellFormed():A67(A)===`${A}`}function q67(A){switch(A){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return A>=33&&A<=126}}function VW3(A){if(A.length===0)return!1;for(let q=0;q<A.length;++q)if(!q67(A.charCodeAt(q)))return!1;return!0}var NW3=/[^\t\x20-\x7e\x80-\xff]/;function vW3(A){return!NW3.test(A)}function kW3(A){if(A==null||A==="")return{start:0,end:null,size:null};let q=A?A.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return q?{start:parseInt(q[1]),end:q[2]?parseInt(q[2]):null,size:q[3]?parseInt(q[3]):null}:null}function EW3(A,q,K){return(A[z48]??=[]).push([q,K]),A.on(q,K),A}function LW3(A){for(let[q,K]of A[z48]??[])A.removeListener(q,K);A[z48]=null}function yW3(A,q,K){try{q.onError(K),fx6(q.aborted)}catch(Y){A.emit("error",Y)}}var K67=Object.create(null);K67.enumerable=!0;var _48={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},Y67={..._48,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(_48,null);Object.setPrototypeOf(Y67,null);z67.exports={kEnumerableProperty:K67,nop:s03,isDisturbed:JW3,isErrored:MW3,isReadable:DW3,toUSVString:A67,isUSVString:TW3,isBlobLike:ieA,parseOrigin:e03,parseURL:reA,getServerName:qW3,isStream:aY1,isIterable:oeA,isAsyncIterable:YW3,isDestroyed:seA,headerNameToString:teA,bufferToLowerCasedHeaderName:$W3,addListener:EW3,removeAllListeners:LW3,errorRequest:yW3,parseRawHeaders:HW3,parseHeaders:OW3,parseKeepAliveTimeout:_W3,destroy:zW3,bodyLength:aeA,deepClone:KW3,ReadableStreamFrom:PW3,isBuffer:eeA,validateHandler:jW3,getSocketInfo:XW3,isFormDataLike:WW3,buildURL:t03,addAbortListener:ZW3,isValidHTTPToken:VW3,isValidHeaderValue:vW3,isTokenCharCode:q67,parseRangeHeader:kW3,normalizedMethodRecordsBase:_48,normalizedMethodRecords:Y67,isValidPort:neA,isHttpOrHttpsPrefixed:rY1,nodeMajor:r03,nodeMinor:o03,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"],wrapRequestBody:a03}});var AX6=C((U$2,_67)=>{var Qw=g6("node:diagnostics_channel"),O48=g6("node:util"),sY1=O48.debuglog("undici"),$48=O48.debuglog("fetch"),Y36=O48.debuglog("websocket"),w67=!1,RW3={beforeConnect:Qw.channel("undici:client:beforeConnect"),connected:Qw.channel("undici:client:connected"),connectError:Qw.channel("undici:client:connectError"),sendHeaders:Qw.channel("undici:client:sendHeaders"),create:Qw.channel("undici:request:create"),bodySent:Qw.channel("undici:request:bodySent"),headers:Qw.channel("undici:request:headers"),trailers:Qw.channel("undici:request:trailers"),error:Qw.channel("undici:request:error"),open:Qw.channel("undici:websocket:open"),close:Qw.channel("undici:websocket:close"),socketError:Qw.channel("undici:websocket:socket_error"),ping:Qw.channel("undici:websocket:ping"),pong:Qw.channel("undici:websocket:pong")};if(sY1.enabled||$48.enabled){let A=$48.enabled?$48:sY1;Qw.channel("undici:client:beforeConnect").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w}}=q;A("connecting to %s using %s%s",`${w}${z?`:${z}`:""}`,Y,K)}),Qw.channel("undici:client:connected").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w}}=q;A("connected to %s using %s%s",`${w}${z?`:${z}`:""}`,Y,K)}),Qw.channel("undici:client:connectError").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w},error:_}=q;A("connection to %s using %s%s errored - %s",`${w}${z?`:${z}`:""}`,Y,K,_.message)}),Qw.channel("undici:client:sendHeaders").subscribe((q)=>{let{request:{method:K,path:Y,origin:z}}=q;A("sending request to %s %s/%s",K,z,Y)}),Qw.channel("undici:request:headers").subscribe((q)=>{let{request:{method:K,path:Y,origin:z},response:{statusCode:w}}=q;A("received response to %s %s/%s - HTTP %d",K,z,Y,w)}),Qw.channel("undici:request:trailers").subscribe((q)=>{let{request:{method:K,path:Y,origin:z}}=q;A("trailers received from %s %s/%s",K,z,Y)}),Qw.channel("undici:request:error").subscribe((q)=>{let{request:{method:K,path:Y,origin:z},error:w}=q;A("request to %s %s/%s errored - %s",K,z,Y,w.message)}),w67=!0}if(Y36.enabled){if(!w67){let A=sY1.enabled?sY1:Y36;Qw.channel("undici:client:beforeConnect").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w}}=q;A("connecting to %s%s using %s%s",w,z?`:${z}`:"",Y,K)}),Qw.channel("undici:client:connected").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w}}=q;A("connected to %s%s using %s%s",w,z?`:${z}`:"",Y,K)}),Qw.channel("undici:client:connectError").subscribe((q)=>{let{connectParams:{version:K,protocol:Y,port:z,host:w},error:_}=q;A("connection to %s%s using %s%s errored - %s",w,z?`:${z}`:"",Y,K,_.message)}),Qw.channel("undici:client:sendHeaders").subscribe((q)=>{let{request:{method:K,path:Y,origin:z}}=q;A("sending request to %s %s/%s",K,z,Y)})}Qw.channel("undici:websocket:open").subscribe((A)=>{let{address:{address:q,port:K}}=A;Y36("connection opened %s%s",q,K?`:${K}`:"")}),Qw.channel("undici:websocket:close").subscribe((A)=>{let{websocket:q,code:K,reason:Y}=A;Y36("closed connection to %s - %s %s",q.url,K,Y)}),Qw.channel("undici:websocket:socket_error").subscribe((A)=>{Y36("connection errored - %s",A.message)}),Qw.channel("undici:websocket:ping").subscribe((A)=>{Y36("ping received")}),Qw.channel("undici:websocket:pong").subscribe((A)=>{Y36("pong received")})}_67.exports={channels:RW3}});var M67=C((p$2,J67)=>{var{InvalidArgumentError:mH,NotSupportedError:SW3}=Ww(),ad=g6("node:assert"),{isValidHTTPToken:H67,isValidHeaderValue:$67,isStream:CW3,destroy:hW3,isBuffer:IW3,isFormDataLike:bW3,isIterable:xW3,isBlobLike:uW3,buildURL:BW3,validateHandler:mW3,getServerName:gW3,normalizedMethodRecords:FW3}=x9(),{channels:vm}=AX6(),{headerNameLowerCasedRecord:O67}=nY1(),QW3=/[^\u0021-\u00ff]/,ZR=Symbol("handler");class j67{constructor(A,{path:q,method:K,body:Y,headers:z,query:w,idempotent:_,blocking:$,upgrade:O,headersTimeout:H,bodyTimeout:j,reset:J,throwOnError:M,expectContinue:D,servername:X},P){if(typeof q!=="string")throw new mH("path must be a string");else if(q[0]!=="/"&&!(q.startsWith("http://")||q.startsWith("https://"))&&K!=="CONNECT")throw new mH("path must be an absolute URL or start with a slash");else if(QW3.test(q))throw new mH("invalid request path");if(typeof K!=="string")throw new mH("method must be a string");else if(FW3[K]===void 0&&!H67(K))throw new mH("invalid request method");if(O&&typeof O!=="string")throw new mH("upgrade must be a string");if(H!=null&&(!Number.isFinite(H)||H<0))throw new mH("invalid headersTimeout");if(j!=null&&(!Number.isFinite(j)||j<0))throw new mH("invalid bodyTimeout");if(J!=null&&typeof J!=="boolean")throw new mH("invalid reset");if(D!=null&&typeof D!=="boolean")throw new mH("invalid expectContinue");if(this.headersTimeout=H,this.bodyTimeout=j,this.throwOnError=M===!0,this.method=K,this.abort=null,Y==null)this.body=null;else if(CW3(Y)){this.body=Y;let W=this.body._readableState;if(!W||!W.autoDestroy)this.endHandler=function(){hW3(this)},this.body.on("end",this.endHandler);this.errorHandler=(Z)=>{if(this.abort)this.abort(Z);else this.error=Z},this.body.on("error",this.errorHandler)}else if(IW3(Y))this.body=Y.byteLength?Y:null;else if(ArrayBuffer.isView(Y))this.body=Y.buffer.byteLength?Buffer.from(Y.buffer,Y.byteOffset,Y.byteLength):null;else if(Y instanceof ArrayBuffer)this.body=Y.byteLength?Buffer.from(Y):null;else if(typeof Y==="string")this.body=Y.length?Buffer.from(Y):null;else if(bW3(Y)||xW3(Y)||uW3(Y))this.body=Y;else throw new mH("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=O||null,this.path=w?BW3(q,w):q,this.origin=A,this.idempotent=_==null?K==="HEAD"||K==="GET":_,this.blocking=$==null?!1:$,this.reset=J==null?null:J,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=D!=null?D:!1,Array.isArray(z)){if(z.length%2!==0)throw new mH("headers array must be even");for(let W=0;W<z.length;W+=2)tY1(this,z[W],z[W+1])}else if(z&&typeof z==="object")if(z[Symbol.iterator])for(let W of z){if(!Array.isArray(W)||W.length!==2)throw new mH("headers must be in key-value pair format");tY1(this,W[0],W[1])}else{let W=Object.keys(z);for(let Z=0;Z<W.length;++Z)tY1(this,W[Z],z[W[Z]])}else if(z!=null)throw new mH("headers must be an object or an array");if(mW3(P,K,O),this.servername=X||gW3(this.host),this[ZR]=P,vm.create.hasSubscribers)vm.create.publish({request:this})}onBodySent(A){if(this[ZR].onBodySent)try{return this[ZR].onBodySent(A)}catch(q){this.abort(q)}}onRequestSent(){if(vm.bodySent.hasSubscribers)vm.bodySent.publish({request:this});if(this[ZR].onRequestSent)try{return this[ZR].onRequestSent()}catch(A){this.abort(A)}}onConnect(A){if(ad(!this.aborted),ad(!this.completed),this.error)A(this.error);else return this.abort=A,this[ZR].onConnect(A)}onResponseStarted(){return this[ZR].onResponseStarted?.()}onHeaders(A,q,K,Y){if(ad(!this.aborted),ad(!this.completed),vm.headers.hasSubscribers)vm.headers.publish({request:this,response:{statusCode:A,headers:q,statusText:Y}});try{return this[ZR].onHeaders(A,q,K,Y)}catch(z){this.abort(z)}}onData(A){ad(!this.aborted),ad(!this.completed);try{return this[ZR].onData(A)}catch(q){return this.abort(q),!1}}onUpgrade(A,q,K){return ad(!this.aborted),ad(!this.completed),this[ZR].onUpgrade(A,q,K)}onComplete(A){if(this.onFinally(),ad(!this.aborted),this.completed=!0,vm.trailers.hasSubscribers)vm.trailers.publish({request:this,trailers:A});try{return this[ZR].onComplete(A)}catch(q){this.onError(q)}}onError(A){if(this.onFinally(),vm.error.hasSubscribers)vm.error.publish({request:this,error:A});if(this.aborted)return;return this.aborted=!0,this[ZR].onError(A)}onFinally(){if(this.errorHandler)this.body.off("error",this.errorHandler),this.errorHandler=null;if(this.endHandler)this.body.off("end",this.endHandler),this.endHandler=null}addHeader(A,q){return tY1(this,A,q),this}}function tY1(A,q,K){if(K&&(typeof K==="object"&&!Array.isArray(K)))throw new mH(`invalid ${q} header`);else if(K===void 0)return;let Y=O67[q];if(Y===void 0){if(Y=q.toLowerCase(),O67[Y]===void 0&&!H67(Y))throw new mH("invalid header key")}if(Array.isArray(K)){let z=[];for(let w=0;w<K.length;w++)if(typeof K[w]==="string"){if(!$67(K[w]))throw new mH(`invalid ${q} header`);z.push(K[w])}else if(K[w]===null)z.push("");else if(typeof K[w]==="object")throw new mH(`invalid ${q} header`);else z.push(`${K[w]}`);K=z}else if(typeof K==="string"){if(!$67(K))throw new mH(`invalid ${q} header`)}else if(K===null)K="";else K=`${K}`;if(A.host===null&&Y==="host"){if(typeof K!=="string")throw new mH("invalid host header");A.host=K}else if(A.contentLength===null&&Y==="content-length"){if(A.contentLength=parseInt(K,10),!Number.isFinite(A.contentLength))throw new mH("invalid content-length header")}else if(A.contentType===null&&Y==="content-type")A.contentType=K,A.headers.push(q,K);else if(Y==="transfer-encoding"||Y==="keep-alive"||Y==="upgrade")throw new mH(`invalid ${Y} header`);else if(Y==="connection"){let z=typeof K==="string"?K.toLowerCase():null;if(z!=="close"&&z!=="keep-alive")throw new mH("invalid connection header");if(z==="close")A.reset=!0}else if(Y==="expect")throw new SW3("expect header not supported");else A.headers.push(q,K)}J67.exports=j67});var Tx6=C((d$2,X67)=>{var UW3=g6("node:events");class H48 extends UW3{dispatch(){throw Error("not implemented")}close(){throw Error("not implemented")}destroy(){throw Error("not implemented")}compose(...A){let q=Array.isArray(A[0])?A[0]:A,K=this.dispatch.bind(this);for(let Y of q){if(Y==null)continue;if(typeof Y!=="function")throw TypeError(`invalid interceptor, expected function received ${typeof Y}`);if(K=Y(K),K==null||typeof K!=="function"||K.length!==2)throw TypeError("invalid interceptor")}return new D67(this,K)}}class D67 extends H48{#A=null;#q=null;constructor(A,q){super();this.#A=A,this.#q=q}dispatch(...A){this.#q(...A)}close(...A){return this.#A.close(...A)}destroy(...A){return this.#A.destroy(...A)}}X67.exports=H48});var zX6=C((c$2,W67)=>{var pW3=Tx6(),{ClientDestroyedError:j48,ClientClosedError:dW3,InvalidArgumentError:qX6}=Ww(),{kDestroy:cW3,kClose:lW3,kClosed:Vx6,kDestroyed:KX6,kDispatch:J48,kInterceptors:z36}=cO(),sd=Symbol("onDestroyed"),YX6=Symbol("onClosed"),eY1=Symbol("Intercepted Dispatch");class P67 extends pW3{constructor(){super();this[KX6]=!1,this[sd]=null,this[Vx6]=!1,this[YX6]=[]}get destroyed(){return this[KX6]}get closed(){return this[Vx6]}get interceptors(){return this[z36]}set interceptors(A){if(A){for(let q=A.length-1;q>=0;q--)if(typeof this[z36][q]!=="function")throw new qX6("interceptor must be an function")}this[z36]=A}close(A){if(A===void 0)return new Promise((K,Y)=>{this.close((z,w)=>{return z?Y(z):K(w)})});if(typeof A!=="function")throw new qX6("invalid callback");if(this[KX6]){queueMicrotask(()=>A(new j48,null));return}if(this[Vx6]){if(this[YX6])this[YX6].push(A);else queueMicrotask(()=>A(null,null));return}this[Vx6]=!0,this[YX6].push(A);let q=()=>{let K=this[YX6];this[YX6]=null;for(let Y=0;Y<K.length;Y++)K[Y](null,null)};this[lW3]().then(()=>this.destroy()).then(()=>{queueMicrotask(q)})}destroy(A,q){if(typeof A==="function")q=A,A=null;if(q===void 0)return new Promise((Y,z)=>{this.destroy(A,(w,_)=>{return w?z(w):Y(_)})});if(typeof q!=="function")throw new qX6("invalid callback");if(this[KX6]){if(this[sd])this[sd].push(q);else queueMicrotask(()=>q(null,null));return}if(!A)A=new j48;this[KX6]=!0,this[sd]=this[sd]||[],this[sd].push(q);let K=()=>{let Y=this[sd];this[sd]=null;for(let z=0;z<Y.length;z++)Y[z](null,null)};this[cW3](A).then(()=>{queueMicrotask(K)})}[eY1](A,q){if(!this[z36]||this[z36].length===0)return this[eY1]=this[J48],this[J48](A,q);let K=this[J48].bind(this);for(let Y=this[z36].length-1;Y>=0;Y--)K=this[z36][Y](K);return this[eY1]=K,K(A,q)}dispatch(A,q){if(!q||typeof q!=="object")throw new qX6("handler must be an object");try{if(!A||typeof A!=="object")throw new qX6("opts must be an object.");if(this[KX6]||this[sd])throw new j48;if(this[Vx6])throw new dW3;return this[eY1](A,q)}catch(K){if(typeof q.onError!=="function")throw new qX6("invalid onError method");return q.onError(K),!1}}}W67.exports=P67});var f48=C((l$2,T67)=>{var wX6=0,M48=1000,D48=(M48>>1)-1,td,X48=Symbol("kFastTimer"),ed=[],P48=-2,W48=-1,G67=0,Z67=1;function Z48(){wX6+=D48;let A=0,q=ed.length;while(A<q){let K=ed[A];if(K._state===G67)K._idleStart=wX6-D48,K._state=Z67;else if(K._state===Z67&&wX6>=K._idleStart+K._idleTimeout)K._state=W48,K._idleStart=-1,K._onTimeout(K._timerArg);if(K._state===W48){if(K._state=P48,--q!==0)ed[A]=ed[q]}else++A}if(ed.length=q,ed.length!==0)f67()}function f67(){if(td)td.refresh();else if(clearTimeout(td),td=setTimeout(Z48,D48),td.unref)td.unref()}class G48{[X48]=!0;_state=P48;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(A,q,K){this._onTimeout=A,this._idleTimeout=q,this._timerArg=K,this.refresh()}refresh(){if(this._state===P48)ed.push(this);if(!td||ed.length===1)f67();this._state=G67}clear(){this._state=W48,this._idleStart=-1}}T67.exports={setTimeout(A,q,K){return q<=M48?setTimeout(A,q,K):new G48(A,q,K)},clearTimeout(A){if(A[X48])A.clear();else clearTimeout(A)},setFastTimeout(A,q,K){return new G48(A,q,K)},clearFastTimeout(A){A.clear()},now(){return wX6},tick(A=0){wX6+=A-M48+1,Z48(),Z48()},reset(){wX6=0,ed.length=0,clearTimeout(td),td=null},kFastTimer:X48}});var Nx6=C((i$2,E67)=>{var iW3=g6("node:net"),V67=g6("node:assert"),k67=x9(),{InvalidArgumentError:nW3,ConnectTimeoutError:rW3}=Ww(),Az1=f48();function N67(){}var T48,V48;if(global.FinalizationRegistry&&!(process.env.NODE_V8_COVERAGE||process.env.UNDICI_NO_FG))V48=class{constructor(q){this._maxCachedSessions=q,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry((K)=>{if(this._sessionCache.size<this._maxCachedSessions)return;let Y=this._sessionCache.get(K);if(Y!==void 0&&Y.deref()===void 0)this._sessionCache.delete(K)})}get(q){let K=this._sessionCache.get(q);return K?K.deref():null}set(q,K){if(this._maxCachedSessions===0)return;this._sessionCache.set(q,new WeakRef(K)),this._sessionRegistry.register(K,q)}};else V48=class{constructor(q){this._maxCachedSessions=q,this._sessionCache=new Map}get(q){return this._sessionCache.get(q)}set(q,K){if(this._maxCachedSessions===0)return;if(this._sessionCache.size>=this._maxCachedSessions){let{value:Y}=this._sessionCache.keys().next();this._sessionCache.delete(Y)}this._sessionCache.set(q,K)}};function oW3({allowH2:A,maxCachedSessions:q,socketPath:K,timeout:Y,session:z,...w}){if(q!=null&&(!Number.isInteger(q)||q<0))throw new nW3("maxCachedSessions must be a positive integer or zero");let _={path:K,...w},$=new V48(q==null?100:q);return Y=Y==null?1e4:Y,A=A!=null?A:!1,function({hostname:H,host:j,protocol:J,port:M,servername:D,localAddress:X,httpSocket:P},W){let Z;if(J==="https:"){if(!T48)T48=g6("node:tls");D=D||_.servername||k67.getServerName(j)||null;let f=D||H;V67(f);let V=z||$.get(f)||null;M=M||443,Z=T48.connect({highWaterMark:16384,..._,servername:D,session:V,localAddress:X,ALPNProtocols:A?["http/1.1","h2"]:["http/1.1"],socket:P,port:M,host:H}),Z.on("session",function(N){$.set(f,N)})}else V67(!P,"httpSocket can only be sent on TLS update"),M=M||80,Z=iW3.connect({highWaterMark:65536,..._,localAddress:X,port:M,host:H});if(_.keepAlive==null||_.keepAlive){let f=_.keepAliveInitialDelay===void 0?60000:_.keepAliveInitialDelay;Z.setKeepAlive(!0,f)}let G=aW3(new WeakRef(Z),{timeout:Y,hostname:H,port:M});return Z.setNoDelay(!0).once(J==="https:"?"secureConnect":"connect",function(){if(queueMicrotask(G),W){let f=W;W=null,f(null,this)}}).on("error",function(f){if(queueMicrotask(G),W){let V=W;W=null,V(f)}}),Z}}var aW3=process.platform==="win32"?(A,q)=>{if(!q.timeout)return N67;let K=null,Y=null,z=Az1.setFastTimeout(()=>{K=setImmediate(()=>{Y=setImmediate(()=>v67(A.deref(),q))})},q.timeout);return()=>{Az1.clearFastTimeout(z),clearImmediate(K),clearImmediate(Y)}}:(A,q)=>{if(!q.timeout)return N67;let K=null,Y=Az1.setFastTimeout(()=>{K=setImmediate(()=>{v67(A.deref(),q)})},q.timeout);return()=>{Az1.clearFastTimeout(Y),clearImmediate(K)}};function v67(A,q){if(A==null)return;let K="Connect Timeout Error";if(Array.isArray(A.autoSelectFamilyAttemptedAddresses))K+=` (attempted addresses: ${A.autoSelectFamilyAttemptedAddresses.join(", ")},`;else K+=` (attempted address: ${q.hostname}:${q.port},`;K+=` timeout: ${q.timeout}ms)`,k67.destroy(A,new rW3(K))}E67.exports=oW3});var R67=C((L67)=>{Object.defineProperty(L67,"__esModule",{value:!0});L67.enumToMap=void 0;function sW3(A){let q={};return Object.keys(A).forEach((K)=>{let Y=A[K];if(typeof Y==="number")q[K]=Y}),q}L67.enumToMap=sW3});var l67=C((B67)=>{Object.defineProperty(B67,"__esModule",{value:!0});B67.SPECIAL_HEADERS=B67.HEADER_STATE=B67.MINOR=B67.MAJOR=B67.CONNECTION_TOKEN_CHARS=B67.HEADER_CHARS=B67.TOKEN=B67.STRICT_TOKEN=B67.HEX=B67.URL_CHAR=B67.STRICT_URL_CHAR=B67.USERINFO_CHARS=B67.MARK=B67.ALPHANUM=B67.NUM=B67.HEX_MAP=B67.NUM_MAP=B67.ALPHA=B67.FINISH=B67.H_METHOD_MAP=B67.METHOD_MAP=B67.METHODS_RTSP=B67.METHODS_ICE=B67.METHODS_HTTP=B67.METHODS=B67.LENIENT_FLAGS=B67.FLAGS=B67.TYPE=B67.ERROR=void 0;var tW3=R67(),eW3;(function(A){A[A.OK=0]="OK",A[A.INTERNAL=1]="INTERNAL",A[A.STRICT=2]="STRICT",A[A.LF_EXPECTED=3]="LF_EXPECTED",A[A.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",A[A.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",A[A.INVALID_METHOD=6]="INVALID_METHOD",A[A.INVALID_URL=7]="INVALID_URL",A[A.INVALID_CONSTANT=8]="INVALID_CONSTANT",A[A.INVALID_VERSION=9]="INVALID_VERSION",A[A.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",A[A.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",A[A.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",A[A.INVALID_STATUS=13]="INVALID_STATUS",A[A.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",A[A.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",A[A.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",A[A.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",A[A.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",A[A.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",A[A.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",A[A.PAUSED=21]="PAUSED",A[A.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",A[A.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",A[A.USER=24]="USER"})(eW3=B67.ERROR||(B67.ERROR={}));var AZ3;(function(A){A[A.BOTH=0]="BOTH",A[A.REQUEST=1]="REQUEST",A[A.RESPONSE=2]="RESPONSE"})(AZ3=B67.TYPE||(B67.TYPE={}));var qZ3;(function(A){A[A.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",A[A.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",A[A.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",A[A.CHUNKED=8]="CHUNKED",A[A.UPGRADE=16]="UPGRADE",A[A.CONTENT_LENGTH=32]="CONTENT_LENGTH",A[A.SKIPBODY=64]="SKIPBODY",A[A.TRAILING=128]="TRAILING",A[A.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(qZ3=B67.FLAGS||(B67.FLAGS={}));var KZ3;(function(A){A[A.HEADERS=1]="HEADERS",A[A.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",A[A.KEEP_ALIVE=4]="KEEP_ALIVE"})(KZ3=B67.LENIENT_FLAGS||(B67.LENIENT_FLAGS={}));var SK;(function(A){A[A.DELETE=0]="DELETE",A[A.GET=1]="GET",A[A.HEAD=2]="HEAD",A[A.POST=3]="POST",A[A.PUT=4]="PUT",A[A.CONNECT=5]="CONNECT",A[A.OPTIONS=6]="OPTIONS",A[A.TRACE=7]="TRACE",A[A.COPY=8]="COPY",A[A.LOCK=9]="LOCK",A[A.MKCOL=10]="MKCOL",A[A.MOVE=11]="MOVE",A[A.PROPFIND=12]="PROPFIND",A[A.PROPPATCH=13]="PROPPATCH",A[A.SEARCH=14]="SEARCH",A[A.UNLOCK=15]="UNLOCK",A[A.BIND=16]="BIND",A[A.REBIND=17]="REBIND",A[A.UNBIND=18]="UNBIND",A[A.ACL=19]="ACL",A[A.REPORT=20]="REPORT",A[A.MKACTIVITY=21]="MKACTIVITY",A[A.CHECKOUT=22]="CHECKOUT",A[A.MERGE=23]="MERGE",A[A["M-SEARCH"]=24]="M-SEARCH",A[A.NOTIFY=25]="NOTIFY",A[A.SUBSCRIBE=26]="SUBSCRIBE",A[A.UNSUBSCRIBE=27]="UNSUBSCRIBE",A[A.PATCH=28]="PATCH",A[A.PURGE=29]="PURGE",A[A.MKCALENDAR=30]="MKCALENDAR",A[A.LINK=31]="LINK",A[A.UNLINK=32]="UNLINK",A[A.SOURCE=33]="SOURCE",A[A.PRI=34]="PRI",A[A.DESCRIBE=35]="DESCRIBE",A[A.ANNOUNCE=36]="ANNOUNCE",A[A.SETUP=37]="SETUP",A[A.PLAY=38]="PLAY",A[A.PAUSE=39]="PAUSE",A[A.TEARDOWN=40]="TEARDOWN",A[A.GET_PARAMETER=41]="GET_PARAMETER",A[A.SET_PARAMETER=42]="SET_PARAMETER",A[A.REDIRECT=43]="REDIRECT",A[A.RECORD=44]="RECORD",A[A.FLUSH=45]="FLUSH"})(SK=B67.METHODS||(B67.METHODS={}));B67.METHODS_HTTP=[SK.DELETE,SK.GET,SK.HEAD,SK.POST,SK.PUT,SK.CONNECT,SK.OPTIONS,SK.TRACE,SK.COPY,SK.LOCK,SK.MKCOL,SK.MOVE,SK.PROPFIND,SK.PROPPATCH,SK.SEARCH,SK.UNLOCK,SK.BIND,SK.REBIND,SK.UNBIND,SK.ACL,SK.REPORT,SK.MKACTIVITY,SK.CHECKOUT,SK.MERGE,SK["M-SEARCH"],SK.NOTIFY,SK.SUBSCRIBE,SK.UNSUBSCRIBE,SK.PATCH,SK.PURGE,SK.MKCALENDAR,SK.LINK,SK.UNLINK,SK.PRI,SK.SOURCE];B67.METHODS_ICE=[SK.SOURCE];B67.METHODS_RTSP=[SK.OPTIONS,SK.DESCRIBE,SK.ANNOUNCE,SK.SETUP,SK.PLAY,SK.PAUSE,SK.TEARDOWN,SK.GET_PARAMETER,SK.SET_PARAMETER,SK.REDIRECT,SK.RECORD,SK.FLUSH,SK.GET,SK.POST];B67.METHOD_MAP=tW3.enumToMap(SK);B67.H_METHOD_MAP={};Object.keys(B67.METHOD_MAP).forEach((A)=>{if(/^H/.test(A))B67.H_METHOD_MAP[A]=B67.METHOD_MAP[A]});var YZ3;(function(A){A[A.SAFE=0]="SAFE",A[A.SAFE_WITH_CB=1]="SAFE_WITH_CB",A[A.UNSAFE=2]="UNSAFE"})(YZ3=B67.FINISH||(B67.FINISH={}));B67.ALPHA=[];for(let A=65;A<=90;A++)B67.ALPHA.push(String.fromCharCode(A)),B67.ALPHA.push(String.fromCharCode(A+32));B67.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};B67.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};B67.NUM=["0","1","2","3","4","5","6","7","8","9"];B67.ALPHANUM=B67.ALPHA.concat(B67.NUM);B67.MARK=["-","_",".","!","~","*","'","(",")"];B67.USERINFO_CHARS=B67.ALPHANUM.concat(B67.MARK).concat(["%",";",":","&","=","+","$",","]);B67.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(B67.ALPHANUM);B67.URL_CHAR=B67.STRICT_URL_CHAR.concat(["\t","\f"]);for(let A=128;A<=255;A++)B67.URL_CHAR.push(A);B67.HEX=B67.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);B67.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(B67.ALPHANUM);B67.TOKEN=B67.STRICT_TOKEN.concat([" "]);B67.HEADER_CHARS=["\t"];for(let A=32;A<=255;A++)if(A!==127)B67.HEADER_CHARS.push(A);B67.CONNECTION_TOKEN_CHARS=B67.HEADER_CHARS.filter((A)=>A!==44);B67.MAJOR=B67.NUM_MAP;B67.MINOR=B67.MAJOR;var _X6;(function(A){A[A.GENERAL=0]="GENERAL",A[A.CONNECTION=1]="CONNECTION",A[A.CONTENT_LENGTH=2]="CONTENT_LENGTH",A[A.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",A[A.UPGRADE=4]="UPGRADE",A[A.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",A[A.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",A[A.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",A[A.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(_X6=B67.HEADER_STATE||(B67.HEADER_STATE={}));B67.SPECIAL_HEADERS={connection:_X6.CONNECTION,"content-length":_X6.CONTENT_LENGTH,"proxy-connection":_X6.CONNECTION,"transfer-encoding":_X6.TRANSFER_ENCODING,upgrade:_X6.UPGRADE}});var E48=C((o$2,i67)=>{var{Buffer:DZ3}=g6("node:buffer");i67.exports=DZ3.from(" ","base64")});var r67=C((a$2,n67)=>{var{Buffer:XZ3}=g6("node:buffer");n67.exports=XZ3.from(" ","base64")});var vx6=C((s$2,K17)=>{var o67=["GET","HEAD","POST"],PZ3=new Set(o67),WZ3=[101,204,205,304],a67=[301,302,303,307,308],ZZ3=new Set(a67),s67=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],GZ3=new Set(s67),t67=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],fZ3=new Set(t67),TZ3=["follow","manual","error"],e67=["GET","HEAD","OPTIONS","TRACE"],VZ3=new Set(e67),NZ3=["navigate","same-origin","no-cors","cors"],vZ3=["omit","same-origin","include"],kZ3=["default","no-store","reload","no-cache","force-cache","only-if-cached"],EZ3=["content-encoding","content-language","content-location","content-type","content-length"],LZ3=["half"],A17=["CONNECT","TRACE","TRACK"],yZ3=new Set(A17),q17=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],RZ3=new Set(q17);K17.exports={subresource:q17,forbiddenMethods:A17,requestBodyHeader:EZ3,referrerPolicy:t67,requestRedirect:TZ3,requestMode:NZ3,requestCredentials:vZ3,requestCache:kZ3,redirectStatus:a67,corsSafeListedMethods:o67,nullBodyStatus:WZ3,safeMethods:e67,badPorts:s67,requestDuplex:LZ3,subresourceSet:RZ3,badPortsSet:GZ3,redirectStatusSet:ZZ3,corsSafeListedMethodsSet:PZ3,safeMethodsSet:VZ3,forbiddenMethodsSet:yZ3,referrerPolicySet:fZ3}});var y48=C((t$2,Y17)=>{var L48=Symbol.for("undici.globalOrigin.1");function SZ3(){return globalThis[L48]}function CZ3(A){if(A===void 0){Object.defineProperty(globalThis,L48,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let q=new URL(A);if(q.protocol!=="http:"&&q.protocol!=="https:")throw TypeError(`Only http & https urls are allowed, received ${q.protocol}`);Object.defineProperty(globalThis,L48,{value:q,writable:!0,enumerable:!1,configurable:!1})}Y17.exports={getGlobalOrigin:SZ3,setGlobalOrigin:CZ3}});var qN=C((e$2,j17)=>{var zz1=g6("node:assert"),hZ3=new TextEncoder,kx6=/^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/,IZ3=/[\u000A\u000D\u0009\u0020]/,bZ3=/[\u0009\u000A\u000C\u000D\u0020]/g,xZ3=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function uZ3(A){zz1(A.protocol==="data:");let q=_17(A,!0);q=q.slice(5);let K={position:0},Y=$X6(",",q,K),z=Y.length;if(Y=UZ3(Y,!0,!0),K.position>=q.length)return"failure";K.position++;let w=q.slice(z+1),_=$17(w);if(/;(\u0020){0,}base64$/i.test(Y)){let O=H17(_);if(_=mZ3(O),_==="failure")return"failure";Y=Y.slice(0,-6),Y=Y.replace(/(\u0020)+$/,""),Y=Y.slice(0,-1)}if(Y.startsWith(";"))Y="text/plain"+Y;let $=R48(Y);if($==="failure")$=R48("text/plain;charset=US-ASCII");return{mimeType:$,body:_}}function _17(A,q=!1){if(!q)return A.href;let K=A.href,Y=A.hash.length,z=Y===0?K:K.substring(0,K.length-Y);if(!Y&&K.endsWith("#"))return z.slice(0,-1);return z}function wz1(A,q,K){let Y="";while(K.position<q.length&&A(q[K.position]))Y+=q[K.position],K.position++;return Y}function $X6(A,q,K){let Y=q.indexOf(A,K.position),z=K.position;if(Y===-1)return K.position=q.length,q.slice(z);return K.position=Y,q.slice(z,K.position)}function $17(A){let q=hZ3.encode(A);return BZ3(q)}function z17(A){return A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102}function w17(A){return A>=48&&A<=57?A-48:(A&223)-55}function BZ3(A){let q=A.length,K=new Uint8Array(q),Y=0;for(let z=0;z<q;++z){let w=A[z];if(w!==37)K[Y++]=w;else if(w===37&&!(z17(A[z+1])&&z17(A[z+2])))K[Y++]=37;else K[Y++]=w17(A[z+1])<<4|w17(A[z+2]),z+=2}return q===Y?K:K.subarray(0,Y)}function R48(A){A=Yz1(A,!0,!0);let q={position:0},K=$X6("/",A,q);if(K.length===0||!kx6.test(K))return"failure";if(q.position>A.length)return"failure";q.position++;let Y=$X6(";",A,q);if(Y=Yz1(Y,!1,!0),Y.length===0||!kx6.test(Y))return"failure";let z=K.toLowerCase(),w=Y.toLowerCase(),_={type:z,subtype:w,parameters:new Map,essence:`${z}/${w}`};while(q.position<A.length){q.position++,wz1((H)=>IZ3.test(H),A,q);let $=wz1((H)=>H!==";"&&H!=="=",A,q);if($=$.toLowerCase(),q.position<A.length){if(A[q.position]===";")continue;q.position++}if(q.position>A.length)break;let O=null;if(A[q.position]==='"')O=O17(A,q,!0),$X6(";",A,q);else if(O=$X6(";",A,q),O=Yz1(O,!1,!0),O.length===0)continue;if($.length!==0&&kx6.test($)&&(O.length===0||xZ3.test(O))&&!_.parameters.has($))_.parameters.set($,O)}return _}function mZ3(A){A=A.replace(bZ3,"");let q=A.length;if(q%4===0){if(A.charCodeAt(q-1)===61){if(--q,A.charCodeAt(q-1)===61)--q}}if(q%4===1)return"failure";if(/[^+/0-9A-Za-z]/.test(A.length===q?A:A.substring(0,q)))return"failure";let K=Buffer.from(A,"base64");return new Uint8Array(K.buffer,K.byteOffset,K.byteLength)}function O17(A,q,K){let Y=q.position,z="";zz1(A[q.position]==='"'),q.position++;while(!0){if(z+=wz1((_)=>_!=='"'&&_!=="\\",A,q),q.position>=A.length)break;let w=A[q.position];if(q.position++,w==="\\"){if(q.position>=A.length){z+="\\";break}z+=A[q.position],q.position++}else{zz1(w==='"');break}}if(K)return z;return A.slice(Y,q.position)}function gZ3(A){zz1(A!=="failure");let{parameters:q,essence:K}=A,Y=K;for(let[z,w]of q.entries()){if(Y+=";",Y+=z,Y+="=",!kx6.test(w))w=w.replace(/(\\|")/g,"\\$1"),w='"'+w,w+='"';Y+=w}return Y}function FZ3(A){return A===13||A===10||A===9||A===32}function Yz1(A,q=!0,K=!0){return S48(A,q,K,FZ3)}function QZ3(A){return A===13||A===10||A===9||A===12||A===32}function UZ3(A,q=!0,K=!0){return S48(A,q,K,QZ3)}function S48(A,q,K,Y){let z=0,w=A.length-1;if(q)while(z<A.length&&Y(A.charCodeAt(z)))z++;if(K)while(w>0&&Y(A.charCodeAt(w)))w--;return z===0&&w===A.length-1?A:A.slice(z,w+1)}function H17(A){let q=A.length;if(65535>q)return String.fromCharCode.apply(null,A);let K="",Y=0,z=65535;while(Y<q){if(Y+z>q)z=q-Y;K+=String.fromCharCode.apply(null,A.subarray(Y,Y+=z))}return K}function pZ3(A){switch(A.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}if(A.subtype.endsWith("+json"))return"application/json";if(A.subtype.endsWith("+xml"))return"application/xml";return""}j17.exports={dataURLProcessor:uZ3,URLSerializer:_17,collectASequenceOfCodePoints:wz1,collectASequenceOfCodePointsFast:$X6,stringPercentDecode:$17,parseMIMEType:R48,collectAnHTTPQuotedString:O17,serializeAMimeType:gZ3,removeChars:S48,removeHTTPWhitespace:Yz1,minimizeSupportedMimeType:pZ3,HTTP_TOKEN_CODEPOINTS:kx6,isomorphicDecode:H17}});var R0=C((AO2,J17)=>{var{types:km,inspect:dZ3}=g6("node:util"),{markAsUncloneable:cZ3}=g6("node:worker_threads"),{toUSVString:lZ3}=x9(),v7={};v7.converters={};v7.util={};v7.errors={};v7.errors.exception=function(A){return TypeError(`${A.header}: ${A.message}`)};v7.errors.conversionFailed=function(A){let q=A.types.length===1?"":" one of",K=`${A.argument} could not be converted to${q}: ${A.types.join(", ")}.`;return v7.errors.exception({header:A.prefix,message:K})};v7.errors.invalidArgument=function(A){return v7.errors.exception({header:A.prefix,message:`"${A.value}" is an invalid ${A.type}.`})};v7.brandCheck=function(A,q,K){if(K?.strict!==!1){if(!(A instanceof q)){let Y=TypeError("Illegal invocation");throw Y.code="ERR_INVALID_THIS",Y}}else if(A?.[Symbol.toStringTag]!==q.prototype[Symbol.toStringTag]){let Y=TypeError("Illegal invocation");throw Y.code="ERR_INVALID_THIS",Y}};v7.argumentLengthCheck=function({length:A},q,K){if(A<q)throw v7.errors.exception({message:`${q} argument${q!==1?"s":""} required, but${A?" only":""} ${A} found.`,header:K})};v7.illegalConstructor=function(){throw v7.errors.exception({header:"TypeError",message:"Illegal constructor"})};v7.util.Type=function(A){switch(typeof A){case"undefined":return"Undefined";case"boolean":return"Boolean";case"string":return"String";case"symbol":return"Symbol";case"number":return"Number";case"bigint":return"BigInt";case"function":case"object":{if(A===null)return"Null";return"Object"}}};v7.util.markAsUncloneable=cZ3||(()=>{});v7.util.ConvertToInt=function(A,q,K,Y){let z,w;if(q===64)if(z=Math.pow(2,53)-1,K==="unsigned")w=0;else w=Math.pow(-2,53)+1;else if(K==="unsigned")w=0,z=Math.pow(2,q)-1;else w=Math.pow(-2,q)-1,z=Math.pow(2,q-1)-1;let _=Number(A);if(_===0)_=0;if(Y?.enforceRange===!0){if(Number.isNaN(_)||_===Number.POSITIVE_INFINITY||_===Number.NEGATIVE_INFINITY)throw v7.errors.exception({header:"Integer conversion",message:`Could not convert ${v7.util.Stringify(A)} to an integer.`});if(_=v7.util.IntegerPart(_),_<w||_>z)throw v7.errors.exception({header:"Integer conversion",message:`Value must be between ${w}-${z}, got ${_}.`});return _}if(!Number.isNaN(_)&&Y?.clamp===!0){if(_=Math.min(Math.max(_,w),z),Math.floor(_)%2===0)_=Math.floor(_);else _=Math.ceil(_);return _}if(Number.isNaN(_)||_===0&&Object.is(0,_)||_===Number.POSITIVE_INFINITY||_===Number.NEGATIVE_INFINITY)return 0;if(_=v7.util.IntegerPart(_),_=_%Math.pow(2,q),K==="signed"&&_>=Math.pow(2,q)-1)return _-Math.pow(2,q);return _};v7.util.IntegerPart=function(A){let q=Math.floor(Math.abs(A));if(A<0)return-1*q;return q};v7.util.Stringify=function(A){switch(v7.util.Type(A)){case"Symbol":return`Symbol(${A.description})`;case"Object":return dZ3(A);case"String":return`"${A}"`;default:return`${A}`}};v7.sequenceConverter=function(A){return(q,K,Y,z)=>{if(v7.util.Type(q)!=="Object")throw v7.errors.exception({header:K,message:`${Y} (${v7.util.Stringify(q)}) is not iterable.`});let w=typeof z==="function"?z():q?.[Symbol.iterator]?.(),_=[],$=0;if(w===void 0||typeof w.next!=="function")throw v7.errors.exception({header:K,message:`${Y} is not iterable.`});while(!0){let{done:O,value:H}=w.next();if(O)break;_.push(A(H,K,`${Y}[${$++}]`))}return _}};v7.recordConverter=function(A,q){return(K,Y,z)=>{if(v7.util.Type(K)!=="Object")throw v7.errors.exception({header:Y,message:`${z} ("${v7.util.Type(K)}") is not an Object.`});let w={};if(!km.isProxy(K)){let $=[...Object.getOwnPropertyNames(K),...Object.getOwnPropertySymbols(K)];for(let O of $){let H=A(O,Y,z),j=q(K[O],Y,z);w[H]=j}return w}let _=Reflect.ownKeys(K);for(let $ of _)if(Reflect.getOwnPropertyDescriptor(K,$)?.enumerable){let H=A($,Y,z),j=q(K[$],Y,z);w[H]=j}return w}};v7.interfaceConverter=function(A){return(q,K,Y,z)=>{if(z?.strict!==!1&&!(q instanceof A))throw v7.errors.exception({header:K,message:`Expected ${Y} ("${v7.util.Stringify(q)}") to be an instance of ${A.name}.`});return q}};v7.dictionaryConverter=function(A){return(q,K,Y)=>{let z=v7.util.Type(q),w={};if(z==="Null"||z==="Undefined")return w;else if(z!=="Object")throw v7.errors.exception({header:K,message:`Expected ${q} to be one of: Null, Undefined, Object.`});for(let _ of A){let{key:$,defaultValue:O,required:H,converter:j}=_;if(H===!0){if(!Object.hasOwn(q,$))throw v7.errors.exception({header:K,message:`Missing required key "${$}".`})}let J=q[$],M=Object.hasOwn(_,"defaultValue");if(M&&J!==null)J??=O();if(H||M||J!==void 0){if(J=j(J,K,`${Y}.${$}`),_.allowedValues&&!_.allowedValues.includes(J))throw v7.errors.exception({header:K,message:`${J} is not an accepted type. Expected one of ${_.allowedValues.join(", ")}.`});w[$]=J}}return w}};v7.nullableConverter=function(A){return(q,K,Y)=>{if(q===null)return q;return A(q,K,Y)}};v7.converters.DOMString=function(A,q,K,Y){if(A===null&&Y?.legacyNullToEmptyString)return"";if(typeof A==="symbol")throw v7.errors.exception({header:q,message:`${K} is a symbol, which cannot be converted to a DOMString.`});return String(A)};v7.converters.ByteString=function(A,q,K){let Y=v7.converters.DOMString(A,q,K);for(let z=0;z<Y.length;z++)if(Y.charCodeAt(z)>255)throw TypeError(`Cannot convert argument to a ByteString because the character at index ${z} has a value of ${Y.charCodeAt(z)} which is greater than 255.`);return Y};v7.converters.USVString=lZ3;v7.converters.boolean=function(A){return Boolean(A)};v7.converters.any=function(A){return A};v7.converters["long long"]=function(A,q,K){return v7.util.ConvertToInt(A,64,"signed",void 0,q,K)};v7.converters["unsigned long long"]=function(A,q,K){return v7.util.ConvertToInt(A,64,"unsigned",void 0,q,K)};v7.converters["unsigned long"]=function(A,q,K){return v7.util.ConvertToInt(A,32,"unsigned",void 0,q,K)};v7.converters["unsigned short"]=function(A,q,K,Y){return v7.util.ConvertToInt(A,16,"unsigned",Y,q,K)};v7.converters.ArrayBuffer=function(A,q,K,Y){if(v7.util.Type(A)!=="Object"||!km.isAnyArrayBuffer(A))throw v7.errors.conversionFailed({prefix:q,argument:`${K} ("${v7.util.Stringify(A)}")`,types:["ArrayBuffer"]});if(Y?.allowShared===!1&&km.isSharedArrayBuffer(A))throw v7.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(A.resizable||A.growable)throw v7.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return A};v7.converters.TypedArray=function(A,q,K,Y,z){if(v7.util.Type(A)!=="Object"||!km.isTypedArray(A)||A.constructor.name!==q.name)throw v7.errors.conversionFailed({prefix:K,argument:`${Y} ("${v7.util.Stringify(A)}")`,types:[q.name]});if(z?.allowShared===!1&&km.isSharedArrayBuffer(A.buffer))throw v7.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(A.buffer.resizable||A.buffer.growable)throw v7.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return A};v7.converters.DataView=function(A,q,K,Y){if(v7.util.Type(A)!=="Object"||!km.isDataView(A))throw v7.errors.exception({header:q,message:`${K} is not a DataView.`});if(Y?.allowShared===!1&&km.isSharedArrayBuffer(A.buffer))throw v7.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});if(A.buffer.resizable||A.buffer.growable)throw v7.errors.exception({header:"ArrayBuffer",message:"Received a resizable ArrayBuffer."});return A};v7.converters.BufferSource=function(A,q,K,Y){if(km.isAnyArrayBuffer(A))return v7.converters.ArrayBuffer(A,q,K,{...Y,allowShared:!1});if(km.isTypedArray(A))return v7.converters.TypedArray(A,A.constructor,q,K,{...Y,allowShared:!1});if(km.isDataView(A))return v7.converters.DataView(A,q,K,{...Y,allowShared:!1});throw v7.errors.conversionFailed({prefix:q,argument:`${K} ("${v7.util.Stringify(A)}")`,types:["BufferSource"]})};v7.converters["sequence<ByteString>"]=v7.sequenceConverter(v7.converters.ByteString);v7.converters["sequence<sequence<ByteString>>"]=v7.sequenceConverter(v7.converters["sequence<ByteString>"]);v7.converters["record<ByteString, ByteString>"]=v7.recordConverter(v7.converters.ByteString,v7.converters.ByteString);J17.exports={webidl:v7}});var OE=C((qO2,R17)=>{var{Transform:iZ3}=g6("node:stream"),M17=g6("node:zlib"),{redirectStatusSet:nZ3,referrerPolicySet:rZ3,badPortsSet:oZ3}=vx6(),{getGlobalOrigin:D17}=y48(),{collectASequenceOfCodePoints:w36,collectAnHTTPQuotedString:aZ3,removeChars:sZ3,parseMIMEType:tZ3}=qN(),{performance:eZ3}=g6("node:perf_hooks"),{isBlobLike:AG3,ReadableStreamFrom:qG3,isValidHTTPToken:X17,normalizedMethodRecordsBase:KG3}=x9(),_36=g6("node:assert"),{isUint8Array:YG3}=g6("node:util/types"),{webidl:Ex6}=R0(),P17=[],$z1;try{$z1=g6("node:crypto");let A=["sha256","sha384","sha512"];P17=$z1.getHashes().filter((q)=>A.includes(q))}catch{}function W17(A){let q=A.urlList,K=q.length;return K===0?null:q[K-1].toString()}function zG3(A,q){if(!nZ3.has(A.status))return null;let K=A.headersList.get("location",!0);if(K!==null&&G17(K)){if(!Z17(K))K=wG3(K);K=new URL(K,W17(A))}if(K&&!K.hash)K.hash=q;return K}function Z17(A){for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(K>126||K<32)return!1}return!0}function wG3(A){return Buffer.from(A,"binary").toString("utf8")}function yx6(A){return A.urlList[A.urlList.length-1]}function _G3(A){let q=yx6(A);if(v17(q)&&oZ3.has(q.port))return"blocked";return"allowed"}function $G3(A){return A instanceof Error||(A?.constructor?.name==="Error"||A?.constructor?.name==="DOMException")}function OG3(A){for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(!(K===9||K>=32&&K<=126||K>=128&&K<=255))return!1}return!0}var HG3=X17;function G17(A){return(A[0]==="\t"||A[0]===" "||A[A.length-1]==="\t"||A[A.length-1]===" "||A.includes(`
`)||A.includes("\r")||A.includes("\x00"))===!1}function jG3(A,q){let{headersList:K}=q,Y=(K.get("referrer-policy",!0)??"").split(","),z="";if(Y.length>0)for(let w=Y.length;w!==0;w--){let _=Y[w-1].trim();if(rZ3.has(_)){z=_;break}}if(z!=="")A.referrerPolicy=z}function JG3(){return"allowed"}function MG3(){return"success"}function DG3(){return"success"}function XG3(A){let q=null;q=A.mode,A.headersList.set("sec-fetch-mode",q,!0)}function PG3(A){let q=A.origin;if(q==="client"||q===void 0)return;if(A.responseTainting==="cors"||A.mode==="websocket")A.headersList.append("origin",q,!0);else if(A.method!=="GET"&&A.method!=="HEAD"){switch(A.referrerPolicy){case"no-referrer":q=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":if(A.origin&&h48(A.origin)&&!h48(yx6(A)))q=null;break;case"same-origin":if(!Oz1(A,yx6(A)))q=null;break;default:}A.headersList.append("origin",q,!0)}}function OX6(A,q){return A}function WG3(A,q,K){if(!A?.startTime||A.startTime<q)return{domainLookupStartTime:q,domainLookupEndTime:q,connectionStartTime:q,connectionEndTime:q,secureConnectionStartTime:q,ALPNNegotiatedProtocol:A?.ALPNNegotiatedProtocol};return{domainLookupStartTime:OX6(A.domainLookupStartTime,K),domainLookupEndTime:OX6(A.domainLookupEndTime,K),connectionStartTime:OX6(A.connectionStartTime,K),connectionEndTime:OX6(A.connectionEndTime,K),secureConnectionStartTime:OX6(A.secureConnectionStartTime,K),ALPNNegotiatedProtocol:A.ALPNNegotiatedProtocol}}function ZG3(A){return OX6(eZ3.now(),A)}function GG3(A){return{startTime:A.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:A.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function f17(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function fG3(A){return{referrerPolicy:A.referrerPolicy}}function TG3(A){let q=A.referrerPolicy;_36(q);let K=null;if(A.referrer==="client"){let $=D17();if(!$||$.origin==="null")return"no-referrer";K=new URL($)}else if(A.referrer instanceof URL)K=A.referrer;let Y=C48(K),z=C48(K,!0);if(Y.toString().length>4096)Y=z;let w=Oz1(A,Y),_=Lx6(Y)&&!Lx6(A.url);switch(q){case"origin":return z!=null?z:C48(K,!0);case"unsafe-url":return Y;case"same-origin":return w?z:"no-referrer";case"origin-when-cross-origin":return w?Y:z;case"strict-origin-when-cross-origin":{let $=yx6(A);if(Oz1(Y,$))return Y;if(Lx6(Y)&&!Lx6($))return"no-referrer";return z}case"strict-origin":case"no-referrer-when-downgrade":default:return _?"no-referrer":z}}function C48(A,q){if(_36(A instanceof URL),A=new URL(A),A.protocol==="file:"||A.protocol==="about:"||A.protocol==="blank:")return"no-referrer";if(A.username="",A.password="",A.hash="",q)A.pathname="",A.search="";return A}function Lx6(A){if(!(A instanceof URL))return!1;if(A.href==="about:blank"||A.href==="about:srcdoc")return!0;if(A.protocol==="data:")return!0;if(A.protocol==="file:")return!0;return q(A.origin);function q(K){if(K==null||K==="null")return!1;let Y=new URL(K);if(Y.protocol==="https:"||Y.protocol==="wss:")return!0;if(/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(Y.hostname)||(Y.hostname==="localhost"||Y.hostname.includes("localhost."))||Y.hostname.endsWith(".localhost"))return!0;return!1}}function VG3(A,q){if($z1===void 0)return!0;let K=T17(q);if(K==="no metadata")return!0;if(K.length===0)return!0;let Y=vG3(K),z=kG3(K,Y);for(let w of z){let{algo:_,hash:$}=w,O=$z1.createHash(_).update(A).digest("base64");if(O[O.length-1]==="=")if(O[O.length-2]==="=")O=O.slice(0,-2);else O=O.slice(0,-1);if(EG3(O,$))return!0}return!1}var NG3=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function T17(A){let q=[],K=!0;for(let Y of A.split(" ")){K=!1;let z=NG3.exec(Y);if(z===null||z.groups===void 0||z.groups.algo===void 0)continue;let w=z.groups.algo.toLowerCase();if(P17.includes(w))q.push(z.groups)}if(K===!0)return"no metadata";return q}function vG3(A){let q=A[0].algo;if(q[3]==="5")return q;for(let K=1;K<A.length;++K){let Y=A[K];if(Y.algo[3]==="5"){q="sha512";break}else if(q[3]==="3")continue;else if(Y.algo[3]==="3")q="sha384"}return q}function kG3(A,q){if(A.length===1)return A;let K=0;for(let Y=0;Y<A.length;++Y)if(A[Y].algo===q)A[K++]=A[Y];return A.length=K,A}function EG3(A,q){if(A.length!==q.length)return!1;for(let K=0;K<A.length;++K)if(A[K]!==q[K]){if(A[K]==="+"&&q[K]==="-"||A[K]==="/"&&q[K]==="_")continue;return!1}return!0}function LG3(A){}function Oz1(A,q){if(A.origin===q.origin&&A.origin==="null")return!0;if(A.protocol===q.protocol&&A.hostname===q.hostname&&A.port===q.port)return!0;return!1}function yG3(){let A,q;return{promise:new Promise((Y,z)=>{A=Y,q=z}),resolve:A,reject:q}}function RG3(A){return A.controller.state==="aborted"}function SG3(A){return A.controller.state==="aborted"||A.controller.state==="terminated"}function CG3(A){return KG3[A.toLowerCase()]??A}function hG3(A){let q=JSON.stringify(A);if(q===void 0)throw TypeError("Value is not JSON serializable");return _36(typeof q==="string"),q}var IG3=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function V17(A,q,K=0,Y=1){class z{#A;#q;#K;constructor(w,_){this.#A=w,this.#q=_,this.#K=0}next(){if(typeof this!=="object"||this===null||!(#A in this))throw TypeError(`'next' called on an object that does not implement interface ${A} Iterator.`);let w=this.#K,_=this.#A[q],$=_.length;if(w>=$)return{value:void 0,done:!0};let{[K]:O,[Y]:H}=_[w];this.#K=w+1;let j;switch(this.#q){case"key":j=O;break;case"value":j=H;break;case"key+value":j=[O,H];break}return{value:j,done:!1}}}return delete z.prototype.constructor,Object.setPrototypeOf(z.prototype,IG3),Object.defineProperties(z.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${A} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(w,_){return new z(w,_)}}function bG3(A,q,K,Y=0,z=1){let w=V17(A,K,Y,z),_={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Ex6.brandCheck(this,q),w(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Ex6.brandCheck(this,q),w(this,"value")}},entries:{writable:!0,enumerable:!0,configurable:!0,value:function(){return Ex6.brandCheck(this,q),w(this,"key+value")}},forEach:{writable:!0,enumerable:!0,configurable:!0,value:function(O,H=globalThis){if(Ex6.brandCheck(this,q),Ex6.argumentLengthCheck(arguments,1,`${A}.forEach`),typeof O!=="function")throw TypeError(`Failed to execute 'forEach' on '${A}': parameter 1 is not of type 'Function'.`);for(let{0:j,1:J}of w(this,"key+value"))O.call(H,J,j,this)}}};return Object.defineProperties(q.prototype,{..._,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:_.entries.value}})}async function xG3(A,q,K){let Y=q,z=K,w;try{w=A.stream.getReader()}catch(_){z(_);return}try{Y(await N17(w))}catch(_){z(_)}}function uG3(A){return A instanceof ReadableStream||A[Symbol.toStringTag]==="ReadableStream"&&typeof A.tee==="function"}function BG3(A){try{A.close(),A.byobRequest?.respond(0)}catch(q){if(!q.message.includes("Controller is already closed")&&!q.message.includes("ReadableStream is already closed"))throw q}}var mG3=/[^\x00-\xFF]/;function _z1(A){return _36(!mG3.test(A)),A}async function N17(A){let q=[],K=0;while(!0){let{done:Y,value:z}=await A.read();if(Y)return Buffer.concat(q,K);if(!YG3(z))throw TypeError("Received non-Uint8Array chunk");q.push(z),K+=z.length}}function gG3(A){_36("protocol"in A);let q=A.protocol;return q==="about:"||q==="blob:"||q==="data:"}function h48(A){return typeof A==="string"&&A[5]===":"&&A[0]==="h"&&A[1]==="t"&&A[2]==="t"&&A[3]==="p"&&A[4]==="s"||A.protocol==="https:"}function v17(A){_36("protocol"in A);let q=A.protocol;return q==="http:"||q==="https:"}function FG3(A,q){let K=A;if(!K.startsWith("bytes"))return"failure";let Y={position:5};if(q)w36((O)=>O==="\t"||O===" ",K,Y);if(K.charCodeAt(Y.position)!==61)return"failure";if(Y.position++,q)w36((O)=>O==="\t"||O===" ",K,Y);let z=w36((O)=>{let H=O.charCodeAt(0);return H>=48&&H<=57},K,Y),w=z.length?Number(z):null;if(q)w36((O)=>O==="\t"||O===" ",K,Y);if(K.charCodeAt(Y.position)!==45)return"failure";if(Y.position++,q)w36((O)=>O==="\t"||O===" ",K,Y);let _=w36((O)=>{let H=O.charCodeAt(0);return H>=48&&H<=57},K,Y),$=_.length?Number(_):null;if(Y.position<K.length)return"failure";if($===null&&w===null)return"failure";if(w>$)return"failure";return{rangeStartValue:w,rangeEndValue:$}}function QG3(A,q,K){let Y="bytes ";return Y+=_z1(`${A}`),Y+="-",Y+=_z1(`${q}`),Y+="/",Y+=_z1(`${K}`),Y}class k17 extends iZ3{#A;constructor(A){super();this.#A=A}_transform(A,q,K){if(!this._inflateStream){if(A.length===0){K();return}this._inflateStream=(A[0]&15)===8?M17.createInflate(this.#A):M17.createInflateRaw(this.#A),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",(Y)=>this.destroy(Y))}this._inflateStream.write(A,q,K)}_final(A){if(this._inflateStream)this._inflateStream.end(),this._inflateStream=null;A()}}function UG3(A){return new k17(A)}function pG3(A){let q=null,K=null,Y=null,z=E17("content-type",A);if(z===null)return"failure";for(let w of z){let _=tZ3(w);if(_==="failure"||_.essence==="*/*")continue;if(Y=_,Y.essence!==K){if(q=null,Y.parameters.has("charset"))q=Y.parameters.get("charset");K=Y.essence}else if(!Y.parameters.has("charset")&&q!==null)Y.parameters.set("charset",q)}if(Y==null)return"failure";return Y}function dG3(A){let q=A,K={position:0},Y=[],z="";while(K.position<q.length){if(z+=w36((w)=>w!=='"'&&w!==",",q,K),K.position<q.length)if(q.charCodeAt(K.position)===34){if(z+=aZ3(q,K),K.position<q.length)continue}else _36(q.charCodeAt(K.position)===44),K.position++;z=sZ3(z,!0,!0,(w)=>w===9||w===32),Y.push(z),z=""}return Y}function E17(A,q){let K=q.get(A,!0);if(K===null)return null;return dG3(K)}var cG3=new TextDecoder;function lG3(A){if(A.length===0)return"";if(A[0]===239&&A[1]===187&&A[2]===191)A=A.subarray(3);return cG3.decode(A)}class L17{get baseUrl(){return D17()}get origin(){return this.baseUrl?.origin}policyContainer=f17()}class y17{settingsObject=new L17}var iG3=new y17;R17.exports={isAborted:RG3,isCancelled:SG3,isValidEncodedURL:Z17,createDeferredPromise:yG3,ReadableStreamFrom:qG3,tryUpgradeRequestToAPotentiallyTrustworthyURL:LG3,clampAndCoarsenConnectionTimingInfo:WG3,coarsenedSharedCurrentTime:ZG3,determineRequestsReferrer:TG3,makePolicyContainer:f17,clonePolicyContainer:fG3,appendFetchMetadata:XG3,appendRequestOriginHeader:PG3,TAOCheck:DG3,corsCheck:MG3,crossOriginResourcePolicyCheck:JG3,createOpaqueTimingInfo:GG3,setRequestReferrerPolicyOnRedirect:jG3,isValidHTTPToken:X17,requestBadPort:_G3,requestCurrentURL:yx6,responseURL:W17,responseLocationURL:zG3,isBlobLike:AG3,isURLPotentiallyTrustworthy:Lx6,isValidReasonPhrase:OG3,sameOrigin:Oz1,normalizeMethod:CG3,serializeJavascriptValueToJSONString:hG3,iteratorMixin:bG3,createIterator:V17,isValidHeaderName:HG3,isValidHeaderValue:G17,isErrorLike:$G3,fullyReadBody:xG3,bytesMatch:VG3,isReadableStreamLike:uG3,readableStreamClose:BG3,isomorphicEncode:_z1,urlIsLocal:gG3,urlHasHttpsScheme:h48,urlIsHttpHttpsScheme:v17,readAllBytes:N17,simpleRangeHeaderValue:FG3,buildContentRange:QG3,parseMetadata:T17,createInflate:UG3,extractMimeType:pG3,getDecodeSplit:E17,utf8DecodeBytes:lG3,environmentSettingsObject:iG3}});var ds=C((KO2,S17)=>{S17.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kDispatcher:Symbol("dispatcher")}});var I48=C((YO2,C17)=>{var{Blob:nG3,File:rG3}=g6("node:buffer"),{kState:Ac}=ds(),{webidl:Em}=R0();class Lm{constructor(A,q,K={}){let Y=q,z=K.type,w=K.lastModified??Date.now();this[Ac]={blobLike:A,name:Y,type:z,lastModified:w}}stream(...A){return Em.brandCheck(this,Lm),this[Ac].blobLike.stream(...A)}arrayBuffer(...A){return Em.brandCheck(this,Lm),this[Ac].blobLike.arrayBuffer(...A)}slice(...A){return Em.brandCheck(this,Lm),this[Ac].blobLike.slice(...A)}text(...A){return Em.brandCheck(this,Lm),this[Ac].blobLike.text(...A)}get size(){return Em.brandCheck(this,Lm),this[Ac].blobLike.size}get type(){return Em.brandCheck(this,Lm),this[Ac].blobLike.type}get name(){return Em.brandCheck(this,Lm),this[Ac].name}get lastModified(){return Em.brandCheck(this,Lm),this[Ac].lastModified}get[Symbol.toStringTag](){return"File"}}Em.converters.Blob=Em.interfaceConverter(nG3);function oG3(A){return A instanceof rG3||A&&(typeof A.stream==="function"||typeof A.arrayBuffer==="function")&&A[Symbol.toStringTag]==="File"}C17.exports={FileLike:Lm,isFileLike:oG3}});var Rx6=C((zO2,u17)=>{var{isBlobLike:Hz1,iteratorMixin:aG3}=OE(),{kState:Ff}=ds(),{kEnumerableProperty:HX6}=x9(),{FileLike:h17,isFileLike:sG3}=I48(),{webidl:$$}=R0(),{File:x17}=g6("node:buffer"),I17=g6("node:util"),b17=globalThis.File??x17;class ym{constructor(A){if($$.util.markAsUncloneable(this),A!==void 0)throw $$.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Ff]=[]}append(A,q,K=void 0){$$.brandCheck(this,ym);let Y="FormData.append";if($$.argumentLengthCheck(arguments,2,Y),arguments.length===3&&!Hz1(q))throw TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");A=$$.converters.USVString(A,Y,"name"),q=Hz1(q)?$$.converters.Blob(q,Y,"value",{strict:!1}):$$.converters.USVString(q,Y,"value"),K=arguments.length===3?$$.converters.USVString(K,Y,"filename"):void 0;let z=b48(A,q,K);this[Ff].push(z)}delete(A){$$.brandCheck(this,ym);let q="FormData.delete";$$.argumentLengthCheck(arguments,1,q),A=$$.converters.USVString(A,q,"name"),this[Ff]=this[Ff].filter((K)=>K.name!==A)}get(A){$$.brandCheck(this,ym);let q="FormData.get";$$.argumentLengthCheck(arguments,1,q),A=$$.converters.USVString(A,q,"name");let K=this[Ff].findIndex((Y)=>Y.name===A);if(K===-1)return null;return this[Ff][K].value}getAll(A){$$.brandCheck(this,ym);let q="FormData.getAll";return $$.argumentLengthCheck(arguments,1,q),A=$$.converters.USVString(A,q,"name"),this[Ff].filter((K)=>K.name===A).map((K)=>K.value)}has(A){$$.brandCheck(this,ym);let q="FormData.has";return $$.argumentLengthCheck(arguments,1,q),A=$$.converters.USVString(A,q,"name"),this[Ff].findIndex((K)=>K.name===A)!==-1}set(A,q,K=void 0){$$.brandCheck(this,ym);let Y="FormData.set";if($$.argumentLengthCheck(arguments,2,Y),arguments.length===3&&!Hz1(q))throw TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");A=$$.converters.USVString(A,Y,"name"),q=Hz1(q)?$$.converters.Blob(q,Y,"name",{strict:!1}):$$.converters.USVString(q,Y,"name"),K=arguments.length===3?$$.converters.USVString(K,Y,"name"):void 0;let z=b48(A,q,K),w=this[Ff].findIndex((_)=>_.name===A);if(w!==-1)this[Ff]=[...this[Ff].slice(0,w),z,...this[Ff].slice(w+1).filter((_)=>_.name!==A)];else this[Ff].push(z)}[I17.inspect.custom](A,q){let K=this[Ff].reduce((z,w)=>{if(z[w.name])if(Array.isArray(z[w.name]))z[w.name].push(w.value);else z[w.name]=[z[w.name],w.value];else z[w.name]=w.value;return z},{__proto__:null});q.depth??=A,q.colors??=!0;let Y=I17.formatWithOptions(q,K);return`FormData ${Y.slice(Y.indexOf("]")+2)}`}}aG3("FormData",ym,Ff,"name","value");Object.defineProperties(ym.prototype,{append:HX6,delete:HX6,get:HX6,getAll:HX6,has:HX6,set:HX6,[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function b48(A,q,K){if(typeof q==="string");else{if(!sG3(q))q=q instanceof Blob?new b17([q],"blob",{type:q.type}):new h17(q,"blob",{type:q.type});if(K!==void 0){let Y={type:q.type,lastModified:q.lastModified};q=q instanceof x17?new b17([q],K,Y):new h17(q,K,Y)}}return{name:A,value:q}}u17.exports={FormData:ym,makeEntry:b48}});var U17=C((wO2,Q17)=>{var{isUSVString:B17,bufferToLowerCasedHeaderName:tG3}=x9(),{utf8DecodeBytes:eG3}=OE(),{HTTP_TOKEN_CODEPOINTS:Af3,isomorphicDecode:m17}=qN(),{isFileLike:qf3}=I48(),{makeEntry:Kf3}=Rx6(),jz1=g6("node:assert"),{File:Yf3}=g6("node:buffer"),zf3=globalThis.File??Yf3,wf3=Buffer.from('form-data; name="'),g17=Buffer.from("; filename"),_f3=Buffer.from("--"),$f3=Buffer.from(`--\r
`);function Of3(A){for(let q=0;q<A.length;++q)if((A.charCodeAt(q)&-128)!==0)return!1;return!0}function Hf3(A){let q=A.length;if(q<27||q>70)return!1;for(let K=0;K<q;++K){let Y=A.charCodeAt(K);if(!(Y>=48&&Y<=57||Y>=65&&Y<=90||Y>=97&&Y<=122||Y===39||Y===45||Y===95))return!1}return!0}function jf3(A,q){jz1(q!=="failure"&&q.essence==="multipart/form-data");let K=q.parameters.get("boundary");if(K===void 0)return"failure";let Y=Buffer.from(`--${K}`,"utf8"),z=[],w={position:0};while(A[w.position]===13&&A[w.position+1]===10)w.position+=2;let _=A.length;while(A[_-1]===10&&A[_-2]===13)_-=2;if(_!==A.length)A=A.subarray(0,_);while(!0){if(A.subarray(w.position,w.position+Y.length).equals(Y))w.position+=Y.length;else return"failure";if(w.position===A.length-2&&Jz1(A,_f3,w)||w.position===A.length-4&&Jz1(A,$f3,w))return z;if(A[w.position]!==13||A[w.position+1]!==10)return"failure";w.position+=2;let $=Jf3(A,w);if($==="failure")return"failure";let{name:O,filename:H,contentType:j,encoding:J}=$;w.position+=2;let M;{let X=A.indexOf(Y.subarray(2),w.position);if(X===-1)return"failure";if(M=A.subarray(w.position,X-4),w.position+=M.length,J==="base64")M=Buffer.from(M.toString(),"base64")}if(A[w.position]!==13||A[w.position+1]!==10)return"failure";else w.position+=2;let D;if(H!==null){if(j??="text/plain",!Of3(j))j="";D=new zf3([M],H,{type:j})}else D=eG3(Buffer.from(M));jz1(B17(O)),jz1(typeof D==="string"&&B17(D)||qf3(D)),z.push(Kf3(O,D,H))}}function Jf3(A,q){let K=null,Y=null,z=null,w=null;while(!0){if(A[q.position]===13&&A[q.position+1]===10){if(K===null)return"failure";return{name:K,filename:Y,contentType:z,encoding:w}}let _=jX6(($)=>$!==10&&$!==13&&$!==58,A,q);if(_=x48(_,!0,!0,($)=>$===9||$===32),!Af3.test(_.toString()))return"failure";if(A[q.position]!==58)return"failure";switch(q.position++,jX6(($)=>$===32||$===9,A,q),tG3(_)){case"content-disposition":{if(K=Y=null,!Jz1(A,wf3,q))return"failure";if(q.position+=17,K=F17(A,q),K===null)return"failure";if(Jz1(A,g17,q)){let $=q.position+g17.length;if(A[$]===42)q.position+=1,$+=1;if(A[$]!==61||A[$+1]!==34)return"failure";if(q.position+=12,Y=F17(A,q),Y===null)return"failure"}break}case"content-type":{let $=jX6((O)=>O!==10&&O!==13,A,q);$=x48($,!1,!0,(O)=>O===9||O===32),z=m17($);break}case"content-transfer-encoding":{let $=jX6((O)=>O!==10&&O!==13,A,q);$=x48($,!1,!0,(O)=>O===9||O===32),w=m17($);break}default:jX6(($)=>$!==10&&$!==13,A,q)}if(A[q.position]!==13&&A[q.position+1]!==10)return"failure";else q.position+=2}}function F17(A,q){jz1(A[q.position-1]===34);let K=jX6((Y)=>Y!==10&&Y!==13&&Y!==34,A,q);if(A[q.position]!==34)return null;else q.position++;return K=new TextDecoder().decode(K).replace(/%0A/ig,`
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),K}function jX6(A,q,K){let Y=K.position;while(Y<q.length&&A(q[Y]))++Y;return q.subarray(K.position,K.position=Y)}function x48(A,q,K,Y){let z=0,w=A.length-1;if(q)while(z<A.length&&Y(A[z]))z++;if(K)while(w>0&&Y(A[w]))w--;return z===0&&w===A.length-1?A:A.subarray(z,w+1)}function Jz1(A,q,K){if(A.length<q.length)return!1;for(let Y=0;Y<q.length;Y++)if(q[Y]!==A[K.position+Y])return!1;return!0}Q17.exports={multipartFormDataParser:jf3,validateBoundary:Hf3}});var DX6=C((_O2,o17)=>{var Sx6=x9(),{ReadableStreamFrom:Mf3,isBlobLike:p17,isReadableStreamLike:Df3,readableStreamClose:Xf3,createDeferredPromise:Pf3,fullyReadBody:Wf3,extractMimeType:Zf3,utf8DecodeBytes:l17}=OE(),{FormData:d17}=Rx6(),{kState:MX6}=ds(),{webidl:Gf3}=R0(),{Blob:ff3}=g6("node:buffer"),u48=g6("node:assert"),{isErrored:i17,isDisturbed:Tf3}=g6("node:stream"),{isArrayBuffer:Vf3}=g6("node:util/types"),{serializeAMimeType:Nf3}=qN(),{multipartFormDataParser:vf3}=U17(),B48;try{let A=g6("node:crypto");B48=(q)=>A.randomInt(0,q)}catch{B48=(A)=>Math.floor(Math.random(A))}var Mz1=new TextEncoder;function kf3(){}var m48=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,g48;if(m48)g48=new FinalizationRegistry((A)=>{let q=A.deref();if(q&&!q.locked&&!Tf3(q)&&!i17(q))q.cancel("Response object has been garbage collected").catch(kf3)});function n17(A,q=!1){let K=null;if(A instanceof ReadableStream)K=A;else if(p17(A))K=A.stream();else K=new ReadableStream({async pull(O){let H=typeof z==="string"?Mz1.encode(z):z;if(H.byteLength)O.enqueue(H);queueMicrotask(()=>Xf3(O))},start(){},type:"bytes"});u48(Df3(K));let Y=null,z=null,w=null,_=null;if(typeof A==="string")z=A,_="text/plain;charset=UTF-8";else if(A instanceof URLSearchParams)z=A.toString(),_="application/x-www-form-urlencoded;charset=UTF-8";else if(Vf3(A))z=new Uint8Array(A.slice());else if(ArrayBuffer.isView(A))z=new Uint8Array(A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength));else if(Sx6.isFormDataLike(A)){let O=`----formdata-undici-0${`${B48(100000000000)}`.padStart(11,"0")}`,H=`--${O}\r
Content-Disposition: form-data`;/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */let j=(W)=>W.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),J=(W)=>W.replace(/\r?\n|\r/g,`\r
`),M=[],D=new Uint8Array([13,10]);w=0;let X=!1;for(let[W,Z]of A)if(typeof Z==="string"){let G=Mz1.encode(H+`; name="${j(J(W))}"\r
\r
${J(Z)}\r
`);M.push(G),w+=G.byteLength}else{let G=Mz1.encode(`${H}; name="${j(J(W))}"`+(Z.name?`; filename="${j(Z.name)}"`:"")+`\r
Content-Type: ${Z.type||"application/octet-stream"}\r
\r
`);if(M.push(G,Z,D),typeof Z.size==="number")w+=G.byteLength+Z.size+D.byteLength;else X=!0}let P=Mz1.encode(`--${O}--`);if(M.push(P),w+=P.byteLength,X)w=null;z=A,Y=async function*(){for(let W of M)if(W.stream)yield*W.stream();else yield W},_=`multipart/form-data; boundary=${O}`}else if(p17(A)){if(z=A,w=A.size,A.type)_=A.type}else if(typeof A[Symbol.asyncIterator]==="function"){if(q)throw TypeError("keepalive");if(Sx6.isDisturbed(A)||A.locked)throw TypeError("Response body object should not be disturbed or locked");K=A instanceof ReadableStream?A:Mf3(A)}if(typeof z==="string"||Sx6.isBuffer(z))w=Buffer.byteLength(z);if(Y!=null){let O;K=new ReadableStream({async start(){O=Y(A)[Symbol.asyncIterator]()},async pull(H){let{value:j,done:J}=await O.next();if(J)queueMicrotask(()=>{H.close(),H.byobRequest?.respond(0)});else if(!i17(K)){let M=new Uint8Array(j);if(M.byteLength)H.enqueue(M)}return H.desiredSize>0},async cancel(H){await O.return()},type:"bytes"})}return[{stream:K,source:z,length:w},_]}function Ef3(A,q=!1){if(A instanceof ReadableStream)u48(!Sx6.isDisturbed(A),"The body has already been consumed."),u48(!A.locked,"The stream is locked.");return n17(A,q)}function Lf3(A,q){let[K,Y]=q.stream.tee();if(m48)g48.register(A,new WeakRef(K));return q.stream=K,{stream:Y,length:q.length,source:q.source}}function yf3(A){if(A.aborted)throw new DOMException("The operation was aborted.","AbortError")}function Rf3(A){return{blob(){return JX6(this,(K)=>{let Y=c17(this);if(Y===null)Y="";else if(Y)Y=Nf3(Y);return new ff3([K],{type:Y})},A)},arrayBuffer(){return JX6(this,(K)=>{return new Uint8Array(K).buffer},A)},text(){return JX6(this,l17,A)},json(){return JX6(this,Cf3,A)},formData(){return JX6(this,(K)=>{let Y=c17(this);if(Y!==null)switch(Y.essence){case"multipart/form-data":{let z=vf3(K,Y);if(z==="failure")throw TypeError("Failed to parse body as FormData.");let w=new d17;return w[MX6]=z,w}case"application/x-www-form-urlencoded":{let z=new URLSearchParams(K.toString()),w=new d17;for(let[_,$]of z)w.append(_,$);return w}}throw TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},A)},bytes(){return JX6(this,(K)=>{return new Uint8Array(K)},A)}}}function Sf3(A){Object.assign(A.prototype,Rf3(A))}async function JX6(A,q,K){if(Gf3.brandCheck(A,K),r17(A))throw TypeError("Body is unusable: Body has already been read");yf3(A[MX6]);let Y=Pf3(),z=(_)=>Y.reject(_),w=(_)=>{try{Y.resolve(q(_))}catch($){z($)}};if(A[MX6].body==null)return w(Buffer.allocUnsafe(0)),Y.promise;return await Wf3(A[MX6].body,w,z),Y.promise}function r17(A){let q=A[MX6].body;return q!=null&&(q.stream.locked||Sx6.isDisturbed(q.stream))}function Cf3(A){return JSON.parse(l17(A))}function c17(A){let q=A[MX6].headersList,K=Zf3(q);if(K==="failure")return null;return K}o17.exports={extractBody:n17,safelyExtractBody:Ef3,cloneBody:Lf3,mixinBody:Sf3,streamRegistry:g48,hasFinalizationRegistry:m48,bodyUnusable:r17}});var $87=C(($O2,_87)=>{var nK=g6("node:assert"),p3=x9(),{channels:a17}=AX6(),F48=f48(),{RequestContentLengthMismatchError:$36,ResponseContentLengthMismatchError:hf3,RequestAbortedError:K87,HeadersTimeoutError:If3,HeadersOverflowError:bf3,SocketError:Gz1,InformationalError:XX6,BodyTimeoutError:xf3,HTTPParserError:uf3,ResponseExceededMaxSizeError:Bf3}=Ww(),{kUrl:Y87,kReset:KN,kClient:d48,kParser:Bj,kBlocking:Ix6,kRunning:mZ,kPending:mf3,kSize:s17,kWriting:ls,kQueue:cI,kNoRef:Cx6,kKeepAliveDefaultTimeout:gf3,kHostHeader:Ff3,kPendingIdx:Qf3,kRunningIdx:GR,kError:fR,kPipelining:Wz1,kSocket:PX6,kKeepAliveTimeoutValue:fz1,kMaxHeadersSize:Q48,kKeepAliveMaxTimeout:Uf3,kKeepAliveTimeoutThreshold:pf3,kHeadersTimeout:df3,kBodyTimeout:cf3,kStrictContentLength:c48,kMaxRequests:t17,kCounter:lf3,kMaxResponseSize:if3,kOnError:nf3,kResume:cs,kHTTPContext:z87}=cO(),Rm=l67(),rf3=Buffer.alloc(0),Dz1=Buffer[Symbol.species],Xz1=p3.addListener,of3=p3.removeAllListeners,U48;async function af3(){let A=process.env.JEST_WORKER_ID?E48():void 0,q;try{q=await WebAssembly.compile(r67())}catch(K){q=await WebAssembly.compile(A||E48())}return await WebAssembly.instantiate(q,{env:{wasm_on_url:(K,Y,z)=>{return 0},wasm_on_status:(K,Y,z)=>{nK(UD.ptr===K);let w=Y-Cm+Sm.byteOffset;return UD.onStatus(new Dz1(Sm.buffer,w,z))||0},wasm_on_message_begin:(K)=>{return nK(UD.ptr===K),UD.onMessageBegin()||0},wasm_on_header_field:(K,Y,z)=>{nK(UD.ptr===K);let w=Y-Cm+Sm.byteOffset;return UD.onHeaderField(new Dz1(Sm.buffer,w,z))||0},wasm_on_header_value:(K,Y,z)=>{nK(UD.ptr===K);let w=Y-Cm+Sm.byteOffset;return UD.onHeaderValue(new Dz1(Sm.buffer,w,z))||0},wasm_on_headers_complete:(K,Y,z,w)=>{return nK(UD.ptr===K),UD.onHeadersComplete(Y,Boolean(z),Boolean(w))||0},wasm_on_body:(K,Y,z)=>{nK(UD.ptr===K);let w=Y-Cm+Sm.byteOffset;return UD.onBody(new Dz1(Sm.buffer,w,z))||0},wasm_on_message_complete:(K)=>{return nK(UD.ptr===K),UD.onMessageComplete()||0}}})}var p48=null,l48=af3();l48.catch();var UD=null,Sm=null,Pz1=0,Cm=null,sf3=0,hx6=1,WX6=2|hx6,Zz1=4|hx6,i48=8|sf3;class w87{constructor(A,q,{exports:K}){nK(Number.isFinite(A[Q48])&&A[Q48]>0),this.llhttp=K,this.ptr=this.llhttp.llhttp_alloc(Rm.TYPE.RESPONSE),this.client=A,this.socket=q,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=A[Q48],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=A[if3]}setTimeout(A,q){if(A!==this.timeoutValue||q&hx6^this.timeoutType&hx6){if(this.timeout)F48.clearTimeout(this.timeout),this.timeout=null;if(A)if(q&hx6)this.timeout=F48.setFastTimeout(e17,A,new WeakRef(this));else this.timeout=setTimeout(e17,A,new WeakRef(this)),this.timeout.unref();this.timeoutValue=A}else if(this.timeout){if(this.timeout.refresh)this.timeout.refresh()}this.timeoutType=q}resume(){if(this.socket.destroyed||!this.paused)return;if(nK(this.ptr!=null),nK(UD==null),this.llhttp.llhttp_resume(this.ptr),nK(this.timeoutType===Zz1),this.timeout){if(this.timeout.refresh)this.timeout.refresh()}this.paused=!1,this.execute(this.socket.read()||rf3),this.readMore()}readMore(){while(!this.paused&&this.ptr){let A=this.socket.read();if(A===null)break;this.execute(A)}}execute(A){nK(this.ptr!=null),nK(UD==null),nK(!this.paused);let{socket:q,llhttp:K}=this;if(A.length>Pz1){if(Cm)K.free(Cm);Pz1=Math.ceil(A.length/4096)*4096,Cm=K.malloc(Pz1)}new Uint8Array(K.memory.buffer,Cm,Pz1).set(A);try{let Y;try{Sm=A,UD=this,Y=K.llhttp_execute(this.ptr,Cm,A.length)}catch(w){throw w}finally{UD=null,Sm=null}let z=K.llhttp_get_error_pos(this.ptr)-Cm;if(Y===Rm.ERROR.PAUSED_UPGRADE)this.onUpgrade(A.slice(z));else if(Y===Rm.ERROR.PAUSED)this.paused=!0,q.unshift(A.slice(z));else if(Y!==Rm.ERROR.OK){let w=K.llhttp_get_error_reason(this.ptr),_="";if(w){let $=new Uint8Array(K.memory.buffer,w).indexOf(0);_="Response does not match the HTTP/1.1 protocol ("+Buffer.from(K.memory.buffer,w,$).toString()+")"}throw new uf3(_,Rm.ERROR[Y],A.slice(z))}}catch(Y){p3.destroy(q,Y)}}destroy(){nK(this.ptr!=null),nK(UD==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&F48.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(A){this.statusText=A.toString()}onMessageBegin(){let{socket:A,client:q}=this;if(A.destroyed)return-1;let K=q[cI][q[GR]];if(!K)return-1;K.onResponseStarted()}onHeaderField(A){let q=this.headers.length;if((q&1)===0)this.headers.push(A);else this.headers[q-1]=Buffer.concat([this.headers[q-1],A]);this.trackHeader(A.length)}onHeaderValue(A){let q=this.headers.length;if((q&1)===1)this.headers.push(A),q+=1;else this.headers[q-1]=Buffer.concat([this.headers[q-1],A]);let K=this.headers[q-2];if(K.length===10){let Y=p3.bufferToLowerCasedHeaderName(K);if(Y==="keep-alive")this.keepAlive+=A.toString();else if(Y==="connection")this.connection+=A.toString()}else if(K.length===14&&p3.bufferToLowerCasedHeaderName(K)==="content-length")this.contentLength+=A.toString();this.trackHeader(A.length)}trackHeader(A){if(this.headersSize+=A,this.headersSize>=this.headersMaxSize)p3.destroy(this.socket,new bf3)}onUpgrade(A){let{upgrade:q,client:K,socket:Y,headers:z,statusCode:w}=this;nK(q),nK(K[PX6]===Y),nK(!Y.destroyed),nK(!this.paused),nK((z.length&1)===0);let _=K[cI][K[GR]];nK(_),nK(_.upgrade||_.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,this.headers=[],this.headersSize=0,Y.unshift(A),Y[Bj].destroy(),Y[Bj]=null,Y[d48]=null,Y[fR]=null,of3(Y),K[PX6]=null,K[z87]=null,K[cI][K[GR]++]=null,K.emit("disconnect",K[Y87],[K],new XX6("upgrade"));try{_.onUpgrade(w,z,Y)}catch($){p3.destroy(Y,$)}K[cs]()}onHeadersComplete(A,q,K){let{client:Y,socket:z,headers:w,statusText:_}=this;if(z.destroyed)return-1;let $=Y[cI][Y[GR]];if(!$)return-1;if(nK(!this.upgrade),nK(this.statusCode<200),A===100)return p3.destroy(z,new Gz1("bad response",p3.getSocketInfo(z))),-1;if(q&&!$.upgrade)return p3.destroy(z,new Gz1("bad upgrade",p3.getSocketInfo(z))),-1;if(nK(this.timeoutType===WX6),this.statusCode=A,this.shouldKeepAlive=K||$.method==="HEAD"&&!z[KN]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let H=$.bodyTimeout!=null?$.bodyTimeout:Y[cf3];this.setTimeout(H,Zz1)}else if(this.timeout){if(this.timeout.refresh)this.timeout.refresh()}if($.method==="CONNECT")return nK(Y[mZ]===1),this.upgrade=!0,2;if(q)return nK(Y[mZ]===1),this.upgrade=!0,2;if(nK((this.headers.length&1)===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&Y[Wz1]){let H=this.keepAlive?p3.parseKeepAliveTimeout(this.keepAlive):null;if(H!=null){let j=Math.min(H-Y[pf3],Y[Uf3]);if(j<=0)z[KN]=!0;else Y[fz1]=j}else Y[fz1]=Y[gf3]}else z[KN]=!0;let O=$.onHeaders(A,w,this.resume,_)===!1;if($.aborted)return-1;if($.method==="HEAD")return 1;if(A<200)return 1;if(z[Ix6])z[Ix6]=!1,Y[cs]();return O?Rm.ERROR.PAUSED:0}onBody(A){let{client:q,socket:K,statusCode:Y,maxResponseSize:z}=this;if(K.destroyed)return-1;let w=q[cI][q[GR]];if(nK(w),nK(this.timeoutType===Zz1),this.timeout){if(this.timeout.refresh)this.timeout.refresh()}if(nK(Y>=200),z>-1&&this.bytesRead+A.length>z)return p3.destroy(K,new Bf3),-1;if(this.bytesRead+=A.length,w.onData(A)===!1)return Rm.ERROR.PAUSED}onMessageComplete(){let{client:A,socket:q,statusCode:K,upgrade:Y,headers:z,contentLength:w,bytesRead:_,shouldKeepAlive:$}=this;if(q.destroyed&&(!K||$))return-1;if(Y)return;nK(K>=100),nK((this.headers.length&1)===0);let O=A[cI][A[GR]];if(nK(O),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,K<200)return;if(O.method!=="HEAD"&&w&&_!==parseInt(w,10))return p3.destroy(q,new hf3),-1;if(O.onComplete(z),A[cI][A[GR]++]=null,q[ls])return nK(A[mZ]===0),p3.destroy(q,new XX6("reset")),Rm.ERROR.PAUSED;else if(!$)return p3.destroy(q,new XX6("reset")),Rm.ERROR.PAUSED;else if(q[KN]&&A[mZ]===0)return p3.destroy(q,new XX6("reset")),Rm.ERROR.PAUSED;else if(A[Wz1]==null||A[Wz1]===1)setImmediate(()=>A[cs]());else A[cs]()}}function e17(A){let{socket:q,timeoutType:K,client:Y,paused:z}=A.deref();if(K===WX6){if(!q[ls]||q.writableNeedDrain||Y[mZ]>1)nK(!z,"cannot be paused while waiting for headers"),p3.destroy(q,new If3)}else if(K===Zz1){if(!z)p3.destroy(q,new xf3)}else if(K===i48)nK(Y[mZ]===0&&Y[fz1]),p3.destroy(q,new XX6("socket idle timeout"))}async function tf3(A,q){if(A[PX6]=q,!p48)p48=await l48,l48=null;q[Cx6]=!1,q[ls]=!1,q[KN]=!1,q[Ix6]=!1,q[Bj]=new w87(A,q,p48),Xz1(q,"error",function(Y){nK(Y.code!=="ERR_TLS_CERT_ALTNAME_INVALID");let z=this[Bj];if(Y.code==="ECONNRESET"&&z.statusCode&&!z.shouldKeepAlive){z.onMessageComplete();return}this[fR]=Y,this[d48][nf3](Y)}),Xz1(q,"readable",function(){let Y=this[Bj];if(Y)Y.readMore()}),Xz1(q,"end",function(){let Y=this[Bj];if(Y.statusCode&&!Y.shouldKeepAlive){Y.onMessageComplete();return}p3.destroy(this,new Gz1("other side closed",p3.getSocketInfo(this)))}),Xz1(q,"close",function(){let Y=this[d48],z=this[Bj];if(z){if(!this[fR]&&z.statusCode&&!z.shouldKeepAlive)z.onMessageComplete();this[Bj].destroy(),this[Bj]=null}let w=this[fR]||new Gz1("closed",p3.getSocketInfo(this));if(Y[PX6]=null,Y[z87]=null,Y.destroyed){nK(Y[mf3]===0);let _=Y[cI].splice(Y[GR]);for(let $=0;$<_.length;$++){let O=_[$];p3.errorRequest(Y,O,w)}}else if(Y[mZ]>0&&w.code!=="UND_ERR_INFO"){let _=Y[cI][Y[GR]];Y[cI][Y[GR]++]=null,p3.errorRequest(Y,_,w)}Y[Qf3]=Y[GR],nK(Y[mZ]===0),Y.emit("disconnect",Y[Y87],[Y],w),Y[cs]()});let K=!1;return q.on("close",()=>{K=!0}),{version:"h1",defaultPipelining:1,write(...Y){return qT3(A,...Y)},resume(){ef3(A)},destroy(Y,z){if(K)queueMicrotask(z);else q.destroy(Y).on("close",z)},get destroyed(){return q.destroyed},busy(Y){if(q[ls]||q[KN]||q[Ix6])return!0;if(Y){if(A[mZ]>0&&!Y.idempotent)return!0;if(A[mZ]>0&&(Y.upgrade||Y.method==="CONNECT"))return!0;if(A[mZ]>0&&p3.bodyLength(Y.body)!==0&&(p3.isStream(Y.body)||p3.isAsyncIterable(Y.body)||p3.isFormDataLike(Y.body)))return!0}return!1}}}function ef3(A){let q=A[PX6];if(q&&!q.destroyed){if(A[s17]===0){if(!q[Cx6]&&q.unref)q.unref(),q[Cx6]=!0}else if(q[Cx6]&&q.ref)q.ref(),q[Cx6]=!1;if(A[s17]===0){if(q[Bj].timeoutType!==i48)q[Bj].setTimeout(A[fz1],i48)}else if(A[mZ]>0&&q[Bj].statusCode<200){if(q[Bj].timeoutType!==WX6){let K=A[cI][A[GR]],Y=K.headersTimeout!=null?K.headersTimeout:A[df3];q[Bj].setTimeout(Y,WX6)}}}}function AT3(A){return A!=="GET"&&A!=="HEAD"&&A!=="OPTIONS"&&A!=="TRACE"&&A!=="CONNECT"}function qT3(A,q){let{method:K,path:Y,host:z,upgrade:w,blocking:_,reset:$}=q,{body:O,headers:H,contentLength:j}=q,J=K==="PUT"||K==="POST"||K==="PATCH"||K==="QUERY"||K==="PROPFIND"||K==="PROPPATCH";if(p3.isFormDataLike(O)){if(!U48)U48=DX6().extractBody;let[W,Z]=U48(O);if(q.contentType==null)H.push("content-type",Z);O=W.stream,j=W.length}else if(p3.isBlobLike(O)&&q.contentType==null&&O.type)H.push("content-type",O.type);if(O&&typeof O.read==="function")O.read(0);let M=p3.bodyLength(O);if(j=M??j,j===null)j=q.contentLength;if(j===0&&!J)j=null;if(AT3(K)&&j>0&&q.contentLength!==null&&q.contentLength!==j){if(A[c48])return p3.errorRequest(A,q,new $36),!1;process.emitWarning(new $36)}let D=A[PX6],X=(W)=>{if(q.aborted||q.completed)return;p3.errorRequest(A,q,W||new K87),p3.destroy(O),p3.destroy(D,new XX6("aborted"))};try{q.onConnect(X)}catch(W){p3.errorRequest(A,q,W)}if(q.aborted)return!1;if(K==="HEAD")D[KN]=!0;if(w||K==="CONNECT")D[KN]=!0;if($!=null)D[KN]=$;if(A[t17]&&D[lf3]++>=A[t17])D[KN]=!0;if(_)D[Ix6]=!0;let P=`${K} ${Y} HTTP/1.1\r
`;if(typeof z==="string")P+=`host: ${z}\r
`;else P+=A[Ff3];if(w)P+=`connection: upgrade\r
upgrade: ${w}\r
`;else if(A[Wz1]&&!D[KN])P+=`connection: keep-alive\r
`;else P+=`connection: close\r
`;if(Array.isArray(H))for(let W=0;W<H.length;W+=2){let Z=H[W+0],G=H[W+1];if(Array.isArray(G))for(let f=0;f<G.length;f++)P+=`${Z}: ${G[f]}\r
`;else P+=`${Z}: ${G}\r
`}if(a17.sendHeaders.hasSubscribers)a17.sendHeaders.publish({request:q,headers:P,socket:D});if(!O||M===0)A87(X,null,A,q,D,j,P,J);else if(p3.isBuffer(O))A87(X,O,A,q,D,j,P,J);else if(p3.isBlobLike(O))if(typeof O.stream==="function")q87(X,O.stream(),A,q,D,j,P,J);else YT3(X,O,A,q,D,j,P,J);else if(p3.isStream(O))KT3(X,O,A,q,D,j,P,J);else if(p3.isIterable(O))q87(X,O,A,q,D,j,P,J);else nK(!1);return!0}function KT3(A,q,K,Y,z,w,_,$){nK(w!==0||K[mZ]===0,"stream body cannot be pipelined");let O=!1,H=new n48({abort:A,socket:z,request:Y,contentLength:w,client:K,expectsPayload:$,header:_}),j=function(X){if(O)return;try{if(!H.write(X)&&this.pause)this.pause()}catch(P){p3.destroy(this,P)}},J=function(){if(O)return;if(q.resume)q.resume()},M=function(){if(queueMicrotask(()=>{q.removeListener("error",D)}),!O){let X=new K87;queueMicrotask(()=>D(X))}},D=function(X){if(O)return;if(O=!0,nK(z.destroyed||z[ls]&&K[mZ]<=1),z.off("drain",J).off("error",D),q.removeListener("data",j).removeListener("end",D).removeListener("close",M),!X)try{H.end()}catch(P){X=P}if(H.destroy(X),X&&(X.code!=="UND_ERR_INFO"||X.message!=="reset"))p3.destroy(q,X);else p3.destroy(q)};if(q.on("data",j).on("end",D).on("error",D).on("close",M),q.resume)q.resume();if(z.on("drain",J).on("error",D),q.errorEmitted??q.errored)setImmediate(()=>D(q.errored));else if(q.endEmitted??q.readableEnded)setImmediate(()=>D(null));if(q.closeEmitted??q.closed)setImmediate(M)}function A87(A,q,K,Y,z,w,_,$){try{if(!q)if(w===0)z.write(`${_}content-length: 0\r
\r
`,"latin1");else nK(w===null,"no body must not have content length"),z.write(`${_}\r
`,"latin1");else if(p3.isBuffer(q)){if(nK(w===q.byteLength,"buffer body must have content length"),z.cork(),z.write(`${_}content-length: ${w}\r
\r
`,"latin1"),z.write(q),z.uncork(),Y.onBodySent(q),!$&&Y.reset!==!1)z[KN]=!0}Y.onRequestSent(),K[cs]()}catch(O){A(O)}}async function YT3(A,q,K,Y,z,w,_,$){nK(w===q.size,"blob body must have content length");try{if(w!=null&&w!==q.size)throw new $36;let O=Buffer.from(await q.arrayBuffer());if(z.cork(),z.write(`${_}content-length: ${w}\r
\r
`,"latin1"),z.write(O),z.uncork(),Y.onBodySent(O),Y.onRequestSent(),!$&&Y.reset!==!1)z[KN]=!0;K[cs]()}catch(O){A(O)}}async function q87(A,q,K,Y,z,w,_,$){nK(w!==0||K[mZ]===0,"iterator body cannot be pipelined");let O=null;function H(){if(O){let M=O;O=null,M()}}let j=()=>new Promise((M,D)=>{if(nK(O===null),z[fR])D(z[fR]);else O=M});z.on("close",H).on("drain",H);let J=new n48({abort:A,socket:z,request:Y,contentLength:w,client:K,expectsPayload:$,header:_});try{for await(let M of q){if(z[fR])throw z[fR];if(!J.write(M))await j()}J.end()}catch(M){J.destroy(M)}finally{z.off("close",H).off("drain",H)}}class n48{constructor({abort:A,socket:q,request:K,contentLength:Y,client:z,expectsPayload:w,header:_}){this.socket=q,this.request=K,this.contentLength=Y,this.client=z,this.bytesWritten=0,this.expectsPayload=w,this.header=_,this.abort=A,q[ls]=!0}write(A){let{socket:q,request:K,contentLength:Y,client:z,bytesWritten:w,expectsPayload:_,header:$}=this;if(q[fR])throw q[fR];if(q.destroyed)return!1;let O=Buffer.byteLength(A);if(!O)return!0;if(Y!==null&&w+O>Y){if(z[c48])throw new $36;process.emitWarning(new $36)}if(q.cork(),w===0){if(!_&&K.reset!==!1)q[KN]=!0;if(Y===null)q.write(`${$}transfer-encoding: chunked\r
`,"latin1");else q.write(`${$}content-length: ${Y}\r
\r
`,"latin1")}if(Y===null)q.write(`\r
${O.toString(16)}\r
`,"latin1");this.bytesWritten+=O;let H=q.write(A);if(q.uncork(),K.onBodySent(A),!H){if(q[Bj].timeout&&q[Bj].timeoutType===WX6){if(q[Bj].timeout.refresh)q[Bj].timeout.refresh()}}return H}end(){let{socket:A,contentLength:q,client:K,bytesWritten:Y,expectsPayload:z,header:w,request:_}=this;if(_.onRequestSent(),A[ls]=!1,A[fR])throw A[fR];if(A.destroyed)return;if(Y===0)if(z)A.write(`${w}content-length: 0\r
\r
`,"latin1");else A.write(`${w}\r
`,"latin1");else if(q===null)A.write(`\r
0\r
\r
`,"latin1");if(q!==null&&Y!==q)if(K[c48])throw new $36;else process.emitWarning(new $36);if(A[Bj].timeout&&A[Bj].timeoutType===WX6){if(A[Bj].timeout.refresh)A[Bj].timeout.refresh()}K[cs]()}destroy(A){let{socket:q,client:K,abort:Y}=this;if(q[ls]=!1,A)nK(K[mZ]<=1,"pipeline should only contain this request"),Y(A)}}_87.exports=tf3});var P87=C((OO2,X87)=>{var TR=g6("node:assert"),{pipeline:zT3}=g6("node:stream"),TY=x9(),{RequestContentLengthMismatchError:r48,RequestAbortedError:O87,SocketError:bx6,InformationalError:o48}=Ww(),{kUrl:Tz1,kReset:Nz1,kClient:ZX6,kRunning:vz1,kPending:wT3,kQueue:is,kPendingIdx:a48,kRunningIdx:lI,kError:nI,kSocket:nX,kStrictContentLength:_T3,kOnError:s48,kMaxConcurrentStreams:D87,kHTTP2Session:iI,kResume:ns,kSize:$T3,kHTTPContext:OT3}=cO(),qc=Symbol("open streams"),H87,j87=!1,Vz1;try{Vz1=g6("node:http2")}catch{Vz1={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:HT3,HTTP2_HEADER_METHOD:jT3,HTTP2_HEADER_PATH:JT3,HTTP2_HEADER_SCHEME:MT3,HTTP2_HEADER_CONTENT_LENGTH:DT3,HTTP2_HEADER_EXPECT:XT3,HTTP2_HEADER_STATUS:PT3}}=Vz1;function WT3(A){let q=[];for(let[K,Y]of Object.entries(A))if(Array.isArray(Y))for(let z of Y)q.push(Buffer.from(K),Buffer.from(z));else q.push(Buffer.from(K),Buffer.from(Y));return q}async function ZT3(A,q){if(A[nX]=q,!j87)j87=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"});let K=Vz1.connect(A[Tz1],{createConnection:()=>q,peerMaxConcurrentStreams:A[D87]});K[qc]=0,K[ZX6]=A,K[nX]=q,TY.addListener(K,"error",fT3),TY.addListener(K,"frameError",TT3),TY.addListener(K,"end",VT3),TY.addListener(K,"goaway",NT3),TY.addListener(K,"close",function(){let{[ZX6]:z}=this,{[nX]:w}=z,_=this[nX][nI]||this[nI]||new bx6("closed",TY.getSocketInfo(w));if(z[iI]=null,z.destroyed){TR(z[wT3]===0);let $=z[is].splice(z[lI]);for(let O=0;O<$.length;O++){let H=$[O];TY.errorRequest(z,H,_)}}}),K.unref(),A[iI]=K,q[iI]=K,TY.addListener(q,"error",function(z){TR(z.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[nI]=z,this[ZX6][s48](z)}),TY.addListener(q,"end",function(){TY.destroy(this,new bx6("other side closed",TY.getSocketInfo(this)))}),TY.addListener(q,"close",function(){let z=this[nI]||new bx6("closed",TY.getSocketInfo(this));if(A[nX]=null,this[iI]!=null)this[iI].destroy(z);A[a48]=A[lI],TR(A[vz1]===0),A.emit("disconnect",A[Tz1],[A],z),A[ns]()});let Y=!1;return q.on("close",()=>{Y=!0}),{version:"h2",defaultPipelining:1/0,write(...z){return kT3(A,...z)},resume(){GT3(A)},destroy(z,w){if(Y)queueMicrotask(w);else q.destroy(z).on("close",w)},get destroyed(){return q.destroyed},busy(){return!1}}}function GT3(A){let q=A[nX];if(q?.destroyed===!1)if(A[$T3]===0&&A[D87]===0)q.unref(),A[iI].unref();else q.ref(),A[iI].ref()}function fT3(A){TR(A.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[nX][nI]=A,this[ZX6][s48](A)}function TT3(A,q,K){if(K===0){let Y=new o48(`HTTP/2: "frameError" received - type ${A}, code ${q}`);this[nX][nI]=Y,this[ZX6][s48](Y)}}function VT3(){let A=new bx6("other side closed",TY.getSocketInfo(this[nX]));this.destroy(A),TY.destroy(this[nX],A)}function NT3(A){let q=this[nI]||new bx6(`HTTP/2: "GOAWAY" frame received with code ${A}`,TY.getSocketInfo(this)),K=this[ZX6];if(K[nX]=null,K[OT3]=null,this[iI]!=null)this[iI].destroy(q),this[iI]=null;if(TY.destroy(this[nX],q),K[lI]<K[is].length){let Y=K[is][K[lI]];K[is][K[lI]++]=null,TY.errorRequest(K,Y,q),K[a48]=K[lI]}TR(K[vz1]===0),K.emit("disconnect",K[Tz1],[K],q),K[ns]()}function vT3(A){return A!=="GET"&&A!=="HEAD"&&A!=="OPTIONS"&&A!=="TRACE"&&A!=="CONNECT"}function kT3(A,q){let K=A[iI],{method:Y,path:z,host:w,upgrade:_,expectContinue:$,signal:O,headers:H}=q,{body:j}=q;if(_)return TY.errorRequest(A,q,Error("Upgrade not supported for H2")),!1;let J={};for(let V=0;V<H.length;V+=2){let N=H[V+0],v=H[V+1];if(Array.isArray(v))for(let y=0;y<v.length;y++)if(J[N])J[N]+=`,${v[y]}`;else J[N]=v[y];else J[N]=v}let M,{hostname:D,port:X}=A[Tz1];J[HT3]=w||`${D}${X?`:${X}`:""}`,J[jT3]=Y;let P=(V)=>{if(q.aborted||q.completed)return;if(V=V||new O87,TY.errorRequest(A,q,V),M!=null)TY.destroy(M,V);TY.destroy(j,V),A[is][A[lI]++]=null,A[ns]()};try{q.onConnect(P)}catch(V){TY.errorRequest(A,q,V)}if(q.aborted)return!1;if(Y==="CONNECT"){if(K.ref(),M=K.request(J,{endStream:!1,signal:O}),M.id&&!M.pending)q.onUpgrade(null,null,M),++K[qc],A[is][A[lI]++]=null;else M.once("ready",()=>{q.onUpgrade(null,null,M),++K[qc],A[is][A[lI]++]=null});return M.once("close",()=>{if(K[qc]-=1,K[qc]===0)K.unref()}),!0}J[JT3]=z,J[MT3]="https";let W=Y==="PUT"||Y==="POST"||Y==="PATCH";if(j&&typeof j.read==="function")j.read(0);let Z=TY.bodyLength(j);if(TY.isFormDataLike(j)){H87??=DX6().extractBody;let[V,N]=H87(j);J["content-type"]=N,j=V.stream,Z=V.length}if(Z==null)Z=q.contentLength;if(Z===0||!W)Z=null;if(vT3(Y)&&Z>0&&q.contentLength!=null&&q.contentLength!==Z){if(A[_T3])return TY.errorRequest(A,q,new r48),!1;process.emitWarning(new r48)}if(Z!=null)TR(j,"no body must not have content length"),J[DT3]=`${Z}`;K.ref();let G=Y==="GET"||Y==="HEAD"||j===null;if($)J[XT3]="100-continue",M=K.request(J,{endStream:G,signal:O}),M.once("continue",f);else M=K.request(J,{endStream:G,signal:O}),f();return++K[qc],M.once("response",(V)=>{let{[PT3]:N,...v}=V;if(q.onResponseStarted(),q.aborted){let y=new O87;TY.errorRequest(A,q,y),TY.destroy(M,y);return}if(q.onHeaders(Number(N),WT3(v),M.resume.bind(M),"")===!1)M.pause();M.on("data",(y)=>{if(q.onData(y)===!1)M.pause()})}),M.once("end",()=>{if(M.state?.state==null||M.state.state<6)q.onComplete([]);if(K[qc]===0)K.unref();P(new o48("HTTP/2: stream half-closed (remote)")),A[is][A[lI]++]=null,A[a48]=A[lI],A[ns]()}),M.once("close",()=>{if(K[qc]-=1,K[qc]===0)K.unref()}),M.once("error",function(V){P(V)}),M.once("frameError",(V,N)=>{P(new o48(`HTTP/2: "frameError" received - type ${V}, code ${N}`))}),!0;function f(){if(!j||Z===0)J87(P,M,null,A,q,A[nX],Z,W);else if(TY.isBuffer(j))J87(P,M,j,A,q,A[nX],Z,W);else if(TY.isBlobLike(j))if(typeof j.stream==="function")M87(P,M,j.stream(),A,q,A[nX],Z,W);else LT3(P,M,j,A,q,A[nX],Z,W);else if(TY.isStream(j))ET3(P,A[nX],W,M,j,A,q,Z);else if(TY.isIterable(j))M87(P,M,j,A,q,A[nX],Z,W);else TR(!1)}}function J87(A,q,K,Y,z,w,_,$){try{if(K!=null&&TY.isBuffer(K))TR(_===K.byteLength,"buffer body must have content length"),q.cork(),q.write(K),q.uncork(),q.end(),z.onBodySent(K);if(!$)w[Nz1]=!0;z.onRequestSent(),Y[ns]()}catch(O){A(O)}}function ET3(A,q,K,Y,z,w,_,$){TR($!==0||w[vz1]===0,"stream body cannot be pipelined");let O=zT3(z,Y,(j)=>{if(j)TY.destroy(O,j),A(j);else{if(TY.removeAllListeners(O),_.onRequestSent(),!K)q[Nz1]=!0;w[ns]()}});TY.addListener(O,"data",H);function H(j){_.onBodySent(j)}}async function LT3(A,q,K,Y,z,w,_,$){TR(_===K.size,"blob body must have content length");try{if(_!=null&&_!==K.size)throw new r48;let O=Buffer.from(await K.arrayBuffer());if(q.cork(),q.write(O),q.uncork(),q.end(),z.onBodySent(O),z.onRequestSent(),!$)w[Nz1]=!0;Y[ns]()}catch(O){A(O)}}async function M87(A,q,K,Y,z,w,_,$){TR(_!==0||Y[vz1]===0,"iterator body cannot be pipelined");let O=null;function H(){if(O){let J=O;O=null,J()}}let j=()=>new Promise((J,M)=>{if(TR(O===null),w[nI])M(w[nI]);else O=J});q.on("close",H).on("drain",H);try{for await(let J of K){if(w[nI])throw w[nI];let M=q.write(J);if(z.onBodySent(J),!M)await j()}if(q.end(),z.onRequestSent(),!$)w[Nz1]=!0;Y[ns]()}catch(J){A(J)}finally{q.off("close",H).off("drain",H)}}X87.exports=ZT3});var kz1=C((HO2,f87)=>{var hm=x9(),{kBodyUsed:xx6}=cO(),e48=g6("node:assert"),{InvalidArgumentError:yT3}=Ww(),RT3=g6("node:events"),ST3=[300,301,302,303,307,308],W87=Symbol("body");class t48{constructor(A){this[W87]=A,this[xx6]=!1}async*[Symbol.asyncIterator](){e48(!this[xx6],"disturbed"),this[xx6]=!0,yield*this[W87]}}class G87{constructor(A,q,K,Y){if(q!=null&&(!Number.isInteger(q)||q<0))throw new yT3("maxRedirections must be a positive number");if(hm.validateHandler(Y,K.method,K.upgrade),this.dispatch=A,this.location=null,this.abort=null,this.opts={...K,maxRedirections:0},this.maxRedirections=q,this.handler=Y,this.history=[],this.redirectionLimitReached=!1,hm.isStream(this.opts.body)){if(hm.bodyLength(this.opts.body)===0)this.opts.body.on("data",function(){e48(!1)});if(typeof this.opts.body.readableDidRead!=="boolean")this.opts.body[xx6]=!1,RT3.prototype.on.call(this.opts.body,"data",function(){this[xx6]=!0})}else if(this.opts.body&&typeof this.opts.body.pipeTo==="function")this.opts.body=new t48(this.opts.body);else if(this.opts.body&&typeof this.opts.body!=="string"&&!ArrayBuffer.isView(this.opts.body)&&hm.isIterable(this.opts.body))this.opts.body=new t48(this.opts.body)}onConnect(A){this.abort=A,this.handler.onConnect(A,{history:this.history})}onUpgrade(A,q,K){this.handler.onUpgrade(A,q,K)}onError(A){this.handler.onError(A)}onHeaders(A,q,K,Y){if(this.location=this.history.length>=this.maxRedirections||hm.isDisturbed(this.opts.body)?null:CT3(A,q),this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections){if(this.request)this.request.abort(Error("max redirects"));this.redirectionLimitReached=!0,this.abort(Error("max redirects"));return}if(this.opts.origin)this.history.push(new URL(this.opts.path,this.opts.origin));if(!this.location)return this.handler.onHeaders(A,q,K,Y);let{origin:z,pathname:w,search:_}=hm.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),$=_?`${w}${_}`:w;if(this.opts.headers=hT3(this.opts.headers,A===303,this.opts.origin!==z),this.opts.path=$,this.opts.origin=z,this.opts.maxRedirections=0,this.opts.query=null,A===303&&this.opts.method!=="HEAD")this.opts.method="GET",this.opts.body=null}onData(A){if(this.location);else return this.handler.onData(A)}onComplete(A){if(this.location)this.location=null,this.abort=null,this.dispatch(this.opts,this);else this.handler.onComplete(A)}onBodySent(A){if(this.handler.onBodySent)this.handler.onBodySent(A)}}function CT3(A,q){if(ST3.indexOf(A)===-1)return null;for(let K=0;K<q.length;K+=2)if(q[K].length===8&&hm.headerNameToString(q[K])==="location")return q[K+1]}function Z87(A,q,K){if(A.length===4)return hm.headerNameToString(A)==="host";if(q&&hm.headerNameToString(A).startsWith("content-"))return!0;if(K&&(A.length===13||A.length===6||A.length===19)){let Y=hm.headerNameToString(A);return Y==="authorization"||Y==="cookie"||Y==="proxy-authorization"}return!1}function hT3(A,q,K){let Y=[];if(Array.isArray(A)){for(let z=0;z<A.length;z+=2)if(!Z87(A[z],q,K))Y.push(A[z],A[z+1])}else if(A&&typeof A==="object"){for(let z of Object.keys(A))if(!Z87(z,q,K))Y.push(z,A[z])}else e48(A==null,"headers must be an object or an array");return Y}f87.exports=G87});var Ez1=C((jO2,T87)=>{var IT3=kz1();function bT3({maxRedirections:A}){return(q)=>{return function(Y,z){let{maxRedirections:w=A}=Y;if(!w)return q(Y,z);let _=new IT3(q,w,Y,z);return Y={...Y,maxRedirections:0},q(Y,_)}}}T87.exports=bT3});var Ux6=C((JO2,h87)=>{var Kc=g6("node:assert"),L87=g6("node:net"),xT3=g6("node:http"),O36=x9(),{channels:GX6}=AX6(),uT3=M67(),BT3=zX6(),{InvalidArgumentError:TJ,InformationalError:mT3,ClientDestroyedError:gT3}=Ww(),FT3=Nx6(),{kUrl:Im,kServerName:rs,kClient:QT3,kBusy:Aq8,kConnect:UT3,kResuming:H36,kRunning:Fx6,kPending:Qx6,kSize:gx6,kQueue:rI,kConnected:pT3,kConnecting:fX6,kNeedDrain:as,kKeepAliveDefaultTimeout:V87,kHostHeader:dT3,kPendingIdx:oI,kRunningIdx:Yc,kError:cT3,kPipelining:Lz1,kKeepAliveTimeoutValue:lT3,kMaxHeadersSize:iT3,kKeepAliveMaxTimeout:nT3,kKeepAliveTimeoutThreshold:rT3,kHeadersTimeout:oT3,kBodyTimeout:aT3,kStrictContentLength:sT3,kConnector:ux6,kMaxRedirections:tT3,kMaxRequests:qq8,kCounter:eT3,kClose:AV3,kDestroy:qV3,kDispatch:KV3,kInterceptors:N87,kLocalAddress:Bx6,kMaxResponseSize:YV3,kOnError:zV3,kHTTPContext:VJ,kMaxConcurrentStreams:wV3,kResume:mx6}=cO(),_V3=$87(),$V3=P87(),v87=!1,os=Symbol("kClosedResolve"),k87=()=>{};function y87(A){return A[Lz1]??A[VJ]?.defaultPipelining??1}class R87 extends BT3{constructor(A,{interceptors:q,maxHeaderSize:K,headersTimeout:Y,socketTimeout:z,requestTimeout:w,connectTimeout:_,bodyTimeout:$,idleTimeout:O,keepAlive:H,keepAliveTimeout:j,maxKeepAliveTimeout:J,keepAliveMaxTimeout:M,keepAliveTimeoutThreshold:D,socketPath:X,pipelining:P,tls:W,strictContentLength:Z,maxCachedSessions:G,maxRedirections:f,connect:V,maxRequestsPerClient:N,localAddress:v,maxResponseSize:y,autoSelectFamily:R,autoSelectFamilyAttemptTimeout:h,maxConcurrentStreams:B,allowH2:x}={}){super();if(H!==void 0)throw new TJ("unsupported keepAlive, use pipelining=0 instead");if(z!==void 0)throw new TJ("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(w!==void 0)throw new TJ("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(O!==void 0)throw new TJ("unsupported idleTimeout, use keepAliveTimeout instead");if(J!==void 0)throw new TJ("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(K!=null&&!Number.isFinite(K))throw new TJ("invalid maxHeaderSize");if(X!=null&&typeof X!=="string")throw new TJ("invalid socketPath");if(_!=null&&(!Number.isFinite(_)||_<0))throw new TJ("invalid connectTimeout");if(j!=null&&(!Number.isFinite(j)||j<=0))throw new TJ("invalid keepAliveTimeout");if(M!=null&&(!Number.isFinite(M)||M<=0))throw new TJ("invalid keepAliveMaxTimeout");if(D!=null&&!Number.isFinite(D))throw new TJ("invalid keepAliveTimeoutThreshold");if(Y!=null&&(!Number.isInteger(Y)||Y<0))throw new TJ("headersTimeout must be a positive integer or zero");if($!=null&&(!Number.isInteger($)||$<0))throw new TJ("bodyTimeout must be a positive integer or zero");if(V!=null&&typeof V!=="function"&&typeof V!=="object")throw new TJ("connect must be a function or an object");if(f!=null&&(!Number.isInteger(f)||f<0))throw new TJ("maxRedirections must be a positive number");if(N!=null&&(!Number.isInteger(N)||N<0))throw new TJ("maxRequestsPerClient must be a positive number");if(v!=null&&(typeof v!=="string"||L87.isIP(v)===0))throw new TJ("localAddress must be valid string IP address");if(y!=null&&(!Number.isInteger(y)||y<-1))throw new TJ("maxResponseSize must be a positive number");if(h!=null&&(!Number.isInteger(h)||h<-1))throw new TJ("autoSelectFamilyAttemptTimeout must be a positive number");if(x!=null&&typeof x!=="boolean")throw new TJ("allowH2 must be a valid boolean value");if(B!=null&&(typeof B!=="number"||B<1))throw new TJ("maxConcurrentStreams must be a positive integer, greater than 0");if(typeof V!=="function")V=FT3({...W,maxCachedSessions:G,allowH2:x,socketPath:X,timeout:_,...R?{autoSelectFamily:R,autoSelectFamilyAttemptTimeout:h}:void 0,...V});if(q?.Client&&Array.isArray(q.Client)){if(this[N87]=q.Client,!v87)v87=!0,process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.",{code:"UNDICI-CLIENT-INTERCEPTOR-DEPRECATED"})}else this[N87]=[OV3({maxRedirections:f})];this[Im]=O36.parseOrigin(A),this[ux6]=V,this[Lz1]=P!=null?P:1,this[iT3]=K||xT3.maxHeaderSize,this[V87]=j==null?4000:j,this[nT3]=M==null?600000:M,this[rT3]=D==null?2000:D,this[lT3]=this[V87],this[rs]=null,this[Bx6]=v!=null?v:null,this[H36]=0,this[as]=0,this[dT3]=`host: ${this[Im].hostname}${this[Im].port?`:${this[Im].port}`:""}\r
`,this[aT3]=$!=null?$:300000,this[oT3]=Y!=null?Y:300000,this[sT3]=Z==null?!0:Z,this[tT3]=f,this[qq8]=N,this[os]=null,this[YV3]=y>-1?y:-1,this[wV3]=B!=null?B:100,this[VJ]=null,this[rI]=[],this[Yc]=0,this[oI]=0,this[mx6]=(F)=>Kq8(this,F),this[zV3]=(F)=>S87(this,F)}get pipelining(){return this[Lz1]}set pipelining(A){this[Lz1]=A,this[mx6](!0)}get[Qx6](){return this[rI].length-this[oI]}get[Fx6](){return this[oI]-this[Yc]}get[gx6](){return this[rI].length-this[Yc]}get[pT3](){return!!this[VJ]&&!this[fX6]&&!this[VJ].destroyed}get[Aq8](){return Boolean(this[VJ]?.busy(null)||this[gx6]>=(y87(this)||1)||this[Qx6]>0)}[UT3](A){C87(this),this.once("connect",A)}[KV3](A,q){let K=A.origin||this[Im].origin,Y=new uT3(K,A,q);if(this[rI].push(Y),this[H36]);else if(O36.bodyLength(Y.body)==null&&O36.isIterable(Y.body))this[H36]=1,queueMicrotask(()=>Kq8(this));else this[mx6](!0);if(this[H36]&&this[as]!==2&&this[Aq8])this[as]=2;return this[as]<2}async[AV3](){return new Promise((A)=>{if(this[gx6])this[os]=A;else A(null)})}async[qV3](A){return new Promise((q)=>{let K=this[rI].splice(this[oI]);for(let z=0;z<K.length;z++){let w=K[z];O36.errorRequest(this,w,A)}let Y=()=>{if(this[os])this[os](),this[os]=null;q(null)};if(this[VJ])this[VJ].destroy(A,Y),this[VJ]=null;else queueMicrotask(Y);this[mx6]()})}}var OV3=Ez1();function S87(A,q){if(A[Fx6]===0&&q.code!=="UND_ERR_INFO"&&q.code!=="UND_ERR_SOCKET"){Kc(A[oI]===A[Yc]);let K=A[rI].splice(A[Yc]);for(let Y=0;Y<K.length;Y++){let z=K[Y];O36.errorRequest(A,z,q)}Kc(A[gx6]===0)}}async function C87(A){Kc(!A[fX6]),Kc(!A[VJ]);let{host:q,hostname:K,protocol:Y,port:z}=A[Im];if(K[0]==="["){let w=K.indexOf("]");Kc(w!==-1);let _=K.substring(1,w);Kc(L87.isIP(_)),K=_}if(A[fX6]=!0,GX6.beforeConnect.hasSubscribers)GX6.beforeConnect.publish({connectParams:{host:q,hostname:K,protocol:Y,port:z,version:A[VJ]?.version,servername:A[rs],localAddress:A[Bx6]},connector:A[ux6]});try{let w=await new Promise((_,$)=>{A[ux6]({host:q,hostname:K,protocol:Y,port:z,servername:A[rs],localAddress:A[Bx6]},(O,H)=>{if(O)$(O);else _(H)})});if(A.destroyed){O36.destroy(w.on("error",k87),new gT3);return}Kc(w);try{A[VJ]=w.alpnProtocol==="h2"?await $V3(A,w):await _V3(A,w)}catch(_){throw w.destroy().on("error",k87),_}if(A[fX6]=!1,w[eT3]=0,w[qq8]=A[qq8],w[QT3]=A,w[cT3]=null,GX6.connected.hasSubscribers)GX6.connected.publish({connectParams:{host:q,hostname:K,protocol:Y,port:z,version:A[VJ]?.version,servername:A[rs],localAddress:A[Bx6]},connector:A[ux6],socket:w});A.emit("connect",A[Im],[A])}catch(w){if(A.destroyed)return;if(A[fX6]=!1,GX6.connectError.hasSubscribers)GX6.connectError.publish({connectParams:{host:q,hostname:K,protocol:Y,port:z,version:A[VJ]?.version,servername:A[rs],localAddress:A[Bx6]},connector:A[ux6],error:w});if(w.code==="ERR_TLS_CERT_ALTNAME_INVALID"){Kc(A[Fx6]===0);while(A[Qx6]>0&&A[rI][A[oI]].servername===A[rs]){let _=A[rI][A[oI]++];O36.errorRequest(A,_,w)}}else S87(A,w);A.emit("connectionError",A[Im],[A],w)}A[mx6]()}function E87(A){A[as]=0,A.emit("drain",A[Im],[A])}function Kq8(A,q){if(A[H36]===2)return;if(A[H36]=2,HV3(A,q),A[H36]=0,A[Yc]>256)A[rI].splice(0,A[Yc]),A[oI]-=A[Yc],A[Yc]=0}function HV3(A,q){while(!0){if(A.destroyed){Kc(A[Qx6]===0);return}if(A[os]&&!A[gx6]){A[os](),A[os]=null;return}if(A[VJ])A[VJ].resume();if(A[Aq8])A[as]=2;else if(A[as]===2){if(q)A[as]=1,queueMicrotask(()=>E87(A));else E87(A);continue}if(A[Qx6]===0)return;if(A[Fx6]>=(y87(A)||1))return;let K=A[rI][A[oI]];if(A[Im].protocol==="https:"&&A[rs]!==K.servername){if(A[Fx6]>0)return;A[rs]=K.servername,A[VJ]?.destroy(new mT3("servername changed"),()=>{A[VJ]=null,Kq8(A)})}if(A[fX6])return;if(!A[VJ]){C87(A);return}if(A[VJ].destroyed)return;if(A[VJ].busy(K))return;if(!K.aborted&&A[VJ].write(K))A[oI]++;else A[rI].splice(A[oI],1)}}h87.exports=R87});var zq8=C((MO2,I87)=>{class Yq8{constructor(){this.bottom=0,this.top=0,this.list=Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(A){this.list[this.top]=A,this.top=this.top+1&2047}shift(){let A=this.list[this.bottom];if(A===void 0)return null;return this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,A}}I87.exports=class{constructor(){this.head=this.tail=new Yq8}isEmpty(){return this.head.isEmpty()}push(q){if(this.head.isFull())this.head=this.head.next=new Yq8;this.head.push(q)}shift(){let q=this.tail,K=q.shift();if(q.isEmpty()&&q.next!==null)this.tail=q.next;return K}}});var u87=C((DO2,x87)=>{var{kFree:jV3,kConnected:JV3,kPending:MV3,kQueued:DV3,kRunning:XV3,kSize:PV3}=cO(),j36=Symbol("pool");class b87{constructor(A){this[j36]=A}get connected(){return this[j36][JV3]}get free(){return this[j36][jV3]}get pending(){return this[j36][MV3]}get queued(){return this[j36][DV3]}get running(){return this[j36][XV3]}get size(){return this[j36][PV3]}}x87.exports=b87});var Hq8=C((XO2,i87)=>{var WV3=zX6(),ZV3=zq8(),{kConnected:wq8,kSize:B87,kRunning:m87,kPending:g87,kQueued:px6,kBusy:GV3,kFree:fV3,kUrl:TV3,kClose:VV3,kDestroy:NV3,kDispatch:vV3}=cO(),kV3=u87(),YN=Symbol("clients"),Qf=Symbol("needDrain"),dx6=Symbol("queue"),_q8=Symbol("closed resolve"),$q8=Symbol("onDrain"),F87=Symbol("onConnect"),Q87=Symbol("onDisconnect"),U87=Symbol("onConnectionError"),Oq8=Symbol("get dispatcher"),d87=Symbol("add client"),c87=Symbol("remove client"),p87=Symbol("stats");class l87 extends WV3{constructor(){super();this[dx6]=new ZV3,this[YN]=[],this[px6]=0;let A=this;this[$q8]=function(K,Y){let z=A[dx6],w=!1;while(!w){let _=z.shift();if(!_)break;A[px6]--,w=!this.dispatch(_.opts,_.handler)}if(this[Qf]=w,!this[Qf]&&A[Qf])A[Qf]=!1,A.emit("drain",K,[A,...Y]);if(A[_q8]&&z.isEmpty())Promise.all(A[YN].map((_)=>_.close())).then(A[_q8])},this[F87]=(q,K)=>{A.emit("connect",q,[A,...K])},this[Q87]=(q,K,Y)=>{A.emit("disconnect",q,[A,...K],Y)},this[U87]=(q,K,Y)=>{A.emit("connectionError",q,[A,...K],Y)},this[p87]=new kV3(this)}get[GV3](){return this[Qf]}get[wq8](){return this[YN].filter((A)=>A[wq8]).length}get[fV3](){return this[YN].filter((A)=>A[wq8]&&!A[Qf]).length}get[g87](){let A=this[px6];for(let{[g87]:q}of this[YN])A+=q;return A}get[m87](){let A=0;for(let{[m87]:q}of this[YN])A+=q;return A}get[B87](){let A=this[px6];for(let{[B87]:q}of this[YN])A+=q;return A}get stats(){return this[p87]}async[VV3](){if(this[dx6].isEmpty())await Promise.all(this[YN].map((A)=>A.close()));else await new Promise((A)=>{this[_q8]=A})}async[NV3](A){while(!0){let q=this[dx6].shift();if(!q)break;q.handler.onError(A)}await Promise.all(this[YN].map((q)=>q.destroy(A)))}[vV3](A,q){let K=this[Oq8]();if(!K)this[Qf]=!0,this[dx6].push({opts:A,handler:q}),this[px6]++;else if(!K.dispatch(A,q))K[Qf]=!0,this[Qf]=!this[Oq8]();return!this[Qf]}[d87](A){if(A.on("drain",this[$q8]).on("connect",this[F87]).on("disconnect",this[Q87]).on("connectionError",this[U87]),this[YN].push(A),this[Qf])queueMicrotask(()=>{if(this[Qf])this[$q8](A[TV3],[this,A])});return this}[c87](A){A.close(()=>{let q=this[YN].indexOf(A);if(q!==-1)this[YN].splice(q,1)}),this[Qf]=this[YN].some((q)=>!q[Qf]&&q.closed!==!0&&q.destroyed!==!0)}}i87.exports={PoolBase:l87,kClients:YN,kNeedDrain:Qf,kAddClient:d87,kRemoveClient:c87,kGetDispatcher:Oq8}});var TX6=C((PO2,t87)=>{var{PoolBase:EV3,kClients:n87,kNeedDrain:LV3,kAddClient:yV3,kGetDispatcher:RV3}=Hq8(),SV3=Ux6(),{InvalidArgumentError:jq8}=Ww(),r87=x9(),{kUrl:o87,kInterceptors:CV3}=cO(),hV3=Nx6(),Jq8=Symbol("options"),Mq8=Symbol("connections"),a87=Symbol("factory");function IV3(A,q){return new SV3(A,q)}class s87 extends EV3{constructor(A,{connections:q,factory:K=IV3,connect:Y,connectTimeout:z,tls:w,maxCachedSessions:_,socketPath:$,autoSelectFamily:O,autoSelectFamilyAttemptTimeout:H,allowH2:j,...J}={}){super();if(q!=null&&(!Number.isFinite(q)||q<0))throw new jq8("invalid connections");if(typeof K!=="function")throw new jq8("factory must be a function.");if(Y!=null&&typeof Y!=="function"&&typeof Y!=="object")throw new jq8("connect must be a function or an object");if(typeof Y!=="function")Y=hV3({...w,maxCachedSessions:_,allowH2:j,socketPath:$,timeout:z,...O?{autoSelectFamily:O,autoSelectFamilyAttemptTimeout:H}:void 0,...Y});this[CV3]=J.interceptors?.Pool&&Array.isArray(J.interceptors.Pool)?J.interceptors.Pool:[],this[Mq8]=q||null,this[o87]=r87.parseOrigin(A),this[Jq8]={...r87.deepClone(J),connect:Y,allowH2:j},this[Jq8].interceptors=J.interceptors?{...J.interceptors}:void 0,this[a87]=K}[RV3](){for(let A of this[n87])if(!A[LV3])return A;if(!this[Mq8]||this[n87].length<this[Mq8]){let A=this[a87](this[o87],this[Jq8]);return this[yV3](A),A}}}t87.exports=s87});var zA7=C((WO2,YA7)=>{var{BalancedPoolMissingUpstreamError:bV3,InvalidArgumentError:xV3}=Ww(),{PoolBase:uV3,kClients:gZ,kNeedDrain:cx6,kAddClient:BV3,kRemoveClient:mV3,kGetDispatcher:gV3}=Hq8(),FV3=TX6(),{kUrl:Dq8,kInterceptors:QV3}=cO(),{parseOrigin:e87}=x9(),AA7=Symbol("factory"),yz1=Symbol("options"),qA7=Symbol("kGreatestCommonDivisor"),J36=Symbol("kCurrentWeight"),M36=Symbol("kIndex"),VR=Symbol("kWeight"),Rz1=Symbol("kMaxWeightPerServer"),Sz1=Symbol("kErrorPenalty");function UV3(A,q){if(A===0)return q;while(q!==0){let K=q;q=A%q,A=K}return A}function pV3(A,q){return new FV3(A,q)}class KA7 extends uV3{constructor(A=[],{factory:q=pV3,...K}={}){super();if(this[yz1]=K,this[M36]=-1,this[J36]=0,this[Rz1]=this[yz1].maxWeightPerServer||100,this[Sz1]=this[yz1].errorPenalty||15,!Array.isArray(A))A=[A];if(typeof q!=="function")throw new xV3("factory must be a function.");this[QV3]=K.interceptors?.BalancedPool&&Array.isArray(K.interceptors.BalancedPool)?K.interceptors.BalancedPool:[],this[AA7]=q;for(let Y of A)this.addUpstream(Y);this._updateBalancedPoolStats()}addUpstream(A){let q=e87(A).origin;if(this[gZ].find((Y)=>Y[Dq8].origin===q&&Y.closed!==!0&&Y.destroyed!==!0))return this;let K=this[AA7](q,Object.assign({},this[yz1]));this[BV3](K),K.on("connect",()=>{K[VR]=Math.min(this[Rz1],K[VR]+this[Sz1])}),K.on("connectionError",()=>{K[VR]=Math.max(1,K[VR]-this[Sz1]),this._updateBalancedPoolStats()}),K.on("disconnect",(...Y)=>{let z=Y[2];if(z&&z.code==="UND_ERR_SOCKET")K[VR]=Math.max(1,K[VR]-this[Sz1]),this._updateBalancedPoolStats()});for(let Y of this[gZ])Y[VR]=this[Rz1];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let A=0;for(let q=0;q<this[gZ].length;q++)A=UV3(this[gZ][q][VR],A);this[qA7]=A}removeUpstream(A){let q=e87(A).origin,K=this[gZ].find((Y)=>Y[Dq8].origin===q&&Y.closed!==!0&&Y.destroyed!==!0);if(K)this[mV3](K);return this}get upstreams(){return this[gZ].filter((A)=>A.closed!==!0&&A.destroyed!==!0).map((A)=>A[Dq8].origin)}[gV3](){if(this[gZ].length===0)throw new bV3;if(!this[gZ].find((z)=>!z[cx6]&&z.closed!==!0&&z.destroyed!==!0))return;if(this[gZ].map((z)=>z[cx6]).reduce((z,w)=>z&&w,!0))return;let K=0,Y=this[gZ].findIndex((z)=>!z[cx6]);while(K++<this[gZ].length){this[M36]=(this[M36]+1)%this[gZ].length;let z=this[gZ][this[M36]];if(z[VR]>this[gZ][Y][VR]&&!z[cx6])Y=this[M36];if(this[M36]===0){if(this[J36]=this[J36]-this[qA7],this[J36]<=0)this[J36]=this[Rz1]}if(z[VR]>=this[J36]&&!z[cx6])return z}return this[J36]=this[gZ][Y][VR],this[M36]=Y,this[gZ][Y]}}YA7.exports=KA7});var VX6=C((ZO2,MA7)=>{var{InvalidArgumentError:Cz1}=Ww(),{kClients:ss,kRunning:wA7,kClose:dV3,kDestroy:cV3,kDispatch:lV3,kInterceptors:iV3}=cO(),nV3=zX6(),rV3=TX6(),oV3=Ux6(),aV3=x9(),sV3=Ez1(),_A7=Symbol("onConnect"),$A7=Symbol("onDisconnect"),OA7=Symbol("onConnectionError"),tV3=Symbol("maxRedirections"),HA7=Symbol("onDrain"),jA7=Symbol("factory"),Xq8=Symbol("options");function eV3(A,q){return q&&q.connections===1?new oV3(A,q):new rV3(A,q)}class JA7 extends nV3{constructor({factory:A=eV3,maxRedirections:q=0,connect:K,...Y}={}){super();if(typeof A!=="function")throw new Cz1("factory must be a function.");if(K!=null&&typeof K!=="function"&&typeof K!=="object")throw new Cz1("connect must be a function or an object");if(!Number.isInteger(q)||q<0)throw new Cz1("maxRedirections must be a positive number");if(K&&typeof K!=="function")K={...K};this[iV3]=Y.interceptors?.Agent&&Array.isArray(Y.interceptors.Agent)?Y.interceptors.Agent:[sV3({maxRedirections:q})],this[Xq8]={...aV3.deepClone(Y),connect:K},this[Xq8].interceptors=Y.interceptors?{...Y.interceptors}:void 0,this[tV3]=q,this[jA7]=A,this[ss]=new Map,this[HA7]=(z,w)=>{this.emit("drain",z,[this,...w])},this[_A7]=(z,w)=>{this.emit("connect",z,[this,...w])},this[$A7]=(z,w,_)=>{this.emit("disconnect",z,[this,...w],_)},this[OA7]=(z,w,_)=>{this.emit("connectionError",z,[this,...w],_)}}get[wA7](){let A=0;for(let q of this[ss].values())A+=q[wA7];return A}[lV3](A,q){let K;if(A.origin&&(typeof A.origin==="string"||A.origin instanceof URL))K=String(A.origin);else throw new Cz1("opts.origin must be a non-empty string or URL.");let Y=this[ss].get(K);if(!Y)Y=this[jA7](A.origin,this[Xq8]).on("drain",this[HA7]).on("connect",this[_A7]).on("disconnect",this[$A7]).on("connectionError",this[OA7]),this[ss].set(K,Y);return Y.dispatch(A,q)}async[dV3](){let A=[];for(let q of this[ss].values())A.push(q.close());this[ss].clear(),await Promise.all(A)}async[cV3](A){let q=[];for(let K of this[ss].values())q.push(K.destroy(A));this[ss].clear(),await Promise.all(q)}}MA7.exports=JA7});var Wq8=C((GO2,ZA7)=>{var{kProxy:AN3,kClose:qN3,kDestroy:KN3,kInterceptors:YN3}=cO(),{URL:lx6}=g6("node:url"),zN3=VX6(),wN3=TX6(),_N3=zX6(),{InvalidArgumentError:bz1,RequestAbortedError:$N3,SecureProxyConnectionError:ON3}=Ww(),DA7=Nx6(),hz1=Symbol("proxy agent"),Iz1=Symbol("proxy client"),ix6=Symbol("proxy headers"),Pq8=Symbol("request tls settings"),XA7=Symbol("proxy tls settings"),PA7=Symbol("connect endpoint function");function HN3(A){return A==="https:"?443:80}function jN3(A,q){return new wN3(A,q)}var JN3=()=>{};class WA7 extends _N3{constructor(A){super();if(!A||typeof A==="object"&&!(A instanceof lx6)&&!A.uri)throw new bz1("Proxy uri is mandatory");let{clientFactory:q=jN3}=A;if(typeof q!=="function")throw new bz1("Proxy opts.clientFactory must be a function.");let K=this.#A(A),{href:Y,origin:z,port:w,protocol:_,username:$,password:O,hostname:H}=K;if(this[AN3]={uri:Y,protocol:_},this[YN3]=A.interceptors?.ProxyAgent&&Array.isArray(A.interceptors.ProxyAgent)?A.interceptors.ProxyAgent:[],this[Pq8]=A.requestTls,this[XA7]=A.proxyTls,this[ix6]=A.headers||{},A.auth&&A.token)throw new bz1("opts.auth cannot be used in combination with opts.token");else if(A.auth)this[ix6]["proxy-authorization"]=`Basic ${A.auth}`;else if(A.token)this[ix6]["proxy-authorization"]=A.token;else if($&&O)this[ix6]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent($)}:${decodeURIComponent(O)}`).toString("base64")}`;let j=DA7({...A.proxyTls});this[PA7]=DA7({...A.requestTls}),this[Iz1]=q(K,{connect:j}),this[hz1]=new zN3({...A,connect:async(J,M)=>{let D=J.host;if(!J.port)D+=`:${HN3(J.protocol)}`;try{let{socket:X,statusCode:P}=await this[Iz1].connect({origin:z,port:w,path:D,signal:J.signal,headers:{...this[ix6],host:J.host},servername:this[XA7]?.servername||H});if(P!==200)X.on("error",JN3).destroy(),M(new $N3(`Proxy response (${P}) !== 200 when HTTP Tunneling`));if(J.protocol!=="https:"){M(null,X);return}let W;if(this[Pq8])W=this[Pq8].servername;else W=J.servername;this[PA7]({...J,servername:W,httpSocket:X},M)}catch(X){if(X.code==="ERR_TLS_CERT_ALTNAME_INVALID")M(new ON3(X));else M(X)}}})}dispatch(A,q){let K=MN3(A.headers);if(DN3(K),K&&!("host"in K)&&!("Host"in K)){let{host:Y}=new lx6(A.origin);K.host=Y}return this[hz1].dispatch({...A,headers:K},q)}#A(A){if(typeof A==="string")return new lx6(A);else if(A instanceof lx6)return A;else return new lx6(A.uri)}async[qN3](){await this[hz1].close(),await this[Iz1].close()}async[KN3](){await this[hz1].destroy(),await this[Iz1].destroy()}}function MN3(A){if(Array.isArray(A)){let q={};for(let K=0;K<A.length;K+=2)q[A[K]]=A[K+1];return q}return A}function DN3(A){if(A&&Object.keys(A).find((K)=>K.toLowerCase()==="proxy-authorization"))throw new bz1("Proxy-Authorization should be sent in ProxyAgent constructor")}ZA7.exports=WA7});var kA7=C((fO2,vA7)=>{var XN3=zX6(),{kClose:PN3,kDestroy:WN3,kClosed:GA7,kDestroyed:fA7,kDispatch:ZN3,kNoProxyAgent:nx6,kHttpProxyAgent:ts,kHttpsProxyAgent:D36}=cO(),TA7=Wq8(),GN3=VX6(),fN3={"http:":80,"https:":443},VA7=!1;class NA7 extends XN3{#A=null;#q=null;#K=null;constructor(A={}){super();if(this.#K=A,!VA7)VA7=!0,process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.",{code:"UNDICI-EHPA"});let{httpProxy:q,httpsProxy:K,noProxy:Y,...z}=A;this[nx6]=new GN3(z);let w=q??process.env.http_proxy??process.env.HTTP_PROXY;if(w)this[ts]=new TA7({...z,uri:w});else this[ts]=this[nx6];let _=K??process.env.https_proxy??process.env.HTTPS_PROXY;if(_)this[D36]=new TA7({...z,uri:_});else this[D36]=this[ts];this.#_()}[ZN3](A,q){let K=new URL(A.origin);return this.#z(K).dispatch(A,q)}async[PN3](){if(await this[nx6].close(),!this[ts][GA7])await this[ts].close();if(!this[D36][GA7])await this[D36].close()}async[WN3](A){if(await this[nx6].destroy(A),!this[ts][fA7])await this[ts].destroy(A);if(!this[D36][fA7])await this[D36].destroy(A)}#z(A){let{protocol:q,host:K,port:Y}=A;if(K=K.replace(/:\d*$/,"").toLowerCase(),Y=Number.parseInt(Y,10)||fN3[q]||0,!this.#Y(K,Y))return this[nx6];if(q==="https:")return this[D36];return this[ts]}#Y(A,q){if(this.#w)this.#_();if(this.#q.length===0)return!0;if(this.#A==="*")return!1;for(let K=0;K<this.#q.length;K++){let Y=this.#q[K];if(Y.port&&Y.port!==q)continue;if(!/^[.*]/.test(Y.hostname)){if(A===Y.hostname)return!1}else if(A.endsWith(Y.hostname.replace(/^\*/,"")))return!1}return!0}#_(){let A=this.#K.noProxy??this.#O,q=A.split(/[,\s]/),K=[];for(let Y=0;Y<q.length;Y++){let z=q[Y];if(!z)continue;let w=z.match(/^(.+):(\d+)$/);K.push({hostname:(w?w[1]:z).toLowerCase(),port:w?Number.parseInt(w[2],10):0})}this.#A=A,this.#q=K}get#w(){if(this.#K.noProxy!==void 0)return!1;return this.#A!==this.#O}get#O(){return process.env.no_proxy??process.env.NO_PROXY??""}}vA7.exports=NA7});var xz1=C((TO2,RA7)=>{var NX6=g6("node:assert"),{kRetryHandlerDefaultRetry:EA7}=cO(),{RequestRetryError:rx6}=Ww(),{isDisturbed:LA7,parseHeaders:TN3,parseRangeHeader:yA7,wrapRequestBody:VN3}=x9();function NN3(A){let q=Date.now();return new Date(A).getTime()-q}class Zq8{constructor(A,q){let{retryOptions:K,...Y}=A,{retry:z,maxRetries:w,maxTimeout:_,minTimeout:$,timeoutFactor:O,methods:H,errorCodes:j,retryAfter:J,statusCodes:M}=K??{};this.dispatch=q.dispatch,this.handler=q.handler,this.opts={...Y,body:VN3(A.body)},this.abort=null,this.aborted=!1,this.retryOpts={retry:z??Zq8[EA7],retryAfter:J??!0,maxTimeout:_??30000,minTimeout:$??500,timeoutFactor:O??2,maxRetries:w??5,methods:H??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:M??[500,502,503,504,429],errorCodes:j??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect((D)=>{if(this.aborted=!0,this.abort)this.abort(D);else this.reason=D})}onRequestSent(){if(this.handler.onRequestSent)this.handler.onRequestSent()}onUpgrade(A,q,K){if(this.handler.onUpgrade)this.handler.onUpgrade(A,q,K)}onConnect(A){if(this.aborted)A(this.reason);else this.abort=A}onBodySent(A){if(this.handler.onBodySent)return this.handler.onBodySent(A)}static[EA7](A,{state:q,opts:K},Y){let{statusCode:z,code:w,headers:_}=A,{method:$,retryOptions:O}=K,{maxRetries:H,minTimeout:j,maxTimeout:J,timeoutFactor:M,statusCodes:D,errorCodes:X,methods:P}=O,{counter:W}=q;if(w&&w!=="UND_ERR_REQ_RETRY"&&!X.includes(w)){Y(A);return}if(Array.isArray(P)&&!P.includes($)){Y(A);return}if(z!=null&&Array.isArray(D)&&!D.includes(z)){Y(A);return}if(W>H){Y(A);return}let Z=_?.["retry-after"];if(Z)Z=Number(Z),Z=Number.isNaN(Z)?NN3(Z):Z*1000;let G=Z>0?Math.min(Z,J):Math.min(j*M**(W-1),J);setTimeout(()=>Y(null),G)}onHeaders(A,q,K,Y){let z=TN3(q);if(this.retryCount+=1,A>=300)if(this.retryOpts.statusCodes.includes(A)===!1)return this.handler.onHeaders(A,q,K,Y);else return this.abort(new rx6("Request failed",A,{headers:z,data:{count:this.retryCount}})),!1;if(this.resume!=null){if(this.resume=null,A!==206&&(this.start>0||A!==200))return this.abort(new rx6("server does not support the range header and the payload was partially consumed",A,{headers:z,data:{count:this.retryCount}})),!1;let _=yA7(z["content-range"]);if(!_)return this.abort(new rx6("Content-Range mismatch",A,{headers:z,data:{count:this.retryCount}})),!1;if(this.etag!=null&&this.etag!==z.etag)return this.abort(new rx6("ETag mismatch",A,{headers:z,data:{count:this.retryCount}})),!1;let{start:$,size:O,end:H=O-1}=_;return NX6(this.start===$,"content-range mismatch"),NX6(this.end==null||this.end===H,"content-range mismatch"),this.resume=K,!0}if(this.end==null){if(A===206){let _=yA7(z["content-range"]);if(_==null)return this.handler.onHeaders(A,q,K,Y);let{start:$,size:O,end:H=O-1}=_;NX6($!=null&&Number.isFinite($),"content-range mismatch"),NX6(H!=null&&Number.isFinite(H),"invalid content-length"),this.start=$,this.end=H}if(this.end==null){let _=z["content-length"];this.end=_!=null?Number(_)-1:null}if(NX6(Number.isFinite(this.start)),NX6(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=K,this.etag=z.etag!=null?z.etag:null,this.etag!=null&&this.etag.startsWith("W/"))this.etag=null;return this.handler.onHeaders(A,q,K,Y)}let w=new rx6("Request failed",A,{headers:z,data:{count:this.retryCount}});return this.abort(w),!1}onData(A){return this.start+=A.length,this.handler.onData(A)}onComplete(A){return this.retryCount=0,this.handler.onComplete(A)}onError(A){if(this.aborted||LA7(this.opts.body))return this.handler.onError(A);if(this.retryCount-this.retryCountCheckpoint>0)this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint);else this.retryCount+=1;this.retryOpts.retry(A,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},q.bind(this));function q(K){if(K!=null||this.aborted||LA7(this.opts.body))return this.handler.onError(K);if(this.start!==0){let Y={range:`bytes=${this.start}-${this.end??""}`};if(this.etag!=null)Y["if-match"]=this.etag;this.opts={...this.opts,headers:{...this.opts.headers,...Y}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(Y){this.handler.onError(Y)}}}}RA7.exports=Zq8});var hA7=C((VO2,CA7)=>{var vN3=Tx6(),kN3=xz1();class SA7 extends vN3{#A=null;#q=null;constructor(A,q={}){super(q);this.#A=A,this.#q=q}dispatch(A,q){let K=new kN3({...A,retryOptions:this.#q},{dispatch:this.#A.dispatch.bind(this.#A),handler:q});return this.#A.dispatch(A,K)}close(){return this.#A.close()}destroy(){return this.#A.destroy()}}CA7.exports=SA7});var Nq8=C((NO2,UA7)=>{var BA7=g6("node:assert"),{Readable:EN3}=g6("node:stream"),{RequestAbortedError:mA7,NotSupportedError:LN3,InvalidArgumentError:yN3,AbortError:Gq8}=Ww(),gA7=x9(),{ReadableStreamFrom:RN3}=x9(),HE=Symbol("kConsume"),ox6=Symbol("kReading"),es=Symbol("kBody"),IA7=Symbol("kAbort"),FA7=Symbol("kContentType"),bA7=Symbol("kContentLength"),SN3=()=>{};class QA7 extends EN3{constructor({resume:A,abort:q,contentType:K="",contentLength:Y,highWaterMark:z=65536}){super({autoDestroy:!0,read:A,highWaterMark:z});this._readableState.dataEmitted=!1,this[IA7]=q,this[HE]=null,this[es]=null,this[FA7]=K,this[bA7]=Y,this[ox6]=!1}destroy(A){if(!A&&!this._readableState.endEmitted)A=new mA7;if(A)this[IA7]();return super.destroy(A)}_destroy(A,q){if(!this[ox6])setImmediate(()=>{q(A)});else q(A)}on(A,...q){if(A==="data"||A==="readable")this[ox6]=!0;return super.on(A,...q)}addListener(A,...q){return this.on(A,...q)}off(A,...q){let K=super.off(A,...q);if(A==="data"||A==="readable")this[ox6]=this.listenerCount("data")>0||this.listenerCount("readable")>0;return K}removeListener(A,...q){return this.off(A,...q)}push(A){if(this[HE]&&A!==null)return Tq8(this[HE],A),this[ox6]?super.push(A):!0;return super.push(A)}async text(){return ax6(this,"text")}async json(){return ax6(this,"json")}async blob(){return ax6(this,"blob")}async bytes(){return ax6(this,"bytes")}async arrayBuffer(){return ax6(this,"arrayBuffer")}async formData(){throw new LN3}get bodyUsed(){return gA7.isDisturbed(this)}get body(){if(!this[es]){if(this[es]=RN3(this),this[HE])this[es].getReader(),BA7(this[es].locked)}return this[es]}async dump(A){let q=Number.isFinite(A?.limit)?A.limit:131072,K=A?.signal;if(K!=null&&(typeof K!=="object"||!("aborted"in K)))throw new yN3("signal must be an AbortSignal");if(K?.throwIfAborted(),this._readableState.closeEmitted)return null;return await new Promise((Y,z)=>{if(this[bA7]>q)this.destroy(new Gq8);let w=()=>{this.destroy(K.reason??new Gq8)};K?.addEventListener("abort",w),this.on("close",function(){if(K?.removeEventListener("abort",w),K?.aborted)z(K.reason??new Gq8);else Y(null)}).on("error",SN3).on("data",function(_){if(q-=_.length,q<=0)this.destroy()}).resume()})}}function CN3(A){return A[es]&&A[es].locked===!0||A[HE]}function hN3(A){return gA7.isDisturbed(A)||CN3(A)}async function ax6(A,q){return BA7(!A[HE]),new Promise((K,Y)=>{if(hN3(A)){let z=A._readableState;if(z.destroyed&&z.closeEmitted===!1)A.on("error",(w)=>{Y(w)}).on("close",()=>{Y(TypeError("unusable"))});else Y(z.errored??TypeError("unusable"))}else queueMicrotask(()=>{A[HE]={type:q,stream:A,resolve:K,reject:Y,length:0,body:[]},A.on("error",function(z){Vq8(this[HE],z)}).on("close",function(){if(this[HE].body!==null)Vq8(this[HE],new mA7)}),IN3(A[HE])})})}function IN3(A){if(A.body===null)return;let{_readableState:q}=A.stream;if(q.bufferIndex){let K=q.bufferIndex,Y=q.buffer.length;for(let z=K;z<Y;z++)Tq8(A,q.buffer[z])}else for(let K of q.buffer)Tq8(A,K);if(q.endEmitted)uA7(this[HE]);else A.stream.on("end",function(){uA7(this[HE])});A.stream.resume();while(A.stream.read()!=null);}function fq8(A,q){if(A.length===0||q===0)return"";let K=A.length===1?A[0]:Buffer.concat(A,q),Y=K.length,z=Y>2&&K[0]===239&&K[1]===187&&K[2]===191?3:0;return K.utf8Slice(z,Y)}function xA7(A,q){if(A.length===0||q===0)return new Uint8Array(0);if(A.length===1)return new Uint8Array(A[0]);let K=new Uint8Array(Buffer.allocUnsafeSlow(q).buffer),Y=0;for(let z=0;z<A.length;++z){let w=A[z];K.set(w,Y),Y+=w.length}return K}function uA7(A){let{type:q,body:K,resolve:Y,stream:z,length:w}=A;try{if(q==="text")Y(fq8(K,w));else if(q==="json")Y(JSON.parse(fq8(K,w)));else if(q==="arrayBuffer")Y(xA7(K,w).buffer);else if(q==="blob")Y(new Blob(K,{type:z[FA7]}));else if(q==="bytes")Y(xA7(K,w));Vq8(A)}catch(_){z.destroy(_)}}function Tq8(A,q){A.length+=q.length,A.body.push(q)}function Vq8(A,q){if(A.body===null)return;if(q)A.reject(q);else A.resolve();A.type=null,A.stream=null,A.resolve=null,A.reject=null,A.length=0,A.body=null}UA7.exports={Readable:QA7,chunksDecode:fq8}});var vq8=C((vO2,iA7)=>{var bN3=g6("node:assert"),{ResponseStatusCodeError:pA7}=Ww(),{chunksDecode:dA7}=Nq8();async function xN3({callback:A,body:q,contentType:K,statusCode:Y,statusMessage:z,headers:w}){bN3(q);let _=[],$=0;try{for await(let J of q)if(_.push(J),$+=J.length,$>131072){_=[],$=0;break}}catch{_=[],$=0}let O=`Response status code ${Y}${z?`: ${z}`:""}`;if(Y===204||!K||!$){queueMicrotask(()=>A(new pA7(O,Y,w)));return}let H=Error.stackTraceLimit;Error.stackTraceLimit=0;let j;try{if(cA7(K))j=JSON.parse(dA7(_,$));else if(lA7(K))j=dA7(_,$)}catch{}finally{Error.stackTraceLimit=H}queueMicrotask(()=>A(new pA7(O,Y,w,j)))}var cA7=(A)=>{return A.length>15&&A[11]==="/"&&A[0]==="a"&&A[1]==="p"&&A[2]==="p"&&A[3]==="l"&&A[4]==="i"&&A[5]==="c"&&A[6]==="a"&&A[7]==="t"&&A[8]==="i"&&A[9]==="o"&&A[10]==="n"&&A[12]==="j"&&A[13]==="s"&&A[14]==="o"&&A[15]==="n"},lA7=(A)=>{return A.length>4&&A[4]==="/"&&A[0]==="t"&&A[1]==="e"&&A[2]==="x"&&A[3]==="t"};iA7.exports={getResolveErrorBodyCallback:xN3,isContentTypeApplicationJson:cA7,isContentTypeText:lA7}});var oA7=C((kO2,Eq8)=>{var uN3=g6("node:assert"),{Readable:BN3}=Nq8(),{InvalidArgumentError:vX6,RequestAbortedError:nA7}=Ww(),jE=x9(),{getResolveErrorBodyCallback:mN3}=vq8(),{AsyncResource:gN3}=g6("node:async_hooks");class kq8 extends gN3{constructor(A,q){if(!A||typeof A!=="object")throw new vX6("invalid opts");let{signal:K,method:Y,opaque:z,body:w,onInfo:_,responseHeaders:$,throwOnError:O,highWaterMark:H}=A;try{if(typeof q!=="function")throw new vX6("invalid callback");if(H&&(typeof H!=="number"||H<0))throw new vX6("invalid highWaterMark");if(K&&typeof K.on!=="function"&&typeof K.addEventListener!=="function")throw new vX6("signal must be an EventEmitter or EventTarget");if(Y==="CONNECT")throw new vX6("invalid method");if(_&&typeof _!=="function")throw new vX6("invalid onInfo callback");super("UNDICI_REQUEST")}catch(j){if(jE.isStream(w))jE.destroy(w.on("error",jE.nop),j);throw j}if(this.method=Y,this.responseHeaders=$||null,this.opaque=z||null,this.callback=q,this.res=null,this.abort=null,this.body=w,this.trailers={},this.context=null,this.onInfo=_||null,this.throwOnError=O,this.highWaterMark=H,this.signal=K,this.reason=null,this.removeAbortListener=null,jE.isStream(w))w.on("error",(j)=>{this.onError(j)});if(this.signal)if(this.signal.aborted)this.reason=this.signal.reason??new nA7;else this.removeAbortListener=jE.addAbortListener(this.signal,()=>{if(this.reason=this.signal.reason??new nA7,this.res)jE.destroy(this.res.on("error",jE.nop),this.reason);else if(this.abort)this.abort(this.reason);if(this.removeAbortListener)this.res?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null})}onConnect(A,q){if(this.reason){A(this.reason);return}uN3(this.callback),this.abort=A,this.context=q}onHeaders(A,q,K,Y){let{callback:z,opaque:w,abort:_,context:$,responseHeaders:O,highWaterMark:H}=this,j=O==="raw"?jE.parseRawHeaders(q):jE.parseHeaders(q);if(A<200){if(this.onInfo)this.onInfo({statusCode:A,headers:j});return}let J=O==="raw"?jE.parseHeaders(q):j,M=J["content-type"],D=J["content-length"],X=new BN3({resume:K,abort:_,contentType:M,contentLength:this.method!=="HEAD"&&D?Number(D):null,highWaterMark:H});if(this.removeAbortListener)X.on("close",this.removeAbortListener);if(this.callback=null,this.res=X,z!==null)if(this.throwOnError&&A>=400)this.runInAsyncScope(mN3,null,{callback:z,body:X,contentType:M,statusCode:A,statusMessage:Y,headers:j});else this.runInAsyncScope(z,null,null,{statusCode:A,headers:j,trailers:this.trailers,opaque:w,body:X,context:$})}onData(A){return this.res.push(A)}onComplete(A){jE.parseHeaders(A,this.trailers),this.res.push(null)}onError(A){let{res:q,callback:K,body:Y,opaque:z}=this;if(K)this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(K,null,A,{opaque:z})});if(q)this.res=null,queueMicrotask(()=>{jE.destroy(q,A)});if(Y)this.body=null,jE.destroy(Y,A);if(this.removeAbortListener)q?.off("close",this.removeAbortListener),this.removeAbortListener(),this.removeAbortListener=null}}function rA7(A,q){if(q===void 0)return new Promise((K,Y)=>{rA7.call(this,A,(z,w)=>{return z?Y(z):K(w)})});try{this.dispatch(A,new kq8(A,q))}catch(K){if(typeof q!=="function")throw K;let Y=A?.opaque;queueMicrotask(()=>q(K,{opaque:Y}))}}Eq8.exports=rA7;Eq8.exports.RequestHandler=kq8});var sx6=C((EO2,tA7)=>{var{addAbortListener:FN3}=x9(),{RequestAbortedError:QN3}=Ww(),kX6=Symbol("kListener"),bm=Symbol("kSignal");function aA7(A){if(A.abort)A.abort(A[bm]?.reason);else A.reason=A[bm]?.reason??new QN3;sA7(A)}function UN3(A,q){if(A.reason=null,A[bm]=null,A[kX6]=null,!q)return;if(q.aborted){aA7(A);return}A[bm]=q,A[kX6]=()=>{aA7(A)},FN3(A[bm],A[kX6])}function sA7(A){if(!A[bm])return;if("removeEventListener"in A[bm])A[bm].removeEventListener("abort",A[kX6]);else A[bm].removeListener("abort",A[kX6]);A[bm]=null,A[kX6]=null}tA7.exports={addSignal:UN3,removeSignal:sA7}});var Y77=C((LO2,K77)=>{var pN3=g6("node:assert"),{finished:dN3,PassThrough:cN3}=g6("node:stream"),{InvalidArgumentError:EX6,InvalidReturnValueError:lN3}=Ww(),aI=x9(),{getResolveErrorBodyCallback:iN3}=vq8(),{AsyncResource:nN3}=g6("node:async_hooks"),{addSignal:rN3,removeSignal:eA7}=sx6();class A77 extends nN3{constructor(A,q,K){if(!A||typeof A!=="object")throw new EX6("invalid opts");let{signal:Y,method:z,opaque:w,body:_,onInfo:$,responseHeaders:O,throwOnError:H}=A;try{if(typeof K!=="function")throw new EX6("invalid callback");if(typeof q!=="function")throw new EX6("invalid factory");if(Y&&typeof Y.on!=="function"&&typeof Y.addEventListener!=="function")throw new EX6("signal must be an EventEmitter or EventTarget");if(z==="CONNECT")throw new EX6("invalid method");if($&&typeof $!=="function")throw new EX6("invalid onInfo callback");super("UNDICI_STREAM")}catch(j){if(aI.isStream(_))aI.destroy(_.on("error",aI.nop),j);throw j}if(this.responseHeaders=O||null,this.opaque=w||null,this.factory=q,this.callback=K,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=_,this.onInfo=$||null,this.throwOnError=H||!1,aI.isStream(_))_.on("error",(j)=>{this.onError(j)});rN3(this,Y)}onConnect(A,q){if(this.reason){A(this.reason);return}pN3(this.callback),this.abort=A,this.context=q}onHeaders(A,q,K,Y){let{factory:z,opaque:w,context:_,callback:$,responseHeaders:O}=this,H=O==="raw"?aI.parseRawHeaders(q):aI.parseHeaders(q);if(A<200){if(this.onInfo)this.onInfo({statusCode:A,headers:H});return}this.factory=null;let j;if(this.throwOnError&&A>=400){let D=(O==="raw"?aI.parseHeaders(q):H)["content-type"];j=new cN3,this.callback=null,this.runInAsyncScope(iN3,null,{callback:$,body:j,contentType:D,statusCode:A,statusMessage:Y,headers:H})}else{if(z===null)return;if(j=this.runInAsyncScope(z,null,{statusCode:A,headers:H,opaque:w,context:_}),!j||typeof j.write!=="function"||typeof j.end!=="function"||typeof j.on!=="function")throw new lN3("expected Writable");dN3(j,{readable:!1},(M)=>{let{callback:D,res:X,opaque:P,trailers:W,abort:Z}=this;if(this.res=null,M||!X.readable)aI.destroy(X,M);if(this.callback=null,this.runInAsyncScope(D,null,M||null,{opaque:P,trailers:W}),M)Z()})}return j.on("drain",K),this.res=j,(j.writableNeedDrain!==void 0?j.writableNeedDrain:j._writableState?.needDrain)!==!0}onData(A){let{res:q}=this;return q?q.write(A):!0}onComplete(A){let{res:q}=this;if(eA7(this),!q)return;this.trailers=aI.parseHeaders(A),q.end()}onError(A){let{res:q,callback:K,opaque:Y,body:z}=this;if(eA7(this),this.factory=null,q)this.res=null,aI.destroy(q,A);else if(K)this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(K,null,A,{opaque:Y})});if(z)this.body=null,aI.destroy(z,A)}}function q77(A,q,K){if(K===void 0)return new Promise((Y,z)=>{q77.call(this,A,q,(w,_)=>{return w?z(w):Y(_)})});try{this.dispatch(A,new A77(A,q,K))}catch(Y){if(typeof K!=="function")throw Y;let z=A?.opaque;queueMicrotask(()=>K(Y,{opaque:z}))}}K77.exports=q77});var j77=C((yO2,H77)=>{var{Readable:w77,Duplex:oN3,PassThrough:aN3}=g6("node:stream"),{InvalidArgumentError:tx6,InvalidReturnValueError:sN3,RequestAbortedError:Lq8}=Ww(),NR=x9(),{AsyncResource:tN3}=g6("node:async_hooks"),{addSignal:eN3,removeSignal:Av3}=sx6(),z77=g6("node:assert"),LX6=Symbol("resume");class _77 extends w77{constructor(){super({autoDestroy:!0});this[LX6]=null}_read(){let{[LX6]:A}=this;if(A)this[LX6]=null,A()}_destroy(A,q){this._read(),q(A)}}class $77 extends w77{constructor(A){super({autoDestroy:!0});this[LX6]=A}_read(){this[LX6]()}_destroy(A,q){if(!A&&!this._readableState.endEmitted)A=new Lq8;q(A)}}class O77 extends tN3{constructor(A,q){if(!A||typeof A!=="object")throw new tx6("invalid opts");if(typeof q!=="function")throw new tx6("invalid handler");let{signal:K,method:Y,opaque:z,onInfo:w,responseHeaders:_}=A;if(K&&typeof K.on!=="function"&&typeof K.addEventListener!=="function")throw new tx6("signal must be an EventEmitter or EventTarget");if(Y==="CONNECT")throw new tx6("invalid method");if(w&&typeof w!=="function")throw new tx6("invalid onInfo callback");super("UNDICI_PIPELINE");this.opaque=z||null,this.responseHeaders=_||null,this.handler=q,this.abort=null,this.context=null,this.onInfo=w||null,this.req=new _77().on("error",NR.nop),this.ret=new oN3({readableObjectMode:A.objectMode,autoDestroy:!0,read:()=>{let{body:$}=this;if($?.resume)$.resume()},write:($,O,H)=>{let{req:j}=this;if(j.push($,O)||j._readableState.destroyed)H();else j[LX6]=H},destroy:($,O)=>{let{body:H,req:j,res:J,ret:M,abort:D}=this;if(!$&&!M._readableState.endEmitted)$=new Lq8;if(D&&$)D();NR.destroy(H,$),NR.destroy(j,$),NR.destroy(J,$),Av3(this),O($)}}).on("prefinish",()=>{let{req:$}=this;$.push(null)}),this.res=null,eN3(this,K)}onConnect(A,q){let{ret:K,res:Y}=this;if(this.reason){A(this.reason);return}z77(!Y,"pipeline cannot be retried"),z77(!K.destroyed),this.abort=A,this.context=q}onHeaders(A,q,K){let{opaque:Y,handler:z,context:w}=this;if(A<200){if(this.onInfo){let $=this.responseHeaders==="raw"?NR.parseRawHeaders(q):NR.parseHeaders(q);this.onInfo({statusCode:A,headers:$})}return}this.res=new $77(K);let _;try{this.handler=null;let $=this.responseHeaders==="raw"?NR.parseRawHeaders(q):NR.parseHeaders(q);_=this.runInAsyncScope(z,null,{statusCode:A,headers:$,opaque:Y,body:this.res,context:w})}catch($){throw this.res.on("error",NR.nop),$}if(!_||typeof _.on!=="function")throw new sN3("expected Readable");_.on("data",($)=>{let{ret:O,body:H}=this;if(!O.push($)&&H.pause)H.pause()}).on("error",($)=>{let{ret:O}=this;NR.destroy(O,$)}).on("end",()=>{let{ret:$}=this;$.push(null)}).on("close",()=>{let{ret:$}=this;if(!$._readableState.ended)NR.destroy($,new Lq8)}),this.body=_}onData(A){let{res:q}=this;return q.push(A)}onComplete(A){let{res:q}=this;q.push(null)}onError(A){let{ret:q}=this;this.handler=null,NR.destroy(q,A)}}function qv3(A,q){try{let K=new O77(A,q);return this.dispatch({...A,body:K.req},K),K.ret}catch(K){return new aN3().destroy(K)}}H77.exports=qv3});var Z77=C((RO2,W77)=>{var{InvalidArgumentError:yq8,SocketError:Kv3}=Ww(),{AsyncResource:Yv3}=g6("node:async_hooks"),J77=x9(),{addSignal:zv3,removeSignal:M77}=sx6(),D77=g6("node:assert");class X77 extends Yv3{constructor(A,q){if(!A||typeof A!=="object")throw new yq8("invalid opts");if(typeof q!=="function")throw new yq8("invalid callback");let{signal:K,opaque:Y,responseHeaders:z}=A;if(K&&typeof K.on!=="function"&&typeof K.addEventListener!=="function")throw new yq8("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE");this.responseHeaders=z||null,this.opaque=Y||null,this.callback=q,this.abort=null,this.context=null,zv3(this,K)}onConnect(A,q){if(this.reason){A(this.reason);return}D77(this.callback),this.abort=A,this.context=null}onHeaders(){throw new Kv3("bad upgrade",null)}onUpgrade(A,q,K){D77(A===101);let{callback:Y,opaque:z,context:w}=this;M77(this),this.callback=null;let _=this.responseHeaders==="raw"?J77.parseRawHeaders(q):J77.parseHeaders(q);this.runInAsyncScope(Y,null,null,{headers:_,socket:K,opaque:z,context:w})}onError(A){let{callback:q,opaque:K}=this;if(M77(this),q)this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(q,null,A,{opaque:K})})}}function P77(A,q){if(q===void 0)return new Promise((K,Y)=>{P77.call(this,A,(z,w)=>{return z?Y(z):K(w)})});try{let K=new X77(A,q);this.dispatch({...A,method:A.method||"GET",upgrade:A.protocol||"Websocket"},K)}catch(K){if(typeof q!=="function")throw K;let Y=A?.opaque;queueMicrotask(()=>q(K,{opaque:Y}))}}W77.exports=P77});var v77=C((SO2,N77)=>{var wv3=g6("node:assert"),{AsyncResource:_v3}=g6("node:async_hooks"),{InvalidArgumentError:Rq8,SocketError:$v3}=Ww(),G77=x9(),{addSignal:Ov3,removeSignal:f77}=sx6();class T77 extends _v3{constructor(A,q){if(!A||typeof A!=="object")throw new Rq8("invalid opts");if(typeof q!=="function")throw new Rq8("invalid callback");let{signal:K,opaque:Y,responseHeaders:z}=A;if(K&&typeof K.on!=="function"&&typeof K.addEventListener!=="function")throw new Rq8("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT");this.opaque=Y||null,this.responseHeaders=z||null,this.callback=q,this.abort=null,Ov3(this,K)}onConnect(A,q){if(this.reason){A(this.reason);return}wv3(this.callback),this.abort=A,this.context=q}onHeaders(){throw new $v3("bad connect",null)}onUpgrade(A,q,K){let{callback:Y,opaque:z,context:w}=this;f77(this),this.callback=null;let _=q;if(_!=null)_=this.responseHeaders==="raw"?G77.parseRawHeaders(q):G77.parseHeaders(q);this.runInAsyncScope(Y,null,null,{statusCode:A,headers:_,socket:K,opaque:z,context:w})}onError(A){let{callback:q,opaque:K}=this;if(f77(this),q)this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(q,null,A,{opaque:K})})}}function V77(A,q){if(q===void 0)return new Promise((K,Y)=>{V77.call(this,A,(z,w)=>{return z?Y(z):K(w)})});try{let K=new T77(A,q);this.dispatch({...A,method:"CONNECT"},K)}catch(K){if(typeof q!=="function")throw K;let Y=A?.opaque;queueMicrotask(()=>q(K,{opaque:Y}))}}N77.exports=V77});var k77=C((Hv3,yX6)=>{Hv3.request=oA7();Hv3.stream=Y77();Hv3.pipeline=j77();Hv3.upgrade=Z77();Hv3.connect=v77()});var Cq8=C((CO2,E77)=>{var{UndiciError:Pv3}=Ww();class Sq8 extends Pv3{constructor(A){super(A);Error.captureStackTrace(this,Sq8),this.name="MockNotMatchedError",this.message=A||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}}E77.exports={MockNotMatchedError:Sq8}});var RX6=C((hO2,L77)=>{L77.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var ex6=C((IO2,m77)=>{var{MockNotMatchedError:X36}=Cq8(),{kDispatches:uz1,kMockAgent:Wv3,kOriginalDispatch:Zv3,kOrigin:Gv3,kGetNetConnect:fv3}=RX6(),{buildURL:Tv3}=x9(),{STATUS_CODES:Vv3}=g6("node:http"),{types:{isPromise:Nv3}}=g6("node:util");function zc(A,q){if(typeof A==="string")return A===q;if(A instanceof RegExp)return A.test(q);if(typeof A==="function")return A(q)===!0;return!1}function R77(A){return Object.fromEntries(Object.entries(A).map(([q,K])=>{return[q.toLocaleLowerCase(),K]}))}function S77(A,q){if(Array.isArray(A)){for(let K=0;K<A.length;K+=2)if(A[K].toLocaleLowerCase()===q.toLocaleLowerCase())return A[K+1];return}else if(typeof A.get==="function")return A.get(q);else return R77(A)[q.toLocaleLowerCase()]}function bq8(A){let q=A.slice(),K=[];for(let Y=0;Y<q.length;Y+=2)K.push([q[Y],q[Y+1]]);return Object.fromEntries(K)}function C77(A,q){if(typeof A.headers==="function"){if(Array.isArray(q))q=bq8(q);return A.headers(q?R77(q):{})}if(typeof A.headers>"u")return!0;if(typeof q!=="object"||typeof A.headers!=="object")return!1;for(let[K,Y]of Object.entries(A.headers)){let z=S77(q,K);if(!zc(Y,z))return!1}return!0}function y77(A){if(typeof A!=="string")return A;let q=A.split("?");if(q.length!==2)return A;let K=new URLSearchParams(q.pop());return K.sort(),[...q,K.toString()].join("?")}function vv3(A,{path:q,method:K,body:Y,headers:z}){let w=zc(A.path,q),_=zc(A.method,K),$=typeof A.body<"u"?zc(A.body,Y):!0,O=C77(A,z);return w&&_&&$&&O}function h77(A){if(Buffer.isBuffer(A))return A;else if(A instanceof Uint8Array)return A;else if(A instanceof ArrayBuffer)return A;else if(typeof A==="object")return JSON.stringify(A);else return A.toString()}function I77(A,q){let K=q.query?Tv3(q.path,q.query):q.path,Y=typeof K==="string"?y77(K):K,z=A.filter(({consumed:w})=>!w).filter(({path:w})=>zc(y77(w),Y));if(z.length===0)throw new X36(`Mock dispatch not matched for path '${Y}'`);if(z=z.filter(({method:w})=>zc(w,q.method)),z.length===0)throw new X36(`Mock dispatch not matched for method '${q.method}' on path '${Y}'`);if(z=z.filter(({body:w})=>typeof w<"u"?zc(w,q.body):!0),z.length===0)throw new X36(`Mock dispatch not matched for body '${q.body}' on path '${Y}'`);if(z=z.filter((w)=>C77(w,q.headers)),z.length===0){let w=typeof q.headers==="object"?JSON.stringify(q.headers):q.headers;throw new X36(`Mock dispatch not matched for headers '${w}' on path '${Y}'`)}return z[0]}function kv3(A,q,K){let Y={timesInvoked:0,times:1,persist:!1,consumed:!1},z=typeof K==="function"?{callback:K}:{...K},w={...Y,...q,pending:!0,data:{error:null,...z}};return A.push(w),w}function hq8(A,q){let K=A.findIndex((Y)=>{if(!Y.consumed)return!1;return vv3(Y,q)});if(K!==-1)A.splice(K,1)}function b77(A){let{path:q,method:K,body:Y,headers:z,query:w}=A;return{path:q,method:K,body:Y,headers:z,query:w}}function Iq8(A){let q=Object.keys(A),K=[];for(let Y=0;Y<q.length;++Y){let z=q[Y],w=A[z],_=Buffer.from(`${z}`);if(Array.isArray(w))for(let $=0;$<w.length;++$)K.push(_,Buffer.from(`${w[$]}`));else K.push(_,Buffer.from(`${w}`))}return K}function x77(A){return Vv3[A]||"unknown"}async function Ev3(A){let q=[];for await(let K of A)q.push(K);return Buffer.concat(q).toString("utf8")}function u77(A,q){let K=b77(A),Y=I77(this[uz1],K);if(Y.timesInvoked++,Y.data.callback)Y.data={...Y.data,...Y.data.callback(A)};let{data:{statusCode:z,data:w,headers:_,trailers:$,error:O},delay:H,persist:j}=Y,{timesInvoked:J,times:M}=Y;if(Y.consumed=!j&&J>=M,Y.pending=J<M,O!==null)return hq8(this[uz1],K),q.onError(O),!0;if(typeof H==="number"&&H>0)setTimeout(()=>{D(this[uz1])},H);else D(this[uz1]);function D(P,W=w){let Z=Array.isArray(A.headers)?bq8(A.headers):A.headers,G=typeof W==="function"?W({...A,headers:Z}):W;if(Nv3(G)){G.then((v)=>D(P,v));return}let f=h77(G),V=Iq8(_),N=Iq8($);q.onConnect?.((v)=>q.onError(v),null),q.onHeaders?.(z,V,X,x77(z)),q.onData?.(Buffer.from(f)),q.onComplete?.(N),hq8(P,K)}function X(){}return!0}function Lv3(){let A=this[Wv3],q=this[Gv3],K=this[Zv3];return function(z,w){if(A.isMockActive)try{u77.call(this,z,w)}catch(_){if(_ instanceof X36){let $=A[fv3]();if($===!1)throw new X36(`${_.message}: subsequent request to origin ${q} was not allowed (net.connect disabled)`);if(B77($,q))K.call(this,z,w);else throw new X36(`${_.message}: subsequent request to origin ${q} was not allowed (net.connect is not enabled for this origin)`)}else throw _}else K.call(this,z,w)}}function B77(A,q){let K=new URL(q);if(A===!0)return!0;else if(Array.isArray(A)&&A.some((Y)=>zc(Y,K.host)))return!0;return!1}function yv3(A){if(A){let{agent:q,...K}=A;return K}}m77.exports={getResponseData:h77,getMockDispatch:I77,addMockDispatch:kv3,deleteMockDispatch:hq8,buildKey:b77,generateKeyValues:Iq8,matchValue:zc,getResponse:Ev3,getStatusText:x77,mockDispatch:u77,buildMockDispatch:Lv3,checkNetConnect:B77,buildMockOptions:yv3,getHeaderByName:S77,buildHeadersFromArray:bq8}});var Fq8=C((hv3,gq8)=>{var{getResponseData:Rv3,buildKey:Sv3,addMockDispatch:xq8}=ex6(),{kDispatches:Bz1,kDispatchKey:mz1,kDefaultHeaders:uq8,kDefaultTrailers:Bq8,kContentLength:mq8,kMockDispatch:gz1}=RX6(),{InvalidArgumentError:xm}=Ww(),{buildURL:Cv3}=x9();class Au6{constructor(A){this[gz1]=A}delay(A){if(typeof A!=="number"||!Number.isInteger(A)||A<=0)throw new xm("waitInMs must be a valid integer > 0");return this[gz1].delay=A,this}persist(){return this[gz1].persist=!0,this}times(A){if(typeof A!=="number"||!Number.isInteger(A)||A<=0)throw new xm("repeatTimes must be a valid integer > 0");return this[gz1].times=A,this}}class g77{constructor(A,q){if(typeof A!=="object")throw new xm("opts must be an object");if(typeof A.path>"u")throw new xm("opts.path must be defined");if(typeof A.method>"u")A.method="GET";if(typeof A.path==="string")if(A.query)A.path=Cv3(A.path,A.query);else{let K=new URL(A.path,"data://");A.path=K.pathname+K.search}if(typeof A.method==="string")A.method=A.method.toUpperCase();this[mz1]=Sv3(A),this[Bz1]=q,this[uq8]={},this[Bq8]={},this[mq8]=!1}createMockScopeDispatchData({statusCode:A,data:q,responseOptions:K}){let Y=Rv3(q),z=this[mq8]?{"content-length":Y.length}:{},w={...this[uq8],...z,...K.headers},_={...this[Bq8],...K.trailers};return{statusCode:A,data:q,headers:w,trailers:_}}validateReplyParameters(A){if(typeof A.statusCode>"u")throw new xm("statusCode must be defined");if(typeof A.responseOptions!=="object"||A.responseOptions===null)throw new xm("responseOptions must be an object")}reply(A){if(typeof A==="function"){let z=(_)=>{let $=A(_);if(typeof $!=="object"||$===null)throw new xm("reply options callback must return an object");let O={data:"",responseOptions:{},...$};return this.validateReplyParameters(O),{...this.createMockScopeDispatchData(O)}},w=xq8(this[Bz1],this[mz1],z);return new Au6(w)}let q={statusCode:A,data:arguments[1]===void 0?"":arguments[1],responseOptions:arguments[2]===void 0?{}:arguments[2]};this.validateReplyParameters(q);let K=this.createMockScopeDispatchData(q),Y=xq8(this[Bz1],this[mz1],K);return new Au6(Y)}replyWithError(A){if(typeof A>"u")throw new xm("error must be defined");let q=xq8(this[Bz1],this[mz1],{error:A});return new Au6(q)}defaultReplyHeaders(A){if(typeof A>"u")throw new xm("headers must be defined");return this[uq8]=A,this}defaultReplyTrailers(A){if(typeof A>"u")throw new xm("trailers must be defined");return this[Bq8]=A,this}replyContentLength(){return this[mq8]=!0,this}}hv3.MockInterceptor=g77;hv3.MockScope=Au6});var Uq8=C((bO2,i77)=>{var{promisify:xv3}=g6("node:util"),uv3=Ux6(),{buildMockDispatch:Bv3}=ex6(),{kDispatches:F77,kMockAgent:Q77,kClose:U77,kOriginalClose:p77,kOrigin:d77,kOriginalDispatch:mv3,kConnected:Qq8}=RX6(),{MockInterceptor:gv3}=Fq8(),c77=cO(),{InvalidArgumentError:Fv3}=Ww();class l77 extends uv3{constructor(A,q){super(A,q);if(!q||!q.agent||typeof q.agent.dispatch!=="function")throw new Fv3("Argument opts.agent must implement Agent");this[Q77]=q.agent,this[d77]=A,this[F77]=[],this[Qq8]=1,this[mv3]=this.dispatch,this[p77]=this.close.bind(this),this.dispatch=Bv3.call(this),this.close=this[U77]}get[c77.kConnected](){return this[Qq8]}intercept(A){return new gv3(A,this[F77])}async[U77](){await xv3(this[p77])(),this[Qq8]=0,this[Q77][c77.kClients].delete(this[d77])}}i77.exports=l77});var dq8=C((xO2,A47)=>{var{promisify:Qv3}=g6("node:util"),Uv3=TX6(),{buildMockDispatch:pv3}=ex6(),{kDispatches:n77,kMockAgent:r77,kClose:o77,kOriginalClose:a77,kOrigin:s77,kOriginalDispatch:dv3,kConnected:pq8}=RX6(),{MockInterceptor:cv3}=Fq8(),t77=cO(),{InvalidArgumentError:lv3}=Ww();class e77 extends Uv3{constructor(A,q){super(A,q);if(!q||!q.agent||typeof q.agent.dispatch!=="function")throw new lv3("Argument opts.agent must implement Agent");this[r77]=q.agent,this[s77]=A,this[n77]=[],this[pq8]=1,this[dv3]=this.dispatch,this[a77]=this.close.bind(this),this.dispatch=pv3.call(this),this.close=this[o77]}get[t77.kConnected](){return this[pq8]}intercept(A){return new cv3(A,this[n77])}async[o77](){await Qv3(this[a77])(),this[pq8]=0,this[r77][t77.kClients].delete(this[s77])}}A47.exports=e77});var K47=C((uO2,q47)=>{var iv3={pronoun:"it",is:"is",was:"was",this:"this"},nv3={pronoun:"they",is:"are",was:"were",this:"these"};q47.exports=class{constructor(q,K){this.singular=q,this.plural=K}pluralize(q){let K=q===1,Y=K?iv3:nv3,z=K?this.singular:this.plural;return{...Y,count:q,noun:z}}}});var z47=C((BO2,Y47)=>{var{Transform:rv3}=g6("node:stream"),{Console:ov3}=g6("node:console"),av3=process.versions.icu?"✅":"Y ",sv3=process.versions.icu?"❌":"N ";Y47.exports=class{constructor({disableColors:q}={}){this.transform=new rv3({transform(K,Y,z){z(null,K)}}),this.logger=new ov3({stdout:this.transform,inspectOptions:{colors:!q&&!0}})}format(q){let K=q.map(({method:Y,path:z,data:{statusCode:w},persist:_,times:$,timesInvoked:O,origin:H})=>({Method:Y,Origin:H,Path:z,"Status code":w,Persistent:_?av3:sv3,Invocations:O,Remaining:_?1/0:$-O}));return this.logger.table(K),this.transform.read().toString()}}});var H47=C((mO2,O47)=>{var{kClients:P36}=cO(),tv3=VX6(),{kAgent:cq8,kMockAgentSet:Fz1,kMockAgentGet:w47,kDispatches:lq8,kIsMockActive:Qz1,kNetConnect:W36,kGetNetConnect:ev3,kOptions:Uz1,kFactory:pz1}=RX6(),Ak3=Uq8(),qk3=dq8(),{matchValue:Kk3,buildMockOptions:Yk3}=ex6(),{InvalidArgumentError:_47,UndiciError:zk3}=Ww(),wk3=Tx6(),_k3=K47(),$k3=z47();class $47 extends wk3{constructor(A){super(A);if(this[W36]=!0,this[Qz1]=!0,A?.agent&&typeof A.agent.dispatch!=="function")throw new _47("Argument opts.agent must implement Agent");let q=A?.agent?A.agent:new tv3(A);this[cq8]=q,this[P36]=q[P36],this[Uz1]=Yk3(A)}get(A){let q=this[w47](A);if(!q)q=this[pz1](A),this[Fz1](A,q);return q}dispatch(A,q){return this.get(A.origin),this[cq8].dispatch(A,q)}async close(){await this[cq8].close(),this[P36].clear()}deactivate(){this[Qz1]=!1}activate(){this[Qz1]=!0}enableNetConnect(A){if(typeof A==="string"||typeof A==="function"||A instanceof RegExp)if(Array.isArray(this[W36]))this[W36].push(A);else this[W36]=[A];else if(typeof A>"u")this[W36]=!0;else throw new _47("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[W36]=!1}get isMockActive(){return this[Qz1]}[Fz1](A,q){this[P36].set(A,q)}[pz1](A){let q=Object.assign({agent:this},this[Uz1]);return this[Uz1]&&this[Uz1].connections===1?new Ak3(A,q):new qk3(A,q)}[w47](A){let q=this[P36].get(A);if(q)return q;if(typeof A!=="string"){let K=this[pz1]("http://localhost:9999");return this[Fz1](A,K),K}for(let[K,Y]of Array.from(this[P36]))if(Y&&typeof K!=="string"&&Kk3(K,A)){let z=this[pz1](A);return this[Fz1](A,z),z[lq8]=Y[lq8],z}}[ev3](){return this[W36]}pendingInterceptors(){let A=this[P36];return Array.from(A.entries()).flatMap(([q,K])=>K[lq8].map((Y)=>({...Y,origin:q}))).filter(({pending:q})=>q)}assertNoPendingInterceptors({pendingInterceptorsFormatter:A=new $k3}={}){let q=this.pendingInterceptors();if(q.length===0)return;let K=new _k3("interceptor","interceptors").pluralize(q.length);throw new zk3(`
${K.count} ${K.noun} ${K.is} pending:

${A.format(q)}
`.trim())}}O47.exports=$47});var dz1=C((gO2,D47)=>{var j47=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Ok3}=Ww(),Hk3=VX6();if(M47()===void 0)J47(new Hk3);function J47(A){if(!A||typeof A.dispatch!=="function")throw new Ok3("Argument agent must implement Agent");Object.defineProperty(globalThis,j47,{value:A,writable:!0,enumerable:!1,configurable:!1})}function M47(){return globalThis[j47]}D47.exports={setGlobalDispatcher:J47,getGlobalDispatcher:M47}});var cz1=C((FO2,X47)=>{X47.exports=class{#A;constructor(q){if(typeof q!=="object"||q===null)throw TypeError("handler must be an object");this.#A=q}onConnect(...q){return this.#A.onConnect?.(...q)}onError(...q){return this.#A.onError?.(...q)}onUpgrade(...q){return this.#A.onUpgrade?.(...q)}onResponseStarted(...q){return this.#A.onResponseStarted?.(...q)}onHeaders(...q){return this.#A.onHeaders?.(...q)}onData(...q){return this.#A.onData?.(...q)}onComplete(...q){return this.#A.onComplete?.(...q)}onBodySent(...q){return this.#A.onBodySent?.(...q)}}});var W47=C((QO2,P47)=>{var jk3=kz1();P47.exports=(A)=>{let q=A?.maxRedirections;return(K)=>{return function(z,w){let{maxRedirections:_=q,...$}=z;if(!_)return K(z,w);let O=new jk3(K,_,z,w);return K($,O)}}}});var G47=C((UO2,Z47)=>{var Jk3=xz1();Z47.exports=(A)=>{return(q)=>{return function(Y,z){return q(Y,new Jk3({...Y,retryOptions:{...A,...Y.retryOptions}},{handler:z,dispatch:q}))}}}});var V47=C((pO2,T47)=>{var Mk3=x9(),{InvalidArgumentError:Dk3,RequestAbortedError:Xk3}=Ww(),Pk3=cz1();class f47 extends Pk3{#A=1048576;#q=null;#K=!1;#z=!1;#Y=0;#_=null;#w=null;constructor({maxSize:A},q){super(q);if(A!=null&&(!Number.isFinite(A)||A<1))throw new Dk3("maxSize must be a number greater than 0");this.#A=A??this.#A,this.#w=q}onConnect(A){this.#q=A,this.#w.onConnect(this.#O.bind(this))}#O(A){this.#z=!0,this.#_=A}onHeaders(A,q,K,Y){let w=Mk3.parseHeaders(q)["content-length"];if(w!=null&&w>this.#A)throw new Xk3(`Response size (${w}) larger than maxSize (${this.#A})`);if(this.#z)return!0;return this.#w.onHeaders(A,q,K,Y)}onError(A){if(this.#K)return;A=this.#_??A,this.#w.onError(A)}onData(A){if(this.#Y=this.#Y+A.length,this.#Y>=this.#A)if(this.#K=!0,this.#z)this.#w.onError(this.#_);else this.#w.onComplete([]);return!0}onComplete(A){if(this.#K)return;if(this.#z){this.#w.onError(this.reason);return}this.#w.onComplete(A)}}function Wk3({maxSize:A}={maxSize:1048576}){return(q)=>{return function(Y,z){let{dumpMaxSize:w=A}=Y,_=new f47({maxSize:w},z);return q(Y,_)}}}T47.exports=Wk3});var L47=C((dO2,E47)=>{var{isIP:Zk3}=g6("node:net"),{lookup:Gk3}=g6("node:dns"),fk3=cz1(),{InvalidArgumentError:SX6,InformationalError:Tk3}=Ww(),N47=Math.pow(2,31)-1;class v47{#A=0;#q=0;#K=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(A){this.#A=A.maxTTL,this.#q=A.maxItems,this.dualStack=A.dualStack,this.affinity=A.affinity,this.lookup=A.lookup??this.#z,this.pick=A.pick??this.#Y}get full(){return this.#K.size===this.#q}runLookup(A,q,K){let Y=this.#K.get(A.hostname);if(Y==null&&this.full){K(null,A.origin);return}let z={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...q.dns,maxTTL:this.#A,maxItems:this.#q};if(Y==null)this.lookup(A,z,(w,_)=>{if(w||_==null||_.length===0){K(w??new Tk3("No DNS entries found"));return}this.setRecords(A,_);let $=this.#K.get(A.hostname),O=this.pick(A,$,z.affinity),H;if(typeof O.port==="number")H=`:${O.port}`;else if(A.port!=="")H=`:${A.port}`;else H="";K(null,`${A.protocol}//${O.family===6?`[${O.address}]`:O.address}${H}`)});else{let w=this.pick(A,Y,z.affinity);if(w==null){this.#K.delete(A.hostname),this.runLookup(A,q,K);return}let _;if(typeof w.port==="number")_=`:${w.port}`;else if(A.port!=="")_=`:${A.port}`;else _="";K(null,`${A.protocol}//${w.family===6?`[${w.address}]`:w.address}${_}`)}}#z(A,q,K){Gk3(A.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(Y,z)=>{if(Y)return K(Y);let w=new Map;for(let _ of z)w.set(`${_.address}:${_.family}`,_);K(null,w.values())})}#Y(A,q,K){let Y=null,{records:z,offset:w}=q,_;if(this.dualStack){if(K==null)if(w==null||w===N47)q.offset=0,K=4;else q.offset++,K=(q.offset&1)===1?6:4;if(z[K]!=null&&z[K].ips.length>0)_=z[K];else _=z[K===4?6:4]}else _=z[K];if(_==null||_.ips.length===0)return Y;if(_.offset==null||_.offset===N47)_.offset=0;else _.offset++;let $=_.offset%_.ips.length;if(Y=_.ips[$]??null,Y==null)return Y;if(Date.now()-Y.timestamp>Y.ttl)return _.ips.splice($,1),this.pick(A,q,K);return Y}setRecords(A,q){let K=Date.now(),Y={records:{4:null,6:null}};for(let z of q){if(z.timestamp=K,typeof z.ttl==="number")z.ttl=Math.min(z.ttl,this.#A);else z.ttl=this.#A;let w=Y.records[z.family]??{ips:[]};w.ips.push(z),Y.records[z.family]=w}this.#K.set(A.hostname,Y)}getHandler(A,q){return new k47(this,A,q)}}class k47 extends fk3{#A=null;#q=null;#K=null;#z=null;#Y=null;constructor(A,{origin:q,handler:K,dispatch:Y},z){super(K);this.#Y=q,this.#z=K,this.#q={...z},this.#A=A,this.#K=Y}onError(A){switch(A.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#A.dualStack){this.#A.runLookup(this.#Y,this.#q,(q,K)=>{if(q)return this.#z.onError(q);let Y={...this.#q,origin:K};this.#K(Y,this)});return}this.#z.onError(A);return}case"ENOTFOUND":this.#A.deleteRecord(this.#Y);default:this.#z.onError(A);break}}}E47.exports=(A)=>{if(A?.maxTTL!=null&&(typeof A?.maxTTL!=="number"||A?.maxTTL<0))throw new SX6("Invalid maxTTL. Must be a positive number");if(A?.maxItems!=null&&(typeof A?.maxItems!=="number"||A?.maxItems<1))throw new SX6("Invalid maxItems. Must be a positive number and greater than zero");if(A?.affinity!=null&&A?.affinity!==4&&A?.affinity!==6)throw new SX6("Invalid affinity. Must be either 4 or 6");if(A?.dualStack!=null&&typeof A?.dualStack!=="boolean")throw new SX6("Invalid dualStack. Must be a boolean");if(A?.lookup!=null&&typeof A?.lookup!=="function")throw new SX6("Invalid lookup. Must be a function");if(A?.pick!=null&&typeof A?.pick!=="function")throw new SX6("Invalid pick. Must be a function");let q=A?.dualStack??!0,K;if(q)K=A?.affinity??null;else K=A?.affinity??4;let Y={maxTTL:A?.maxTTL??1e4,lookup:A?.lookup??null,pick:A?.pick??null,dualStack:q,affinity:K,maxItems:A?.maxItems??1/0},z=new v47(Y);return(w)=>{return function($,O){let H=$.origin.constructor===URL?$.origin:new URL($.origin);if(Zk3(H.hostname)!==0)return w($,O);return z.runLookup(H,$,(j,J)=>{if(j)return O.onError(j);let M=null;M={...$,servername:H.hostname,origin:J,headers:{host:H.hostname,...$.headers}},w(M,z.getHandler({origin:H,dispatch:w,handler:O},$))}),!0}}}});var Z36=C((cO2,b47)=>{var{kConstruct:Vk3}=cO(),{kEnumerableProperty:CX6}=x9(),{iteratorMixin:Nk3,isValidHeaderName:qu6,isValidHeaderValue:R47}=OE(),{webidl:wz}=R0(),iq8=g6("node:assert"),lz1=g6("node:util"),vM=Symbol("headers map"),JE=Symbol("headers map sorted");function y47(A){return A===10||A===13||A===9||A===32}function S47(A){let q=0,K=A.length;while(K>q&&y47(A.charCodeAt(K-1)))--K;while(K>q&&y47(A.charCodeAt(q)))++q;return q===0&&K===A.length?A:A.substring(q,K)}function C47(A,q){if(Array.isArray(q))for(let K=0;K<q.length;++K){let Y=q[K];if(Y.length!==2)throw wz.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${Y.length}.`});nq8(A,Y[0],Y[1])}else if(typeof q==="object"&&q!==null){let K=Object.keys(q);for(let Y=0;Y<K.length;++Y)nq8(A,K[Y],q[K[Y]])}else throw wz.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function nq8(A,q,K){if(K=S47(K),!qu6(q))throw wz.errors.invalidArgument({prefix:"Headers.append",value:q,type:"header name"});else if(!R47(K))throw wz.errors.invalidArgument({prefix:"Headers.append",value:K,type:"header value"});if(I47(A)==="immutable")throw TypeError("immutable");return rq8(A).append(q,K,!1)}function h47(A,q){return A[0]<q[0]?-1:1}class iz1{cookies=null;constructor(A){if(A instanceof iz1)this[vM]=new Map(A[vM]),this[JE]=A[JE],this.cookies=A.cookies===null?null:[...A.cookies];else this[vM]=new Map(A),this[JE]=null}contains(A,q){return this[vM].has(q?A:A.toLowerCase())}clear(){this[vM].clear(),this[JE]=null,this.cookies=null}append(A,q,K){this[JE]=null;let Y=K?A:A.toLowerCase(),z=this[vM].get(Y);if(z){let w=Y==="cookie"?"; ":", ";this[vM].set(Y,{name:z.name,value:`${z.value}${w}${q}`})}else this[vM].set(Y,{name:A,value:q});if(Y==="set-cookie")(this.cookies??=[]).push(q)}set(A,q,K){this[JE]=null;let Y=K?A:A.toLowerCase();if(Y==="set-cookie")this.cookies=[q];this[vM].set(Y,{name:A,value:q})}delete(A,q){if(this[JE]=null,!q)A=A.toLowerCase();if(A==="set-cookie")this.cookies=null;this[vM].delete(A)}get(A,q){return this[vM].get(q?A:A.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:A,1:{value:q}}of this[vM])yield[A,q]}get entries(){let A={};if(this[vM].size!==0)for(let{name:q,value:K}of this[vM].values())A[q]=K;return A}rawValues(){return this[vM].values()}get entriesList(){let A=[];if(this[vM].size!==0)for(let{0:q,1:{name:K,value:Y}}of this[vM])if(q==="set-cookie")for(let z of this.cookies)A.push([K,z]);else A.push([K,Y]);return A}toSortedArray(){let A=this[vM].size,q=Array(A);if(A<=32){if(A===0)return q;let K=this[vM][Symbol.iterator](),Y=K.next().value;q[0]=[Y[0],Y[1].value],iq8(Y[1].value!==null);for(let z=1,w=0,_=0,$=0,O=0,H,j;z<A;++z){j=K.next().value,H=q[z]=[j[0],j[1].value],iq8(H[1]!==null),$=0,_=z;while($<_)if(O=$+(_-$>>1),q[O][0]<=H[0])$=O+1;else _=O;if(z!==O){w=z;while(w>$)q[w]=q[--w];q[$]=H}}if(!K.next().done)throw TypeError("Unreachable");return q}else{let K=0;for(let{0:Y,1:{value:z}}of this[vM])q[K++]=[Y,z],iq8(z!==null);return q.sort(h47)}}}class FZ{#A;#q;constructor(A=void 0){if(wz.util.markAsUncloneable(this),A===Vk3)return;if(this.#q=new iz1,this.#A="none",A!==void 0)A=wz.converters.HeadersInit(A,"Headers contructor","init"),C47(this,A)}append(A,q){wz.brandCheck(this,FZ),wz.argumentLengthCheck(arguments,2,"Headers.append");let K="Headers.append";return A=wz.converters.ByteString(A,K,"name"),q=wz.converters.ByteString(q,K,"value"),nq8(this,A,q)}delete(A){wz.brandCheck(this,FZ),wz.argumentLengthCheck(arguments,1,"Headers.delete");let q="Headers.delete";if(A=wz.converters.ByteString(A,q,"name"),!qu6(A))throw wz.errors.invalidArgument({prefix:"Headers.delete",value:A,type:"header name"});if(this.#A==="immutable")throw TypeError("immutable");if(!this.#q.contains(A,!1))return;this.#q.delete(A,!1)}get(A){wz.brandCheck(this,FZ),wz.argumentLengthCheck(arguments,1,"Headers.get");let q="Headers.get";if(A=wz.converters.ByteString(A,q,"name"),!qu6(A))throw wz.errors.invalidArgument({prefix:q,value:A,type:"header name"});return this.#q.get(A,!1)}has(A){wz.brandCheck(this,FZ),wz.argumentLengthCheck(arguments,1,"Headers.has");let q="Headers.has";if(A=wz.converters.ByteString(A,q,"name"),!qu6(A))throw wz.errors.invalidArgument({prefix:q,value:A,type:"header name"});return this.#q.contains(A,!1)}set(A,q){wz.brandCheck(this,FZ),wz.argumentLengthCheck(arguments,2,"Headers.set");let K="Headers.set";if(A=wz.converters.ByteString(A,K,"name"),q=wz.converters.ByteString(q,K,"value"),q=S47(q),!qu6(A))throw wz.errors.invalidArgument({prefix:K,value:A,type:"header name"});else if(!R47(q))throw wz.errors.invalidArgument({prefix:K,value:q,type:"header value"});if(this.#A==="immutable")throw TypeError("immutable");this.#q.set(A,q,!1)}getSetCookie(){wz.brandCheck(this,FZ);let A=this.#q.cookies;if(A)return[...A];return[]}get[JE](){if(this.#q[JE])return this.#q[JE];let A=[],q=this.#q.toSortedArray(),K=this.#q.cookies;if(K===null||K.length===1)return this.#q[JE]=q;for(let Y=0;Y<q.length;++Y){let{0:z,1:w}=q[Y];if(z==="set-cookie")for(let _=0;_<K.length;++_)A.push([z,K[_]]);else A.push([z,w])}return this.#q[JE]=A}[lz1.inspect.custom](A,q){return q.depth??=A,`Headers ${lz1.formatWithOptions(q,this.#q.entries)}`}static getHeadersGuard(A){return A.#A}static setHeadersGuard(A,q){A.#A=q}static getHeadersList(A){return A.#q}static setHeadersList(A,q){A.#q=q}}var{getHeadersGuard:I47,setHeadersGuard:vk3,getHeadersList:rq8,setHeadersList:kk3}=FZ;Reflect.deleteProperty(FZ,"getHeadersGuard");Reflect.deleteProperty(FZ,"setHeadersGuard");Reflect.deleteProperty(FZ,"getHeadersList");Reflect.deleteProperty(FZ,"setHeadersList");Nk3("Headers",FZ,JE,0,1);Object.defineProperties(FZ.prototype,{append:CX6,delete:CX6,get:CX6,has:CX6,set:CX6,getSetCookie:CX6,[Symbol.toStringTag]:{value:"Headers",configurable:!0},[lz1.inspect.custom]:{enumerable:!1}});wz.converters.HeadersInit=function(A,q,K){if(wz.util.Type(A)==="Object"){let Y=Reflect.get(A,Symbol.iterator);if(!lz1.types.isProxy(A)&&Y===FZ.prototype.entries)try{return rq8(A).entriesList}catch{}if(typeof Y==="function")return wz.converters["sequence<sequence<ByteString>>"](A,q,K,Y.bind(A));return wz.converters["record<ByteString, ByteString>"](A,q,K)}throw wz.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})};b47.exports={fill:C47,compareHeaderName:h47,Headers:FZ,HeadersList:iz1,getHeadersGuard:I47,setHeadersGuard:vk3,setHeadersList:kk3,getHeadersList:rq8}});var Yu6=C((lO2,d47)=>{var{Headers:F47,HeadersList:x47,fill:Ek3,getHeadersGuard:Lk3,setHeadersGuard:Q47,setHeadersList:U47}=Z36(),{extractBody:u47,cloneBody:yk3,mixinBody:Rk3,hasFinalizationRegistry:Sk3,streamRegistry:Ck3,bodyUnusable:hk3}=DX6(),oq8=x9(),B47=g6("node:util"),{kEnumerableProperty:ME}=oq8,{isValidReasonPhrase:Ik3,isCancelled:bk3,isAborted:xk3,isBlobLike:uk3,serializeJavascriptValueToJSONString:Bk3,isErrorLike:mk3,isomorphicEncode:gk3,environmentSettingsObject:Fk3}=OE(),{redirectStatusSet:Qk3,nullBodyStatus:Uk3}=vx6(),{kState:mj,kHeaders:wc}=ds(),{webidl:F5}=R0(),{FormData:pk3}=Rx6(),{URLSerializer:m47}=qN(),{kConstruct:rz1}=cO(),aq8=g6("node:assert"),{types:dk3}=g6("node:util"),ck3=new TextEncoder("utf-8");class QZ{static error(){return Ku6(oz1(),"immutable")}static json(A,q={}){if(F5.argumentLengthCheck(arguments,1,"Response.json"),q!==null)q=F5.converters.ResponseInit(q);let K=ck3.encode(Bk3(A)),Y=u47(K),z=Ku6(hX6({}),"response");return g47(z,q,{body:Y[0],type:"application/json"}),z}static redirect(A,q=302){F5.argumentLengthCheck(arguments,1,"Response.redirect"),A=F5.converters.USVString(A),q=F5.converters["unsigned short"](q);let K;try{K=new URL(A,Fk3.settingsObject.baseUrl)}catch(w){throw TypeError(`Failed to parse URL from ${A}`,{cause:w})}if(!Qk3.has(q))throw RangeError(`Invalid status code ${q}`);let Y=Ku6(hX6({}),"immutable");Y[mj].status=q;let z=gk3(m47(K));return Y[mj].headersList.append("location",z,!0),Y}constructor(A=null,q={}){if(F5.util.markAsUncloneable(this),A===rz1)return;if(A!==null)A=F5.converters.BodyInit(A);q=F5.converters.ResponseInit(q),this[mj]=hX6({}),this[wc]=new F47(rz1),Q47(this[wc],"response"),U47(this[wc],this[mj].headersList);let K=null;if(A!=null){let[Y,z]=u47(A);K={body:Y,type:z}}g47(this,q,K)}get type(){return F5.brandCheck(this,QZ),this[mj].type}get url(){F5.brandCheck(this,QZ);let A=this[mj].urlList,q=A[A.length-1]??null;if(q===null)return"";return m47(q,!0)}get redirected(){return F5.brandCheck(this,QZ),this[mj].urlList.length>1}get status(){return F5.brandCheck(this,QZ),this[mj].status}get ok(){return F5.brandCheck(this,QZ),this[mj].status>=200&&this[mj].status<=299}get statusText(){return F5.brandCheck(this,QZ),this[mj].statusText}get headers(){return F5.brandCheck(this,QZ),this[wc]}get body(){return F5.brandCheck(this,QZ),this[mj].body?this[mj].body.stream:null}get bodyUsed(){return F5.brandCheck(this,QZ),!!this[mj].body&&oq8.isDisturbed(this[mj].body.stream)}clone(){if(F5.brandCheck(this,QZ),hk3(this))throw F5.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let A=sq8(this[mj]);return Ku6(A,Lk3(this[wc]))}[B47.inspect.custom](A,q){if(q.depth===null)q.depth=2;q.colors??=!0;let K={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${B47.formatWithOptions(q,K)}`}}Rk3(QZ);Object.defineProperties(QZ.prototype,{type:ME,url:ME,status:ME,ok:ME,redirected:ME,statusText:ME,headers:ME,clone:ME,body:ME,bodyUsed:ME,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(QZ,{json:ME,redirect:ME,error:ME});function sq8(A){if(A.internalResponse)return p47(sq8(A.internalResponse),A.type);let q=hX6({...A,body:null});if(A.body!=null)q.body=yk3(q,A.body);return q}function hX6(A){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...A,headersList:A?.headersList?new x47(A?.headersList):new x47,urlList:A?.urlList?[...A.urlList]:[]}}function oz1(A){let q=mk3(A);return hX6({type:"error",status:0,error:q?A:Error(A?String(A):A),aborted:A&&A.name==="AbortError"})}function lk3(A){return A.type==="error"&&A.status===0}function nz1(A,q){return q={internalResponse:A,...q},new Proxy(A,{get(K,Y){return Y in q?q[Y]:K[Y]},set(K,Y,z){return aq8(!(Y in q)),K[Y]=z,!0}})}function p47(A,q){if(q==="basic")return nz1(A,{type:"basic",headersList:A.headersList});else if(q==="cors")return nz1(A,{type:"cors",headersList:A.headersList});else if(q==="opaque")return nz1(A,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});else if(q==="opaqueredirect")return nz1(A,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});else aq8(!1)}function ik3(A,q=null){return aq8(bk3(A)),xk3(A)?oz1(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:q})):oz1(Object.assign(new DOMException("Request was cancelled."),{cause:q}))}function g47(A,q,K){if(q.status!==null&&(q.status<200||q.status>599))throw RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in q&&q.statusText!=null){if(!Ik3(String(q.statusText)))throw TypeError("Invalid statusText")}if("status"in q&&q.status!=null)A[mj].status=q.status;if("statusText"in q&&q.statusText!=null)A[mj].statusText=q.statusText;if("headers"in q&&q.headers!=null)Ek3(A[wc],q.headers);if(K){if(Uk3.includes(A.status))throw F5.errors.exception({header:"Response constructor",message:`Invalid response status code ${A.status}`});if(A[mj].body=K.body,K.type!=null&&!A[mj].headersList.contains("content-type",!0))A[mj].headersList.append("content-type",K.type,!0)}}function Ku6(A,q){let K=new QZ(rz1);if(K[mj]=A,K[wc]=new F47(rz1),U47(K[wc],A.headersList),Q47(K[wc],q),Sk3&&A.body?.stream)Ck3.register(K,new WeakRef(A.body.stream));return K}F5.converters.ReadableStream=F5.interfaceConverter(ReadableStream);F5.converters.FormData=F5.interfaceConverter(pk3);F5.converters.URLSearchParams=F5.interfaceConverter(URLSearchParams);F5.converters.XMLHttpRequestBodyInit=function(A,q,K){if(typeof A==="string")return F5.converters.USVString(A,q,K);if(uk3(A))return F5.converters.Blob(A,q,K,{strict:!1});if(ArrayBuffer.isView(A)||dk3.isArrayBuffer(A))return F5.converters.BufferSource(A,q,K);if(oq8.isFormDataLike(A))return F5.converters.FormData(A,q,K,{strict:!1});if(A instanceof URLSearchParams)return F5.converters.URLSearchParams(A,q,K);return F5.converters.DOMString(A,q,K)};F5.converters.BodyInit=function(A,q,K){if(A instanceof ReadableStream)return F5.converters.ReadableStream(A,q,K);if(A?.[Symbol.asyncIterator])return A;return F5.converters.XMLHttpRequestBodyInit(A,q,K)};F5.converters.ResponseInit=F5.dictionaryConverter([{key:"status",converter:F5.converters["unsigned short"],defaultValue:()=>200},{key:"statusText",converter:F5.converters.ByteString,defaultValue:()=>""},{key:"headers",converter:F5.converters.HeadersInit}]);d47.exports={isNetworkError:lk3,makeNetworkError:oz1,makeResponse:hX6,makeAppropriateNetworkError:ik3,filterResponse:p47,Response:QZ,cloneResponse:sq8,fromInnerResponse:Ku6}});var o47=C((iO2,r47)=>{var{kConnected:c47,kSize:l47}=cO();class i47{constructor(A){this.value=A}deref(){return this.value[c47]===0&&this.value[l47]===0?void 0:this.value}}class n47{constructor(A){this.finalizer=A}register(A,q){if(A.on)A.on("disconnect",()=>{if(A[c47]===0&&A[l47]===0)this.finalizer(q)})}unregister(A){}}r47.exports=function(){if(process.env.NODE_V8_COVERAGE&&process.version.startsWith("v18"))return process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"),{WeakRef:i47,FinalizationRegistry:n47};return{WeakRef,FinalizationRegistry}}});var IX6=C((nO2,jq7)=>{var{extractBody:nk3,mixinBody:rk3,cloneBody:ok3,bodyUnusable:a47}=DX6(),{Headers:wq7,fill:ak3,HeadersList:ez1,setHeadersGuard:eq8,getHeadersGuard:sk3,setHeadersList:_q7,getHeadersList:s47}=Z36(),{FinalizationRegistry:tk3}=o47()(),sz1=x9(),t47=g6("node:util"),{isValidHTTPToken:ek3,sameOrigin:e47,environmentSettingsObject:az1}=OE(),{forbiddenMethodsSet:AE3,corsSafeListedMethodsSet:qE3,referrerPolicy:KE3,requestRedirect:YE3,requestMode:zE3,requestCredentials:wE3,requestCache:_E3,requestDuplex:$E3}=vx6(),{kEnumerableProperty:kM,normalizedMethodRecordsBase:OE3,normalizedMethodRecords:HE3}=sz1,{kHeaders:DE,kSignal:tz1,kState:s$,kDispatcher:tq8}=ds(),{webidl:rK}=R0(),{URLSerializer:jE3}=qN(),{kConstruct:Aw1}=cO(),JE3=g6("node:assert"),{getMaxListeners:Aq7,setMaxListeners:qq7,getEventListeners:ME3,defaultMaxListeners:Kq7}=g6("node:events"),DE3=Symbol("abortController"),$q7=new tk3(({signal:A,abort:q})=>{A.removeEventListener("abort",q)}),qw1=new WeakMap;function Yq7(A){return q;function q(){let K=A.deref();if(K!==void 0){$q7.unregister(q),this.removeEventListener("abort",q),K.abort(this.reason);let Y=qw1.get(K.signal);if(Y!==void 0){if(Y.size!==0){for(let z of Y){let w=z.deref();if(w!==void 0)w.abort(this.reason)}Y.clear()}qw1.delete(K.signal)}}}}var zq7=!1;class Z_{constructor(A,q={}){if(rK.util.markAsUncloneable(this),A===Aw1)return;let K="Request constructor";rK.argumentLengthCheck(arguments,1,K),A=rK.converters.RequestInfo(A,K,"input"),q=rK.converters.RequestInit(q,K,"init");let Y=null,z=null,w=az1.settingsObject.baseUrl,_=null;if(typeof A==="string"){this[tq8]=q.dispatcher;let W;try{W=new URL(A,w)}catch(Z){throw TypeError("Failed to parse URL from "+A,{cause:Z})}if(W.username||W.password)throw TypeError("Request cannot be constructed from a URL that includes credentials: "+A);Y=Kw1({urlList:[W]}),z="cors"}else this[tq8]=q.dispatcher||A[tq8],JE3(A instanceof Z_),Y=A[s$],_=A[tz1];let $=az1.settingsObject.origin,O="client";if(Y.window?.constructor?.name==="EnvironmentSettingsObject"&&e47(Y.window,$))O=Y.window;if(q.window!=null)throw TypeError(`'window' option '${O}' must be null`);if("window"in q)O="no-window";Y=Kw1({method:Y.method,headersList:Y.headersList,unsafeRequest:Y.unsafeRequest,client:az1.settingsObject,window:O,priority:Y.priority,origin:Y.origin,referrer:Y.referrer,referrerPolicy:Y.referrerPolicy,mode:Y.mode,credentials:Y.credentials,cache:Y.cache,redirect:Y.redirect,integrity:Y.integrity,keepalive:Y.keepalive,reloadNavigation:Y.reloadNavigation,historyNavigation:Y.historyNavigation,urlList:[...Y.urlList]});let H=Object.keys(q).length!==0;if(H){if(Y.mode==="navigate")Y.mode="same-origin";Y.reloadNavigation=!1,Y.historyNavigation=!1,Y.origin="client",Y.referrer="client",Y.referrerPolicy="",Y.url=Y.urlList[Y.urlList.length-1],Y.urlList=[Y.url]}if(q.referrer!==void 0){let W=q.referrer;if(W==="")Y.referrer="no-referrer";else{let Z;try{Z=new URL(W,w)}catch(G){throw TypeError(`Referrer "${W}" is not a valid URL.`,{cause:G})}if(Z.protocol==="about:"&&Z.hostname==="client"||$&&!e47(Z,az1.settingsObject.baseUrl))Y.referrer="client";else Y.referrer=Z}}if(q.referrerPolicy!==void 0)Y.referrerPolicy=q.referrerPolicy;let j;if(q.mode!==void 0)j=q.mode;else j=z;if(j==="navigate")throw rK.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(j!=null)Y.mode=j;if(q.credentials!==void 0)Y.credentials=q.credentials;if(q.cache!==void 0)Y.cache=q.cache;if(Y.cache==="only-if-cached"&&Y.mode!=="same-origin")throw TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(q.redirect!==void 0)Y.redirect=q.redirect;if(q.integrity!=null)Y.integrity=String(q.integrity);if(q.keepalive!==void 0)Y.keepalive=Boolean(q.keepalive);if(q.method!==void 0){let W=q.method,Z=HE3[W];if(Z!==void 0)Y.method=Z;else{if(!ek3(W))throw TypeError(`'${W}' is not a valid HTTP method.`);let G=W.toUpperCase();if(AE3.has(G))throw TypeError(`'${W}' HTTP method is unsupported.`);W=OE3[G]??W,Y.method=W}if(!zq7&&Y.method==="patch")process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),zq7=!0}if(q.signal!==void 0)_=q.signal;this[s$]=Y;let J=new AbortController;if(this[tz1]=J.signal,_!=null){if(!_||typeof _.aborted!=="boolean"||typeof _.addEventListener!=="function")throw TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(_.aborted)J.abort(_.reason);else{this[DE3]=J;let W=new WeakRef(J),Z=Yq7(W);try{if(typeof Aq7==="function"&&Aq7(_)===Kq7)qq7(1500,_);else if(ME3(_,"abort").length>=Kq7)qq7(1500,_)}catch{}sz1.addAbortListener(_,Z),$q7.register(J,{signal:_,abort:Z},Z)}}if(this[DE]=new wq7(Aw1),_q7(this[DE],Y.headersList),eq8(this[DE],"request"),j==="no-cors"){if(!qE3.has(Y.method))throw TypeError(`'${Y.method} is unsupported in no-cors mode.`);eq8(this[DE],"request-no-cors")}if(H){let W=s47(this[DE]),Z=q.headers!==void 0?q.headers:new ez1(W);if(W.clear(),Z instanceof ez1){for(let{name:G,value:f}of Z.rawValues())W.append(G,f,!1);W.cookies=Z.cookies}else ak3(this[DE],Z)}let M=A instanceof Z_?A[s$].body:null;if((q.body!=null||M!=null)&&(Y.method==="GET"||Y.method==="HEAD"))throw TypeError("Request with GET/HEAD method cannot have body.");let D=null;if(q.body!=null){let[W,Z]=nk3(q.body,Y.keepalive);if(D=W,Z&&!s47(this[DE]).contains("content-type",!0))this[DE].append("content-type",Z)}let X=D??M;if(X!=null&&X.source==null){if(D!=null&&q.duplex==null)throw TypeError("RequestInit: duplex option is required when sending a body.");if(Y.mode!=="same-origin"&&Y.mode!=="cors")throw TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');Y.useCORSPreflightFlag=!0}let P=X;if(D==null&&M!=null){if(a47(A))throw TypeError("Cannot construct a Request with a Request object that has already been used.");let W=new TransformStream;M.stream.pipeThrough(W),P={source:M.source,length:M.length,stream:W.readable}}this[s$].body=P}get method(){return rK.brandCheck(this,Z_),this[s$].method}get url(){return rK.brandCheck(this,Z_),jE3(this[s$].url)}get headers(){return rK.brandCheck(this,Z_),this[DE]}get destination(){return rK.brandCheck(this,Z_),this[s$].destination}get referrer(){if(rK.brandCheck(this,Z_),this[s$].referrer==="no-referrer")return"";if(this[s$].referrer==="client")return"about:client";return this[s$].referrer.toString()}get referrerPolicy(){return rK.brandCheck(this,Z_),this[s$].referrerPolicy}get mode(){return rK.brandCheck(this,Z_),this[s$].mode}get credentials(){return this[s$].credentials}get cache(){return rK.brandCheck(this,Z_),this[s$].cache}get redirect(){return rK.brandCheck(this,Z_),this[s$].redirect}get integrity(){return rK.brandCheck(this,Z_),this[s$].integrity}get keepalive(){return rK.brandCheck(this,Z_),this[s$].keepalive}get isReloadNavigation(){return rK.brandCheck(this,Z_),this[s$].reloadNavigation}get isHistoryNavigation(){return rK.brandCheck(this,Z_),this[s$].historyNavigation}get signal(){return rK.brandCheck(this,Z_),this[tz1]}get body(){return rK.brandCheck(this,Z_),this[s$].body?this[s$].body.stream:null}get bodyUsed(){return rK.brandCheck(this,Z_),!!this[s$].body&&sz1.isDisturbed(this[s$].body.stream)}get duplex(){return rK.brandCheck(this,Z_),"half"}clone(){if(rK.brandCheck(this,Z_),a47(this))throw TypeError("unusable");let A=Oq7(this[s$]),q=new AbortController;if(this.signal.aborted)q.abort(this.signal.reason);else{let K=qw1.get(this.signal);if(K===void 0)K=new Set,qw1.set(this.signal,K);let Y=new WeakRef(q);K.add(Y),sz1.addAbortListener(q.signal,Yq7(Y))}return Hq7(A,q.signal,sk3(this[DE]))}[t47.inspect.custom](A,q){if(q.depth===null)q.depth=2;q.colors??=!0;let K={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${t47.formatWithOptions(q,K)}`}}rk3(Z_);function Kw1(A){return{method:A.method??"GET",localURLsOnly:A.localURLsOnly??!1,unsafeRequest:A.unsafeRequest??!1,body:A.body??null,client:A.client??null,reservedClient:A.reservedClient??null,replacesClientId:A.replacesClientId??"",window:A.window??"client",keepalive:A.keepalive??!1,serviceWorkers:A.serviceWorkers??"all",initiator:A.initiator??"",destination:A.destination??"",priority:A.priority??null,origin:A.origin??"client",policyContainer:A.policyContainer??"client",referrer:A.referrer??"client",referrerPolicy:A.referrerPolicy??"",mode:A.mode??"no-cors",useCORSPreflightFlag:A.useCORSPreflightFlag??!1,credentials:A.credentials??"same-origin",useCredentials:A.useCredentials??!1,cache:A.cache??"default",redirect:A.redirect??"follow",integrity:A.integrity??"",cryptoGraphicsNonceMetadata:A.cryptoGraphicsNonceMetadata??"",parserMetadata:A.parserMetadata??"",reloadNavigation:A.reloadNavigation??!1,historyNavigation:A.historyNavigation??!1,userActivation:A.userActivation??!1,taintedOrigin:A.taintedOrigin??!1,redirectCount:A.redirectCount??0,responseTainting:A.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:A.preventNoCacheCacheControlHeaderModification??!1,done:A.done??!1,timingAllowFailed:A.timingAllowFailed??!1,urlList:A.urlList,url:A.urlList[0],headersList:A.headersList?new ez1(A.headersList):new ez1}}function Oq7(A){let q=Kw1({...A,body:null});if(A.body!=null)q.body=ok3(q,A.body);return q}function Hq7(A,q,K){let Y=new Z_(Aw1);return Y[s$]=A,Y[tz1]=q,Y[DE]=new wq7(Aw1),_q7(Y[DE],A.headersList),eq8(Y[DE],K),Y}Object.defineProperties(Z_.prototype,{method:kM,url:kM,headers:kM,redirect:kM,clone:kM,signal:kM,duplex:kM,destination:kM,body:kM,bodyUsed:kM,isHistoryNavigation:kM,isReloadNavigation:kM,keepalive:kM,integrity:kM,cache:kM,credentials:kM,attribute:kM,referrerPolicy:kM,referrer:kM,mode:kM,[Symbol.toStringTag]:{value:"Request",configurable:!0}});rK.converters.Request=rK.interfaceConverter(Z_);rK.converters.RequestInfo=function(A,q,K){if(typeof A==="string")return rK.converters.USVString(A,q,K);if(A instanceof Z_)return rK.converters.Request(A,q,K);return rK.converters.USVString(A,q,K)};rK.converters.AbortSignal=rK.interfaceConverter(AbortSignal);rK.converters.RequestInit=rK.dictionaryConverter([{key:"method",converter:rK.converters.ByteString},{key:"headers",converter:rK.converters.HeadersInit},{key:"body",converter:rK.nullableConverter(rK.converters.BodyInit)},{key:"referrer",converter:rK.converters.USVString},{key:"referrerPolicy",converter:rK.converters.DOMString,allowedValues:KE3},{key:"mode",converter:rK.converters.DOMString,allowedValues:zE3},{key:"credentials",converter:rK.converters.DOMString,allowedValues:wE3},{key:"cache",converter:rK.converters.DOMString,allowedValues:_E3},{key:"redirect",converter:rK.converters.DOMString,allowedValues:YE3},{key:"integrity",converter:rK.converters.DOMString},{key:"keepalive",converter:rK.converters.boolean},{key:"signal",converter:rK.nullableConverter((A)=>rK.converters.AbortSignal(A,"RequestInit","signal",{strict:!1}))},{key:"window",converter:rK.converters.any},{key:"duplex",converter:rK.converters.DOMString,allowedValues:$E3},{key:"dispatcher",converter:rK.converters.any}]);jq7.exports={Request:Z_,makeRequest:Kw1,fromInnerRequest:Hq7,cloneRequest:Oq7}});var wu6=C((rO2,Eq7)=>{var{makeNetworkError:P2,makeAppropriateNetworkError:Yw1,filterResponse:AK8,makeResponse:zw1,fromInnerResponse:XE3}=Yu6(),{HeadersList:Jq7}=Z36(),{Request:PE3,cloneRequest:WE3}=IX6(),At=g6("node:zlib"),{bytesMatch:ZE3,makePolicyContainer:GE3,clonePolicyContainer:fE3,requestBadPort:TE3,TAOCheck:VE3,appendRequestOriginHeader:NE3,responseLocationURL:vE3,requestCurrentURL:um,setRequestReferrerPolicyOnRedirect:kE3,tryUpgradeRequestToAPotentiallyTrustworthyURL:EE3,createOpaqueTimingInfo:wK8,appendFetchMetadata:LE3,corsCheck:yE3,crossOriginResourcePolicyCheck:RE3,determineRequestsReferrer:SE3,coarsenedSharedCurrentTime:zu6,createDeferredPromise:CE3,isBlobLike:hE3,sameOrigin:zK8,isCancelled:G36,isAborted:Mq7,isErrorLike:IE3,fullyReadBody:bE3,readableStreamClose:xE3,isomorphicEncode:ww1,urlIsLocal:uE3,urlIsHttpHttpsScheme:_K8,urlHasHttpsScheme:BE3,clampAndCoarsenConnectionTimingInfo:mE3,simpleRangeHeaderValue:gE3,buildContentRange:FE3,createInflate:QE3,extractMimeType:UE3}=OE(),{kState:Wq7,kDispatcher:pE3}=ds(),f36=g6("node:assert"),{safelyExtractBody:$K8,extractBody:Dq7}=DX6(),{redirectStatusSet:Zq7,nullBodyStatus:Gq7,safeMethodsSet:dE3,requestBodyHeader:cE3,subresourceSet:lE3}=vx6(),iE3=g6("node:events"),{Readable:nE3,pipeline:rE3,finished:oE3}=g6("node:stream"),{addAbortListener:aE3,isErrored:sE3,isReadable:_w1,bufferToLowerCasedHeaderName:Xq7}=x9(),{dataURLProcessor:tE3,serializeAMimeType:eE3,minimizeSupportedMimeType:AL3}=qN(),{getGlobalDispatcher:qL3}=dz1(),{webidl:KL3}=R0(),{STATUS_CODES:YL3}=g6("node:http"),zL3=["GET","HEAD"],wL3=typeof __UNDICI_IS_NODE__<"u"||typeof esbuildDetection<"u"?"node":"undici",qK8;class OK8 extends iE3{constructor(A){super();this.dispatcher=A,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(A){if(this.state!=="ongoing")return;this.state="terminated",this.connection?.destroy(A),this.emit("terminated",A)}abort(A){if(this.state!=="ongoing")return;if(this.state="aborted",!A)A=new DOMException("The operation was aborted.","AbortError");this.serializedAbortReason=A,this.connection?.destroy(A),this.emit("terminated",A)}}function _L3(A){fq7(A,"fetch")}function $L3(A,q=void 0){KL3.argumentLengthCheck(arguments,1,"globalThis.fetch");let K=CE3(),Y;try{Y=new PE3(A,q)}catch(j){return K.reject(j),K.promise}let z=Y[Wq7];if(Y.signal.aborted)return KK8(K,z,null,Y.signal.reason),K.promise;if(z.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope")z.serviceWorkers="none";let _=null,$=!1,O=null;return aE3(Y.signal,()=>{$=!0,f36(O!=null),O.abort(Y.signal.reason);let j=_?.deref();KK8(K,z,j,Y.signal.reason)}),O=Vq7({request:z,processResponseEndOfBody:_L3,processResponse:(j)=>{if($)return;if(j.aborted){KK8(K,z,_,O.serializedAbortReason);return}if(j.type==="error"){K.reject(TypeError("fetch failed",{cause:j.error}));return}_=new WeakRef(XE3(j,"immutable")),K.resolve(_.deref()),K=null},dispatcher:Y[pE3]}),K.promise}function fq7(A,q="other"){if(A.type==="error"&&A.aborted)return;if(!A.urlList?.length)return;let K=A.urlList[0],Y=A.timingInfo,z=A.cacheState;if(!_K8(K))return;if(Y===null)return;if(!A.timingAllowPassed)Y=wK8({startTime:Y.startTime}),z="";Y.endTime=zu6(),A.timingInfo=Y,Tq7(Y,K.href,q,globalThis,z)}var Tq7=performance.markResourceTiming;function KK8(A,q,K,Y){if(A)A.reject(Y);if(q.body!=null&&_w1(q.body?.stream))q.body.stream.cancel(Y).catch((w)=>{if(w.code==="ERR_INVALID_STATE")return;throw w});if(K==null)return;let z=K[Wq7];if(z.body!=null&&_w1(z.body?.stream))z.body.stream.cancel(Y).catch((w)=>{if(w.code==="ERR_INVALID_STATE")return;throw w})}function Vq7({request:A,processRequestBodyChunkLength:q,processRequestEndOfBody:K,processResponse:Y,processResponseEndOfBody:z,processResponseConsumeBody:w,useParallelQueue:_=!1,dispatcher:$=qL3()}){f36($);let O=null,H=!1;if(A.client!=null)O=A.client.globalObject,H=A.client.crossOriginIsolatedCapability;let j=zu6(H),J=wK8({startTime:j}),M={controller:new OK8($),request:A,timingInfo:J,processRequestBodyChunkLength:q,processRequestEndOfBody:K,processResponse:Y,processResponseConsumeBody:w,processResponseEndOfBody:z,taskDestination:O,crossOriginIsolatedCapability:H};if(f36(!A.body||A.body.stream),A.window==="client")A.window=A.client?.globalObject?.constructor?.name==="Window"?A.client:"no-window";if(A.origin==="client")A.origin=A.client.origin;if(A.policyContainer==="client")if(A.client!=null)A.policyContainer=fE3(A.client.policyContainer);else A.policyContainer=GE3();if(!A.headersList.contains("accept",!0))A.headersList.append("accept","*/*",!0);if(!A.headersList.contains("accept-language",!0))A.headersList.append("accept-language","*",!0);if(A.priority===null);if(lE3.has(A.destination));return Nq7(M).catch((D)=>{M.controller.terminate(D)}),M.controller}async function Nq7(A,q=!1){let K=A.request,Y=null;if(K.localURLsOnly&&!uE3(um(K)))Y=P2("local URLs only");if(EE3(K),TE3(K)==="blocked")Y=P2("bad port");if(K.referrerPolicy==="")K.referrerPolicy=K.policyContainer.referrerPolicy;if(K.referrer!=="no-referrer")K.referrer=SE3(K);if(Y===null)Y=await(async()=>{let w=um(K);if(zK8(w,K.url)&&K.responseTainting==="basic"||w.protocol==="data:"||(K.mode==="navigate"||K.mode==="websocket"))return K.responseTainting="basic",await Pq7(A);if(K.mode==="same-origin")return P2('request mode cannot be "same-origin"');if(K.mode==="no-cors"){if(K.redirect!=="follow")return P2('redirect mode cannot be "follow" for "no-cors" request');return K.responseTainting="opaque",await Pq7(A)}if(!_K8(um(K)))return P2("URL scheme must be a HTTP(S) scheme");return K.responseTainting="cors",await vq7(A)})();if(q)return Y;if(Y.status!==0&&!Y.internalResponse){if(K.responseTainting==="cors");if(K.responseTainting==="basic")Y=AK8(Y,"basic");else if(K.responseTainting==="cors")Y=AK8(Y,"cors");else if(K.responseTainting==="opaque")Y=AK8(Y,"opaque");else f36(!1)}let z=Y.status===0?Y:Y.internalResponse;if(z.urlList.length===0)z.urlList.push(...K.urlList);if(!K.timingAllowFailed)Y.timingAllowPassed=!0;if(Y.type==="opaque"&&z.status===206&&z.rangeRequested&&!K.headers.contains("range",!0))Y=z=P2();if(Y.status!==0&&(K.method==="HEAD"||K.method==="CONNECT"||Gq7.includes(z.status)))z.body=null,A.controller.dump=!0;if(K.integrity){let w=($)=>YK8(A,P2($));if(K.responseTainting==="opaque"||Y.body==null){w(Y.error);return}let _=($)=>{if(!ZE3($,K.integrity)){w("integrity mismatch");return}Y.body=$K8($)[0],YK8(A,Y)};await bE3(Y.body,_,w)}else YK8(A,Y)}function Pq7(A){if(G36(A)&&A.request.redirectCount===0)return Promise.resolve(Yw1(A));let{request:q}=A,{protocol:K}=um(q);switch(K){case"about:":return Promise.resolve(P2("about scheme is not supported"));case"blob:":{if(!qK8)qK8=g6("node:buffer").resolveObjectURL;let Y=um(q);if(Y.search.length!==0)return Promise.resolve(P2("NetworkError when attempting to fetch resource."));let z=qK8(Y.toString());if(q.method!=="GET"||!hE3(z))return Promise.resolve(P2("invalid method"));let w=zw1(),_=z.size,$=ww1(`${_}`),O=z.type;if(!q.headersList.contains("range",!0)){let H=Dq7(z);w.statusText="OK",w.body=H[0],w.headersList.set("content-length",$,!0),w.headersList.set("content-type",O,!0)}else{w.rangeRequested=!0;let H=q.headersList.get("range",!0),j=gE3(H,!0);if(j==="failure")return Promise.resolve(P2("failed to fetch the data URL"));let{rangeStartValue:J,rangeEndValue:M}=j;if(J===null)J=_-M,M=J+M-1;else{if(J>=_)return Promise.resolve(P2("Range start is greater than the blob's size."));if(M===null||M>=_)M=_-1}let D=z.slice(J,M,O),X=Dq7(D);w.body=X[0];let P=ww1(`${D.size}`),W=FE3(J,M,_);w.status=206,w.statusText="Partial Content",w.headersList.set("content-length",P,!0),w.headersList.set("content-type",O,!0),w.headersList.set("content-range",W,!0)}return Promise.resolve(w)}case"data:":{let Y=um(q),z=tE3(Y);if(z==="failure")return Promise.resolve(P2("failed to fetch the data URL"));let w=eE3(z.mimeType);return Promise.resolve(zw1({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:w}]],body:$K8(z.body)[0]}))}case"file:":return Promise.resolve(P2("not implemented... yet..."));case"http:":case"https:":return vq7(A).catch((Y)=>P2(Y));default:return Promise.resolve(P2("unknown scheme"))}}function OL3(A,q){if(A.request.done=!0,A.processResponseDone!=null)queueMicrotask(()=>A.processResponseDone(q))}function YK8(A,q){let K=A.timingInfo,Y=()=>{let w=Date.now();if(A.request.destination==="document")A.controller.fullTimingInfo=K;A.controller.reportTimingSteps=()=>{if(A.request.url.protocol!=="https:")return;K.endTime=w;let{cacheState:$,bodyInfo:O}=q;if(!q.timingAllowPassed)K=wK8(K),$="";let H=0;if(A.request.mode!=="navigator"||!q.hasCrossOriginRedirects){H=q.status;let j=UE3(q.headersList);if(j!=="failure")O.contentType=AL3(j)}if(A.request.initiatorType!=null)Tq7(K,A.request.url.href,A.request.initiatorType,globalThis,$,O,H)};let _=()=>{if(A.request.done=!0,A.processResponseEndOfBody!=null)queueMicrotask(()=>A.processResponseEndOfBody(q));if(A.request.initiatorType!=null)A.controller.reportTimingSteps()};queueMicrotask(()=>_())};if(A.processResponse!=null)queueMicrotask(()=>{A.processResponse(q),A.processResponse=null});let z=q.type==="error"?q:q.internalResponse??q;if(z.body==null)Y();else oE3(z.body.stream,()=>{Y()})}async function vq7(A){let q=A.request,K=null,Y=null,z=A.timingInfo;if(q.serviceWorkers==="all");if(K===null){if(q.redirect==="follow")q.serviceWorkers="none";if(Y=K=await kq7(A),q.responseTainting==="cors"&&yE3(q,K)==="failure")return P2("cors failure");if(VE3(q,K)==="failure")q.timingAllowFailed=!0}if((q.responseTainting==="opaque"||K.type==="opaque")&&RE3(q.origin,q.client,q.destination,Y)==="blocked")return P2("blocked");if(Zq7.has(Y.status)){if(q.redirect!=="manual")A.controller.connection.destroy(void 0,!1);if(q.redirect==="error")K=P2("unexpected redirect");else if(q.redirect==="manual")K=Y;else if(q.redirect==="follow")K=await HL3(A,K);else f36(!1)}return K.timingInfo=z,K}function HL3(A,q){let K=A.request,Y=q.internalResponse?q.internalResponse:q,z;try{if(z=vE3(Y,um(K).hash),z==null)return q}catch(_){return Promise.resolve(P2(_))}if(!_K8(z))return Promise.resolve(P2("URL scheme must be a HTTP(S) scheme"));if(K.redirectCount===20)return Promise.resolve(P2("redirect count exceeded"));if(K.redirectCount+=1,K.mode==="cors"&&(z.username||z.password)&&!zK8(K,z))return Promise.resolve(P2('cross origin not allowed for request mode "cors"'));if(K.responseTainting==="cors"&&(z.username||z.password))return Promise.resolve(P2('URL cannot contain credentials for request mode "cors"'));if(Y.status!==303&&K.body!=null&&K.body.source==null)return Promise.resolve(P2());if([301,302].includes(Y.status)&&K.method==="POST"||Y.status===303&&!zL3.includes(K.method)){K.method="GET",K.body=null;for(let _ of cE3)K.headersList.delete(_)}if(!zK8(um(K),z))K.headersList.delete("authorization",!0),K.headersList.delete("proxy-authorization",!0),K.headersList.delete("cookie",!0),K.headersList.delete("host",!0);if(K.body!=null)f36(K.body.source!=null),K.body=$K8(K.body.source)[0];let w=A.timingInfo;if(w.redirectEndTime=w.postRedirectStartTime=zu6(A.crossOriginIsolatedCapability),w.redirectStartTime===0)w.redirectStartTime=w.startTime;return K.urlList.push(z),kE3(K,Y),Nq7(A,!0)}async function kq7(A,q=!1,K=!1){let Y=A.request,z=null,w=null,_=null,$=null,O=!1;if(Y.window==="no-window"&&Y.redirect==="error")z=A,w=Y;else w=WE3(Y),z={...A},z.request=w;let H=Y.credentials==="include"||Y.credentials==="same-origin"&&Y.responseTainting==="basic",j=w.body?w.body.length:null,J=null;if(w.body==null&&["POST","PUT"].includes(w.method))J="0";if(j!=null)J=ww1(`${j}`);if(J!=null)w.headersList.append("content-length",J,!0);if(j!=null&&w.keepalive);if(w.referrer instanceof URL)w.headersList.append("referer",ww1(w.referrer.href),!0);if(NE3(w),LE3(w),!w.headersList.contains("user-agent",!0))w.headersList.append("user-agent",wL3);if(w.cache==="default"&&(w.headersList.contains("if-modified-since",!0)||w.headersList.contains("if-none-match",!0)||w.headersList.contains("if-unmodified-since",!0)||w.headersList.contains("if-match",!0)||w.headersList.contains("if-range",!0)))w.cache="no-store";if(w.cache==="no-cache"&&!w.preventNoCacheCacheControlHeaderModification&&!w.headersList.contains("cache-control",!0))w.headersList.append("cache-control","max-age=0",!0);if(w.cache==="no-store"||w.cache==="reload"){if(!w.headersList.contains("pragma",!0))w.headersList.append("pragma","no-cache",!0);if(!w.headersList.contains("cache-control",!0))w.headersList.append("cache-control","no-cache",!0)}if(w.headersList.contains("range",!0))w.headersList.append("accept-encoding","identity",!0);if(!w.headersList.contains("accept-encoding",!0))if(BE3(um(w)))w.headersList.append("accept-encoding","br, gzip, deflate",!0);else w.headersList.append("accept-encoding","gzip, deflate",!0);if(w.headersList.delete("host",!0),$==null)w.cache="no-store";if(w.cache!=="no-store"&&w.cache!=="reload");if(_==null){if(w.cache==="only-if-cached")return P2("only if cached");let M=await jL3(z,H,K);if(!dE3.has(w.method)&&M.status>=200&&M.status<=399);if(O&&M.status===304);if(_==null)_=M}if(_.urlList=[...w.urlList],w.headersList.contains("range",!0))_.rangeRequested=!0;if(_.requestIncludesCredentials=H,_.status===407){if(Y.window==="no-window")return P2();if(G36(A))return Yw1(A);return P2("proxy authentication required")}if(_.status===421&&!K&&(Y.body==null||Y.body.source!=null)){if(G36(A))return Yw1(A);A.controller.connection.destroy(),_=await kq7(A,q,!0)}return _}async function jL3(A,q=!1,K=!1){f36(!A.controller.connection||A.controller.connection.destroyed),A.controller.connection={abort:null,destroyed:!1,destroy(X,P=!0){if(!this.destroyed){if(this.destroyed=!0,P)this.abort?.(X??new DOMException("The operation was aborted.","AbortError"))}}};let Y=A.request,z=null,w=A.timingInfo;if(!0)Y.cache="no-store";let $=K?"yes":"no";if(Y.mode==="websocket");let O=null;if(Y.body==null&&A.processRequestEndOfBody)queueMicrotask(()=>A.processRequestEndOfBody());else if(Y.body!=null){let X=async function*(Z){if(G36(A))return;yield Z,A.processRequestBodyChunkLength?.(Z.byteLength)},P=()=>{if(G36(A))return;if(A.processRequestEndOfBody)A.processRequestEndOfBody()},W=(Z)=>{if(G36(A))return;if(Z.name==="AbortError")A.controller.abort();else A.controller.terminate(Z)};O=async function*(){try{for await(let Z of Y.body.stream)yield*X(Z);P()}catch(Z){W(Z)}}()}try{let{body:X,status:P,statusText:W,headersList:Z,socket:G}=await D({body:O});if(G)z=zw1({status:P,statusText:W,headersList:Z,socket:G});else{let f=X[Symbol.asyncIterator]();A.controller.next=()=>f.next(),z=zw1({status:P,statusText:W,headersList:Z})}}catch(X){if(X.name==="AbortError")return A.controller.connection.destroy(),Yw1(A,X);return P2(X)}let H=async()=>{await A.controller.resume()},j=(X)=>{if(!G36(A))A.controller.abort(X)},J=new ReadableStream({async start(X){A.controller.controller=X},async pull(X){await H(X)},async cancel(X){await j(X)},type:"bytes"});z.body={stream:J,source:null,length:null},A.controller.onAborted=M,A.controller.on("terminated",M),A.controller.resume=async()=>{while(!0){let X,P;try{let{done:Z,value:G}=await A.controller.next();if(Mq7(A))break;X=Z?void 0:G}catch(Z){if(A.controller.ended&&!w.encodedBodySize)X=void 0;else X=Z,P=!0}if(X===void 0){xE3(A.controller.controller),OL3(A,z);return}if(w.decodedBodySize+=X?.byteLength??0,P){A.controller.terminate(X);return}let W=new Uint8Array(X);if(W.byteLength)A.controller.controller.enqueue(W);if(sE3(J)){A.controller.terminate();return}if(A.controller.controller.desiredSize<=0)return}};function M(X){if(Mq7(A)){if(z.aborted=!0,_w1(J))A.controller.controller.error(A.controller.serializedAbortReason)}else if(_w1(J))A.controller.controller.error(TypeError("terminated",{cause:IE3(X)?X:void 0}));A.controller.connection.destroy()}return z;function D({body:X}){let P=um(Y),W=A.controller.dispatcher;return new Promise((Z,G)=>W.dispatch({path:P.pathname+P.search,origin:P.origin,method:Y.method,body:W.isMockActive?Y.body&&(Y.body.source||Y.body.stream):X,headers:Y.headersList.entries,maxRedirections:0,upgrade:Y.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(f){let{connection:V}=A.controller;if(w.finalConnectionTimingInfo=mE3(void 0,w.postRedirectStartTime,A.crossOriginIsolatedCapability),V.destroyed)f(new DOMException("The operation was aborted.","AbortError"));else A.controller.on("terminated",f),this.abort=V.abort=f;w.finalNetworkRequestStartTime=zu6(A.crossOriginIsolatedCapability)},onResponseStarted(){w.finalNetworkResponseStartTime=zu6(A.crossOriginIsolatedCapability)},onHeaders(f,V,N,v){if(f<200)return;let y=[],R="",h=new Jq7;for(let b=0;b<V.length;b+=2)h.append(Xq7(V[b]),V[b+1].toString("latin1"),!0);let B=h.get("content-encoding",!0);if(B)y=B.toLowerCase().split(",").map((b)=>b.trim());R=h.get("location",!0),this.body=new nE3({read:N});let x=[],F=R&&Y.redirect==="follow"&&Zq7.has(f);if(y.length!==0&&Y.method!=="HEAD"&&Y.method!=="CONNECT"&&!Gq7.includes(f)&&!F)for(let b=y.length-1;b>=0;--b){let U=y[b];if(U==="x-gzip"||U==="gzip")x.push(At.createGunzip({flush:At.constants.Z_SYNC_FLUSH,finishFlush:At.constants.Z_SYNC_FLUSH}));else if(U==="deflate")x.push(QE3({flush:At.constants.Z_SYNC_FLUSH,finishFlush:At.constants.Z_SYNC_FLUSH}));else if(U==="br")x.push(At.createBrotliDecompress({flush:At.constants.BROTLI_OPERATION_FLUSH,finishFlush:At.constants.BROTLI_OPERATION_FLUSH}));else{x.length=0;break}}let g=this.onError.bind(this);return Z({status:f,statusText:v,headersList:h,body:x.length?rE3(this.body,...x,(b)=>{if(b)this.onError(b)}).on("error",g):this.body.on("error",g)}),!0},onData(f){if(A.controller.dump)return;let V=f;return w.encodedBodySize+=V.byteLength,this.body.push(V)},onComplete(){if(this.abort)A.controller.off("terminated",this.abort);if(A.controller.onAborted)A.controller.off("terminated",A.controller.onAborted);A.controller.ended=!0,this.body.push(null)},onError(f){if(this.abort)A.controller.off("terminated",this.abort);this.body?.destroy(f),A.controller.terminate(f),G(f)},onUpgrade(f,V,N){if(f!==101)return;let v=new Jq7;for(let y=0;y<V.length;y+=2)v.append(Xq7(V[y]),V[y+1].toString("latin1"),!0);return Z({status:f,statusText:YL3[f],headersList:v,socket:N}),!0}}))}}Eq7.exports={fetch:$L3,Fetch:OK8,fetching:Vq7,finalizeAndReportTiming:fq7}});var HK8=C((oO2,Lq7)=>{Lq7.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var Rq7=C((aO2,yq7)=>{var{webidl:XE}=R0(),$w1=Symbol("ProgressEvent state");class _u6 extends Event{constructor(A,q={}){A=XE.converters.DOMString(A,"ProgressEvent constructor","type"),q=XE.converters.ProgressEventInit(q??{});super(A,q);this[$w1]={lengthComputable:q.lengthComputable,loaded:q.loaded,total:q.total}}get lengthComputable(){return XE.brandCheck(this,_u6),this[$w1].lengthComputable}get loaded(){return XE.brandCheck(this,_u6),this[$w1].loaded}get total(){return XE.brandCheck(this,_u6),this[$w1].total}}XE.converters.ProgressEventInit=XE.dictionaryConverter([{key:"lengthComputable",converter:XE.converters.boolean,defaultValue:()=>!1},{key:"loaded",converter:XE.converters["unsigned long long"],defaultValue:()=>0},{key:"total",converter:XE.converters["unsigned long long"],defaultValue:()=>0},{key:"bubbles",converter:XE.converters.boolean,defaultValue:()=>!1},{key:"cancelable",converter:XE.converters.boolean,defaultValue:()=>!1},{key:"composed",converter:XE.converters.boolean,defaultValue:()=>!1}]);yq7.exports={ProgressEvent:_u6}});var Cq7=C((sO2,Sq7)=>{function JL3(A){if(!A)return"failure";switch(A.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}Sq7.exports={getEncoding:JL3}});var gq7=C((tO2,mq7)=>{var{kState:bX6,kError:jK8,kResult:hq7,kAborted:$u6,kLastProgressEventFired:JK8}=HK8(),{ProgressEvent:ML3}=Rq7(),{getEncoding:Iq7}=Cq7(),{serializeAMimeType:DL3,parseMIMEType:bq7}=qN(),{types:XL3}=g6("node:util"),{StringDecoder:xq7}=g6("string_decoder"),{btoa:uq7}=g6("node:buffer"),PL3={enumerable:!0,writable:!1,configurable:!1};function WL3(A,q,K,Y){if(A[bX6]==="loading")throw new DOMException("Invalid state","InvalidStateError");A[bX6]="loading",A[hq7]=null,A[jK8]=null;let w=q.stream().getReader(),_=[],$=w.read(),O=!0;(async()=>{while(!A[$u6])try{let{done:H,value:j}=await $;if(O&&!A[$u6])queueMicrotask(()=>{qt("loadstart",A)});if(O=!1,!H&&XL3.isUint8Array(j)){if(_.push(j),(A[JK8]===void 0||Date.now()-A[JK8]>=50)&&!A[$u6])A[JK8]=Date.now(),queueMicrotask(()=>{qt("progress",A)});$=w.read()}else if(H){queueMicrotask(()=>{A[bX6]="done";try{let J=ZL3(_,K,q.type,Y);if(A[$u6])return;A[hq7]=J,qt("load",A)}catch(J){A[jK8]=J,qt("error",A)}if(A[bX6]!=="loading")qt("loadend",A)});break}}catch(H){if(A[$u6])return;queueMicrotask(()=>{if(A[bX6]="done",A[jK8]=H,qt("error",A),A[bX6]!=="loading")qt("loadend",A)});break}})()}function qt(A,q){let K=new ML3(A,{bubbles:!1,cancelable:!1});q.dispatchEvent(K)}function ZL3(A,q,K,Y){switch(q){case"DataURL":{let z="data:",w=bq7(K||"application/octet-stream");if(w!=="failure")z+=DL3(w);z+=";base64,";let _=new xq7("latin1");for(let $ of A)z+=uq7(_.write($));return z+=uq7(_.end()),z}case"Text":{let z="failure";if(Y)z=Iq7(Y);if(z==="failure"&&K){let w=bq7(K);if(w!=="failure")z=Iq7(w.parameters.get("charset"))}if(z==="failure")z="UTF-8";return GL3(A,z)}case"ArrayBuffer":return Bq7(A).buffer;case"BinaryString":{let z="",w=new xq7("latin1");for(let _ of A)z+=w.write(_);return z+=w.end(),z}}}function GL3(A,q){let K=Bq7(A),Y=fL3(K),z=0;if(Y!==null)q=Y,z=Y==="UTF-8"?3:2;let w=K.slice(z);return new TextDecoder(q).decode(w)}function fL3(A){let[q,K,Y]=A;if(q===239&&K===187&&Y===191)return"UTF-8";else if(q===254&&K===255)return"UTF-16BE";else if(q===255&&K===254)return"UTF-16LE";return null}function Bq7(A){let q=A.reduce((Y,z)=>{return Y+z.byteLength},0),K=0;return A.reduce((Y,z)=>{return Y.set(z,K),K+=z.byteLength,Y},new Uint8Array(q))}mq7.exports={staticPropertyDescriptors:PL3,readOperation:WL3,fireAProgressEvent:qt}});var pq7=C((eO2,Uq7)=>{var{staticPropertyDescriptors:xX6,readOperation:Ow1,fireAProgressEvent:Fq7}=gq7(),{kState:T36,kError:Qq7,kResult:Hw1,kEvents:Zw,kAborted:TL3}=HK8(),{webidl:p2}=R0(),{kEnumerableProperty:zN}=x9();class W2 extends EventTarget{constructor(){super();this[T36]="empty",this[Hw1]=null,this[Qq7]=null,this[Zw]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(A){p2.brandCheck(this,W2),p2.argumentLengthCheck(arguments,1,"FileReader.readAsArrayBuffer"),A=p2.converters.Blob(A,{strict:!1}),Ow1(this,A,"ArrayBuffer")}readAsBinaryString(A){p2.brandCheck(this,W2),p2.argumentLengthCheck(arguments,1,"FileReader.readAsBinaryString"),A=p2.converters.Blob(A,{strict:!1}),Ow1(this,A,"BinaryString")}readAsText(A,q=void 0){if(p2.brandCheck(this,W2),p2.argumentLengthCheck(arguments,1,"FileReader.readAsText"),A=p2.converters.Blob(A,{strict:!1}),q!==void 0)q=p2.converters.DOMString(q,"FileReader.readAsText","encoding");Ow1(this,A,"Text",q)}readAsDataURL(A){p2.brandCheck(this,W2),p2.argumentLengthCheck(arguments,1,"FileReader.readAsDataURL"),A=p2.converters.Blob(A,{strict:!1}),Ow1(this,A,"DataURL")}abort(){if(this[T36]==="empty"||this[T36]==="done"){this[Hw1]=null;return}if(this[T36]==="loading")this[T36]="done",this[Hw1]=null;if(this[TL3]=!0,Fq7("abort",this),this[T36]!=="loading")Fq7("loadend",this)}get readyState(){switch(p2.brandCheck(this,W2),this[T36]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return p2.brandCheck(this,W2),this[Hw1]}get error(){return p2.brandCheck(this,W2),this[Qq7]}get onloadend(){return p2.brandCheck(this,W2),this[Zw].loadend}set onloadend(A){if(p2.brandCheck(this,W2),this[Zw].loadend)this.removeEventListener("loadend",this[Zw].loadend);if(typeof A==="function")this[Zw].loadend=A,this.addEventListener("loadend",A);else this[Zw].loadend=null}get onerror(){return p2.brandCheck(this,W2),this[Zw].error}set onerror(A){if(p2.brandCheck(this,W2),this[Zw].error)this.removeEventListener("error",this[Zw].error);if(typeof A==="function")this[Zw].error=A,this.addEventListener("error",A);else this[Zw].error=null}get onloadstart(){return p2.brandCheck(this,W2),this[Zw].loadstart}set onloadstart(A){if(p2.brandCheck(this,W2),this[Zw].loadstart)this.removeEventListener("loadstart",this[Zw].loadstart);if(typeof A==="function")this[Zw].loadstart=A,this.addEventListener("loadstart",A);else this[Zw].loadstart=null}get onprogress(){return p2.brandCheck(this,W2),this[Zw].progress}set onprogress(A){if(p2.brandCheck(this,W2),this[Zw].progress)this.removeEventListener("progress",this[Zw].progress);if(typeof A==="function")this[Zw].progress=A,this.addEventListener("progress",A);else this[Zw].progress=null}get onload(){return p2.brandCheck(this,W2),this[Zw].load}set onload(A){if(p2.brandCheck(this,W2),this[Zw].load)this.removeEventListener("load",this[Zw].load);if(typeof A==="function")this[Zw].load=A,this.addEventListener("load",A);else this[Zw].load=null}get onabort(){return p2.brandCheck(this,W2),this[Zw].abort}set onabort(A){if(p2.brandCheck(this,W2),this[Zw].abort)this.removeEventListener("abort",this[Zw].abort);if(typeof A==="function")this[Zw].abort=A,this.addEventListener("abort",A);else this[Zw].abort=null}}W2.EMPTY=W2.prototype.EMPTY=0;W2.LOADING=W2.prototype.LOADING=1;W2.DONE=W2.prototype.DONE=2;Object.defineProperties(W2.prototype,{EMPTY:xX6,LOADING:xX6,DONE:xX6,readAsArrayBuffer:zN,readAsBinaryString:zN,readAsText:zN,readAsDataURL:zN,abort:zN,readyState:zN,result:zN,error:zN,onloadstart:zN,onprogress:zN,onload:zN,onabort:zN,onerror:zN,onloadend:zN,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(W2,{EMPTY:xX6,LOADING:xX6,DONE:xX6});Uq7.exports={FileReader:W2}});var jw1=C((AH2,dq7)=>{dq7.exports={kConstruct:cO().kConstruct}});var iq7=C((qH2,lq7)=>{var VL3=g6("node:assert"),{URLSerializer:cq7}=qN(),{isValidHeaderName:NL3}=OE();function vL3(A,q,K=!1){let Y=cq7(A,K),z=cq7(q,K);return Y===z}function kL3(A){VL3(A!==null);let q=[];for(let K of A.split(","))if(K=K.trim(),NL3(K))q.push(K);return q}lq7.exports={urlEquals:vL3,getFieldValues:kL3}});var oq7=C((KH2,rq7)=>{var{kConstruct:EL3}=jw1(),{urlEquals:LL3,getFieldValues:MK8}=iq7(),{kEnumerableProperty:V36,isDisturbed:yL3}=x9(),{webidl:jK}=R0(),{Response:RL3,cloneResponse:SL3,fromInnerResponse:CL3}=Yu6(),{Request:_c,fromInnerRequest:hL3}=IX6(),{kState:sI}=ds(),{fetching:IL3}=wu6(),{urlIsHttpHttpsScheme:Jw1,createDeferredPromise:uX6,readAllBytes:bL3}=OE(),DK8=g6("node:assert");class Bm{#A;constructor(){if(arguments[0]!==EL3)jK.illegalConstructor();jK.util.markAsUncloneable(this),this.#A=arguments[1]}async match(A,q={}){jK.brandCheck(this,Bm);let K="Cache.match";jK.argumentLengthCheck(arguments,1,K),A=jK.converters.RequestInfo(A,K,"request"),q=jK.converters.CacheQueryOptions(q,K,"options");let Y=this.#Y(A,q,1);if(Y.length===0)return;return Y[0]}async matchAll(A=void 0,q={}){jK.brandCheck(this,Bm);let K="Cache.matchAll";if(A!==void 0)A=jK.converters.RequestInfo(A,K,"request");return q=jK.converters.CacheQueryOptions(q,K,"options"),this.#Y(A,q)}async add(A){jK.brandCheck(this,Bm);let q="Cache.add";jK.argumentLengthCheck(arguments,1,q),A=jK.converters.RequestInfo(A,q,"request");let K=[A];return await this.addAll(K)}async addAll(A){jK.brandCheck(this,Bm);let q="Cache.addAll";jK.argumentLengthCheck(arguments,1,q);let K=[],Y=[];for(let J of A){if(J===void 0)throw jK.errors.conversionFailed({prefix:q,argument:"Argument 1",types:["undefined is not allowed"]});if(J=jK.converters.RequestInfo(J),typeof J==="string")continue;let M=J[sI];if(!Jw1(M.url)||M.method!=="GET")throw jK.errors.exception({header:q,message:"Expected http/s scheme when method is not GET."})}let z=[];for(let J of A){let M=new _c(J)[sI];if(!Jw1(M.url))throw jK.errors.exception({header:q,message:"Expected http/s scheme."});M.initiator="fetch",M.destination="subresource",Y.push(M);let D=uX6();z.push(IL3({request:M,processResponse(X){if(X.type==="error"||X.status===206||X.status<200||X.status>299)D.reject(jK.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(X.headersList.contains("vary")){let P=MK8(X.headersList.get("vary"));for(let W of P)if(W==="*"){D.reject(jK.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let Z of z)Z.abort();return}}},processResponseEndOfBody(X){if(X.aborted){D.reject(new DOMException("aborted","AbortError"));return}D.resolve(X)}})),K.push(D.promise)}let _=await Promise.all(K),$=[],O=0;for(let J of _){let M={type:"put",request:Y[O],response:J};$.push(M),O++}let H=uX6(),j=null;try{this.#q($)}catch(J){j=J}return queueMicrotask(()=>{if(j===null)H.resolve(void 0);else H.reject(j)}),H.promise}async put(A,q){jK.brandCheck(this,Bm);let K="Cache.put";jK.argumentLengthCheck(arguments,2,K),A=jK.converters.RequestInfo(A,K,"request"),q=jK.converters.Response(q,K,"response");let Y=null;if(A instanceof _c)Y=A[sI];else Y=new _c(A)[sI];if(!Jw1(Y.url)||Y.method!=="GET")throw jK.errors.exception({header:K,message:"Expected an http/s scheme when method is not GET"});let z=q[sI];if(z.status===206)throw jK.errors.exception({header:K,message:"Got 206 status"});if(z.headersList.contains("vary")){let M=MK8(z.headersList.get("vary"));for(let D of M)if(D==="*")throw jK.errors.exception({header:K,message:"Got * vary field value"})}if(z.body&&(yL3(z.body.stream)||z.body.stream.locked))throw jK.errors.exception({header:K,message:"Response body is locked or disturbed"});let w=SL3(z),_=uX6();if(z.body!=null){let D=z.body.stream.getReader();bL3(D).then(_.resolve,_.reject)}else _.resolve(void 0);let $=[],O={type:"put",request:Y,response:w};$.push(O);let H=await _.promise;if(w.body!=null)w.body.source=H;let j=uX6(),J=null;try{this.#q($)}catch(M){J=M}return queueMicrotask(()=>{if(J===null)j.resolve();else j.reject(J)}),j.promise}async delete(A,q={}){jK.brandCheck(this,Bm);let K="Cache.delete";jK.argumentLengthCheck(arguments,1,K),A=jK.converters.RequestInfo(A,K,"request"),q=jK.converters.CacheQueryOptions(q,K,"options");let Y=null;if(A instanceof _c){if(Y=A[sI],Y.method!=="GET"&&!q.ignoreMethod)return!1}else DK8(typeof A==="string"),Y=new _c(A)[sI];let z=[],w={type:"delete",request:Y,options:q};z.push(w);let _=uX6(),$=null,O;try{O=this.#q(z)}catch(H){$=H}return queueMicrotask(()=>{if($===null)_.resolve(!!O?.length);else _.reject($)}),_.promise}async keys(A=void 0,q={}){jK.brandCheck(this,Bm);let K="Cache.keys";if(A!==void 0)A=jK.converters.RequestInfo(A,K,"request");q=jK.converters.CacheQueryOptions(q,K,"options");let Y=null;if(A!==void 0){if(A instanceof _c){if(Y=A[sI],Y.method!=="GET"&&!q.ignoreMethod)return[]}else if(typeof A==="string")Y=new _c(A)[sI]}let z=uX6(),w=[];if(A===void 0)for(let _ of this.#A)w.push(_[0]);else{let _=this.#K(Y,q);for(let $ of _)w.push($[0])}return queueMicrotask(()=>{let _=[];for(let $ of w){let O=hL3($,new AbortController().signal,"immutable");_.push(O)}z.resolve(Object.freeze(_))}),z.promise}#q(A){let q=this.#A,K=[...q],Y=[],z=[];try{for(let w of A){if(w.type!=="delete"&&w.type!=="put")throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(w.type==="delete"&&w.response!=null)throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#K(w.request,w.options,Y).length)throw new DOMException("???","InvalidStateError");let _;if(w.type==="delete"){if(_=this.#K(w.request,w.options),_.length===0)return[];for(let $ of _){let O=q.indexOf($);DK8(O!==-1),q.splice(O,1)}}else if(w.type==="put"){if(w.response==null)throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let $=w.request;if(!Jw1($.url))throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if($.method!=="GET")throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(w.options!=null)throw jK.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});_=this.#K(w.request);for(let O of _){let H=q.indexOf(O);DK8(H!==-1),q.splice(H,1)}q.push([w.request,w.response]),Y.push([w.request,w.response])}z.push([w.request,w.response])}return z}catch(w){throw this.#A.length=0,this.#A=K,w}}#K(A,q,K){let Y=[],z=K??this.#A;for(let w of z){let[_,$]=w;if(this.#z(A,_,$,q))Y.push(w)}return Y}#z(A,q,K=null,Y){let z=new URL(A.url),w=new URL(q.url);if(Y?.ignoreSearch)w.search="",z.search="";if(!LL3(z,w,!0))return!1;if(K==null||Y?.ignoreVary||!K.headersList.contains("vary"))return!0;let _=MK8(K.headersList.get("vary"));for(let $ of _){if($==="*")return!1;let O=q.headersList.get($),H=A.headersList.get($);if(O!==H)return!1}return!0}#Y(A,q,K=1/0){let Y=null;if(A!==void 0){if(A instanceof _c){if(Y=A[sI],Y.method!=="GET"&&!q.ignoreMethod)return[]}else if(typeof A==="string")Y=new _c(A)[sI]}let z=[];if(A===void 0)for(let _ of this.#A)z.push(_[1]);else{let _=this.#K(Y,q);for(let $ of _)z.push($[1])}let w=[];for(let _ of z){let $=CL3(_,"immutable");if(w.push($.clone()),w.length>=K)break}return Object.freeze(w)}}Object.defineProperties(Bm.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:V36,matchAll:V36,add:V36,addAll:V36,put:V36,delete:V36,keys:V36});var nq7=[{key:"ignoreSearch",converter:jK.converters.boolean,defaultValue:()=>!1},{key:"ignoreMethod",converter:jK.converters.boolean,defaultValue:()=>!1},{key:"ignoreVary",converter:jK.converters.boolean,defaultValue:()=>!1}];jK.converters.CacheQueryOptions=jK.dictionaryConverter(nq7);jK.converters.MultiCacheQueryOptions=jK.dictionaryConverter([...nq7,{key:"cacheName",converter:jK.converters.DOMString}]);jK.converters.Response=jK.interfaceConverter(RL3);jK.converters["sequence<RequestInfo>"]=jK.sequenceConverter(jK.converters.RequestInfo);rq7.exports={Cache:Bm}});var sq7=C((YH2,aq7)=>{var{kConstruct:Ou6}=jw1(),{Cache:Mw1}=oq7(),{webidl:UZ}=R0(),{kEnumerableProperty:Hu6}=x9();class Kt{#A=new Map;constructor(){if(arguments[0]!==Ou6)UZ.illegalConstructor();UZ.util.markAsUncloneable(this)}async match(A,q={}){if(UZ.brandCheck(this,Kt),UZ.argumentLengthCheck(arguments,1,"CacheStorage.match"),A=UZ.converters.RequestInfo(A),q=UZ.converters.MultiCacheQueryOptions(q),q.cacheName!=null){if(this.#A.has(q.cacheName)){let K=this.#A.get(q.cacheName);return await new Mw1(Ou6,K).match(A,q)}}else for(let K of this.#A.values()){let z=await new Mw1(Ou6,K).match(A,q);if(z!==void 0)return z}}async has(A){UZ.brandCheck(this,Kt);let q="CacheStorage.has";return UZ.argumentLengthCheck(arguments,1,q),A=UZ.converters.DOMString(A,q,"cacheName"),this.#A.has(A)}async open(A){UZ.brandCheck(this,Kt);let q="CacheStorage.open";if(UZ.argumentLengthCheck(arguments,1,q),A=UZ.converters.DOMString(A,q,"cacheName"),this.#A.has(A)){let Y=this.#A.get(A);return new Mw1(Ou6,Y)}let K=[];return this.#A.set(A,K),new Mw1(Ou6,K)}async delete(A){UZ.brandCheck(this,Kt);let q="CacheStorage.delete";return UZ.argumentLengthCheck(arguments,1,q),A=UZ.converters.DOMString(A,q,"cacheName"),this.#A.delete(A)}async keys(){return UZ.brandCheck(this,Kt),[...this.#A.keys()]}}Object.defineProperties(Kt.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:Hu6,has:Hu6,open:Hu6,delete:Hu6,keys:Hu6});aq7.exports={CacheStorage:Kt}});var eq7=C((zH2,tq7)=>{tq7.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var XK8=C((wH2,zK7)=>{function xL3(A){for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(K>=0&&K<=8||K>=10&&K<=31||K===127)return!0}return!1}function AK7(A){for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(K<33||K>126||K===34||K===40||K===41||K===60||K===62||K===64||K===44||K===59||K===58||K===92||K===47||K===91||K===93||K===63||K===61||K===123||K===125)throw Error("Invalid cookie name")}}function qK7(A){let q=A.length,K=0;if(A[0]==='"'){if(q===1||A[q-1]!=='"')throw Error("Invalid cookie value");--q,++K}while(K<q){let Y=A.charCodeAt(K++);if(Y<33||Y>126||Y===34||Y===44||Y===59||Y===92)throw Error("Invalid cookie value")}}function KK7(A){for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(K<32||K===127||K===59)throw Error("Invalid cookie path")}}function uL3(A){if(A.startsWith("-")||A.endsWith(".")||A.endsWith("-"))throw Error("Invalid cookie domain")}var BL3=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mL3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Dw1=Array(61).fill(0).map((A,q)=>q.toString().padStart(2,"0"));function YK7(A){if(typeof A==="number")A=new Date(A);return`${BL3[A.getUTCDay()]}, ${Dw1[A.getUTCDate()]} ${mL3[A.getUTCMonth()]} ${A.getUTCFullYear()} ${Dw1[A.getUTCHours()]}:${Dw1[A.getUTCMinutes()]}:${Dw1[A.getUTCSeconds()]} GMT`}function gL3(A){if(A<0)throw Error("Invalid cookie max-age")}function FL3(A){if(A.name.length===0)return null;AK7(A.name),qK7(A.value);let q=[`${A.name}=${A.value}`];if(A.name.startsWith("__Secure-"))A.secure=!0;if(A.name.startsWith("__Host-"))A.secure=!0,A.domain=null,A.path="/";if(A.secure)q.push("Secure");if(A.httpOnly)q.push("HttpOnly");if(typeof A.maxAge==="number")gL3(A.maxAge),q.push(`Max-Age=${A.maxAge}`);if(A.domain)uL3(A.domain),q.push(`Domain=${A.domain}`);if(A.path)KK7(A.path),q.push(`Path=${A.path}`);if(A.expires&&A.expires.toString()!=="Invalid Date")q.push(`Expires=${YK7(A.expires)}`);if(A.sameSite)q.push(`SameSite=${A.sameSite}`);for(let K of A.unparsed){if(!K.includes("="))throw Error("Invalid unparsed");let[Y,...z]=K.split("=");q.push(`${Y.trim()}=${z.join("=")}`)}return q.join("; ")}zK7.exports={isCTLExcludingHtab:xL3,validateCookieName:AK7,validateCookiePath:KK7,validateCookieValue:qK7,toIMFDate:YK7,stringify:FL3}});var _K7=C((_H2,wK7)=>{var{maxNameValuePairSize:QL3,maxAttributeValueSize:UL3}=eq7(),{isCTLExcludingHtab:pL3}=XK8(),{collectASequenceOfCodePointsFast:Xw1}=qN(),dL3=g6("node:assert");function cL3(A){if(pL3(A))return null;let q="",K="",Y="",z="";if(A.includes(";")){let w={position:0};q=Xw1(";",A,w),K=A.slice(w.position)}else q=A;if(!q.includes("="))z=q;else{let w={position:0};Y=Xw1("=",q,w),z=q.slice(w.position+1)}if(Y=Y.trim(),z=z.trim(),Y.length+z.length>QL3)return null;return{name:Y,value:z,...BX6(K)}}function BX6(A,q={}){if(A.length===0)return q;dL3(A[0]===";"),A=A.slice(1);let K="";if(A.includes(";"))K=Xw1(";",A,{position:0}),A=A.slice(K.length);else K=A,A="";let Y="",z="";if(K.includes("=")){let _={position:0};Y=Xw1("=",K,_),z=K.slice(_.position+1)}else Y=K;if(Y=Y.trim(),z=z.trim(),z.length>UL3)return BX6(A,q);let w=Y.toLowerCase();if(w==="expires"){let _=new Date(z);q.expires=_}else if(w==="max-age"){let _=z.charCodeAt(0);if((_<48||_>57)&&z[0]!=="-")return BX6(A,q);if(!/^\d+$/.test(z))return BX6(A,q);let $=Number(z);q.maxAge=$}else if(w==="domain"){let _=z;if(_[0]===".")_=_.slice(1);_=_.toLowerCase(),q.domain=_}else if(w==="path"){let _="";if(z.length===0||z[0]!=="/")_="/";else _=z;q.path=_}else if(w==="secure")q.secure=!0;else if(w==="httponly")q.httpOnly=!0;else if(w==="samesite"){let _="Default",$=z.toLowerCase();if($.includes("none"))_="None";if($.includes("strict"))_="Strict";if($.includes("lax"))_="Lax";q.sameSite=_}else q.unparsed??=[],q.unparsed.push(`${Y}=${z}`);return BX6(A,q)}wK7.exports={parseSetCookie:cL3,parseUnparsedAttributes:BX6}});var HK7=C(($H2,OK7)=>{var{parseSetCookie:lL3}=_K7(),{stringify:iL3}=XK8(),{webidl:VY}=R0(),{Headers:Pw1}=Z36();function nL3(A){VY.argumentLengthCheck(arguments,1,"getCookies"),VY.brandCheck(A,Pw1,{strict:!1});let q=A.get("cookie"),K={};if(!q)return K;for(let Y of q.split(";")){let[z,...w]=Y.split("=");K[z.trim()]=w.join("=")}return K}function rL3(A,q,K){VY.brandCheck(A,Pw1,{strict:!1});let Y="deleteCookie";VY.argumentLengthCheck(arguments,2,Y),q=VY.converters.DOMString(q,Y,"name"),K=VY.converters.DeleteCookieAttributes(K),$K7(A,{name:q,value:"",expires:new Date(0),...K})}function oL3(A){VY.argumentLengthCheck(arguments,1,"getSetCookies"),VY.brandCheck(A,Pw1,{strict:!1});let q=A.getSetCookie();if(!q)return[];return q.map((K)=>lL3(K))}function $K7(A,q){VY.argumentLengthCheck(arguments,2,"setCookie"),VY.brandCheck(A,Pw1,{strict:!1}),q=VY.converters.Cookie(q);let K=iL3(q);if(K)A.append("Set-Cookie",K)}VY.converters.DeleteCookieAttributes=VY.dictionaryConverter([{converter:VY.nullableConverter(VY.converters.DOMString),key:"path",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters.DOMString),key:"domain",defaultValue:()=>null}]);VY.converters.Cookie=VY.dictionaryConverter([{converter:VY.converters.DOMString,key:"name"},{converter:VY.converters.DOMString,key:"value"},{converter:VY.nullableConverter((A)=>{if(typeof A==="number")return VY.converters["unsigned long long"](A);return new Date(A)}),key:"expires",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters["long long"]),key:"maxAge",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters.DOMString),key:"domain",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters.DOMString),key:"path",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters.boolean),key:"secure",defaultValue:()=>null},{converter:VY.nullableConverter(VY.converters.boolean),key:"httpOnly",defaultValue:()=>null},{converter:VY.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:VY.sequenceConverter(VY.converters.DOMString),key:"unparsed",defaultValue:()=>[]}]);OK7.exports={getCookies:nL3,deleteCookie:rL3,getSetCookies:oL3,setCookie:$K7}});var gX6=C((OH2,JK7)=>{var{webidl:sq}=R0(),{kEnumerableProperty:wN}=x9(),{kConstruct:jK7}=cO(),{MessagePort:aL3}=g6("node:worker_threads");class PE extends Event{#A;constructor(A,q={}){if(A===jK7){super(arguments[1],arguments[2]);sq.util.markAsUncloneable(this);return}let K="MessageEvent constructor";sq.argumentLengthCheck(arguments,1,K),A=sq.converters.DOMString(A,K,"type"),q=sq.converters.MessageEventInit(q,K,"eventInitDict");super(A,q);this.#A=q,sq.util.markAsUncloneable(this)}get data(){return sq.brandCheck(this,PE),this.#A.data}get origin(){return sq.brandCheck(this,PE),this.#A.origin}get lastEventId(){return sq.brandCheck(this,PE),this.#A.lastEventId}get source(){return sq.brandCheck(this,PE),this.#A.source}get ports(){if(sq.brandCheck(this,PE),!Object.isFrozen(this.#A.ports))Object.freeze(this.#A.ports);return this.#A.ports}initMessageEvent(A,q=!1,K=!1,Y=null,z="",w="",_=null,$=[]){return sq.brandCheck(this,PE),sq.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new PE(A,{bubbles:q,cancelable:K,data:Y,origin:z,lastEventId:w,source:_,ports:$})}static createFastMessageEvent(A,q){let K=new PE(jK7,A,q);return K.#A=q,K.#A.data??=null,K.#A.origin??="",K.#A.lastEventId??="",K.#A.source??=null,K.#A.ports??=[],K}}var{createFastMessageEvent:sL3}=PE;delete PE.createFastMessageEvent;class mX6 extends Event{#A;constructor(A,q={}){sq.argumentLengthCheck(arguments,1,"CloseEvent constructor"),A=sq.converters.DOMString(A,"CloseEvent constructor","type"),q=sq.converters.CloseEventInit(q);super(A,q);this.#A=q,sq.util.markAsUncloneable(this)}get wasClean(){return sq.brandCheck(this,mX6),this.#A.wasClean}get code(){return sq.brandCheck(this,mX6),this.#A.code}get reason(){return sq.brandCheck(this,mX6),this.#A.reason}}class Yt extends Event{#A;constructor(A,q){sq.argumentLengthCheck(arguments,1,"ErrorEvent constructor");super(A,q);sq.util.markAsUncloneable(this),A=sq.converters.DOMString(A,"ErrorEvent constructor","type"),q=sq.converters.ErrorEventInit(q??{}),this.#A=q}get message(){return sq.brandCheck(this,Yt),this.#A.message}get filename(){return sq.brandCheck(this,Yt),this.#A.filename}get lineno(){return sq.brandCheck(this,Yt),this.#A.lineno}get colno(){return sq.brandCheck(this,Yt),this.#A.colno}get error(){return sq.brandCheck(this,Yt),this.#A.error}}Object.defineProperties(PE.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:wN,origin:wN,lastEventId:wN,source:wN,ports:wN,initMessageEvent:wN});Object.defineProperties(mX6.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:wN,code:wN,wasClean:wN});Object.defineProperties(Yt.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:wN,filename:wN,lineno:wN,colno:wN,error:wN});sq.converters.MessagePort=sq.interfaceConverter(aL3);sq.converters["sequence<MessagePort>"]=sq.sequenceConverter(sq.converters.MessagePort);var PK8=[{key:"bubbles",converter:sq.converters.boolean,defaultValue:()=>!1},{key:"cancelable",converter:sq.converters.boolean,defaultValue:()=>!1},{key:"composed",converter:sq.converters.boolean,defaultValue:()=>!1}];sq.converters.MessageEventInit=sq.dictionaryConverter([...PK8,{key:"data",converter:sq.converters.any,defaultValue:()=>null},{key:"origin",converter:sq.converters.USVString,defaultValue:()=>""},{key:"lastEventId",converter:sq.converters.DOMString,defaultValue:()=>""},{key:"source",converter:sq.nullableConverter(sq.converters.MessagePort),defaultValue:()=>null},{key:"ports",converter:sq.converters["sequence<MessagePort>"],defaultValue:()=>[]}]);sq.converters.CloseEventInit=sq.dictionaryConverter([...PK8,{key:"wasClean",converter:sq.converters.boolean,defaultValue:()=>!1},{key:"code",converter:sq.converters["unsigned short"],defaultValue:()=>0},{key:"reason",converter:sq.converters.USVString,defaultValue:()=>""}]);sq.converters.ErrorEventInit=sq.dictionaryConverter([...PK8,{key:"message",converter:sq.converters.DOMString,defaultValue:()=>""},{key:"filename",converter:sq.converters.USVString,defaultValue:()=>""},{key:"lineno",converter:sq.converters["unsigned long"],defaultValue:()=>0},{key:"colno",converter:sq.converters["unsigned long"],defaultValue:()=>0},{key:"error",converter:sq.converters.any}]);JK7.exports={MessageEvent:PE,CloseEvent:mX6,ErrorEvent:Yt,createFastMessageEvent:sL3}});var N36=C((HH2,MK7)=>{var tL3={enumerable:!0,writable:!1,configurable:!1},eL3={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},Ay3={NOT_SENT:0,PROCESSING:1,SENT:2},qy3={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},Ky3={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},Yy3=Buffer.allocUnsafe(0),zy3={string:1,typedArray:2,arrayBuffer:3,blob:4};MK7.exports={uid:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",sentCloseFrameState:Ay3,staticPropertyDescriptors:tL3,states:eL3,opcodes:qy3,maxUnsigned16Bit:65535,parserStates:Ky3,emptyBuffer:Yy3,sendHints:zy3}});var ju6=C((jH2,DK7)=>{DK7.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var Du6=C((JH2,NK7)=>{var{kReadyState:Ju6,kController:wy3,kResponse:_y3,kBinaryType:$y3,kWebSocketURL:Oy3}=ju6(),{states:Mu6,opcodes:zt}=N36(),{ErrorEvent:Hy3,createFastMessageEvent:jy3}=gX6(),{isUtf8:Jy3}=g6("node:buffer"),{collectASequenceOfCodePointsFast:My3,removeHTTPWhitespace:XK7}=qN();function Dy3(A){return A[Ju6]===Mu6.CONNECTING}function Xy3(A){return A[Ju6]===Mu6.OPEN}function Py3(A){return A[Ju6]===Mu6.CLOSING}function Wy3(A){return A[Ju6]===Mu6.CLOSED}function WK8(A,q,K=(z,w)=>new Event(z,w),Y={}){let z=K(A,Y);q.dispatchEvent(z)}function Zy3(A,q,K){if(A[Ju6]!==Mu6.OPEN)return;let Y;if(q===zt.TEXT)try{Y=VK7(K)}catch{WK7(A,"Received invalid UTF-8 in text frame.");return}else if(q===zt.BINARY)if(A[$y3]==="blob")Y=new Blob([K]);else Y=Gy3(K);WK8("message",A,jy3,{origin:A[Oy3].origin,data:Y})}function Gy3(A){if(A.byteLength===A.buffer.byteLength)return A.buffer;return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}function fy3(A){if(A.length===0)return!1;for(let q=0;q<A.length;++q){let K=A.charCodeAt(q);if(K<33||K>126||K===34||K===40||K===41||K===44||K===47||K===58||K===59||K===60||K===61||K===62||K===63||K===64||K===91||K===92||K===93||K===123||K===125)return!1}return!0}function Ty3(A){if(A>=1000&&A<1015)return A!==1004&&A!==1005&&A!==1006;return A>=3000&&A<=4999}function WK7(A,q){let{[wy3]:K,[_y3]:Y}=A;if(K.abort(),Y?.socket&&!Y.socket.destroyed)Y.socket.destroy();if(q)WK8("error",A,(z,w)=>new Hy3(z,w),{error:Error(q),message:q})}function ZK7(A){return A===zt.CLOSE||A===zt.PING||A===zt.PONG}function GK7(A){return A===zt.CONTINUATION}function fK7(A){return A===zt.TEXT||A===zt.BINARY}function Vy3(A){return fK7(A)||GK7(A)||ZK7(A)}function Ny3(A){let q={position:0},K=new Map;while(q.position<A.length){let Y=My3(";",A,q),[z,w=""]=Y.split("=");K.set(XK7(z,!0,!1),XK7(w,!1,!0)),q.position++}return K}function vy3(A){for(let q=0;q<A.length;q++){let K=A.charCodeAt(q);if(K<48||K>57)return!1}return!0}var TK7=typeof process.versions.icu==="string",PK7=TK7?new TextDecoder("utf-8",{fatal:!0}):void 0,VK7=TK7?PK7.decode.bind(PK7):function(A){if(Jy3(A))return A.toString("utf-8");throw TypeError("Invalid utf-8 received.")};NK7.exports={isConnecting:Dy3,isEstablished:Xy3,isClosing:Py3,isClosed:Wy3,fireEvent:WK8,isValidSubprotocol:fy3,isValidStatusCode:Ty3,failWebsocketConnection:WK7,websocketMessageReceived:Zy3,utf8Decode:VK7,isControlFrame:ZK7,isContinuationFrame:GK7,isTextBinaryFrame:fK7,isValidOpcode:Vy3,parseExtensions:Ny3,isValidClientWindowBits:vy3}});var Ww1=C((MH2,kK7)=>{var{maxUnsigned16Bit:ky3}=N36(),ZK8,Xu6=null,FX6=16386;try{ZK8=g6("node:crypto")}catch{ZK8={randomFillSync:function(q,K,Y){for(let z=0;z<q.length;++z)q[z]=Math.random()*255|0;return q}}}function Ey3(){if(FX6===16386)FX6=0,ZK8.randomFillSync(Xu6??=Buffer.allocUnsafe(16386),0,16386);return[Xu6[FX6++],Xu6[FX6++],Xu6[FX6++],Xu6[FX6++]]}class vK7{constructor(A){this.frameData=A}createFrame(A){let q=this.frameData,K=Ey3(),Y=q?.byteLength??0,z=Y,w=6;if(Y>ky3)w+=8,z=127;else if(Y>125)w+=2,z=126;let _=Buffer.allocUnsafe(Y+w);_[0]=_[1]=0,_[0]|=128,_[0]=(_[0]&240)+A;/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */if(_[w-4]=K[0],_[w-3]=K[1],_[w-2]=K[2],_[w-1]=K[3],_[1]=z,z===126)_.writeUInt16BE(Y,2);else if(z===127)_[2]=_[3]=0,_.writeUIntBE(Y,4,6);_[1]|=128;for(let $=0;$<Y;++$)_[w+$]=q[$]^K[$&3];return _}}kK7.exports={WebsocketFrameSend:vK7}});var fK8=C((DH2,hK7)=>{var{uid:Ly3,states:Pu6,sentCloseFrameState:Zw1,emptyBuffer:yy3,opcodes:Ry3}=N36(),{kReadyState:Wu6,kSentClose:Gw1,kByteParser:LK7,kReceivedClose:EK7,kResponse:yK7}=ju6(),{fireEvent:Sy3,failWebsocketConnection:wt,isClosing:Cy3,isClosed:hy3,isEstablished:Iy3,parseExtensions:by3}=Du6(),{channels:QX6}=AX6(),{CloseEvent:xy3}=gX6(),{makeRequest:uy3}=IX6(),{fetching:By3}=wu6(),{Headers:my3,getHeadersList:gy3}=Z36(),{getDecodeSplit:Fy3}=OE(),{WebsocketFrameSend:Qy3}=Ww1(),GK8;try{GK8=g6("node:crypto")}catch{}function Uy3(A,q,K,Y,z,w){let _=A;_.protocol=A.protocol==="ws:"?"http:":"https:";let $=uy3({urlList:[_],client:K,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(w.headers){let J=gy3(new my3(w.headers));$.headersList=J}let O=GK8.randomBytes(16).toString("base64");$.headersList.append("sec-websocket-key",O),$.headersList.append("sec-websocket-version","13");for(let J of q)$.headersList.append("sec-websocket-protocol",J);let H="permessage-deflate; client_max_window_bits";return $.headersList.append("sec-websocket-extensions",H),By3({request:$,useParallelQueue:!0,dispatcher:w.dispatcher,processResponse(J){if(J.type==="error"||J.status!==101){wt(Y,"Received network error or non-101 status code.");return}if(q.length!==0&&!J.headersList.get("Sec-WebSocket-Protocol")){wt(Y,"Server did not respond with sent protocols.");return}if(J.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){wt(Y,'Server did not set Upgrade header to "websocket".');return}if(J.headersList.get("Connection")?.toLowerCase()!=="upgrade"){wt(Y,'Server did not set Connection header to "upgrade".');return}let M=J.headersList.get("Sec-WebSocket-Accept"),D=GK8.createHash("sha1").update(O+Ly3).digest("base64");if(M!==D){wt(Y,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let X=J.headersList.get("Sec-WebSocket-Extensions"),P;if(X!==null){if(P=by3(X),!P.has("permessage-deflate")){wt(Y,"Sec-WebSocket-Extensions header does not match.");return}}let W=J.headersList.get("Sec-WebSocket-Protocol");if(W!==null){if(!Fy3("sec-websocket-protocol",$.headersList).includes(W)){wt(Y,"Protocol was not set in the opening handshake.");return}}if(J.socket.on("data",RK7),J.socket.on("close",SK7),J.socket.on("error",CK7),QX6.open.hasSubscribers)QX6.open.publish({address:J.socket.address(),protocol:W,extensions:X});z(J,P)}})}function py3(A,q,K,Y){if(Cy3(A)||hy3(A));else if(!Iy3(A))wt(A,"Connection was closed before it was established."),A[Wu6]=Pu6.CLOSING;else if(A[Gw1]===Zw1.NOT_SENT){A[Gw1]=Zw1.PROCESSING;let z=new Qy3;if(q!==void 0&&K===void 0)z.frameData=Buffer.allocUnsafe(2),z.frameData.writeUInt16BE(q,0);else if(q!==void 0&&K!==void 0)z.frameData=Buffer.allocUnsafe(2+Y),z.frameData.writeUInt16BE(q,0),z.frameData.write(K,2,"utf-8");else z.frameData=yy3;A[yK7].socket.write(z.createFrame(Ry3.CLOSE)),A[Gw1]=Zw1.SENT,A[Wu6]=Pu6.CLOSING}else A[Wu6]=Pu6.CLOSING}function RK7(A){if(!this.ws[LK7].write(A))this.pause()}function SK7(){let{ws:A}=this,{[yK7]:q}=A;q.socket.off("data",RK7),q.socket.off("close",SK7),q.socket.off("error",CK7);let K=A[Gw1]===Zw1.SENT&&A[EK7],Y=1005,z="",w=A[LK7].closingInfo;if(w&&!w.error)Y=w.code??1005,z=w.reason;else if(!A[EK7])Y=1006;if(A[Wu6]=Pu6.CLOSED,Sy3("close",A,(_,$)=>new xy3(_,$),{wasClean:K,code:Y,reason:z}),QX6.close.hasSubscribers)QX6.close.publish({websocket:A,code:Y,reason:z})}function CK7(A){let{ws:q}=this;if(q[Wu6]=Pu6.CLOSING,QX6.socketError.hasSubscribers)QX6.socketError.publish(A);this.destroy()}hK7.exports={establishWebSocketConnection:Uy3,closeWebSocketConnection:py3}});var xK7=C((XH2,bK7)=>{var{createInflateRaw:dy3,Z_DEFAULT_WINDOWBITS:cy3}=g6("node:zlib"),{isValidClientWindowBits:ly3}=Du6(),iy3=Buffer.from([0,0,255,255]),fw1=Symbol("kBuffer"),Tw1=Symbol("kLength");class IK7{#A;#q={};constructor(A){this.#q.serverNoContextTakeover=A.has("server_no_context_takeover"),this.#q.serverMaxWindowBits=A.get("server_max_window_bits")}decompress(A,q,K){if(!this.#A){let Y=cy3;if(this.#q.serverMaxWindowBits){if(!ly3(this.#q.serverMaxWindowBits)){K(Error("Invalid server_max_window_bits"));return}Y=Number.parseInt(this.#q.serverMaxWindowBits)}this.#A=dy3({windowBits:Y}),this.#A[fw1]=[],this.#A[Tw1]=0,this.#A.on("data",(z)=>{this.#A[fw1].push(z),this.#A[Tw1]+=z.length}),this.#A.on("error",(z)=>{this.#A=null,K(z)})}if(this.#A.write(A),q)this.#A.write(iy3);this.#A.flush(()=>{let Y=Buffer.concat(this.#A[fw1],this.#A[Tw1]);this.#A[fw1].length=0,this.#A[Tw1]=0,K(null,Y)})}}bK7.exports={PerMessageDeflate:IK7}});var iK7=C((PH2,lK7)=>{var{Writable:ny3}=g6("node:stream"),ry3=g6("node:assert"),{parserStates:_N,opcodes:UX6,states:oy3,emptyBuffer:uK7,sentCloseFrameState:BK7}=N36(),{kReadyState:ay3,kSentClose:mK7,kResponse:gK7,kReceivedClose:FK7}=ju6(),{channels:Vw1}=AX6(),{isValidStatusCode:sy3,isValidOpcode:ty3,failWebsocketConnection:vR,websocketMessageReceived:QK7,utf8Decode:ey3,isControlFrame:UK7,isTextBinaryFrame:TK8,isContinuationFrame:AR3}=Du6(),{WebsocketFrameSend:pK7}=Ww1(),{closeWebSocketConnection:dK7}=fK8(),{PerMessageDeflate:qR3}=xK7();class cK7 extends ny3{#A=[];#q=0;#K=!1;#z=_N.INFO;#Y={};#_=[];#w;constructor(A,q){super();if(this.ws=A,this.#w=q==null?new Map:q,this.#w.has("permessage-deflate"))this.#w.set("permessage-deflate",new qR3(q))}_write(A,q,K){this.#A.push(A),this.#q+=A.length,this.#K=!0,this.run(K)}run(A){while(this.#K)if(this.#z===_N.INFO){if(this.#q<2)return A();let q=this.consume(2),K=(q[0]&128)!==0,Y=q[0]&15,z=(q[1]&128)===128,w=!K&&Y!==UX6.CONTINUATION,_=q[1]&127,$=q[0]&64,O=q[0]&32,H=q[0]&16;if(!ty3(Y))return vR(this.ws,"Invalid opcode received"),A();if(z)return vR(this.ws,"Frame cannot be masked"),A();if($!==0&&!this.#w.has("permessage-deflate")){vR(this.ws,"Expected RSV1 to be clear.");return}if(O!==0||H!==0){vR(this.ws,"RSV1, RSV2, RSV3 must be clear");return}if(w&&!TK8(Y)){vR(this.ws,"Invalid frame type was fragmented.");return}if(TK8(Y)&&this.#_.length>0){vR(this.ws,"Expected continuation frame");return}if(this.#Y.fragmented&&w){vR(this.ws,"Fragmented frame exceeded 125 bytes.");return}if((_>125||w)&&UK7(Y)){vR(this.ws,"Control frame either too large or fragmented");return}if(AR3(Y)&&this.#_.length===0&&!this.#Y.compressed){vR(this.ws,"Unexpected continuation frame");return}if(_<=125)this.#Y.payloadLength=_,this.#z=_N.READ_DATA;else if(_===126)this.#z=_N.PAYLOADLENGTH_16;else if(_===127)this.#z=_N.PAYLOADLENGTH_64;if(TK8(Y))this.#Y.binaryType=Y,this.#Y.compressed=$!==0;this.#Y.opcode=Y,this.#Y.masked=z,this.#Y.fin=K,this.#Y.fragmented=w}else if(this.#z===_N.PAYLOADLENGTH_16){if(this.#q<2)return A();let q=this.consume(2);this.#Y.payloadLength=q.readUInt16BE(0),this.#z=_N.READ_DATA}else if(this.#z===_N.PAYLOADLENGTH_64){if(this.#q<8)return A();let q=this.consume(8),K=q.readUInt32BE(0);if(K>2147483647){vR(this.ws,"Received payload length > 2^31 bytes.");return}let Y=q.readUInt32BE(4);this.#Y.payloadLength=(K<<8)+Y,this.#z=_N.READ_DATA}else if(this.#z===_N.READ_DATA){if(this.#q<this.#Y.payloadLength)return A();let q=this.consume(this.#Y.payloadLength);if(UK7(this.#Y.opcode))this.#K=this.parseControlFrame(q),this.#z=_N.INFO;else if(!this.#Y.compressed){if(this.#_.push(q),!this.#Y.fragmented&&this.#Y.fin){let K=Buffer.concat(this.#_);QK7(this.ws,this.#Y.binaryType,K),this.#_.length=0}this.#z=_N.INFO}else{this.#w.get("permessage-deflate").decompress(q,this.#Y.fin,(K,Y)=>{if(K){dK7(this.ws,1007,K.message,K.message.length);return}if(this.#_.push(Y),!this.#Y.fin){this.#z=_N.INFO,this.#K=!0,this.run(A);return}QK7(this.ws,this.#Y.binaryType,Buffer.concat(this.#_)),this.#K=!0,this.#z=_N.INFO,this.#_.length=0,this.run(A)}),this.#K=!1;break}}}consume(A){if(A>this.#q)throw Error("Called consume() before buffers satiated.");else if(A===0)return uK7;if(this.#A[0].length===A)return this.#q-=this.#A[0].length,this.#A.shift();let q=Buffer.allocUnsafe(A),K=0;while(K!==A){let Y=this.#A[0],{length:z}=Y;if(z+K===A){q.set(this.#A.shift(),K);break}else if(z+K>A){q.set(Y.subarray(0,A-K),K),this.#A[0]=Y.subarray(A-K);break}else q.set(this.#A.shift(),K),K+=Y.length}return this.#q-=A,q}parseCloseBody(A){ry3(A.length!==1);let q;if(A.length>=2)q=A.readUInt16BE(0);if(q!==void 0&&!sy3(q))return{code:1002,reason:"Invalid status code",error:!0};let K=A.subarray(2);if(K[0]===239&&K[1]===187&&K[2]===191)K=K.subarray(3);try{K=ey3(K)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:q,reason:K,error:!1}}parseControlFrame(A){let{opcode:q,payloadLength:K}=this.#Y;if(q===UX6.CLOSE){if(K===1)return vR(this.ws,"Received close frame with a 1-byte body."),!1;if(this.#Y.closeInfo=this.parseCloseBody(A),this.#Y.closeInfo.error){let{code:Y,reason:z}=this.#Y.closeInfo;return dK7(this.ws,Y,z,z.length),vR(this.ws,z),!1}if(this.ws[mK7]!==BK7.SENT){let Y=uK7;if(this.#Y.closeInfo.code)Y=Buffer.allocUnsafe(2),Y.writeUInt16BE(this.#Y.closeInfo.code,0);let z=new pK7(Y);this.ws[gK7].socket.write(z.createFrame(UX6.CLOSE),(w)=>{if(!w)this.ws[mK7]=BK7.SENT})}return this.ws[ay3]=oy3.CLOSING,this.ws[FK7]=!0,!1}else if(q===UX6.PING){if(!this.ws[FK7]){let Y=new pK7(A);if(this.ws[gK7].socket.write(Y.createFrame(UX6.PONG)),Vw1.ping.hasSubscribers)Vw1.ping.publish({payload:A})}}else if(q===UX6.PONG){if(Vw1.pong.hasSubscribers)Vw1.pong.publish({payload:A})}return!0}get closingInfo(){return this.#Y.closeInfo}}lK7.exports={ByteParser:cK7}});var tK7=C((WH2,sK7)=>{var{WebsocketFrameSend:KR3}=Ww1(),{opcodes:nK7,sendHints:pX6}=N36(),YR3=zq8(),rK7=Buffer[Symbol.species];class aK7{#A=new YR3;#q=!1;#K;constructor(A){this.#K=A}add(A,q,K){if(K!==pX6.blob){let z=oK7(A,K);if(!this.#q)this.#K.write(z,q);else{let w={promise:null,callback:q,frame:z};this.#A.push(w)}return}let Y={promise:A.arrayBuffer().then((z)=>{Y.promise=null,Y.frame=oK7(z,K)}),callback:q,frame:null};if(this.#A.push(Y),!this.#q)this.#z()}async#z(){this.#q=!0;let A=this.#A;while(!A.isEmpty()){let q=A.shift();if(q.promise!==null)await q.promise;this.#K.write(q.frame,q.callback),q.callback=q.frame=null}this.#q=!1}}function oK7(A,q){return new KR3(zR3(A,q)).createFrame(q===pX6.string?nK7.TEXT:nK7.BINARY)}function zR3(A,q){switch(q){case pX6.string:return Buffer.from(A);case pX6.arrayBuffer:case pX6.blob:return new rK7(A);case pX6.typedArray:return new rK7(A.buffer,A.byteOffset,A.byteLength)}}sK7.exports={SendQueue:aK7}});var $37=C((ZH2,_37)=>{var{webidl:L3}=R0(),{URLSerializer:wR3}=qN(),{environmentSettingsObject:eK7}=OE(),{staticPropertyDescriptors:_t,states:Zu6,sentCloseFrameState:_R3,sendHints:Nw1}=N36(),{kWebSocketURL:A37,kReadyState:VK8,kController:$R3,kBinaryType:vw1,kResponse:q37,kSentClose:OR3,kByteParser:HR3}=ju6(),{isConnecting:jR3,isEstablished:JR3,isClosing:MR3,isValidSubprotocol:DR3,fireEvent:K37}=Du6(),{establishWebSocketConnection:XR3,closeWebSocketConnection:Y37}=fK8(),{ByteParser:PR3}=iK7(),{kEnumerableProperty:kR,isBlobLike:z37}=x9(),{getGlobalDispatcher:WR3}=dz1(),{types:w37}=g6("node:util"),{ErrorEvent:ZR3,CloseEvent:GR3}=gX6(),{SendQueue:fR3}=tK7();class Uw extends EventTarget{#A={open:null,error:null,close:null,message:null};#q=0;#K="";#z="";#Y;constructor(A,q=[]){super();L3.util.markAsUncloneable(this);let K="WebSocket constructor";L3.argumentLengthCheck(arguments,1,K);let Y=L3.converters["DOMString or sequence<DOMString> or WebSocketInit"](q,K,"options");A=L3.converters.USVString(A,K,"url"),q=Y.protocols;let z=eK7.settingsObject.baseUrl,w;try{w=new URL(A,z)}catch($){throw new DOMException($,"SyntaxError")}if(w.protocol==="http:")w.protocol="ws:";else if(w.protocol==="https:")w.protocol="wss:";if(w.protocol!=="ws:"&&w.protocol!=="wss:")throw new DOMException(`Expected a ws: or wss: protocol, got ${w.protocol}`,"SyntaxError");if(w.hash||w.href.endsWith("#"))throw new DOMException("Got fragment","SyntaxError");if(typeof q==="string")q=[q];if(q.length!==new Set(q.map(($)=>$.toLowerCase())).size)throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(q.length>0&&!q.every(($)=>DR3($)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[A37]=new URL(w.href);let _=eK7.settingsObject;this[$R3]=XR3(w,q,_,this,($,O)=>this.#_($,O),Y),this[VK8]=Uw.CONNECTING,this[OR3]=_R3.NOT_SENT,this[vw1]="blob"}close(A=void 0,q=void 0){L3.brandCheck(this,Uw);let K="WebSocket.close";if(A!==void 0)A=L3.converters["unsigned short"](A,K,"code",{clamp:!0});if(q!==void 0)q=L3.converters.USVString(q,K,"reason");if(A!==void 0){if(A!==1000&&(A<3000||A>4999))throw new DOMException("invalid code","InvalidAccessError")}let Y=0;if(q!==void 0){if(Y=Buffer.byteLength(q),Y>123)throw new DOMException(`Reason must be less than 123 bytes; received ${Y}`,"SyntaxError")}Y37(this,A,q,Y)}send(A){L3.brandCheck(this,Uw);let q="WebSocket.send";if(L3.argumentLengthCheck(arguments,1,q),A=L3.converters.WebSocketSendData(A,q,"data"),jR3(this))throw new DOMException("Sent before connected.","InvalidStateError");if(!JR3(this)||MR3(this))return;if(typeof A==="string"){let K=Buffer.byteLength(A);this.#q+=K,this.#Y.add(A,()=>{this.#q-=K},Nw1.string)}else if(w37.isArrayBuffer(A))this.#q+=A.byteLength,this.#Y.add(A,()=>{this.#q-=A.byteLength},Nw1.arrayBuffer);else if(ArrayBuffer.isView(A))this.#q+=A.byteLength,this.#Y.add(A,()=>{this.#q-=A.byteLength},Nw1.typedArray);else if(z37(A))this.#q+=A.size,this.#Y.add(A,()=>{this.#q-=A.size},Nw1.blob)}get readyState(){return L3.brandCheck(this,Uw),this[VK8]}get bufferedAmount(){return L3.brandCheck(this,Uw),this.#q}get url(){return L3.brandCheck(this,Uw),wR3(this[A37])}get extensions(){return L3.brandCheck(this,Uw),this.#z}get protocol(){return L3.brandCheck(this,Uw),this.#K}get onopen(){return L3.brandCheck(this,Uw),this.#A.open}set onopen(A){if(L3.brandCheck(this,Uw),this.#A.open)this.removeEventListener("open",this.#A.open);if(typeof A==="function")this.#A.open=A,this.addEventListener("open",A);else this.#A.open=null}get onerror(){return L3.brandCheck(this,Uw),this.#A.error}set onerror(A){if(L3.brandCheck(this,Uw),this.#A.error)this.removeEventListener("error",this.#A.error);if(typeof A==="function")this.#A.error=A,this.addEventListener("error",A);else this.#A.error=null}get onclose(){return L3.brandCheck(this,Uw),this.#A.close}set onclose(A){if(L3.brandCheck(this,Uw),this.#A.close)this.removeEventListener("close",this.#A.close);if(typeof A==="function")this.#A.close=A,this.addEventListener("close",A);else this.#A.close=null}get onmessage(){return L3.brandCheck(this,Uw),this.#A.message}set onmessage(A){if(L3.brandCheck(this,Uw),this.#A.message)this.removeEventListener("message",this.#A.message);if(typeof A==="function")this.#A.message=A,this.addEventListener("message",A);else this.#A.message=null}get binaryType(){return L3.brandCheck(this,Uw),this[vw1]}set binaryType(A){if(L3.brandCheck(this,Uw),A!=="blob"&&A!=="arraybuffer")this[vw1]="blob";else this[vw1]=A}#_(A,q){this[q37]=A;let K=new PR3(this,q);K.on("drain",TR3),K.on("error",VR3.bind(this)),A.socket.ws=this,this[HR3]=K,this.#Y=new fR3(A.socket),this[VK8]=Zu6.OPEN;let Y=A.headersList.get("sec-websocket-extensions");if(Y!==null)this.#z=Y;let z=A.headersList.get("sec-websocket-protocol");if(z!==null)this.#K=z;K37("open",this)}}Uw.CONNECTING=Uw.prototype.CONNECTING=Zu6.CONNECTING;Uw.OPEN=Uw.prototype.OPEN=Zu6.OPEN;Uw.CLOSING=Uw.prototype.CLOSING=Zu6.CLOSING;Uw.CLOSED=Uw.prototype.CLOSED=Zu6.CLOSED;Object.defineProperties(Uw.prototype,{CONNECTING:_t,OPEN:_t,CLOSING:_t,CLOSED:_t,url:kR,readyState:kR,bufferedAmount:kR,onopen:kR,onerror:kR,onclose:kR,close:kR,onmessage:kR,binaryType:kR,send:kR,extensions:kR,protocol:kR,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(Uw,{CONNECTING:_t,OPEN:_t,CLOSING:_t,CLOSED:_t});L3.converters["sequence<DOMString>"]=L3.sequenceConverter(L3.converters.DOMString);L3.converters["DOMString or sequence<DOMString>"]=function(A,q,K){if(L3.util.Type(A)==="Object"&&Symbol.iterator in A)return L3.converters["sequence<DOMString>"](A);return L3.converters.DOMString(A,q,K)};L3.converters.WebSocketInit=L3.dictionaryConverter([{key:"protocols",converter:L3.converters["DOMString or sequence<DOMString>"],defaultValue:()=>[]},{key:"dispatcher",converter:L3.converters.any,defaultValue:()=>WR3()},{key:"headers",converter:L3.nullableConverter(L3.converters.HeadersInit)}]);L3.converters["DOMString or sequence<DOMString> or WebSocketInit"]=function(A){if(L3.util.Type(A)==="Object"&&!(Symbol.iterator in A))return L3.converters.WebSocketInit(A);return{protocols:L3.converters["DOMString or sequence<DOMString>"](A)}};L3.converters.WebSocketSendData=function(A){if(L3.util.Type(A)==="Object"){if(z37(A))return L3.converters.Blob(A,{strict:!1});if(ArrayBuffer.isView(A)||w37.isArrayBuffer(A))return L3.converters.BufferSource(A)}return L3.converters.USVString(A)};function TR3(){this.ws[q37].socket.resume()}function VR3(A){let q,K;if(A instanceof GR3)q=A.reason,K=A.code;else q=A.message;K37("error",this,()=>new ZR3("error",{error:A,message:q})),Y37(this,K)}_37.exports={WebSocket:Uw}});var NK8=C((GH2,O37)=>{function NR3(A){return A.indexOf("\x00")===-1}function vR3(A){if(A.length===0)return!1;for(let q=0;q<A.length;q++)if(A.charCodeAt(q)<48||A.charCodeAt(q)>57)return!1;return!0}function kR3(A){return new Promise((q)=>{setTimeout(q,A).unref()})}O37.exports={isValidLastEventId:NR3,isASCIINumber:vR3,delay:kR3}});var D37=C((fH2,M37)=>{var{Transform:ER3}=g6("node:stream"),{isASCIINumber:H37,isValidLastEventId:j37}=NK8(),$c=[239,187,191];class J37 extends ER3{state=null;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(A={}){A.readableObjectMode=!0;super(A);if(this.state=A.eventSourceSettings||{},A.push)this.push=A.push}_transform(A,q,K){if(A.length===0){K();return}if(this.buffer)this.buffer=Buffer.concat([this.buffer,A]);else this.buffer=A;if(this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===$c[0]){K();return}this.checkBOM=!1,K();return;case 2:if(this.buffer[0]===$c[0]&&this.buffer[1]===$c[1]){K();return}this.checkBOM=!1;break;case 3:if(this.buffer[0]===$c[0]&&this.buffer[1]===$c[1]&&this.buffer[2]===$c[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,K();return}this.checkBOM=!1;break;default:if(this.buffer[0]===$c[0]&&this.buffer[1]===$c[1]&&this.buffer[2]===$c[2])this.buffer=this.buffer.subarray(3);this.checkBOM=!1;break}while(this.pos<this.buffer.length){if(this.eventEndCheck){if(this.crlfCheck){if(this.buffer[this.pos]===10){this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.crlfCheck=!1;continue}this.crlfCheck=!1}if(this.buffer[this.pos]===10||this.buffer[this.pos]===13){if(this.buffer[this.pos]===13)this.crlfCheck=!0;if(this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.event.data!==void 0||this.event.event||this.event.id||this.event.retry)this.processEvent(this.event);this.clearEvent();continue}this.eventEndCheck=!1;continue}if(this.buffer[this.pos]===10||this.buffer[this.pos]===13){if(this.buffer[this.pos]===13)this.crlfCheck=!0;this.parseLine(this.buffer.subarray(0,this.pos),this.event),this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.eventEndCheck=!0;continue}this.pos++}K()}parseLine(A,q){if(A.length===0)return;let K=A.indexOf(58);if(K===0)return;let Y="",z="";if(K!==-1){Y=A.subarray(0,K).toString("utf8");let w=K+1;if(A[w]===32)++w;z=A.subarray(w).toString("utf8")}else Y=A.toString("utf8"),z="";switch(Y){case"data":if(q[Y]===void 0)q[Y]=z;else q[Y]+=`
${z}`;break;case"retry":if(H37(z))q[Y]=z;break;case"id":if(j37(z))q[Y]=z;break;case"event":if(z.length>0)q[Y]=z;break}}processEvent(A){if(A.retry&&H37(A.retry))this.state.reconnectionTime=parseInt(A.retry,10);if(A.id&&j37(A.id))this.state.lastEventId=A.id;if(A.data!==void 0)this.push({type:A.event||"message",options:{data:A.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}}M37.exports={EventSourceStream:J37}});var V37=C((TH2,T37)=>{var{pipeline:LR3}=g6("node:stream"),{fetching:yR3}=wu6(),{makeRequest:RR3}=IX6(),{webidl:Oc}=R0(),{EventSourceStream:SR3}=D37(),{parseMIMEType:CR3}=qN(),{createFastMessageEvent:hR3}=gX6(),{isNetworkError:X37}=Yu6(),{delay:IR3}=NK8(),{kEnumerableProperty:v36}=x9(),{environmentSettingsObject:P37}=OE(),W37=!1,Z37=3000,Gu6=0,G37=1,fu6=2,bR3="anonymous",xR3="use-credentials";class dX6 extends EventTarget{#A={open:null,error:null,message:null};#q=null;#K=!1;#z=Gu6;#Y=null;#_=null;#w;#O;constructor(A,q={}){super();Oc.util.markAsUncloneable(this);let K="EventSource constructor";if(Oc.argumentLengthCheck(arguments,1,K),!W37)W37=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"});A=Oc.converters.USVString(A,K,"url"),q=Oc.converters.EventSourceInitDict(q,K,"eventSourceInitDict"),this.#w=q.dispatcher,this.#O={lastEventId:"",reconnectionTime:Z37};let Y=P37,z;try{z=new URL(A,Y.settingsObject.baseUrl),this.#O.origin=z.origin}catch($){throw new DOMException($,"SyntaxError")}this.#q=z.href;let w=bR3;if(q.withCredentials)w=xR3,this.#K=!0;let _={redirect:"follow",keepalive:!0,mode:"cors",credentials:w==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};_.client=P37.settingsObject,_.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],_.cache="no-store",_.initiator="other",_.urlList=[new URL(this.#q)],this.#Y=RR3(_),this.#H()}get readyState(){return this.#z}get url(){return this.#q}get withCredentials(){return this.#K}#H(){if(this.#z===fu6)return;this.#z=Gu6;let A={request:this.#Y,dispatcher:this.#w},q=(K)=>{if(X37(K))this.dispatchEvent(new Event("error")),this.close();this.#j()};A.processResponseEndOfBody=q,A.processResponse=(K)=>{if(X37(K))if(K.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#j();return}let Y=K.headersList.get("content-type",!0),z=Y!==null?CR3(Y):"failure",w=z!=="failure"&&z.essence==="text/event-stream";if(K.status!==200||w===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#z=G37,this.dispatchEvent(new Event("open")),this.#O.origin=K.urlList[K.urlList.length-1].origin;let _=new SR3({eventSourceSettings:this.#O,push:($)=>{this.dispatchEvent(hR3($.type,$.options))}});LR3(K.body.stream,_,($)=>{if($?.aborted===!1)this.close(),this.dispatchEvent(new Event("error"))})},this.#_=yR3(A)}async#j(){if(this.#z===fu6)return;if(this.#z=Gu6,this.dispatchEvent(new Event("error")),await IR3(this.#O.reconnectionTime),this.#z!==Gu6)return;if(this.#O.lastEventId.length)this.#Y.headersList.set("last-event-id",this.#O.lastEventId,!0);this.#H()}close(){if(Oc.brandCheck(this,dX6),this.#z===fu6)return;this.#z=fu6,this.#_.abort(),this.#Y=null}get onopen(){return this.#A.open}set onopen(A){if(this.#A.open)this.removeEventListener("open",this.#A.open);if(typeof A==="function")this.#A.open=A,this.addEventListener("open",A);else this.#A.open=null}get onmessage(){return this.#A.message}set onmessage(A){if(this.#A.message)this.removeEventListener("message",this.#A.message);if(typeof A==="function")this.#A.message=A,this.addEventListener("message",A);else this.#A.message=null}get onerror(){return this.#A.error}set onerror(A){if(this.#A.error)this.removeEventListener("error",this.#A.error);if(typeof A==="function")this.#A.error=A,this.addEventListener("error",A);else this.#A.error=null}}var f37={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Gu6,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:G37,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:fu6,writable:!1}};Object.defineProperties(dX6,f37);Object.defineProperties(dX6.prototype,f37);Object.defineProperties(dX6.prototype,{close:v36,onerror:v36,onmessage:v36,onopen:v36,readyState:v36,url:v36,withCredentials:v36});Oc.converters.EventSourceInitDict=Oc.dictionaryConverter([{key:"withCredentials",converter:Oc.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Oc.converters.any}]);T37.exports={EventSource:dX6,defaultReconnectionTime:Z37}});function Tu6(A){return(q,K,Y)=>{if(typeof K==="function")Y=K,K=null;if(!q||typeof q!=="string"&&typeof q!=="object"&&!(q instanceof URL))throw new kw1("invalid url");if(K!=null&&typeof K!=="object")throw new kw1("invalid opts");if(K&&K.path!=null){if(typeof K.path!=="string")throw new kw1("invalid opts.path");let _=K.path;if(!K.path.startsWith("/"))_=`/${_}`;q=new URL(Ew1.parseOrigin(q).origin+_)}else{if(!K)K=typeof q==="object"?q:{};q=Ew1.parseURL(q)}let{agent:z,dispatcher:w=FR3()}=K;if(z)throw new kw1("unsupported opts.agent. Did you mean opts.client?");return A.call(w,{...K,origin:q.origin,path:q.search?`${q.pathname}${q.search}`:q.pathname,method:K.method||(K.body?"PUT":"GET")},Y)}}var VH2,uR3,NH2,vH2,BR3,kH2,mR3,EH2,gR3,Ew1,kw1,cX6,LH2,yH2,RH2,SH2,CH2,hH2,FR3,QR3,IH2,bH2,xH2,vK8,kK8,dR3,cR3,Lw1,uH2,lR3,iR3,nR3,rR3,oR3,aR3,BH2,mH2,UR3,pR3,sR3,gH2,FH2,QH2,UH2,pH2,dH2,cH2,lH2,iH2,tR3,eR3,AS3,qS3,KS3,YS3,nH2;var EK8=k(()=>{VH2=Ux6(),uR3=Tx6(),NH2=TX6(),vH2=zA7(),BR3=VX6(),kH2=Wq8(),mR3=kA7(),EH2=hA7(),gR3=Ww(),Ew1=x9(),{InvalidArgumentError:kw1}=gR3,cX6=k77(),LH2=Nx6(),yH2=Uq8(),RH2=H47(),SH2=dq8(),CH2=Cq8(),hH2=xz1(),{getGlobalDispatcher:FR3,setGlobalDispatcher:QR3}=dz1(),IH2=cz1(),bH2=kz1(),xH2=Ez1();Object.assign(uR3.prototype,cX6);vK8=BR3,kK8=mR3,dR3={redirect:W47(),retry:G47(),dump:V47(),dns:L47()},cR3={parseHeaders:Ew1.parseHeaders,headerNameToString:Ew1.headerNameToString};Lw1=QR3;uH2=wu6().fetch;lR3=Z36().Headers,iR3=Yu6().Response,nR3=IX6().Request,rR3=Rx6().FormData,oR3=globalThis.File??g6("node:buffer").File,aR3=pq7().FileReader;({setGlobalOrigin:BH2,getGlobalOrigin:mH2}=y48()),{CacheStorage:UR3}=sq7(),{kConstruct:pR3}=jw1();sR3=new UR3(pR3);({deleteCookie:gH2,getCookies:FH2,getSetCookies:QH2,setCookie:UH2}=HK7()),{parseMIMEType:pH2,serializeAMimeType:dH2}=qN(),{CloseEvent:cH2,ErrorEvent:lH2,MessageEvent:iH2}=gX6();tR3=$37().WebSocket,eR3=Tu6(cX6.request),AS3=Tu6(cX6.stream),qS3=Tu6(cX6.pipeline),KS3=Tu6(cX6.connect),YS3=Tu6(cX6.upgrade);({EventSource:nH2}=V37())});function v37(){if(process.env.NODE_EXTRA_CA_CERTS)return;let A=E37();if(A)process.env.NODE_EXTRA_CA_CERTS=A,L(`CA certs: Applied NODE_EXTRA_CA_CERTS from config to process.env: ${A}`)}function k37(){tI.cache.clear?.(),L("Cleared CA certificates cache")}function E37(){try{let q=T1()?.env,Y=HA("userSettings")?.env;L(`CA certs: Config fallback - globalEnv keys: ${q?Object.keys(q).join(","):"none"}, settingsEnv keys: ${Y?Object.keys(Y).join(","):"none"}`);let z=Y?.NODE_EXTRA_CA_CERTS||q?.NODE_EXTRA_CA_CERTS;if(z)L(`CA certs: Found NODE_EXTRA_CA_CERTS in config/settings: ${z}`);return z}catch(A){L(`CA certs: Config fallback failed: ${A}`,{level:"error"});return}}var tI;var lX6=k(()=>{Y7();Eq();G1();Z8();Q8();GA();tI=T8(()=>{let A=xH6("--use-system-ca")||xH6("--use-openssl-ca"),q=process.env.NODE_EXTRA_CA_CERTS,K=E37(),Y=q||K;if(L(`CA certs: useSystemCA=${A}, envPath=${q}, configPath=${K}, extraCertsPath=${Y}`),!A&&!Y)return;let z=g6("tls"),w=[];if(A){let _=z.getCACertificates,$=_?.("system");if($&&$.length>0)w.push(...$),L(`CA certs: Loaded ${w.length} system CA certificates (--use-system-ca)`);else if(!_&&!Y){L("CA certs: --use-system-ca set but system CA API unavailable, deferring to runtime");return}else w.push(...z.rootCertificates),L(`CA certs: Loaded ${w.length} bundled root certificates as base (--use-system-ca fallback)`)}else w.push(...z.rootCertificates),L(`CA certs: Loaded ${w.length} bundled root certificates as base`);if(Y)try{let _=P1().readFileSync(Y,{encoding:"utf8"});w.push(_),L(`CA certs: Appended extra certificates from NODE_EXTRA_CA_CERTS (${Y})`)}catch(_){L(`CA certs: Failed to read NODE_EXTRA_CA_CERTS file (${Y}): ${_}`,{level:"error"})}return w.length>0?w:void 0})});import{Agent as zS3}from"https";function eI(){let A=ER(),q=tI();if(!A&&!q)return;return{...A,...q&&{ca:q}}}function Rw1(){let A=ER(),q=tI();if(!A&&!q)return{};let K={...A,...q&&{ca:q}};if(typeof Bun<"u")return{tls:K};return L("TLS: Created undici agent with custom certificates"),{dispatcher:new vK8({connect:{cert:K.cert,key:K.key,passphrase:K.passphrase,...K.ca&&{ca:K.ca}},pipelining:1})}}function L37(){ER.cache.clear?.(),yw1.cache.clear?.(),L("Cleared mTLS configuration cache")}function y37(){if(!ER())return;if(process.env.NODE_EXTRA_CA_CERTS)L("NODE_EXTRA_CA_CERTS detected - Node.js will automatically append to built-in CAs")}var ER,yw1;var mm=k(()=>{Eq();EK8();G1();Y7();lX6();ER=T8(()=>{let A={};if(process.env.CLAUDE_CODE_CLIENT_CERT)try{A.cert=P1().readFileSync(process.env.CLAUDE_CODE_CLIENT_CERT,{encoding:"utf8"}),L("mTLS: Loaded client certificate from CLAUDE_CODE_CLIENT_CERT")}catch(q){L(`mTLS: Failed to load client certificate: ${q}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY)try{A.key=P1().readFileSync(process.env.CLAUDE_CODE_CLIENT_KEY,{encoding:"utf8"}),L("mTLS: Loaded client key from CLAUDE_CODE_CLIENT_KEY")}catch(q){L(`mTLS: Failed to load client key: ${q}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE)A.passphrase=process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE,L("mTLS: Using client key passphrase");if(Object.keys(A).length===0)return;return A}),yw1=T8(()=>{let A=ER(),q=tI();if(!A&&!q)return;let K={...A,...q&&{ca:q},keepAlive:!0};return L("mTLS: Creating HTTPS agent with custom certificates"),new zS3(K)})});var R37=C((jS3)=>{jS3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(jS3.HttpAuthLocation||(jS3.HttpAuthLocation={}));jS3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(jS3.HttpApiKeyAuthLocation||(jS3.HttpApiKeyAuthLocation={}));jS3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(jS3.EndpointURLScheme||(jS3.EndpointURLScheme={}));jS3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(jS3.AlgorithmId||(jS3.AlgorithmId={}));var wS3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>jS3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>jS3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},_S3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},$S3=(A)=>{return wS3(A)},OS3=(A)=>{return _S3(A)};jS3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(jS3.FieldPosition||(jS3.FieldPosition={}));var HS3="__smithy_context";jS3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(jS3.IniSectionType||(jS3.IniSectionType={}));jS3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(jS3.RequestHandlerProtocol||(jS3.RequestHandlerProtocol={}));jS3.SMITHY_CONTEXT_KEY=HS3;jS3.getDefaultClientConfiguration=$S3;jS3.resolveDefaultRuntimeConfig=OS3});var I37=C((fS3)=>{var XS3=R37(),PS3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},WS3=(A)=>{return{httpHandler:A.httpHandler()}};class S37{name;kind;values;constructor({name:A,kind:q=XS3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class C37{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class Sw1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new Sw1({...A,headers:{...A.headers}});if(q.query)q.query=ZS3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return Sw1.clone(this)}}function ZS3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class h37{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function GS3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}fS3.Field=S37;fS3.Fields=C37;fS3.HttpRequest=Sw1;fS3.HttpResponse=h37;fS3.getHttpHandlerExtensionConfiguration=PS3;fS3.isValidHostname=GS3;fS3.resolveHttpHandlerRuntimeConfig=WS3});var x37=C((SS3)=>{var b37=(A)=>encodeURIComponent(A).replace(/[!'()*]/g,yS3),yS3=(A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,RS3=(A)=>A.split("/").map(b37).join("/");SS3.escapeUri=b37;SS3.escapeUriPath=RS3});var u37=C((bS3)=>{var IK8=x37();function IS3(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=IK8.escapeUri(K),Array.isArray(Y))for(let z=0,w=Y.length;z<w;z++)q.push(`${K}=${IK8.escapeUri(Y[z])}`);else{let z=K;if(Y||typeof Y==="string")z+=`=${IK8.escapeUri(Y)}`;q.push(z)}}return q.join("&")}bS3.buildQueryString=IS3});var $N=C((iS3)=>{var F37=I37(),Q37=u37(),Cw1=g6("http"),hw1=g6("https"),U37=g6("stream"),bK8=g6("http2"),uS3=["ECONNRESET","EPIPE","ETIMEDOUT"],p37=(A)=>{let q={};for(let K of Object.keys(A)){let Y=A[K];q[K]=Array.isArray(Y)?Y.join(","):Y}return q},Uf={setTimeout:(A,q)=>setTimeout(A,q),clearTimeout:(A)=>clearTimeout(A)},B37=1000,BS3=(A,q,K=0)=>{if(!K)return-1;let Y=(z)=>{let w=Uf.setTimeout(()=>{A.destroy(),q(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${K} ms.`),{name:"TimeoutError"}))},K-z),_=($)=>{if($?.connecting)$.on("connect",()=>{Uf.clearTimeout(w)});else Uf.clearTimeout(w)};if(A.socket)_(A.socket);else A.on("socket",_)};if(K<2000)return Y(0),0;return Uf.setTimeout(Y.bind(null,B37),B37)},mS3=(A,q,K=0,Y,z)=>{if(K)return Uf.setTimeout(()=>{let w=`@smithy/node-http-handler - [${Y?"ERROR":"WARN"}] a request has exceeded the configured ${K} ms requestTimeout.`;if(Y){let _=Object.assign(Error(w),{name:"TimeoutError",code:"ETIMEDOUT"});A.destroy(_),q(_)}else w+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",z?.warn?.(w)},K);return-1},gS3=3000,FS3=(A,{keepAlive:q,keepAliveMsecs:K},Y=gS3)=>{if(q!==!0)return-1;let z=()=>{if(A.socket)A.socket.setKeepAlive(q,K||0);else A.on("socket",(w)=>{w.setKeepAlive(q,K||0)})};if(Y===0)return z(),0;return Uf.setTimeout(z,Y)},m37=3000,QS3=(A,q,K=0)=>{let Y=(z)=>{let w=K-z,_=()=>{A.destroy(),q(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${K} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(A.socket)A.socket.setTimeout(w,_),A.on("close",()=>A.socket?.removeListener("timeout",_));else A.setTimeout(w,_)};if(0<K&&K<6000)return Y(0),0;return Uf.setTimeout(Y.bind(null,K===0?0:m37),m37)},g37=6000;async function d37(A,q,K=g37,Y=!1){let z=q.headers??{},w=z.Expect||z.expect,_=-1,$=!0;if(!Y&&w==="100-continue")$=await Promise.race([new Promise((O)=>{_=Number(Uf.setTimeout(()=>O(!0),Math.max(g37,K)))}),new Promise((O)=>{A.on("continue",()=>{Uf.clearTimeout(_),O(!0)}),A.on("response",()=>{Uf.clearTimeout(_),O(!1)}),A.on("error",()=>{Uf.clearTimeout(_),O(!1)})})]);if($)US3(A,q.body)}function US3(A,q){if(q instanceof U37.Readable){q.pipe(A);return}if(q){if(Buffer.isBuffer(q)||typeof q==="string"){A.end(q);return}let K=q;if(typeof K==="object"&&K.buffer&&typeof K.byteOffset==="number"&&typeof K.byteLength==="number"){A.end(Buffer.from(K.buffer,K.byteOffset,K.byteLength));return}A.end(Buffer.from(q));return}A.end()}var pS3=0;class Iw1{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(A){if(typeof A?.handle==="function")return A;return new Iw1(A)}static checkSocketUsage(A,q,K=console){let{sockets:Y,requests:z,maxSockets:w}=A;if(typeof w!=="number"||w===1/0)return q;let _=15000;if(Date.now()-_<q)return q;if(Y&&z)for(let $ in Y){let O=Y[$]?.length??0,H=z[$]?.length??0;if(O>=w&&H>=2*w)return K?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${O} and ${H} additional requests are enqueued.
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return q}constructor(A){this.configProvider=new Promise((q,K)=>{if(typeof A==="function")A().then((Y)=>{q(this.resolveDefaultConfig(Y))}).catch(K);else q(this.resolveDefaultConfig(A))})}resolveDefaultConfig(A){let{requestTimeout:q,connectionTimeout:K,socketTimeout:Y,socketAcquisitionWarningTimeout:z,httpAgent:w,httpsAgent:_,throwOnRequestTimeout:$}=A||{},O=!0,H=50;return{connectionTimeout:K,requestTimeout:q,socketTimeout:Y,socketAcquisitionWarningTimeout:z,throwOnRequestTimeout:$,httpAgent:(()=>{if(w instanceof Cw1.Agent||typeof w?.destroy==="function")return this.externalAgent=!0,w;return new Cw1.Agent({keepAlive:!0,maxSockets:50,...w})})(),httpsAgent:(()=>{if(_ instanceof hw1.Agent||typeof _?.destroy==="function")return this.externalAgent=!0,_;return new hw1.Agent({keepAlive:!0,maxSockets:50,..._})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(A,{abortSignal:q,requestTimeout:K}={}){if(!this.config)this.config=await this.configProvider;return new Promise((Y,z)=>{let w=this.config,_=void 0,$=[],O=async(y)=>{await _,$.forEach(Uf.clearTimeout),Y(y)},H=async(y)=>{await _,$.forEach(Uf.clearTimeout),z(y)};if(q?.aborted){let y=Error("Request aborted");y.name="AbortError",H(y);return}let j=A.protocol==="https:",J=A.headers??{},M=(J.Expect??J.expect)==="100-continue",D=j?w.httpsAgent:w.httpAgent;if(M&&!this.externalAgent)D=new(j?hw1.Agent:Cw1.Agent)({keepAlive:!1,maxSockets:1/0});$.push(Uf.setTimeout(()=>{this.socketWarningTimestamp=Iw1.checkSocketUsage(D,this.socketWarningTimestamp,w.logger)},w.socketAcquisitionWarningTimeout??(w.requestTimeout??2000)+(w.connectionTimeout??1000)));let X=Q37.buildQueryString(A.query||{}),P=void 0;if(A.username!=null||A.password!=null){let y=A.username??"",R=A.password??"";P=`${y}:${R}`}let W=A.path;if(X)W+=`?${X}`;if(A.fragment)W+=`#${A.fragment}`;let Z=A.hostname??"";if(Z[0]==="["&&Z.endsWith("]"))Z=A.hostname.slice(1,-1);else Z=A.hostname;let G={headers:A.headers,host:Z,method:A.method,path:W,port:A.port,agent:D,auth:P},V=(j?hw1.request:Cw1.request)(G,(y)=>{let R=new F37.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:p37(y.headers),body:y});O({response:R})});if(V.on("error",(y)=>{if(uS3.includes(y.code))H(Object.assign(y,{name:"TimeoutError"}));else H(y)}),q){let y=()=>{V.destroy();let R=Error("Request aborted");R.name="AbortError",H(R)};if(typeof q.addEventListener==="function"){let R=q;R.addEventListener("abort",y,{once:!0}),V.once("close",()=>R.removeEventListener("abort",y))}else q.onabort=y}let N=K??w.requestTimeout;$.push(BS3(V,H,w.connectionTimeout)),$.push(mS3(V,H,N,w.throwOnRequestTimeout,w.logger??console)),$.push(QS3(V,H,w.socketTimeout));let v=G.agent;if(typeof v==="object"&&"keepAlive"in v)$.push(FS3(V,{keepAlive:v.keepAlive,keepAliveMsecs:v.keepAliveMsecs}));_=d37(V,A,N,this.externalAgent).catch((y)=>{return $.forEach(Uf.clearTimeout),z(y)})})}updateHttpClientConfig(A,q){this.config=void 0,this.configProvider=this.configProvider.then((K)=>{return{...K,[A]:q}})}httpHandlerConfigs(){return this.config??{}}}class c37{sessions=[];constructor(A){this.sessions=A??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(A){this.sessions.push(A)}contains(A){return this.sessions.includes(A)}remove(A){this.sessions=this.sessions.filter((q)=>q!==A)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(A){for(let q of this.sessions)if(q===A){if(!q.destroyed)q.destroy()}}}class l37{constructor(A){if(this.config=A,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(A,q){let K=this.getUrlString(A),Y=this.sessionCache.get(K);if(Y){let $=Y.poll();if($&&!this.config.disableConcurrency)return $}let z=bK8.connect(K);if(this.config.maxConcurrency)z.settings({maxConcurrentStreams:this.config.maxConcurrency},($)=>{if($)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+A.destination.toString())});z.unref();let w=()=>{z.destroy(),this.deleteSession(K,z)};if(z.on("goaway",w),z.on("error",w),z.on("frameError",w),z.on("close",()=>this.deleteSession(K,z)),q.requestTimeout)z.setTimeout(q.requestTimeout,w);let _=this.sessionCache.get(K)||new c37;return _.offerLast(z),this.sessionCache.set(K,_),z}deleteSession(A,q){let K=this.sessionCache.get(A);if(!K)return;if(!K.contains(q))return;K.remove(q),this.sessionCache.set(A,K)}release(A,q){let K=this.getUrlString(A);this.sessionCache.get(K)?.offerLast(q)}destroy(){for(let[A,q]of this.sessionCache){for(let K of q){if(!K.destroyed)K.destroy();q.remove(K)}this.sessionCache.delete(A)}}setMaxConcurrentStreams(A){if(A&&A<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=A}setDisableConcurrentStreams(A){this.config.disableConcurrency=A}getUrlString(A){return A.destination.toString()}}class xK8{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new l37({});static create(A){if(typeof A?.handle==="function")return A;return new xK8(A)}constructor(A){this.configProvider=new Promise((q,K)=>{if(typeof A==="function")A().then((Y)=>{q(Y||{})}).catch(K);else q(A||{})})}destroy(){this.connectionManager.destroy()}async handle(A,{abortSignal:q,requestTimeout:K}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:Y,disableConcurrentStreams:z}=this.config,w=K??Y;return new Promise((_,$)=>{let O=!1,H=void 0,j=async(h)=>{await H,_(h)},J=async(h)=>{await H,$(h)};if(q?.aborted){O=!0;let h=Error("Request aborted");h.name="AbortError",J(h);return}let{hostname:M,method:D,port:X,protocol:P,query:W}=A,Z="";if(A.username!=null||A.password!=null){let h=A.username??"",B=A.password??"";Z=`${h}:${B}@`}let G=`${P}//${Z}${M}${X?`:${X}`:""}`,f={destination:new URL(G)},V=this.connectionManager.lease(f,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:z||!1}),N=(h)=>{if(z)this.destroySession(V);O=!0,J(h)},v=Q37.buildQueryString(W||{}),y=A.path;if(v)y+=`?${v}`;if(A.fragment)y+=`#${A.fragment}`;let R=V.request({...A.headers,[bK8.constants.HTTP2_HEADER_PATH]:y,[bK8.constants.HTTP2_HEADER_METHOD]:D});if(V.ref(),R.on("response",(h)=>{let B=new F37.HttpResponse({statusCode:h[":status"]||-1,headers:p37(h),body:R});if(O=!0,j({response:B}),z)V.close(),this.connectionManager.deleteSession(G,V)}),w)R.setTimeout(w,()=>{R.close();let h=Error(`Stream timed out because of no activity for ${w} ms`);h.name="TimeoutError",N(h)});if(q){let h=()=>{R.close();let B=Error("Request aborted");B.name="AbortError",N(B)};if(typeof q.addEventListener==="function"){let B=q;B.addEventListener("abort",h,{once:!0}),R.once("close",()=>B.removeEventListener("abort",h))}else q.onabort=h}R.on("frameError",(h,B,x)=>{N(Error(`Frame type id ${h} in stream id ${x} has failed with code ${B}.`))}),R.on("error",N),R.on("aborted",()=>{N(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(V.unref(),z)V.destroy();if(!O)N(Error("Unexpected error: http2 request did not get a response"))}),H=d37(R,A,w)})}updateHttpClientConfig(A,q){this.config=void 0,this.configProvider=this.configProvider.then((K)=>{return{...K,[A]:q}})}httpHandlerConfigs(){return this.config??{}}destroySession(A){if(!A.destroyed)A.destroy()}}class i37 extends U37.Writable{bufferedBytes=[];_write(A,q,K){this.bufferedBytes.push(A),K()}}var dS3=(A)=>{if(cS3(A))return lS3(A);return new Promise((q,K)=>{let Y=new i37;A.pipe(Y),A.on("error",(z)=>{Y.end(),K(z)}),Y.on("error",K),Y.on("finish",function(){let z=new Uint8Array(Buffer.concat(this.bufferedBytes));q(z)})})},cS3=(A)=>typeof ReadableStream==="function"&&A instanceof ReadableStream;async function lS3(A){let q=[],K=A.getReader(),Y=!1,z=0;while(!Y){let{done:$,value:O}=await K.read();if(O)q.push(O),z+=O.length;Y=$}let w=new Uint8Array(z),_=0;for(let $ of q)w.set($,_),_+=$.length;return w}iS3.DEFAULT_REQUEST_TIMEOUT=pS3;iS3.NodeHttp2Handler=xK8;iS3.NodeHttpHandler=Iw1;iS3.streamCollector=dS3});var ON=C((qC3)=>{var uK8={warningEmitted:!1},sS3=(A)=>{if(A&&!uK8.warningEmitted&&parseInt(A.substring(1,A.indexOf(".")))<18)uK8.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js 16.x on January 6, 2025.

To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.

More information can be found at: https://a.co/74kJMmI`)};function tS3(A,q,K){if(!A.$source)A.$source={};return A.$source[q]=K,A}function eS3(A,q,K){if(!A.__aws_sdk_context)A.__aws_sdk_context={features:{}};else if(!A.__aws_sdk_context.features)A.__aws_sdk_context.features={};A.__aws_sdk_context.features[q]=K}function AC3(A,q,K){if(!A.$source)A.$source={};return A.$source[q]=K,A}qC3.emitWarningIfUnsupportedVersion=sS3;qC3.setCredentialFeature=tS3;qC3.setFeature=eS3;qC3.setTokenFeature=AC3;qC3.state=uK8});var EM=C((jC3)=>{class iX6 extends Error{name="ProviderError";tryNextLink;constructor(A,q=!0){let K,Y=!0;if(typeof q==="boolean")K=void 0,Y=q;else if(q!=null&&typeof q==="object")K=q.logger,Y=q.tryNextLink??!0;super(A);this.tryNextLink=Y,Object.setPrototypeOf(this,iX6.prototype),K?.debug?.(`@smithy/property-provider ${Y?"->":"(!)"} ${A}`)}static from(A,q=!0){return Object.assign(new this(A.message,q),A)}}class BK8 extends iX6{name="CredentialsProviderError";constructor(A,q=!0){super(A,q);Object.setPrototypeOf(this,BK8.prototype)}}class mK8 extends iX6{name="TokenProviderError";constructor(A,q=!0){super(A,q);Object.setPrototypeOf(this,mK8.prototype)}}var $C3=(...A)=>async()=>{if(A.length===0)throw new iX6("No providers in chain");let q;for(let K of A)try{return await K()}catch(Y){if(q=Y,Y?.tryNextLink)continue;throw Y}throw q},OC3=(A)=>()=>Promise.resolve(A),HC3=(A,q,K)=>{let Y,z,w,_=!1,$=async()=>{if(!z)z=A();try{Y=await z,w=!0,_=!1}finally{z=void 0}return Y};if(q===void 0)return async(O)=>{if(!w||O?.forceRefresh)Y=await $();return Y};return async(O)=>{if(!w||O?.forceRefresh)Y=await $();if(_)return Y;if(K&&!K(Y))return _=!0,Y;if(q(Y))return await $(),Y;return Y}};jC3.CredentialsProviderError=BK8;jC3.ProviderError=iX6;jC3.TokenProviderError=mK8;jC3.chain=$C3;jC3.fromStatic=OC3;jC3.memoize=HC3});var bw1=C((TC3)=>{var ZC3=ON(),GC3=EM(),n37="AWS_ACCESS_KEY_ID",r37="AWS_SECRET_ACCESS_KEY",o37="AWS_SESSION_TOKEN",a37="AWS_CREDENTIAL_EXPIRATION",s37="AWS_CREDENTIAL_SCOPE",t37="AWS_ACCOUNT_ID",fC3=(A)=>async()=>{A?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let q=process.env[n37],K=process.env[r37],Y=process.env[o37],z=process.env[a37],w=process.env[s37],_=process.env[t37];if(q&&K){let $={accessKeyId:q,secretAccessKey:K,...Y&&{sessionToken:Y},...z&&{expiration:new Date(z)},...w&&{credentialScope:w},..._&&{accountId:_}};return ZC3.setCredentialFeature($,"CREDENTIALS_ENV_VARS","g"),$}throw new GC3.CredentialsProviderError("Unable to find environment variable credentials.",{logger:A?.logger})};TC3.ENV_ACCOUNT_ID=t37;TC3.ENV_CREDENTIAL_SCOPE=s37;TC3.ENV_EXPIRATION=a37;TC3.ENV_KEY=n37;TC3.ENV_SECRET=r37;TC3.ENV_SESSION=o37;TC3.fromEnv=fC3});var FK8=C((e37)=>{Object.defineProperty(e37,"__esModule",{value:!0});e37.getHomeDir=void 0;var RC3=g6("os"),SC3=g6("path"),gK8={},CC3=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},hC3=()=>{let{HOME:A,USERPROFILE:q,HOMEPATH:K,HOMEDRIVE:Y=`C:${SC3.sep}`}=process.env;if(A)return A;if(q)return q;if(K)return`${Y}${K}`;let z=CC3();if(!gK8[z])gK8[z]=(0,RC3.homedir)();return gK8[z]};e37.getHomeDir=hC3});var QK8=C((q57)=>{Object.defineProperty(q57,"__esModule",{value:!0});q57.getSSOTokenFilepath=void 0;var IC3=g6("crypto"),bC3=g6("path"),xC3=FK8(),uC3=(A)=>{let K=(0,IC3.createHash)("sha1").update(A).digest("hex");return(0,bC3.join)((0,xC3.getHomeDir)(),".aws","sso","cache",`${K}.json`)};q57.getSSOTokenFilepath=uC3});var w57=C((Y57)=>{Object.defineProperty(Y57,"__esModule",{value:!0});Y57.getSSOTokenFromFile=Y57.tokenIntercept=void 0;var BC3=g6("fs/promises"),mC3=QK8();Y57.tokenIntercept={};var gC3=async(A)=>{if(Y57.tokenIntercept[A])return Y57.tokenIntercept[A];let q=(0,mC3.getSSOTokenFilepath)(A),K=await(0,BC3.readFile)(q,"utf8");return JSON.parse(K)};Y57.getSSOTokenFromFile=gC3});var _57=C((cC3)=>{cC3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(cC3.HttpAuthLocation||(cC3.HttpAuthLocation={}));cC3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(cC3.HttpApiKeyAuthLocation||(cC3.HttpApiKeyAuthLocation={}));cC3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(cC3.EndpointURLScheme||(cC3.EndpointURLScheme={}));cC3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(cC3.AlgorithmId||(cC3.AlgorithmId={}));var FC3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>cC3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>cC3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},QC3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},UC3=(A)=>{return FC3(A)},pC3=(A)=>{return QC3(A)};cC3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(cC3.FieldPosition||(cC3.FieldPosition={}));var dC3="__smithy_context";cC3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(cC3.IniSectionType||(cC3.IniSectionType={}));cC3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(cC3.RequestHandlerProtocol||(cC3.RequestHandlerProtocol={}));cC3.SMITHY_CONTEXT_KEY=dC3;cC3.getDefaultClientConfiguration=UC3;cC3.resolveDefaultRuntimeConfig=pC3});var H57=C(($57)=>{Object.defineProperty($57,"__esModule",{value:!0});$57.readFile=$57.fileIntercept=$57.filePromises=void 0;var rC3=g6("node:fs/promises");$57.filePromises={};$57.fileIntercept={};var oC3=(A,q)=>{if($57.fileIntercept[A]!==void 0)return $57.fileIntercept[A];if(!$57.filePromises[A]||q?.ignoreCache)$57.filePromises[A]=(0,rC3.readFile)(A,"utf8");return $57.filePromises[A]};$57.readFile=oC3});var gm=C((E36)=>{var vu6=FK8(),j57=QK8(),oK8=w57(),uw1=g6("path"),Bw1=_57(),nX6=H57(),M57="AWS_PROFILE",D57="default",aC3=(A)=>A.profile||process.env[M57]||D57,k36=".",sC3=(A)=>Object.entries(A).filter(([q])=>{let K=q.indexOf(k36);if(K===-1)return!1;return Object.values(Bw1.IniSectionType).includes(q.substring(0,K))}).reduce((q,[K,Y])=>{let z=K.indexOf(k36),w=K.substring(0,z)===Bw1.IniSectionType.PROFILE?K.substring(z+1):K;return q[w]=Y,q},{...A.default&&{default:A.default}}),tC3="AWS_CONFIG_FILE",X57=()=>process.env[tC3]||uw1.join(vu6.getHomeDir(),".aws","config"),eC3="AWS_SHARED_CREDENTIALS_FILE",Ah3=()=>process.env[eC3]||uw1.join(vu6.getHomeDir(),".aws","credentials"),qh3=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Kh3=["__proto__","profile __proto__"],aK8=(A)=>{let q={},K,Y;for(let z of A.split(/\r?\n/)){let w=z.split(/(^|\s)[;#]/)[0].trim();if(w[0]==="["&&w[w.length-1]==="]"){K=void 0,Y=void 0;let $=w.substring(1,w.length-1),O=qh3.exec($);if(O){let[,H,,j]=O;if(Object.values(Bw1.IniSectionType).includes(H))K=[H,j].join(k36)}else K=$;if(Kh3.includes($))throw Error(`Found invalid profile name "${$}"`)}else if(K){let $=w.indexOf("=");if(![0,-1].includes($)){let[O,H]=[w.substring(0,$).trim(),w.substring($+1).trim()];if(H==="")Y=O;else{if(Y&&z.trimStart()===z)Y=void 0;q[K]=q[K]||{};let j=Y?[Y,O].join(k36):O;q[K][j]=H}}}}return q},J57=()=>({}),P57=async(A={})=>{let{filepath:q=Ah3(),configFilepath:K=X57()}=A,Y=vu6.getHomeDir(),z="~/",w=q;if(q.startsWith("~/"))w=uw1.join(Y,q.slice(2));let _=K;if(K.startsWith("~/"))_=uw1.join(Y,K.slice(2));let $=await Promise.all([nX6.readFile(_,{ignoreCache:A.ignoreCache}).then(aK8).then(sC3).catch(J57),nX6.readFile(w,{ignoreCache:A.ignoreCache}).then(aK8).catch(J57)]);return{configFile:$[0],credentialsFile:$[1]}},Yh3=(A)=>Object.entries(A).filter(([q])=>q.startsWith(Bw1.IniSectionType.SSO_SESSION+k36)).reduce((q,[K,Y])=>({...q,[K.substring(K.indexOf(k36)+1)]:Y}),{}),zh3=()=>({}),wh3=async(A={})=>nX6.readFile(A.configFilepath??X57()).then(aK8).then(Yh3).catch(zh3),_h3=(...A)=>{let q={};for(let K of A)for(let[Y,z]of Object.entries(K))if(q[Y]!==void 0)Object.assign(q[Y],z);else q[Y]=z;return q},$h3=async(A)=>{let q=await P57(A);return _h3(q.configFile,q.credentialsFile)},Oh3={getFileRecord(){return nX6.fileIntercept},interceptFile(A,q){nX6.fileIntercept[A]=Promise.resolve(q)},getTokenRecord(){return oK8.tokenIntercept},interceptToken(A,q){oK8.tokenIntercept[A]=q}};Object.defineProperty(E36,"getSSOTokenFromFile",{enumerable:!0,get:function(){return oK8.getSSOTokenFromFile}});Object.defineProperty(E36,"readFile",{enumerable:!0,get:function(){return nX6.readFile}});E36.CONFIG_PREFIX_SEPARATOR=k36;E36.DEFAULT_PROFILE=D57;E36.ENV_PROFILE=M57;E36.externalDataInterceptor=Oh3;E36.getProfileName=aC3;E36.loadSharedConfigFiles=P57;E36.loadSsoSessionData=wh3;E36.parseKnownFiles=$h3;Object.keys(vu6).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(E36,A))Object.defineProperty(E36,A,{enumerable:!0,get:function(){return vu6[A]}})});Object.keys(j57).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(E36,A))Object.defineProperty(E36,A,{enumerable:!0,get:function(){return j57[A]}})})});var HN=C((Nh3)=>{var ku6=EM(),W57=gm();function Z57(A){try{let q=new Set(Array.from(A.match(/([A-Z_]){3,}/g)??[]));return q.delete("CONFIG"),q.delete("CONFIG_PREFIX_SEPARATOR"),q.delete("ENV"),[...q].join(", ")}catch(q){return A}}var Zh3=(A,q)=>async()=>{try{let K=A(process.env,q);if(K===void 0)throw Error();return K}catch(K){throw new ku6.CredentialsProviderError(K.message||`Not found in ENV: ${Z57(A.toString())}`,{logger:q?.logger})}},Gh3=(A,{preferredFile:q="config",...K}={})=>async()=>{let Y=W57.getProfileName(K),{configFile:z,credentialsFile:w}=await W57.loadSharedConfigFiles(K),_=w[Y]||{},$=z[Y]||{},O=q==="config"?{..._,...$}:{...$,..._};try{let j=A(O,q==="config"?z:w);if(j===void 0)throw Error();return j}catch(H){throw new ku6.CredentialsProviderError(H.message||`Not found in config files w/ profile [${Y}]: ${Z57(A.toString())}`,{logger:K.logger})}},fh3=(A)=>typeof A==="function",Th3=(A)=>fh3(A)?async()=>await A():ku6.fromStatic(A),Vh3=({environmentVariableSelector:A,configFileSelector:q,default:K},Y={})=>{let{signingName:z,logger:w}=Y,_={signingName:z,logger:w};return ku6.memoize(ku6.chain(Zh3(A,_),Gh3(q,Y),Th3(K)))};Nh3.loadConfig=Vh3});var G57=C((Eh3)=>{function kh3(A){let q={};if(A=A.replace(/^\?/,""),A)for(let K of A.split("&")){let[Y,z=null]=K.split("=");if(Y=decodeURIComponent(Y),z)z=decodeURIComponent(z);if(!(Y in q))q[Y]=z;else if(Array.isArray(q[Y]))q[Y].push(z);else q[Y]=[q[Y],z]}return q}Eh3.parseQueryString=kh3});var LR=C((Rh3)=>{var yh3=G57(),f57=(A)=>{if(typeof A==="string")return f57(new URL(A));let{hostname:q,pathname:K,port:Y,protocol:z,search:w}=A,_;if(w)_=yh3.parseQueryString(w);return{hostname:q,port:Y?parseInt(Y):void 0,protocol:z,path:K,query:_}};Rh3.parseUrl=f57});var L36=C((zI3)=>{var Fm=EM(),Ch3=g6("url"),hh3=g6("buffer"),Ih3=g6("http"),A38=HN(),bh3=LR();function Lu6(A){return new Promise((q,K)=>{let Y=Ih3.request({method:"GET",...A,hostname:A.hostname?.replace(/^\[(.+)\]$/,"$1")});Y.on("error",(z)=>{K(Object.assign(new Fm.ProviderError("Unable to connect to instance metadata service"),z)),Y.destroy()}),Y.on("timeout",()=>{K(new Fm.ProviderError("TimeoutError from instance metadata service")),Y.destroy()}),Y.on("response",(z)=>{let{statusCode:w=400}=z;if(w<200||300<=w)K(Object.assign(new Fm.ProviderError("Error response received from instance metadata service"),{statusCode:w})),Y.destroy();let _=[];z.on("data",($)=>{_.push($)}),z.on("end",()=>{q(hh3.Buffer.concat(_)),Y.destroy()})}),Y.end()})}var v57=(A)=>Boolean(A)&&typeof A==="object"&&typeof A.AccessKeyId==="string"&&typeof A.SecretAccessKey==="string"&&typeof A.Token==="string"&&typeof A.Expiration==="string",k57=(A)=>({accessKeyId:A.AccessKeyId,secretAccessKey:A.SecretAccessKey,sessionToken:A.Token,expiration:new Date(A.Expiration),...A.AccountId&&{accountId:A.AccountId}}),E57=1000,L57=0,q38=({maxRetries:A=L57,timeout:q=E57})=>({maxRetries:A,timeout:q}),tK8=(A,q)=>{let K=A();for(let Y=0;Y<q;Y++)K=K.catch(A);return K},mw1="AWS_CONTAINER_CREDENTIALS_FULL_URI",gw1="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",eK8="AWS_CONTAINER_AUTHORIZATION_TOKEN",xh3=(A={})=>{let{timeout:q,maxRetries:K}=q38(A);return()=>tK8(async()=>{let Y=await Fh3({logger:A.logger}),z=JSON.parse(await uh3(q,Y));if(!v57(z))throw new Fm.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:A.logger});return k57(z)},K)},uh3=async(A,q)=>{if(process.env[eK8])q.headers={...q.headers,Authorization:process.env[eK8]};return(await Lu6({...q,timeout:A})).toString()},Bh3="169.254.170.2",mh3={localhost:!0,"127.0.0.1":!0},gh3={"http:":!0,"https:":!0},Fh3=async({logger:A})=>{if(process.env[gw1])return{hostname:Bh3,path:process.env[gw1]};if(process.env[mw1]){let q=Ch3.parse(process.env[mw1]);if(!q.hostname||!(q.hostname in mh3))throw new Fm.CredentialsProviderError(`${q.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:A});if(!q.protocol||!(q.protocol in gh3))throw new Fm.CredentialsProviderError(`${q.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:A});return{...q,port:q.port?parseInt(q.port,10):void 0}}throw new Fm.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${gw1} or ${mw1} environment variable is set`,{tryNextLink:!1,logger:A})};class K38 extends Fm.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(A,q=!0){super(A,q);this.tryNextLink=q,Object.setPrototypeOf(this,K38.prototype)}}zI3.Endpoint=void 0;(function(A){A.IPv4="http://169.254.169.254",A.IPv6="http://[fd00:ec2::254]"})(zI3.Endpoint||(zI3.Endpoint={}));var Qh3="AWS_EC2_METADATA_SERVICE_ENDPOINT",Uh3="ec2_metadata_service_endpoint",ph3={environmentVariableSelector:(A)=>A[Qh3],configFileSelector:(A)=>A[Uh3],default:void 0},rX6;(function(A){A.IPv4="IPv4",A.IPv6="IPv6"})(rX6||(rX6={}));var dh3="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ch3="ec2_metadata_service_endpoint_mode",lh3={environmentVariableSelector:(A)=>A[dh3],configFileSelector:(A)=>A[ch3],default:rX6.IPv4},y57=async()=>bh3.parseUrl(await ih3()||await nh3()),ih3=async()=>A38.loadConfig(ph3)(),nh3=async()=>{let A=await A38.loadConfig(lh3)();switch(A){case rX6.IPv4:return zI3.Endpoint.IPv4;case rX6.IPv6:return zI3.Endpoint.IPv6;default:throw Error(`Unsupported endpoint mode: ${A}. Select from ${Object.values(rX6)}`)}},rh3=300,oh3=300,ah3="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",T57=(A,q)=>{let K=rh3+Math.floor(Math.random()*oh3),Y=new Date(Date.now()+K*1000);q.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(Y)}.
For more information, please visit: `+ah3);let z=A.originalExpiration??A.expiration;return{...A,...z?{originalExpiration:z}:{},expiration:Y}},sh3=(A,q={})=>{let K=q?.logger||console,Y;return async()=>{let z;try{if(z=await A(),z.expiration&&z.expiration.getTime()<Date.now())z=T57(z,K)}catch(w){if(Y)K.warn("Credential renew failed: ",w),z=T57(Y,K);else throw w}return Y=z,z}},R57="/latest/meta-data/iam/security-credentials/",th3="/latest/api/token",sK8="AWS_EC2_METADATA_V1_DISABLED",V57="ec2_metadata_v1_disabled",N57="x-aws-ec2-metadata-token",eh3=(A={})=>sh3(AI3(A),{logger:A.logger}),AI3=(A={})=>{let q=!1,{logger:K,profile:Y}=A,{timeout:z,maxRetries:w}=q38(A),_=async($,O)=>{if(q||O.headers?.[N57]==null){let J=!1,M=!1,D=await A38.loadConfig({environmentVariableSelector:(X)=>{let P=X[sK8];if(M=!!P&&P!=="false",P===void 0)throw new Fm.CredentialsProviderError(`${sK8} not set in env, checking config file next.`,{logger:A.logger});return M},configFileSelector:(X)=>{let P=X[V57];return J=!!P&&P!=="false",J},default:!1},{profile:Y})();if(A.ec2MetadataV1Disabled||D){let X=[];if(A.ec2MetadataV1Disabled)X.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(J)X.push(`config file profile (${V57})`);if(M)X.push(`process environment variable (${sK8})`);throw new K38(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${X.join(", ")}].`)}}let j=(await tK8(async()=>{let J;try{J=await KI3(O)}catch(M){if(M.statusCode===401)q=!1;throw M}return J},$)).trim();return tK8(async()=>{let J;try{J=await YI3(j,O,A)}catch(M){if(M.statusCode===401)q=!1;throw M}return J},$)};return async()=>{let $=await y57();if(q)return K?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),_(w,{...$,timeout:z});else{let O;try{O=(await qI3({...$,timeout:z})).toString()}catch(H){if(H?.statusCode===400)throw Object.assign(H,{message:"EC2 Metadata token request returned error"});else if(H.message==="TimeoutError"||[403,404,405].includes(H.statusCode))q=!0;return K?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),_(w,{...$,timeout:z})}return _(w,{...$,headers:{[N57]:O},timeout:z})}}},qI3=async(A)=>Lu6({...A,path:th3,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),KI3=async(A)=>(await Lu6({...A,path:R57})).toString(),YI3=async(A,q,K)=>{let Y=JSON.parse((await Lu6({...q,path:R57+A})).toString());if(!v57(Y))throw new Fm.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:K.logger});return k57(Y)};zI3.DEFAULT_MAX_RETRIES=L57;zI3.DEFAULT_TIMEOUT=E57;zI3.ENV_CMDS_AUTH_TOKEN=eK8;zI3.ENV_CMDS_FULL_URI=mw1;zI3.ENV_CMDS_RELATIVE_URI=gw1;zI3.fromContainerMetadata=xh3;zI3.fromInstanceMetadata=eh3;zI3.getInstanceMetadataEndpoint=y57;zI3.httpRequest=Lu6;zI3.providerConfigFromInit=q38});var d2=C((Ej2,Uw1)=>{var S57,C57,h57,I57,b57,x57,u57,B57,m57,g57,F57,Q57,U57,Fw1,Y38,p57,d57,c57,oX6,l57,i57,n57,r57,o57,a57,s57,t57,e57,Qw1,A97,q97,K97;(function(A){var q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(Y){A(K(q,K(Y)))});else if(typeof Uw1==="object"&&typeof Ej2==="object")A(K(q,K(Ej2)));else A(K(q));function K(Y,z){if(Y!==q)if(typeof Object.create==="function")Object.defineProperty(Y,"__esModule",{value:!0});else Y.__esModule=!0;return function(w,_){return Y[w]=z?z(w,_):_}}})(function(A){var q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))w[$]=_[$]};S57=function(w,_){if(typeof _!=="function"&&_!==null)throw TypeError("Class extends value "+String(_)+" is not a constructor or null");q(w,_);function $(){this.constructor=w}w.prototype=_===null?Object.create(_):($.prototype=_.prototype,new $)},C57=Object.assign||function(w){for(var _,$=1,O=arguments.length;$<O;$++){_=arguments[$];for(var H in _)if(Object.prototype.hasOwnProperty.call(_,H))w[H]=_[H]}return w},h57=function(w,_){var $={};for(var O in w)if(Object.prototype.hasOwnProperty.call(w,O)&&_.indexOf(O)<0)$[O]=w[O];if(w!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var H=0,O=Object.getOwnPropertySymbols(w);H<O.length;H++)if(_.indexOf(O[H])<0&&Object.prototype.propertyIsEnumerable.call(w,O[H]))$[O[H]]=w[O[H]]}return $},I57=function(w,_,$,O){var H=arguments.length,j=H<3?_:O===null?O=Object.getOwnPropertyDescriptor(_,$):O,J;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")j=Reflect.decorate(w,_,$,O);else for(var M=w.length-1;M>=0;M--)if(J=w[M])j=(H<3?J(j):H>3?J(_,$,j):J(_,$))||j;return H>3&&j&&Object.defineProperty(_,$,j),j},b57=function(w,_){return function($,O){_($,O,w)}},x57=function(w,_,$,O,H,j){function J(v){if(v!==void 0&&typeof v!=="function")throw TypeError("Function expected");return v}var M=O.kind,D=M==="getter"?"get":M==="setter"?"set":"value",X=!_&&w?O.static?w:w.prototype:null,P=_||(X?Object.getOwnPropertyDescriptor(X,O.name):{}),W,Z=!1;for(var G=$.length-1;G>=0;G--){var f={};for(var V in O)f[V]=V==="access"?{}:O[V];for(var V in O.access)f.access[V]=O.access[V];f.addInitializer=function(v){if(Z)throw TypeError("Cannot add initializers after decoration has completed");j.push(J(v||null))};var N=(0,$[G])(M==="accessor"?{get:P.get,set:P.set}:P[D],f);if(M==="accessor"){if(N===void 0)continue;if(N===null||typeof N!=="object")throw TypeError("Object expected");if(W=J(N.get))P.get=W;if(W=J(N.set))P.set=W;if(W=J(N.init))H.unshift(W)}else if(W=J(N))if(M==="field")H.unshift(W);else P[D]=W}if(X)Object.defineProperty(X,O.name,P);Z=!0},u57=function(w,_,$){var O=arguments.length>2;for(var H=0;H<_.length;H++)$=O?_[H].call(w,$):_[H].call(w);return O?$:void 0},B57=function(w){return typeof w==="symbol"?w:"".concat(w)},m57=function(w,_,$){if(typeof _==="symbol")_=_.description?"[".concat(_.description,"]"):"";return Object.defineProperty(w,"name",{configurable:!0,value:$?"".concat($," ",_):_})},g57=function(w,_){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(w,_)},F57=function(w,_,$,O){function H(j){return j instanceof $?j:new $(function(J){J(j)})}return new($||($=Promise))(function(j,J){function M(P){try{X(O.next(P))}catch(W){J(W)}}function D(P){try{X(O.throw(P))}catch(W){J(W)}}function X(P){P.done?j(P.value):H(P.value).then(M,D)}X((O=O.apply(w,_||[])).next())})},Q57=function(w,_){var $={label:0,sent:function(){if(j[0]&1)throw j[1];return j[1]},trys:[],ops:[]},O,H,j,J=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return J.next=M(0),J.throw=M(1),J.return=M(2),typeof Symbol==="function"&&(J[Symbol.iterator]=function(){return this}),J;function M(X){return function(P){return D([X,P])}}function D(X){if(O)throw TypeError("Generator is already executing.");while(J&&(J=0,X[0]&&($=0)),$)try{if(O=1,H&&(j=X[0]&2?H.return:X[0]?H.throw||((j=H.return)&&j.call(H),0):H.next)&&!(j=j.call(H,X[1])).done)return j;if(H=0,j)X=[X[0]&2,j.value];switch(X[0]){case 0:case 1:j=X;break;case 4:return $.label++,{value:X[1],done:!1};case 5:$.label++,H=X[1],X=[0];continue;case 7:X=$.ops.pop(),$.trys.pop();continue;default:if((j=$.trys,!(j=j.length>0&&j[j.length-1]))&&(X[0]===6||X[0]===2)){$=0;continue}if(X[0]===3&&(!j||X[1]>j[0]&&X[1]<j[3])){$.label=X[1];break}if(X[0]===6&&$.label<j[1]){$.label=j[1],j=X;break}if(j&&$.label<j[2]){$.label=j[2],$.ops.push(X);break}if(j[2])$.ops.pop();$.trys.pop();continue}X=_.call(w,$)}catch(P){X=[6,P],H=0}finally{O=j=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},U57=function(w,_){for(var $ in w)if($!=="default"&&!Object.prototype.hasOwnProperty.call(_,$))Qw1(_,w,$)},Qw1=Object.create?function(w,_,$,O){if(O===void 0)O=$;var H=Object.getOwnPropertyDescriptor(_,$);if(!H||("get"in H?!_.__esModule:H.writable||H.configurable))H={enumerable:!0,get:function(){return _[$]}};Object.defineProperty(w,O,H)}:function(w,_,$,O){if(O===void 0)O=$;w[O]=_[$]},Fw1=function(w){var _=typeof Symbol==="function"&&Symbol.iterator,$=_&&w[_],O=0;if($)return $.call(w);if(w&&typeof w.length==="number")return{next:function(){if(w&&O>=w.length)w=void 0;return{value:w&&w[O++],done:!w}}};throw TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},Y38=function(w,_){var $=typeof Symbol==="function"&&w[Symbol.iterator];if(!$)return w;var O=$.call(w),H,j=[],J;try{while((_===void 0||_-- >0)&&!(H=O.next()).done)j.push(H.value)}catch(M){J={error:M}}finally{try{if(H&&!H.done&&($=O.return))$.call(O)}finally{if(J)throw J.error}}return j},p57=function(){for(var w=[],_=0;_<arguments.length;_++)w=w.concat(Y38(arguments[_]));return w},d57=function(){for(var w=0,_=0,$=arguments.length;_<$;_++)w+=arguments[_].length;for(var O=Array(w),H=0,_=0;_<$;_++)for(var j=arguments[_],J=0,M=j.length;J<M;J++,H++)O[H]=j[J];return O},c57=function(w,_,$){if($||arguments.length===2){for(var O=0,H=_.length,j;O<H;O++)if(j||!(O in _)){if(!j)j=Array.prototype.slice.call(_,0,O);j[O]=_[O]}}return w.concat(j||Array.prototype.slice.call(_))},oX6=function(w){return this instanceof oX6?(this.v=w,this):new oX6(w)},l57=function(w,_,$){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=$.apply(w,_||[]),H,j=[];return H=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),M("next"),M("throw"),M("return",J),H[Symbol.asyncIterator]=function(){return this},H;function J(G){return function(f){return Promise.resolve(f).then(G,W)}}function M(G,f){if(O[G]){if(H[G]=function(V){return new Promise(function(N,v){j.push([G,V,N,v])>1||D(G,V)})},f)H[G]=f(H[G])}}function D(G,f){try{X(O[G](f))}catch(V){Z(j[0][3],V)}}function X(G){G.value instanceof oX6?Promise.resolve(G.value.v).then(P,W):Z(j[0][2],G)}function P(G){D("next",G)}function W(G){D("throw",G)}function Z(G,f){if(G(f),j.shift(),j.length)D(j[0][0],j[0][1])}},i57=function(w){var _,$;return _={},O("next"),O("throw",function(H){throw H}),O("return"),_[Symbol.iterator]=function(){return this},_;function O(H,j){_[H]=w[H]?function(J){return($=!$)?{value:oX6(w[H](J)),done:!1}:j?j(J):J}:j}},n57=function(w){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var _=w[Symbol.asyncIterator],$;return _?_.call(w):(w=typeof Fw1==="function"?Fw1(w):w[Symbol.iterator](),$={},O("next"),O("throw"),O("return"),$[Symbol.asyncIterator]=function(){return this},$);function O(j){$[j]=w[j]&&function(J){return new Promise(function(M,D){J=w[j](J),H(M,D,J.done,J.value)})}}function H(j,J,M,D){Promise.resolve(D).then(function(X){j({value:X,done:M})},J)}},r57=function(w,_){if(Object.defineProperty)Object.defineProperty(w,"raw",{value:_});else w.raw=_;return w};var K=Object.create?function(w,_){Object.defineProperty(w,"default",{enumerable:!0,value:_})}:function(w,_){w.default=_},Y=function(w){return Y=Object.getOwnPropertyNames||function(_){var $=[];for(var O in _)if(Object.prototype.hasOwnProperty.call(_,O))$[$.length]=O;return $},Y(w)};o57=function(w){if(w&&w.__esModule)return w;var _={};if(w!=null){for(var $=Y(w),O=0;O<$.length;O++)if($[O]!=="default")Qw1(_,w,$[O])}return K(_,w),_},a57=function(w){return w&&w.__esModule?w:{default:w}},s57=function(w,_,$,O){if($==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof _==="function"?w!==_||!O:!_.has(w))throw TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?O:$==="a"?O.call(w):O?O.value:_.get(w)},t57=function(w,_,$,O,H){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!H)throw TypeError("Private accessor was defined without a setter");if(typeof _==="function"?w!==_||!H:!_.has(w))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?H.call(w,$):H?H.value=$:_.set(w,$),$},e57=function(w,_){if(_===null||typeof _!=="object"&&typeof _!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof w==="function"?_===w:w.has(_)},A97=function(w,_,$){if(_!==null&&_!==void 0){if(typeof _!=="object"&&typeof _!=="function")throw TypeError("Object expected.");var O,H;if($){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=_[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=_[Symbol.dispose],$)H=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(H)O=function(){try{H.call(this)}catch(j){return Promise.reject(j)}};w.stack.push({value:_,dispose:O,async:$})}else if($)w.stack.push({async:!0});return _};var z=typeof SuppressedError==="function"?SuppressedError:function(w,_,$){var O=Error($);return O.name="SuppressedError",O.error=w,O.suppressed=_,O};q97=function(w){function _(j){w.error=w.hasError?new z(j,w.error,"An error was suppressed during disposal."):j,w.hasError=!0}var $,O=0;function H(){while($=w.stack.pop())try{if(!$.async&&O===1)return O=0,w.stack.push($),Promise.resolve().then(H);if($.dispose){var j=$.dispose.call($.value);if($.async)return O|=2,Promise.resolve(j).then(H,function(J){return _(J),H()})}else O|=1}catch(J){_(J)}if(O===1)return w.hasError?Promise.reject(w.error):Promise.resolve();if(w.hasError)throw w.error}return H()},K97=function(w,_){if(typeof w==="string"&&/^\.\.?\//.test(w))return w.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function($,O,H,j,J){return O?_?".jsx":".js":H&&(!j||!J)?$:H+j+"."+J.toLowerCase()+"js"});return w},A("__extends",S57),A("__assign",C57),A("__rest",h57),A("__decorate",I57),A("__param",b57),A("__esDecorate",x57),A("__runInitializers",u57),A("__propKey",B57),A("__setFunctionName",m57),A("__metadata",g57),A("__awaiter",F57),A("__generator",Q57),A("__exportStar",U57),A("__createBinding",Qw1),A("__values",Fw1),A("__read",Y38),A("__spread",p57),A("__spreadArrays",d57),A("__spreadArray",c57),A("__await",oX6),A("__asyncGenerator",l57),A("__asyncDelegator",i57),A("__asyncValues",n57),A("__makeTemplateObject",r57),A("__importStar",o57),A("__importDefault",a57),A("__classPrivateFieldGet",s57),A("__classPrivateFieldSet",t57),A("__classPrivateFieldIn",e57),A("__addDisposableResource",A97),A("__disposeResources",q97),A("__rewriteRelativeImportExtension",K97)})});var w97=C((Y97)=>{Object.defineProperty(Y97,"__esModule",{value:!0});Y97.checkUrl=void 0;var PI3=EM(),WI3="169.254.170.2",ZI3="169.254.170.23",GI3="[fd00:ec2::23]",fI3=(A,q)=>{if(A.protocol==="https:")return;if(A.hostname===WI3||A.hostname===ZI3||A.hostname===GI3)return;if(A.hostname.includes("[")){if(A.hostname==="[::1]"||A.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(A.hostname==="localhost")return;let K=A.hostname.split("."),Y=(z)=>{let w=parseInt(z,10);return 0<=w&&w<=255};if(K[0]==="127"&&Y(K[1])&&Y(K[2])&&Y(K[3])&&K.length===4)return}throw new PI3.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
  - loopback CIDR 127.0.0.0/8 or [::1/128]
  - ECS container host 169.254.170.2
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:q})};Y97.checkUrl=fI3});var j38=C((EI3)=>{EI3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(EI3.HttpAuthLocation||(EI3.HttpAuthLocation={}));EI3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(EI3.HttpApiKeyAuthLocation||(EI3.HttpApiKeyAuthLocation={}));EI3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(EI3.EndpointURLScheme||(EI3.EndpointURLScheme={}));EI3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(EI3.AlgorithmId||(EI3.AlgorithmId={}));var TI3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>EI3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>EI3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},VI3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},NI3=(A)=>{return TI3(A)},vI3=(A)=>{return VI3(A)};EI3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(EI3.FieldPosition||(EI3.FieldPosition={}));var kI3="__smithy_context";EI3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(EI3.IniSectionType||(EI3.IniSectionType={}));EI3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(EI3.RequestHandlerProtocol||(EI3.RequestHandlerProtocol={}));EI3.SMITHY_CONTEXT_KEY=kI3;EI3.getDefaultClientConfiguration=NI3;EI3.resolveDefaultRuntimeConfig=vI3});var H97=C((xI3)=>{var SI3=j38(),CI3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},hI3=(A)=>{return{httpHandler:A.httpHandler()}};class _97{name;kind;values;constructor({name:A,kind:q=SI3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class $97{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class pw1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new pw1({...A,headers:{...A.headers}});if(q.query)q.query=II3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return pw1.clone(this)}}function II3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class O97{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function bI3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}xI3.Field=_97;xI3.Fields=$97;xI3.HttpRequest=pw1;xI3.HttpResponse=O97;xI3.getHttpHandlerExtensionConfiguration=CI3;xI3.isValidHostname=bI3;xI3.resolveHttpHandlerRuntimeConfig=hI3});var Qm=C((pI3)=>{var y36=(A,q)=>{let K=[];if(A)K.push(A);if(q)for(let Y of q)K.push(Y);return K},$t=(A,q)=>{return`${A||"anonymous"}${q&&q.length>0?` (a.k.a. ${q.join(",")})`:""}`},J38=()=>{let A=[],q=[],K=!1,Y=new Set,z=(J)=>J.sort((M,D)=>j97[D.step]-j97[M.step]||J97[D.priority||"normal"]-J97[M.priority||"normal"]),w=(J)=>{let M=!1,D=(X)=>{let P=y36(X.name,X.aliases);if(P.includes(J)){M=!0;for(let W of P)Y.delete(W);return!1}return!0};return A=A.filter(D),q=q.filter(D),M},_=(J)=>{let M=!1,D=(X)=>{if(X.middleware===J){M=!0;for(let P of y36(X.name,X.aliases))Y.delete(P);return!1}return!0};return A=A.filter(D),q=q.filter(D),M},$=(J)=>{return A.forEach((M)=>{J.add(M.middleware,{...M})}),q.forEach((M)=>{J.addRelativeTo(M.middleware,{...M})}),J.identifyOnResolve?.(j.identifyOnResolve()),J},O=(J)=>{let M=[];return J.before.forEach((D)=>{if(D.before.length===0&&D.after.length===0)M.push(D);else M.push(...O(D))}),M.push(J),J.after.reverse().forEach((D)=>{if(D.before.length===0&&D.after.length===0)M.push(D);else M.push(...O(D))}),M},H=(J=!1)=>{let M=[],D=[],X={};return A.forEach((W)=>{let Z={...W,before:[],after:[]};for(let G of y36(Z.name,Z.aliases))X[G]=Z;M.push(Z)}),q.forEach((W)=>{let Z={...W,before:[],after:[]};for(let G of y36(Z.name,Z.aliases))X[G]=Z;D.push(Z)}),D.forEach((W)=>{if(W.toMiddleware){let Z=X[W.toMiddleware];if(Z===void 0){if(J)return;throw Error(`${W.toMiddleware} is not found when adding ${$t(W.name,W.aliases)} middleware ${W.relation} ${W.toMiddleware}`)}if(W.relation==="after")Z.after.push(W);if(W.relation==="before")Z.before.push(W)}}),z(M).map(O).reduce((W,Z)=>{return W.push(...Z),W},[])},j={add:(J,M={})=>{let{name:D,override:X,aliases:P}=M,W={step:"initialize",priority:"normal",middleware:J,...M},Z=y36(D,P);if(Z.length>0){if(Z.some((G)=>Y.has(G))){if(!X)throw Error(`Duplicate middleware name '${$t(D,P)}'`);for(let G of Z){let f=A.findIndex((N)=>N.name===G||N.aliases?.some((v)=>v===G));if(f===-1)continue;let V=A[f];if(V.step!==W.step||W.priority!==V.priority)throw Error(`"${$t(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${$t(D,P)}" middleware with ${W.priority} priority in ${W.step} step.`);A.splice(f,1)}}for(let G of Z)Y.add(G)}A.push(W)},addRelativeTo:(J,M)=>{let{name:D,override:X,aliases:P}=M,W={middleware:J,...M},Z=y36(D,P);if(Z.length>0){if(Z.some((G)=>Y.has(G))){if(!X)throw Error(`Duplicate middleware name '${$t(D,P)}'`);for(let G of Z){let f=q.findIndex((N)=>N.name===G||N.aliases?.some((v)=>v===G));if(f===-1)continue;let V=q[f];if(V.toMiddleware!==W.toMiddleware||V.relation!==W.relation)throw Error(`"${$t(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${$t(D,P)}" middleware ${W.relation} "${W.toMiddleware}" middleware.`);q.splice(f,1)}}for(let G of Z)Y.add(G)}q.push(W)},clone:()=>$(J38()),use:(J)=>{J.applyToStack(j)},remove:(J)=>{if(typeof J==="string")return w(J);else return _(J)},removeByTag:(J)=>{let M=!1,D=(X)=>{let{tags:P,name:W,aliases:Z}=X;if(P&&P.includes(J)){let G=y36(W,Z);for(let f of G)Y.delete(f);return M=!0,!1}return!0};return A=A.filter(D),q=q.filter(D),M},concat:(J)=>{let M=$(J38());return M.use(J),M.identifyOnResolve(K||M.identifyOnResolve()||(J.identifyOnResolve?.()??!1)),M},applyToStack:$,identify:()=>{return H(!0).map((J)=>{let M=J.step??J.relation+" "+J.toMiddleware;return $t(J.name,J.aliases)+" - "+M})},identifyOnResolve(J){if(typeof J==="boolean")K=J;return K},resolve:(J,M)=>{for(let D of H().map((X)=>X.middleware).reverse())J=D(J,M);if(K)console.log(j.identify());return J}};return j},j97={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},J97={high:3,normal:2,low:1};pI3.constructStack=J38});var M97=C((lI3)=>{var cI3=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";lI3.isArrayBuffer=cI3});var dw1=C((aI3)=>{var nI3=M97(),M38=g6("buffer"),rI3=(A,q=0,K=A.byteLength-q)=>{if(!nI3.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return M38.Buffer.from(A,q,K)},oI3=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?M38.Buffer.from(A,q):M38.Buffer.from(A)};aI3.fromArrayBuffer=rI3;aI3.fromString=oI3});var P97=C((D97)=>{Object.defineProperty(D97,"__esModule",{value:!0});D97.fromBase64=void 0;var eI3=dw1(),Ab3=/^[A-Za-z0-9+/]*={0,2}$/,qb3=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Ab3.exec(A))throw TypeError("Invalid base64 string.");let q=(0,eI3.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};D97.fromBase64=qb3});var W97=C((Yb3)=>{var Kb3=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";Yb3.isArrayBuffer=Kb3});var Z97=C((Ob3)=>{var wb3=W97(),D38=g6("buffer"),_b3=(A,q=0,K=A.byteLength-q)=>{if(!wb3.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return D38.Buffer.from(A,q,K)},$b3=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?D38.Buffer.from(A,q):D38.Buffer.from(A)};Ob3.fromArrayBuffer=_b3;Ob3.fromString=$b3});var Z2=C((Db3)=>{var G97=Z97(),f97=(A)=>{let q=G97.fromString(A,"utf8");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)},Jb3=(A)=>{if(typeof A==="string")return f97(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)},Mb3=(A)=>{if(typeof A==="string")return A;if(typeof A!=="object"||typeof A.byteOffset!=="number"||typeof A.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return G97.fromArrayBuffer(A.buffer,A.byteOffset,A.byteLength).toString("utf8")};Db3.fromUtf8=f97;Db3.toUint8Array=Jb3;Db3.toUtf8=Mb3});var N97=C((T97)=>{Object.defineProperty(T97,"__esModule",{value:!0});T97.toBase64=void 0;var Zb3=dw1(),Gb3=Z2(),fb3=(A)=>{let q;if(typeof A==="string")q=(0,Gb3.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Zb3.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};T97.toBase64=fb3});var aX6=C((Ru6)=>{var v97=P97(),k97=N97();Object.keys(v97).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(Ru6,A))Object.defineProperty(Ru6,A,{enumerable:!0,get:function(){return v97[A]}})});Object.keys(k97).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(Ru6,A))Object.defineProperty(Ru6,A,{enumerable:!0,get:function(){return k97[A]}})})});var X38=C((L97)=>{Object.defineProperty(L97,"__esModule",{value:!0});L97.ChecksumStream=void 0;var Tb3=aX6(),Vb3=g6("stream");class E97 extends Vb3.Duplex{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;constructor({expectedChecksum:A,checksum:q,source:K,checksumSourceLocation:Y,base64Encoder:z}){super();if(typeof K.pipe==="function")this.source=K;else throw Error(`@smithy/util-stream: unsupported source type ${K?.constructor?.name??K} in ChecksumStream.`);this.base64Encoder=z??Tb3.toBase64,this.expectedChecksum=A,this.checksum=q,this.checksumSourceLocation=Y,this.source.pipe(this)}_read(A){}_write(A,q,K){try{this.checksum.update(A),this.push(A)}catch(Y){return K(Y)}return K()}async _final(A){try{let q=await this.checksum.digest(),K=this.base64Encoder(q);if(this.expectedChecksum!==K)return A(Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${K}" in response header "${this.checksumSourceLocation}".`))}catch(q){return A(q)}return this.push(null),A()}}L97.ChecksumStream=E97});var Ot=C((R97)=>{Object.defineProperty(R97,"__esModule",{value:!0});R97.isBlob=R97.isReadableStream=void 0;var Nb3=(A)=>typeof ReadableStream==="function"&&(A?.constructor?.name===ReadableStream.name||A instanceof ReadableStream);R97.isReadableStream=Nb3;var vb3=(A)=>{return typeof Blob==="function"&&(A?.constructor?.name===Blob.name||A instanceof Blob)};R97.isBlob=vb3});var b97=C((h97)=>{Object.defineProperty(h97,"__esModule",{value:!0});h97.ChecksumStream=void 0;var Eb3=typeof ReadableStream==="function"?ReadableStream:function(){};class C97 extends Eb3{}h97.ChecksumStream=C97});var B97=C((x97)=>{Object.defineProperty(x97,"__esModule",{value:!0});x97.createChecksumStream=void 0;var Lb3=aX6(),yb3=Ot(),Rb3=b97(),Sb3=({expectedChecksum:A,checksum:q,source:K,checksumSourceLocation:Y,base64Encoder:z})=>{if(!(0,yb3.isReadableStream)(K))throw Error(`@smithy/util-stream: unsupported source type ${K?.constructor?.name??K} in ChecksumStream.`);let w=z??Lb3.toBase64;if(typeof TransformStream!=="function")throw Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let _=new TransformStream({start(){},async transform(O,H){q.update(O),H.enqueue(O)},async flush(O){let H=await q.digest(),j=w(H);if(A!==j){let J=Error(`Checksum mismatch: expected "${A}" but received "${j}" in response header "${Y}".`);O.error(J)}else O.terminate()}});K.pipeThrough(_);let $=_.readable;return Object.setPrototypeOf($,Rb3.ChecksumStream.prototype),$};x97.createChecksumStream=Sb3});var g97=C((m97)=>{Object.defineProperty(m97,"__esModule",{value:!0});m97.createChecksumStream=bb3;var Cb3=Ot(),hb3=X38(),Ib3=B97();function bb3(A){if(typeof ReadableStream==="function"&&(0,Cb3.isReadableStream)(A.source))return(0,Ib3.createChecksumStream)(A);return new hb3.ChecksumStream(A)}});var P38=C((Q97)=>{Object.defineProperty(Q97,"__esModule",{value:!0});Q97.ByteArrayCollector=void 0;class F97{allocByteArray;byteLength=0;byteArrays=[];constructor(A){this.allocByteArray=A}push(A){this.byteArrays.push(A),this.byteLength+=A.byteLength}flush(){if(this.byteArrays.length===1){let K=this.byteArrays[0];return this.reset(),K}let A=this.allocByteArray(this.byteLength),q=0;for(let K=0;K<this.byteArrays.length;++K){let Y=this.byteArrays[K];A.set(Y,q),q+=Y.byteLength}return this.reset(),A}reset(){this.byteArrays=[],this.byteLength=0}}Q97.ByteArrayCollector=F97});var n97=C((l97)=>{Object.defineProperty(l97,"__esModule",{value:!0});l97.createBufferedReadable=void 0;l97.createBufferedReadableStream=p97;l97.merge=d97;l97.flush=cw1;l97.sizeOf=sX6;l97.modeOf=c97;var ub3=P38();function p97(A,q,K){let Y=A.getReader(),z=!1,w=0,_=["",new ub3.ByteArrayCollector((H)=>new Uint8Array(H))],$=-1,O=async(H)=>{let{value:j,done:J}=await Y.read(),M=j;if(J){if($!==-1){let D=cw1(_,$);if(sX6(D)>0)H.enqueue(D)}H.close()}else{let D=c97(M,!1);if($!==D){if($>=0)H.enqueue(cw1(_,$));$=D}if($===-1){H.enqueue(M);return}let X=sX6(M);w+=X;let P=sX6(_[$]);if(X>=q&&P===0)H.enqueue(M);else{let W=d97(_,$,M);if(!z&&w>q*2)z=!0,K?.warn(`@smithy/util-stream - stream chunk size ${X} is below threshold of ${q}, automatically buffering.`);if(W>=q)H.enqueue(cw1(_,$));else await O(H)}}};return new ReadableStream({pull:O})}l97.createBufferedReadable=p97;function d97(A,q,K){switch(q){case 0:return A[0]+=K,sX6(A[0]);case 1:case 2:return A[q].push(K),sX6(A[q])}}function cw1(A,q){switch(q){case 0:let K=A[0];return A[0]="",K;case 1:case 2:return A[q].flush()}throw Error(`@smithy/util-stream - invalid index ${q} given to flush()`)}function sX6(A){return A?.byteLength??A?.length??0}function c97(A,q=!0){if(q&&typeof Buffer<"u"&&A instanceof Buffer)return 2;if(A instanceof Uint8Array)return 1;if(typeof A==="string")return 0;return-1}});var a97=C((o97)=>{Object.defineProperty(o97,"__esModule",{value:!0});o97.createBufferedReadable=db3;var Ub3=g6("node:stream"),r97=P38(),Hc=n97(),pb3=Ot();function db3(A,q,K){if((0,pb3.isReadableStream)(A))return(0,Hc.createBufferedReadableStream)(A,q,K);let Y=new Ub3.Readable({read(){}}),z=!1,w=0,_=["",new r97.ByteArrayCollector((O)=>new Uint8Array(O)),new r97.ByteArrayCollector((O)=>Buffer.from(new Uint8Array(O)))],$=-1;return A.on("data",(O)=>{let H=(0,Hc.modeOf)(O,!0);if($!==H){if($>=0)Y.push((0,Hc.flush)(_,$));$=H}if($===-1){Y.push(O);return}let j=(0,Hc.sizeOf)(O);w+=j;let J=(0,Hc.sizeOf)(_[$]);if(j>=q&&J===0)Y.push(O);else{let M=(0,Hc.merge)(_,$,O);if(!z&&w>q*2)z=!0,K?.warn(`@smithy/util-stream - stream chunk size ${j} is below threshold of ${q}, automatically buffering.`);if(M>=q)Y.push((0,Hc.flush)(_,$))}}),A.on("end",()=>{if($!==-1){let O=(0,Hc.flush)(_,$);if((0,Hc.sizeOf)(O)>0)Y.push(O)}Y.push(null)}),Y}});var e97=C((s97)=>{Object.defineProperty(s97,"__esModule",{value:!0});s97.getAwsChunkedEncodingStream=void 0;var lb3=g6("stream"),ib3=(A,q)=>{let{base64Encoder:K,bodyLengthChecker:Y,checksumAlgorithmFn:z,checksumLocationName:w,streamHasher:_}=q,$=K!==void 0&&z!==void 0&&w!==void 0&&_!==void 0,O=$?_(z,A):void 0,H=new lb3.Readable({read:()=>{}});return A.on("data",(j)=>{let J=Y(j)||0;H.push(`${J.toString(16)}\r
`),H.push(j),H.push(`\r
`)}),A.on("end",async()=>{if(H.push(`0\r
`),$){let j=K(await O);H.push(`${w}:${j}\r
`),H.push(`\r
`)}H.push(null)}),H};s97.getAwsChunkedEncodingStream=ib3});var qY7=C((AY7)=>{Object.defineProperty(AY7,"__esModule",{value:!0});AY7.headStream=nb3;async function nb3(A,q){let K=0,Y=[],z=A.getReader(),w=!1;while(!w){let{done:O,value:H}=await z.read();if(H)Y.push(H),K+=H?.byteLength??0;if(K>=q)break;w=O}z.releaseLock();let _=new Uint8Array(Math.min(q,K)),$=0;for(let O of Y){if(O.byteLength>_.byteLength-$){_.set(O.subarray(0,_.byteLength-$),$);break}else _.set(O,$);$+=O.length}return _}});var wY7=C((YY7)=>{Object.defineProperty(YY7,"__esModule",{value:!0});YY7.headStream=void 0;var ob3=g6("stream"),ab3=qY7(),sb3=Ot(),tb3=(A,q)=>{if((0,sb3.isReadableStream)(A))return(0,ab3.headStream)(A,q);return new Promise((K,Y)=>{let z=new KY7;z.limit=q,A.pipe(z),A.on("error",(w)=>{z.end(),Y(w)}),z.on("error",Y),z.on("finish",function(){let w=new Uint8Array(Buffer.concat(this.buffers));K(w)})})};YY7.headStream=tb3;class KY7 extends ob3.Writable{buffers=[];limit=1/0;bytesBuffered=0;_write(A,q,K){if(this.buffers.push(A),this.bytesBuffered+=A.byteLength??0,this.bytesBuffered>=this.limit){let Y=this.bytesBuffered-this.limit,z=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=z.subarray(0,z.byteLength-Y),this.emit("finish")}K()}}});var _Y7=C((zx3)=>{zx3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(zx3.HttpAuthLocation||(zx3.HttpAuthLocation={}));zx3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(zx3.HttpApiKeyAuthLocation||(zx3.HttpApiKeyAuthLocation={}));zx3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(zx3.EndpointURLScheme||(zx3.EndpointURLScheme={}));zx3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(zx3.AlgorithmId||(zx3.AlgorithmId={}));var eb3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>zx3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>zx3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Ax3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},qx3=(A)=>{return eb3(A)},Kx3=(A)=>{return Ax3(A)};zx3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(zx3.FieldPosition||(zx3.FieldPosition={}));var Yx3="__smithy_context";zx3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(zx3.IniSectionType||(zx3.IniSectionType={}));zx3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(zx3.RequestHandlerProtocol||(zx3.RequestHandlerProtocol={}));zx3.SMITHY_CONTEXT_KEY=Yx3;zx3.getDefaultClientConfiguration=qx3;zx3.resolveDefaultRuntimeConfig=Kx3});var jY7=C((Dx3)=>{var Ox3=_Y7(),Hx3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},jx3=(A)=>{return{httpHandler:A.httpHandler()}};class $Y7{name;kind;values;constructor({name:A,kind:q=Ox3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class OY7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class lw1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new lw1({...A,headers:{...A.headers}});if(q.query)q.query=Jx3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return lw1.clone(this)}}function Jx3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class HY7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Mx3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Dx3.Field=$Y7;Dx3.Fields=OY7;Dx3.HttpRequest=lw1;Dx3.HttpResponse=HY7;Dx3.getHttpHandlerExtensionConfiguration=Hx3;Dx3.isValidHostname=Mx3;Dx3.resolveHttpHandlerRuntimeConfig=jx3});var MY7=C((vx3)=>{var JY7=(A)=>encodeURIComponent(A).replace(/[!'()*]/g,Vx3),Vx3=(A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,Nx3=(A)=>A.split("/").map(JY7).join("/");vx3.escapeUri=JY7;vx3.escapeUriPath=Nx3});var DY7=C((yx3)=>{var N38=MY7();function Lx3(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=N38.escapeUri(K),Array.isArray(Y))for(let z=0,w=Y.length;z<w;z++)q.push(`${K}=${N38.escapeUri(Y[z])}`);else{let z=K;if(Y||typeof Y==="string")z+=`=${N38.escapeUri(Y)}`;q.push(z)}}return q.join("&")}yx3.buildQueryString=Lx3});var WY7=C((Bx3)=>{var XY7=jY7(),Sx3=DY7(),Cx3=aX6();function PY7(A,q){return new Request(A,q)}function hx3(A=0){return new Promise((q,K)=>{if(A)setTimeout(()=>{let Y=Error(`Request did not complete within ${A} ms`);Y.name="TimeoutError",K(Y)},A)})}var iw1={supported:void 0};class v38{config;configProvider;static create(A){if(typeof A?.handle==="function")return A;return new v38(A)}constructor(A){if(typeof A==="function")this.configProvider=A().then((q)=>q||{});else this.config=A??{},this.configProvider=Promise.resolve(this.config);if(iw1.supported===void 0)iw1.supported=Boolean(typeof Request<"u"&&"keepalive"in PY7("https://[::1]"))}destroy(){}async handle(A,{abortSignal:q,requestTimeout:K}={}){if(!this.config)this.config=await this.configProvider;let Y=K??this.config.requestTimeout,z=this.config.keepAlive===!0,w=this.config.credentials;if(q?.aborted){let Z=Error("Request aborted");return Z.name="AbortError",Promise.reject(Z)}let _=A.path,$=Sx3.buildQueryString(A.query||{});if($)_+=`?${$}`;if(A.fragment)_+=`#${A.fragment}`;let O="";if(A.username!=null||A.password!=null){let Z=A.username??"",G=A.password??"";O=`${Z}:${G}@`}let{port:H,method:j}=A,J=`${A.protocol}//${O}${A.hostname}${H?`:${H}`:""}${_}`,M=j==="GET"||j==="HEAD"?void 0:A.body,D={body:M,headers:new Headers(A.headers),method:j,credentials:w};if(this.config?.cache)D.cache=this.config.cache;if(M)D.duplex="half";if(typeof AbortController<"u")D.signal=q;if(iw1.supported)D.keepalive=z;if(typeof this.config.requestInit==="function")Object.assign(D,this.config.requestInit(A));let X=()=>{},P=PY7(J,D),W=[fetch(P).then((Z)=>{let G=Z.headers,f={};for(let N of G.entries())f[N[0]]=N[1];if(Z.body==null)return Z.blob().then((N)=>({response:new XY7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:N})}));return{response:new XY7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:Z.body})}}),hx3(Y)];if(q)W.push(new Promise((Z,G)=>{let f=()=>{let V=Error("Request aborted");V.name="AbortError",G(V)};if(typeof q.addEventListener==="function"){let V=q;V.addEventListener("abort",f,{once:!0}),X=()=>V.removeEventListener("abort",f)}else q.onabort=f}));return Promise.race(W).finally(X)}updateHttpClientConfig(A,q){this.config=void 0,this.configProvider=this.configProvider.then((K)=>{return K[A]=q,K})}httpHandlerConfigs(){return this.config??{}}}var Ix3=async(A)=>{if(typeof Blob==="function"&&A instanceof Blob||A.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await A.arrayBuffer());return bx3(A)}return xx3(A)};async function bx3(A){let q=await ux3(A),K=Cx3.fromBase64(q);return new Uint8Array(K)}async function xx3(A){let q=[],K=A.getReader(),Y=!1,z=0;while(!Y){let{done:$,value:O}=await K.read();if(O)q.push(O),z+=O.length;Y=$}let w=new Uint8Array(z),_=0;for(let $ of q)w.set($,_),_+=$.length;return w}function ux3(A){return new Promise((q,K)=>{let Y=new FileReader;Y.onloadend=()=>{if(Y.readyState!==2)return K(Error("Reader aborted too early"));let z=Y.result??"",w=z.indexOf(","),_=w>-1?w+1:z.length;q(z.substring(_))},Y.onabort=()=>K(Error("Read aborted")),Y.onerror=()=>K(Y.error),Y.readAsDataURL(A)})}Bx3.FetchHttpHandler=v38;Bx3.keepAliveSupport=iw1;Bx3.streamCollector=Ix3});var GY7=C((px3)=>{var ZY7={},k38={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;ZY7[A]=q,k38[q]=A}function Qx3(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K<A.length;K+=2){let Y=A.slice(K,K+2).toLowerCase();if(Y in k38)q[K/2]=k38[Y];else throw Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return q}function Ux3(A){let q="";for(let K=0;K<A.byteLength;K++)q+=ZY7[A[K]];return q}px3.fromHex=Qx3;px3.toHex=Ux3});var kY7=C((NY7)=>{Object.defineProperty(NY7,"__esModule",{value:!0});NY7.sdkStreamMixin=void 0;var lx3=WY7(),ix3=aX6(),nx3=GY7(),rx3=Z2(),fY7=Ot(),TY7="The stream has already been transformed.",ox3=(A)=>{if(!VY7(A)&&!(0,fY7.isReadableStream)(A)){let z=A?.__proto__?.constructor?.name||A;throw Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${z}`)}let q=!1,K=async()=>{if(q)throw Error(TY7);return q=!0,await(0,lx3.streamCollector)(A)},Y=(z)=>{if(typeof z.stream!=="function")throw Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return z.stream()};return Object.assign(A,{transformToByteArray:K,transformToString:async(z)=>{let w=await K();if(z==="base64")return(0,ix3.toBase64)(w);else if(z==="hex")return(0,nx3.toHex)(w);else if(z===void 0||z==="utf8"||z==="utf-8")return(0,rx3.toUtf8)(w);else if(typeof TextDecoder==="function")return new TextDecoder(z).decode(w);else throw Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(q)throw Error(TY7);if(q=!0,VY7(A))return Y(A);else if((0,fY7.isReadableStream)(A))return A;else throw Error(`Cannot transform payload to web stream, got ${A}`)}})};NY7.sdkStreamMixin=ox3;var VY7=(A)=>typeof Blob==="function"&&A instanceof Blob});var RY7=C((LY7)=>{Object.defineProperty(LY7,"__esModule",{value:!0});LY7.sdkStreamMixin=void 0;var ax3=$N(),sx3=dw1(),E38=g6("stream"),tx3=kY7(),EY7="The stream has already been transformed.",ex3=(A)=>{if(!(A instanceof E38.Readable))try{return(0,tx3.sdkStreamMixin)(A)}catch(Y){let z=A?.__proto__?.constructor?.name||A;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${z}`)}let q=!1,K=async()=>{if(q)throw Error(EY7);return q=!0,await(0,ax3.streamCollector)(A)};return Object.assign(A,{transformToByteArray:K,transformToString:async(Y)=>{let z=await K();if(Y===void 0||Buffer.isEncoding(Y))return(0,sx3.fromArrayBuffer)(z.buffer,z.byteOffset,z.byteLength).toString(Y);else return new TextDecoder(Y).decode(z)},transformToWebStream:()=>{if(q)throw Error(EY7);if(A.readableFlowing!==null)throw Error("The stream has been consumed by other callbacks.");if(typeof E38.Readable.toWeb!=="function")throw Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return q=!0,E38.Readable.toWeb(A)}})};LY7.sdkStreamMixin=ex3});var CY7=C((SY7)=>{Object.defineProperty(SY7,"__esModule",{value:!0});SY7.splitStream=Au3;async function Au3(A){if(typeof A.stream==="function")A=A.stream();return A.tee()}});var xY7=C((bY7)=>{Object.defineProperty(bY7,"__esModule",{value:!0});bY7.splitStream=Yu3;var hY7=g6("stream"),Ku3=CY7(),IY7=Ot();async function Yu3(A){if((0,IY7.isReadableStream)(A)||(0,IY7.isBlob)(A))return(0,Ku3.splitStream)(A);let q=new hY7.PassThrough,K=new hY7.PassThrough;return A.pipe(q),A.pipe(K),[q,K]}});var L38=C((S0)=>{var uY7=aX6(),BY7=Z2(),mY7=X38(),gY7=g97(),FY7=a97(),QY7=e97(),UY7=wY7(),pY7=RY7(),dY7=xY7(),cY7=Ot();class Cu6 extends Uint8Array{static fromString(A,q="utf-8"){if(typeof A==="string"){if(q==="base64")return Cu6.mutate(uY7.fromBase64(A));return Cu6.mutate(BY7.fromUtf8(A))}throw Error(`Unsupported conversion from ${typeof A} to Uint8ArrayBlobAdapter.`)}static mutate(A){return Object.setPrototypeOf(A,Cu6.prototype),A}transformToString(A="utf-8"){if(A==="base64")return uY7.toBase64(this);return BY7.toUtf8(this)}}S0.Uint8ArrayBlobAdapter=Cu6;Object.keys(mY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return mY7[A]}})});Object.keys(gY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return gY7[A]}})});Object.keys(FY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return FY7[A]}})});Object.keys(QY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return QY7[A]}})});Object.keys(UY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return UY7[A]}})});Object.keys(pY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return pY7[A]}})});Object.keys(dY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return dY7[A]}})});Object.keys(cY7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(S0,A))Object.defineProperty(S0,A,{enumerable:!0,get:function(){return cY7[A]}})})});var b38=C((Ju3)=>{Ju3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ju3.HttpAuthLocation||(Ju3.HttpAuthLocation={}));Ju3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ju3.HttpApiKeyAuthLocation||(Ju3.HttpApiKeyAuthLocation={}));Ju3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Ju3.EndpointURLScheme||(Ju3.EndpointURLScheme={}));Ju3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Ju3.AlgorithmId||(Ju3.AlgorithmId={}));var _u3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Ju3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Ju3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},$u3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Ou3=(A)=>{return _u3(A)},Hu3=(A)=>{return $u3(A)};Ju3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Ju3.FieldPosition||(Ju3.FieldPosition={}));var ju3="__smithy_context";Ju3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Ju3.IniSectionType||(Ju3.IniSectionType={}));Ju3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Ju3.RequestHandlerProtocol||(Ju3.RequestHandlerProtocol={}));Ju3.SMITHY_CONTEXT_KEY=ju3;Ju3.getDefaultClientConfiguration=Ou3;Ju3.resolveDefaultRuntimeConfig=Hu3});var Iu6=C((Tu3)=>{var Pu3=b38(),Wu3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},Zu3=(A)=>{return{httpHandler:A.httpHandler()}};class lY7{name;kind;values;constructor({name:A,kind:q=Pu3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class iY7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class nw1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new nw1({...A,headers:{...A.headers}});if(q.query)q.query=Gu3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return nw1.clone(this)}}function Gu3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class nY7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function fu3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Tu3.Field=lY7;Tu3.Fields=iY7;Tu3.HttpRequest=nw1;Tu3.HttpResponse=nY7;Tu3.getHttpHandlerExtensionConfiguration=Wu3;Tu3.isValidHostname=fu3;Tu3.resolveHttpHandlerRuntimeConfig=Zu3});var rY7=C((bu3)=>{bu3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(bu3.HttpAuthLocation||(bu3.HttpAuthLocation={}));bu3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(bu3.HttpApiKeyAuthLocation||(bu3.HttpApiKeyAuthLocation={}));bu3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(bu3.EndpointURLScheme||(bu3.EndpointURLScheme={}));bu3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(bu3.AlgorithmId||(bu3.AlgorithmId={}));var Ru3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>bu3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>bu3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Su3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Cu3=(A)=>{return Ru3(A)},hu3=(A)=>{return Su3(A)};bu3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(bu3.FieldPosition||(bu3.FieldPosition={}));var Iu3="__smithy_context";bu3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(bu3.IniSectionType||(bu3.IniSectionType={}));bu3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(bu3.RequestHandlerProtocol||(bu3.RequestHandlerProtocol={}));bu3.SMITHY_CONTEXT_KEY=Iu3;bu3.getDefaultClientConfiguration=Cu3;bu3.resolveDefaultRuntimeConfig=hu3});var pZ=C((Fu3)=>{var oY7=rY7(),mu3=(A)=>A[oY7.SMITHY_CONTEXT_KEY]||(A[oY7.SMITHY_CONTEXT_KEY]={}),gu3=(A)=>{if(typeof A==="function")return A;let q=Promise.resolve(A);return()=>q};Fu3.getSmithyContext=mu3;Fu3.normalizeProvider=gu3});var lO=C((AB3)=>{var pu3=Iu6(),aY7=pZ(),rw1=(A)=>{if(typeof A==="function")return A();return A},p38=(A,q,K,Y,z)=>({name:q,namespace:A,traits:K,input:Y,output:z}),du3=(A)=>(q,K)=>async(Y)=>{let{response:z}=await q(Y),{operationSchema:w}=aY7.getSmithyContext(K),[,_,$,O,H,j]=w??[];try{let J=await A.protocol.deserializeResponse(p38(_,$,O,H,j),{...A,...K},z);return{response:z,output:J}}catch(J){if(Object.defineProperty(J,"$response",{value:z,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in J)){try{J.message+=`
  Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(D){if(!K.logger||K.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else K.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof J.$responseBodyText<"u"){if(J.$response)J.$response.body=J.$responseBodyText}try{if(pu3.HttpResponse.isInstance(z)){let{headers:D={}}=z,X=Object.entries(D);J.$metadata={httpStatusCode:z.statusCode,requestId:Q38(/^x-[\w-]+-request-?id$/,X),extendedRequestId:Q38(/^x-[\w-]+-id-2$/,X),cfId:Q38(/^x-[\w-]+-cf-id$/,X)}}}catch(D){}}throw J}},Q38=(A,q)=>{return(q.find(([K])=>{return K.match(A)})||[void 0,void 0])[1]},cu3=(A)=>(q,K)=>async(Y)=>{let{operationSchema:z}=aY7.getSmithyContext(K),[,w,_,$,O,H]=z??[],j=K.endpointV2?.url&&A.urlParser?async()=>A.urlParser(K.endpointV2.url):A.endpoint,J=await A.protocol.serializeRequest(p38(w,_,$,O,H),Y.input,{...A,...K,endpoint:j});return q({...Y,request:J})},sY7={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},tY7={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function lu3(A){return{applyToStack:(q)=>{q.add(cu3(A),tY7),q.add(du3(A),sY7),A.protocol.setSerdeContext(A)}}}class jN{name;namespace;traits;static assign(A,q){return Object.assign(A,q)}static[Symbol.hasInstance](A){let q=this.prototype.isPrototypeOf(A);if(!q&&typeof A==="object"&&A!==null)return A.symbol===this.symbol;return q}getName(){return this.namespace+"#"+this.name}}class ow1 extends jN{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=ow1.symbol}var iu3=(A,q,K,Y)=>jN.assign(new ow1,{name:q,namespace:A,traits:K,valueSchema:Y});class aw1 extends jN{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=aw1.symbol}var nu3=(A,q,K,Y,z)=>jN.assign(new aw1,{name:q,namespace:A,traits:K,keySchema:Y,valueSchema:z});class sw1 extends jN{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=sw1.symbol}var ru3=(A,q,K,Y,z)=>jN.assign(new sw1,{name:q,namespace:A,traits:K,input:Y,output:z});class Bu6 extends jN{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=Bu6.symbol}var ou3=(A,q,K,Y,z)=>jN.assign(new Bu6,{name:q,namespace:A,traits:K,memberNames:Y,memberList:z});class tw1 extends Bu6{static symbol=Symbol.for("@smithy/err");ctor;symbol=tw1.symbol}var au3=(A,q,K,Y,z,w)=>jN.assign(new tw1,{name:q,namespace:A,traits:K,memberNames:Y,memberList:z,ctor:null});function uu6(A){if(typeof A==="object")return A;A=A|0;let q={},K=0;for(let Y of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])if((A>>K++&1)===1)q[Y]=1;return q}class Jc{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=Jc.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(A,q){this.ref=A,this.memberName=q;let K=[],Y=A,z=A;this._isMemberSchema=!1;while(U38(Y))K.push(Y[1]),Y=Y[0],z=rw1(Y),this._isMemberSchema=!0;if(K.length>0){this.memberTraits={};for(let w=K.length-1;w>=0;--w){let _=K[w];Object.assign(this.memberTraits,uu6(_))}}else this.memberTraits=0;if(z instanceof Jc){let w=this.memberTraits;Object.assign(this,z),this.memberTraits=Object.assign({},w,z.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=q??z.memberName;return}if(this.schema=rw1(z),eY7(this.schema))this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3];else this.name=this.memberName??String(z),this.traits=0;if(this._isMemberSchema&&!q)throw Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](A){let q=this.prototype.isPrototypeOf(A);if(!q&&typeof A==="object"&&A!==null)return A.symbol===this.symbol;return q}static of(A){let q=rw1(A);if(q instanceof Jc)return q;if(U38(q)){let[K,Y]=q;if(K instanceof Jc)return Object.assign(K.getMergedTraits(),uu6(Y)),K;throw Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(A,null,2)}.`)}return new Jc(q)}getSchema(){let A=this.schema;if(A[0]===0)return A[4];return A}getName(A=!1){let{name:q}=this;return!A&&q&&q.includes("#")?q.split("#")[1]:q||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let A=this.getSchema();return typeof A==="number"?A>=64&&A<128:A[0]===1}isMapSchema(){let A=this.getSchema();return typeof A==="number"?A>=128&&A<=255:A[0]===2}isStructSchema(){let A=this.getSchema();return A[0]===3||A[0]===-3}isBlobSchema(){let A=this.getSchema();return A===21||A===42}isTimestampSchema(){let A=this.getSchema();return typeof A==="number"&&A>=4&&A<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:A}=this.getMergedTraits();return!!A||this.getSchema()===42}isIdempotencyToken(){let A=(z)=>(z&4)===4||!!z?.idempotencyToken,{normalizedTraits:q,traits:K,memberTraits:Y}=this;return A(q)||A(K)||A(Y)}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return uu6(this.memberTraits)}getOwnTraits(){return uu6(this.traits)}getKeySchema(){let[A,q]=[this.isDocumentSchema(),this.isMapSchema()];if(!A&&!q)throw Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let K=this.getSchema(),Y=A?15:K[4]??0;return xu6([Y,0],"key")}getValueSchema(){let A=this.getSchema(),[q,K,Y]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],z=typeof A==="number"?63&A:A&&typeof A==="object"&&(K||Y)?A[3+A[0]]:q?15:void 0;if(z!=null)return xu6([z,0],K?"value":"member");throw Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(A){let q=this.getSchema();if(this.isStructSchema()&&q[4].includes(A)){let K=q[4].indexOf(A),Y=q[5][K];return xu6(U38(Y)?Y:[Y,0],A)}if(this.isDocumentSchema())return xu6([15,0],A);throw Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${A}.`)}getMemberSchemas(){let A={};try{for(let[q,K]of this.structIterator())A[q]=K}catch(q){}return A}getEventStreamMember(){if(this.isStructSchema()){for(let[A,q]of this.structIterator())if(q.isStreaming()&&q.isStructSchema())return A}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw Error("@smithy/core/schema - cannot iterate non-struct schema.");let A=this.getSchema();for(let q=0;q<A[4].length;++q)yield[A[4][q],xu6([A[5][q],0],A[4][q])]}}function xu6(A,q){if(A instanceof Jc)return Object.assign(A,{memberName:q,_isMemberSchema:!0});return new Jc(A,q)}var U38=(A)=>Array.isArray(A)&&A.length===2,eY7=(A)=>Array.isArray(A)&&A.length>=5;class mu6 extends jN{static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=mu6.symbol}var su3=(A,q,K,Y)=>jN.assign(new mu6,{name:q,namespace:A,traits:Y,schemaRef:K}),tu3=(A,q,K,Y)=>jN.assign(new mu6,{name:q,namespace:A,traits:K,schemaRef:Y}),eu3={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class jc{namespace;schemas;exceptions;static registries=new Map;constructor(A,q=new Map,K=new Map){this.namespace=A,this.schemas=q,this.exceptions=K}static for(A){if(!jc.registries.has(A))jc.registries.set(A,new jc(A));return jc.registries.get(A)}register(A,q){let K=this.normalizeShapeId(A);jc.for(K.split("#")[0]).schemas.set(K,q)}getSchema(A){let q=this.normalizeShapeId(A);if(!this.schemas.has(q))throw Error(`@smithy/core/schema - schema not found for ${q}`);return this.schemas.get(q)}registerError(A,q){let K=A,Y=jc.for(K[1]);Y.schemas.set(K[1]+"#"+K[2],K),Y.exceptions.set(K,q)}getErrorCtor(A){let q=A;return jc.for(q[1]).exceptions.get(q)}getBaseException(){for(let A of this.exceptions.keys())if(Array.isArray(A)){let[,q,K]=A,Y=q+"#"+K;if(Y.startsWith("smithy.ts.sdk.synthetic.")&&Y.endsWith("ServiceException"))return A}return}find(A){return[...this.schemas.values()].find(A)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(A){if(A.includes("#"))return A;return this.namespace+"#"+A}}AB3.ErrorSchema=tw1;AB3.ListSchema=ow1;AB3.MapSchema=aw1;AB3.NormalizedSchema=Jc;AB3.OperationSchema=sw1;AB3.SCHEMA=eu3;AB3.Schema=jN;AB3.SimpleSchema=mu6;AB3.StructureSchema=Bu6;AB3.TypeRegistry=jc;AB3.deref=rw1;AB3.deserializerMiddlewareOption=sY7;AB3.error=au3;AB3.getSchemaSerdePlugin=lu3;AB3.isStaticSchema=eY7;AB3.list=iu3;AB3.map=nu3;AB3.op=ru3;AB3.operation=p38;AB3.serializerMiddlewareOption=tY7;AB3.sim=su3;AB3.simAdapter=tu3;AB3.struct=ou3;AB3.translateTraits=uu6});var Yz7=C((qz7)=>{Object.defineProperty(qz7,"__esModule",{value:!0});qz7.randomUUID=void 0;var EB3=d2(),Az7=EB3.__importDefault(g6("crypto"));qz7.randomUUID=Az7.default.randomUUID.bind(Az7.default)});var d38=C((yB3)=>{var zz7=Yz7(),dZ=Array.from({length:256},(A,q)=>q.toString(16).padStart(2,"0")),LB3=()=>{if(zz7.randomUUID)return zz7.randomUUID();let A=new Uint8Array(16);return crypto.getRandomValues(A),A[6]=A[6]&15|64,A[8]=A[8]&63|128,dZ[A[0]]+dZ[A[1]]+dZ[A[2]]+dZ[A[3]]+"-"+dZ[A[4]]+dZ[A[5]]+"-"+dZ[A[6]]+dZ[A[7]]+"-"+dZ[A[8]]+dZ[A[9]]+"-"+dZ[A[10]]+dZ[A[11]]+dZ[A[12]]+dZ[A[13]]+dZ[A[14]]+dZ[A[15]]};yB3.v4=LB3});var JN=C((Dz7)=>{var SB3=d38(),CB3=(A,q,K=(Y)=>Y)=>A,hB3=(A)=>{switch(A){case"true":return!0;case"false":return!1;default:throw Error(`Unable to parse boolean value "${A}"`)}},IB3=(A)=>{if(A===null||A===void 0)return;if(typeof A==="number"){if(A===0||A===1)Uu6.warn(A21(`Expected boolean, got ${typeof A}: ${A}`));if(A===0)return!1;if(A===1)return!0}if(typeof A==="string"){let q=A.toLowerCase();if(q==="false"||q==="true")Uu6.warn(A21(`Expected boolean, got ${typeof A}: ${A}`));if(q==="false")return!1;if(q==="true")return!0}if(typeof A==="boolean")return A;throw TypeError(`Expected boolean, got ${typeof A}: ${A}`)},Fu6=(A)=>{if(A===null||A===void 0)return;if(typeof A==="string"){let q=parseFloat(A);if(!Number.isNaN(q)){if(String(q)!==String(A))Uu6.warn(A21(`Expected number but observed string: ${A}`));return q}}if(typeof A==="number")return A;throw TypeError(`Expected number, got ${typeof A}: ${A}`)},bB3=Math.ceil(340282346638528860000000000000000000000),ew1=(A)=>{let q=Fu6(A);if(q!==void 0&&!Number.isNaN(q)&&q!==1/0&&q!==-1/0){if(Math.abs(q)>bB3)throw TypeError(`Expected 32-bit float, got ${A}`)}return q},Qu6=(A)=>{if(A===null||A===void 0)return;if(Number.isInteger(A)&&!Number.isNaN(A))return A;throw TypeError(`Expected integer, got ${typeof A}: ${A}`)},xB3=Qu6,l38=(A)=>r38(A,32),i38=(A)=>r38(A,16),n38=(A)=>r38(A,8),r38=(A,q)=>{let K=Qu6(A);if(K!==void 0&&uB3(K,q)!==K)throw TypeError(`Expected ${q}-bit integer, got ${A}`);return K},uB3=(A,q)=>{switch(q){case 32:return Int32Array.of(A)[0];case 16:return Int16Array.of(A)[0];case 8:return Int8Array.of(A)[0]}},BB3=(A,q)=>{if(A===null||A===void 0){if(q)throw TypeError(`Expected a non-null value for ${q}`);throw TypeError("Expected a non-null value")}return A},_z7=(A)=>{if(A===null||A===void 0)return;if(typeof A==="object"&&!Array.isArray(A))return A;let q=Array.isArray(A)?"array":typeof A;throw TypeError(`Expected object, got ${q}: ${A}`)},mB3=(A)=>{if(A===null||A===void 0)return;if(typeof A==="string")return A;if(["boolean","number","bigint"].includes(typeof A))return Uu6.warn(A21(`Expected string, got ${typeof A}: ${A}`)),String(A);throw TypeError(`Expected string, got ${typeof A}: ${A}`)},gB3=(A)=>{if(A===null||A===void 0)return;let q=_z7(A),K=Object.entries(q).filter(([,Y])=>Y!=null).map(([Y])=>Y);if(K.length===0)throw TypeError("Unions must have exactly one non-null member. None were found.");if(K.length>1)throw TypeError(`Unions must have exactly one non-null member. Keys ${K} were not null.`);return q},o38=(A)=>{if(typeof A=="string")return Fu6(AP6(A));return Fu6(A)},FB3=o38,$z7=(A)=>{if(typeof A=="string")return ew1(AP6(A));return ew1(A)},QB3=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,AP6=(A)=>{let q=A.match(QB3);if(q===null||q[0].length!==A.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(A)},a38=(A)=>{if(typeof A=="string")return Oz7(A);return Fu6(A)},UB3=a38,pB3=a38,dB3=(A)=>{if(typeof A=="string")return Oz7(A);return ew1(A)},Oz7=(A)=>{switch(A){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw Error(`Unable to parse float value: ${A}`)}},Hz7=(A)=>{if(typeof A==="string")return Qu6(AP6(A));return Qu6(A)},cB3=Hz7,lB3=(A)=>{if(typeof A==="string")return l38(AP6(A));return l38(A)},tX6=(A)=>{if(typeof A==="string")return i38(AP6(A));return i38(A)},jz7=(A)=>{if(typeof A==="string")return n38(AP6(A));return n38(A)},A21=(A)=>{return String(TypeError(A).stack||A).split(`
`).slice(0,5).filter((q)=>!q.includes("stackTraceWarning")).join(`
`)},Uu6={warn:console.warn},iB3=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],s38=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nB3(A){let q=A.getUTCFullYear(),K=A.getUTCMonth(),Y=A.getUTCDay(),z=A.getUTCDate(),w=A.getUTCHours(),_=A.getUTCMinutes(),$=A.getUTCSeconds(),O=z<10?`0${z}`:`${z}`,H=w<10?`0${w}`:`${w}`,j=_<10?`0${_}`:`${_}`,J=$<10?`0${$}`:`${$}`;return`${iB3[Y]}, ${O} ${s38[K]} ${q} ${H}:${j}:${J} GMT`}var rB3=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),oB3=(A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let q=rB3.exec(A);if(!q)throw TypeError("Invalid RFC-3339 date-time value");let[K,Y,z,w,_,$,O,H]=q,j=tX6(eX6(Y)),J=Um(z,"month",1,12),M=Um(w,"day",1,31);return gu6(j,J,M,{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H})},aB3=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),sB3=(A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let q=aB3.exec(A);if(!q)throw TypeError("Invalid RFC-3339 date-time value");let[K,Y,z,w,_,$,O,H,j]=q,J=tX6(eX6(Y)),M=Um(z,"month",1,12),D=Um(w,"day",1,31),X=gu6(J,M,D,{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H});if(j.toUpperCase()!="Z")X.setTime(X.getTime()-jm3(j));return X},tB3=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),eB3=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Am3=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),qm3=(A)=>{if(A===null||A===void 0)return;if(typeof A!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let q=tB3.exec(A);if(q){let[K,Y,z,w,_,$,O,H]=q;return gu6(tX6(eX6(w)),c38(z),Um(Y,"day",1,31),{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H})}if(q=eB3.exec(A),q){let[K,Y,z,w,_,$,O,H]=q;return wm3(gu6(Ym3(w),c38(z),Um(Y,"day",1,31),{hours:_,minutes:$,seconds:O,fractionalMilliseconds:H}))}if(q=Am3.exec(A),q){let[K,Y,z,w,_,$,O,H]=q;return gu6(tX6(eX6(H)),c38(Y),Um(z.trimLeft(),"day",1,31),{hours:w,minutes:_,seconds:$,fractionalMilliseconds:O})}throw TypeError("Invalid RFC-7231 date-time value")},Km3=(A)=>{if(A===null||A===void 0)return;let q;if(typeof A==="number")q=A;else if(typeof A==="string")q=o38(A);else if(typeof A==="object"&&A.tag===1)q=A.value;else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(q)||q===1/0||q===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(q*1000))},gu6=(A,q,K,Y)=>{let z=q-1;return $m3(A,z,K),new Date(Date.UTC(A,z,K,Um(Y.hours,"hour",0,23),Um(Y.minutes,"minute",0,59),Um(Y.seconds,"seconds",0,60),Hm3(Y.fractionalMilliseconds)))},Ym3=(A)=>{let q=new Date().getUTCFullYear(),K=Math.floor(q/100)*100+tX6(eX6(A));if(K<q)return K+100;return K},zm3=1576800000000,wm3=(A)=>{if(A.getTime()-new Date().getTime()>zm3)return new Date(Date.UTC(A.getUTCFullYear()-100,A.getUTCMonth(),A.getUTCDate(),A.getUTCHours(),A.getUTCMinutes(),A.getUTCSeconds(),A.getUTCMilliseconds()));return A},c38=(A)=>{let q=s38.indexOf(A);if(q<0)throw TypeError(`Invalid month: ${A}`);return q+1},_m3=[31,28,31,30,31,30,31,31,30,31,30,31],$m3=(A,q,K)=>{let Y=_m3[q];if(q===1&&Om3(A))Y=29;if(K>Y)throw TypeError(`Invalid day for ${s38[q]} in ${A}: ${K}`)},Om3=(A)=>{return A%4===0&&(A%100!==0||A%400===0)},Um=(A,q,K,Y)=>{let z=jz7(eX6(A));if(z<K||z>Y)throw TypeError(`${q} must be between ${K} and ${Y}, inclusive`);return z},Hm3=(A)=>{if(A===null||A===void 0)return 0;return $z7("0."+A)*1000},jm3=(A)=>{let q=A[0],K=1;if(q=="+")K=1;else if(q=="-")K=-1;else throw TypeError(`Offset direction, ${q}, must be "+" or "-"`);let Y=Number(A.substring(1,3)),z=Number(A.substring(4,6));return K*(Y*60+z)*60*1000},eX6=(A)=>{let q=0;while(q<A.length-1&&A.charAt(q)==="0")q++;if(q===0)return A;return A.slice(q)},R36=function(q){return Object.assign(new String(q),{deserializeJSON(){return JSON.parse(String(q))},toString(){return String(q)},toJSON(){return String(q)}})};R36.from=(A)=>{if(A&&typeof A==="object"&&(A instanceof R36||("deserializeJSON"in A)))return A;else if(typeof A==="string"||Object.getPrototypeOf(A)===String.prototype)return R36(String(A));return R36(JSON.stringify(A))};R36.fromObject=R36.from;function Jm3(A){if(A.includes(",")||A.includes('"'))A=`"${A.replace(/"/g,"\\\"")}"`;return A}var t38="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",e38="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",A58="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Jz7="(\\d?\\d)",Mz7="(\\d{4})",Mm3=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),Dm3=new RegExp(`^${t38}, ${Jz7} ${e38} ${Mz7} ${A58} GMT$`),Xm3=new RegExp(`^${t38}, ${Jz7}-${e38}-(\\d\\d) ${A58} GMT$`),Pm3=new RegExp(`^${t38} ${e38} ( [1-9]|\\d\\d) ${A58} ${Mz7}$`),Wm3=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zm3=(A)=>{if(A==null)return;let q=NaN;if(typeof A==="number")q=A;else if(typeof A==="string"){if(!/^-?\d*\.?\d+$/.test(A))throw TypeError("parseEpochTimestamp - numeric string invalid.");q=Number.parseFloat(A)}else if(typeof A==="object"&&A.tag===1)q=A.value;if(isNaN(q)||Math.abs(q)===1/0)throw TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(q*1000))},Gm3=(A)=>{if(A==null)return;if(typeof A!=="string")throw TypeError("RFC3339 timestamps must be strings");let q=Mm3.exec(A);if(!q)throw TypeError(`Invalid RFC3339 timestamp format ${A}`);let[,K,Y,z,w,_,$,,O,H]=q;Mc(Y,1,12),Mc(z,1,31),Mc(w,0,23),Mc(_,0,59),Mc($,0,60);let j=new Date(Date.UTC(Number(K),Number(Y)-1,Number(z),Number(w),Number(_),Number($),Number(O)?Math.round(parseFloat(`0.${O}`)*1000):0));if(j.setUTCFullYear(Number(K)),H.toUpperCase()!="Z"){let[,J,M,D]=/([+-])(\d\d):(\d\d)/.exec(H)||[void 0,"+",0,0],X=J==="-"?1:-1;j.setTime(j.getTime()+X*(Number(M)*60*60*1000+Number(D)*60*1000))}return j},fm3=(A)=>{if(A==null)return;if(typeof A!=="string")throw TypeError("RFC7231 timestamps must be strings.");let q,K,Y,z,w,_,$,O;if(O=Dm3.exec(A))[,q,K,Y,z,w,_,$]=O;else if(O=Xm3.exec(A))[,q,K,Y,z,w,_,$]=O,Y=(Number(Y)+1900).toString();else if(O=Pm3.exec(A))[,K,q,z,w,_,$,Y]=O;if(Y&&_){let H=Date.UTC(Number(Y),Wm3.indexOf(K),Number(q),Number(z),Number(w),Number(_),$?Math.round(parseFloat(`0.${$}`)*1000):0);Mc(q,1,31),Mc(z,0,23),Mc(w,0,59),Mc(_,0,60);let j=new Date(H);return j.setUTCFullYear(Number(Y)),j}throw TypeError(`Invalid RFC7231 date-time value ${A}.`)};function Mc(A,q,K){let Y=Number(A);if(Y<q||Y>K)throw Error(`Value ${Y} out of range [${q}, ${K}]`)}function Tm3(A,q,K){if(K<=0||!Number.isInteger(K))throw Error("Invalid number of delimiters ("+K+") for splitEvery.");let Y=A.split(q);if(K===1)return Y;let z=[],w="";for(let _=0;_<Y.length;_++){if(w==="")w=Y[_];else w+=q+Y[_];if((_+1)%K===0)z.push(w),w=""}if(w!=="")z.push(w);return z}var Vm3=(A)=>{let q=A.length,K=[],Y=!1,z=void 0,w=0;for(let _=0;_<q;++_){let $=A[_];switch($){case'"':if(z!=="\\")Y=!Y;break;case",":if(!Y)K.push(A.slice(w,_)),w=_+1;break}z=$}return K.push(A.slice(w)),K.map((_)=>{_=_.trim();let $=_.length;if($<2)return _;if(_[0]==='"'&&_[$-1]==='"')_=_.slice(1,$-1);return _.replace(/\\"/g,'"')})},wz7=/^-?\d*(\.\d+)?$/;class q21{string;type;constructor(A,q){if(this.string=A,this.type=q,!wz7.test(A))throw Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](A){if(!A||typeof A!=="object")return!1;let q=A;return q21.prototype.isPrototypeOf(A)||q.type==="bigDecimal"&&wz7.test(q.string)}}function Nm3(A){return new q21(String(A),"bigDecimal")}Object.defineProperty(Dz7,"generateIdempotencyToken",{enumerable:!0,get:function(){return SB3.v4}});Dz7.LazyJsonString=R36;Dz7.NumericValue=q21;Dz7._parseEpochTimestamp=Zm3;Dz7._parseRfc3339DateTimeWithOffset=Gm3;Dz7._parseRfc7231DateTime=fm3;Dz7.copyDocumentWithTransform=CB3;Dz7.dateToUtcString=nB3;Dz7.expectBoolean=IB3;Dz7.expectByte=n38;Dz7.expectFloat32=ew1;Dz7.expectInt=xB3;Dz7.expectInt32=l38;Dz7.expectLong=Qu6;Dz7.expectNonNull=BB3;Dz7.expectNumber=Fu6;Dz7.expectObject=_z7;Dz7.expectShort=i38;Dz7.expectString=mB3;Dz7.expectUnion=gB3;Dz7.handleFloat=UB3;Dz7.limitedParseDouble=a38;Dz7.limitedParseFloat=pB3;Dz7.limitedParseFloat32=dB3;Dz7.logger=Uu6;Dz7.nv=Nm3;Dz7.parseBoolean=hB3;Dz7.parseEpochTimestamp=Km3;Dz7.parseRfc3339DateTime=oB3;Dz7.parseRfc3339DateTimeWithOffset=sB3;Dz7.parseRfc7231DateTime=qm3;Dz7.quoteHeader=Jm3;Dz7.splitEvery=Tm3;Dz7.splitHeader=Vm3;Dz7.strictParseByte=jz7;Dz7.strictParseDouble=o38;Dz7.strictParseFloat=FB3;Dz7.strictParseFloat32=$z7;Dz7.strictParseInt=cB3;Dz7.strictParseInt32=lB3;Dz7.strictParseLong=Hz7;Dz7.strictParseShort=tX6});var Xz7=C((Jg3)=>{var jg3=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";Jg3.isArrayBuffer=jg3});var K58=C((Wg3)=>{var Dg3=Xz7(),q58=g6("buffer"),Xg3=(A,q=0,K=A.byteLength-q)=>{if(!Dg3.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return q58.Buffer.from(A,q,K)},Pg3=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?q58.Buffer.from(A,q):q58.Buffer.from(A)};Wg3.fromArrayBuffer=Xg3;Wg3.fromString=Pg3});var Zz7=C((Pz7)=>{Object.defineProperty(Pz7,"__esModule",{value:!0});Pz7.fromBase64=void 0;var fg3=K58(),Tg3=/^[A-Za-z0-9+/]*={0,2}$/,Vg3=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Tg3.exec(A))throw TypeError("Invalid base64 string.");let q=(0,fg3.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};Pz7.fromBase64=Vg3});var Tz7=C((Gz7)=>{Object.defineProperty(Gz7,"__esModule",{value:!0});Gz7.toBase64=void 0;var Ng3=K58(),vg3=Z2(),kg3=(A)=>{let q;if(typeof A==="string")q=(0,vg3.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Ng3.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};Gz7.toBase64=kg3});var Y58=C((pu6)=>{var Vz7=Zz7(),Nz7=Tz7();Object.keys(Vz7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(pu6,A))Object.defineProperty(pu6,A,{enumerable:!0,get:function(){return Vz7[A]}})});Object.keys(Nz7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(pu6,A))Object.defineProperty(pu6,A,{enumerable:!0,get:function(){return Nz7[A]}})})});var Ez7=C((Eg3)=>{var vz7=Z2();class kz7{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:A,serializer:q,deserializer:K,serdeContext:Y,defaultContentType:z}){this.marshaller=A,this.serializer=q,this.deserializer=K,this.serdeContext=Y,this.defaultContentType=z}async serializeEventStream({eventStream:A,requestSchema:q,initialRequest:K}){let Y=this.marshaller,z=q.getEventStreamMember(),w=q.getMemberSchema(z),_=this.serializer,$=this.defaultContentType,O=Symbol("initialRequestMarker"),H={async*[Symbol.asyncIterator](){if(K){let j={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:$}};_.write(q,K);let J=_.flush();yield{[O]:!0,headers:j,body:J}}for await(let j of A)yield j}};return Y.serialize(H,(j)=>{if(j[O])return{headers:j.headers,body:j.body};let J=Object.keys(j).find((Z)=>{return Z!=="__type"})??"",{additionalHeaders:M,body:D,eventType:X,explicitPayloadContentType:P}=this.writeEventBody(J,w,j);return{headers:{":event-type":{type:"string",value:X},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:P??$},...M},body:D}})}async deserializeEventStream({response:A,responseSchema:q,initialResponseContainer:K}){let Y=this.marshaller,z=q.getEventStreamMember(),_=q.getMemberSchema(z).getMemberSchemas(),$=Symbol("initialResponseMarker"),O=Y.deserialize(A.body,async(J)=>{let M=Object.keys(J).find((X)=>{return X!=="__type"})??"",D=J[M].body;if(M==="initial-response"){let X=await this.deserializer.read(q,D);return delete X[z],{[$]:!0,...X}}else if(M in _){let X=_[M];if(X.isStructSchema()){let P={},W=!1;for(let[Z,G]of X.structIterator()){let{eventHeader:f,eventPayload:V}=G.getMergedTraits();if(W=W||Boolean(f||V),V){if(G.isBlobSchema())P[Z]=D;else if(G.isStringSchema())P[Z]=(this.serdeContext?.utf8Encoder??vz7.toUtf8)(D);else if(G.isStructSchema())P[Z]=await this.deserializer.read(G,D)}else if(f){let N=J[M].headers[Z]?.value;if(N!=null)if(G.isNumericSchema())if(N&&typeof N==="object"&&"bytes"in N)P[Z]=BigInt(N.toString());else P[Z]=Number(N);else P[Z]=N}}if(W)return{[M]:P}}return{[M]:await this.deserializer.read(X,D)}}else return{$unknown:J}}),H=O[Symbol.asyncIterator](),j=await H.next();if(j.done)return O;if(j.value?.[$]){if(!q)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let[J,M]of Object.entries(j.value))K[J]=M}return{async*[Symbol.asyncIterator](){if(!j?.value?.[$])yield j.value;while(!0){let{done:J,value:M}=await H.next();if(J)break;yield M}}}}writeEventBody(A,q,K){let Y=this.serializer,z=A,w=null,_,$=(()=>{return q.getSchema()[4].includes(A)})(),O={};if(!$){let[J,M]=K[A];z=J,Y.write(15,M)}else{let J=q.getMemberSchema(A);if(J.isStructSchema()){for(let[M,D]of J.structIterator()){let{eventHeader:X,eventPayload:P}=D.getMergedTraits();if(P){w=M;break}else if(X){let W=K[A][M],Z="binary";if(D.isNumericSchema())if(-2147483648<=W&&W<=2147483647)Z="integer";else Z="long";else if(D.isTimestampSchema())Z="timestamp";else if(D.isStringSchema())Z="string";else if(D.isBooleanSchema())Z="boolean";if(W!=null)O[M]={type:Z,value:W},delete K[A][M]}}if(w!==null){let M=J.getMemberSchema(w);if(M.isBlobSchema())_="application/octet-stream";else if(M.isStringSchema())_="text/plain";Y.write(M,K[A][w])}else Y.write(J,K[A])}else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let H=Y.flush();return{body:typeof H==="string"?(this.serdeContext?.utf8Decoder??vz7.fromUtf8)(H):H,eventType:z,explicitPayloadContentType:_,additionalHeaders:O}}}Eg3.EventStreamSerde=kz7});var MN=C((Rg3)=>{var K21=L38(),RR=lO(),yR=JN(),du6=Iu6(),Y21=Y58(),z58=Z2(),S36=async(A=new Uint8Array,q)=>{if(A instanceof Uint8Array)return K21.Uint8ArrayBlobAdapter.mutate(A);if(!A)return K21.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let K=q.streamCollector(A);return K21.Uint8ArrayBlobAdapter.mutate(await K)};function cu6(A){return encodeURIComponent(A).replace(/[!'()*]/g,function(q){return"%"+q.charCodeAt(0).toString(16).toUpperCase()})}class qP6{serdeContext;setSerdeContext(A){this.serdeContext=A}}class z21 extends qP6{options;constructor(A){super();this.options=A}getRequestType(){return du6.HttpRequest}getResponseType(){return du6.HttpResponse}setSerdeContext(A){if(this.serdeContext=A,this.serializer.setSerdeContext(A),this.deserializer.setSerdeContext(A),this.getPayloadCodec())this.getPayloadCodec().setSerdeContext(A)}updateServiceEndpoint(A,q){if("url"in q){if(A.protocol=q.url.protocol,A.hostname=q.url.hostname,A.port=q.url.port?Number(q.url.port):void 0,A.path=q.url.pathname,A.fragment=q.url.hash||void 0,A.username=q.url.username||void 0,A.password=q.url.password||void 0,!A.query)A.query={};for(let[K,Y]of q.url.searchParams.entries())A.query[K]=Y;return A}else return A.protocol=q.protocol,A.hostname=q.hostname,A.port=q.port?Number(q.port):void 0,A.path=q.path,A.query={...q.query},A}setHostPrefix(A,q,K){let Y=RR.NormalizedSchema.of(q.input),z=RR.translateTraits(q.traits??{});if(z.endpoint){let w=z.endpoint?.[0];if(typeof w==="string"){let _=[...Y.structIterator()].filter(([,$])=>$.getMergedTraits().hostLabel);for(let[$]of _){let O=K[$];if(typeof O!=="string")throw Error(`@smithy/core/schema - ${$} in input must be a string as hostLabel.`);w=w.replace(`{${$}}`,O)}A.hostname=w+A.hostname}}}deserializeMetadata(A){return{httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:A,requestSchema:q,initialRequest:K}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:A,requestSchema:q,initialRequest:K})}async deserializeEventStream({response:A,responseSchema:q,initialResponseContainer:K}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:A,responseSchema:q,initialResponseContainer:K})}async loadEventStreamCapability(){let{EventStreamSerde:A}=await Promise.resolve().then(() => e(Ez7()));return new A({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(A,q,K,Y,z){return[]}getEventStreamMarshaller(){let A=this.serdeContext;if(!A.eventStreamMarshaller)throw Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return A.eventStreamMarshaller}}class Lz7 extends z21{async serializeRequest(A,q,K){let Y={...q??{}},z=this.serializer,w={},_={},$=await K.endpoint(),O=RR.NormalizedSchema.of(A?.input),H=O.getSchema(),j=!1,J,M=new du6.HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:w,headers:_,body:void 0});if($){this.updateServiceEndpoint(M,$),this.setHostPrefix(M,A,Y);let D=RR.translateTraits(A.traits);if(D.http){M.method=D.http[0];let[X,P]=D.http[1].split("?");if(M.path=="/")M.path=X;else M.path+=X;let W=new URLSearchParams(P??"");Object.assign(w,Object.fromEntries(W))}}for(let[D,X]of O.structIterator()){let P=X.getMergedTraits()??{},W=Y[D];if(W==null&&!X.isIdempotencyToken())continue;if(P.httpPayload){if(X.isStreaming())if(X.isStructSchema()){if(Y[D])J=await this.serializeEventStream({eventStream:Y[D],requestSchema:O})}else J=W;else z.write(X,W),J=z.flush();delete Y[D]}else if(P.httpLabel){z.write(X,W);let Z=z.flush();if(M.path.includes(`{${D}+}`))M.path=M.path.replace(`{${D}+}`,Z.split("/").map(cu6).join("/"));else if(M.path.includes(`{${D}}`))M.path=M.path.replace(`{${D}}`,cu6(Z));delete Y[D]}else if(P.httpHeader)z.write(X,W),_[P.httpHeader.toLowerCase()]=String(z.flush()),delete Y[D];else if(typeof P.httpPrefixHeaders==="string"){for(let[Z,G]of Object.entries(W)){let f=P.httpPrefixHeaders+Z;z.write([X.getValueSchema(),{httpHeader:f}],G),_[f.toLowerCase()]=z.flush()}delete Y[D]}else if(P.httpQuery||P.httpQueryParams)this.serializeQuery(X,W,w),delete Y[D];else j=!0}if(j&&Y)z.write(H,Y),J=z.flush();return M.headers=_,M.query=w,M.body=J,M}serializeQuery(A,q,K){let Y=this.serializer,z=A.getMergedTraits();if(z.httpQueryParams){for(let[w,_]of Object.entries(q))if(!(w in K)){let $=A.getValueSchema();Object.assign($.getMergedTraits(),{...z,httpQuery:w,httpQueryParams:void 0}),this.serializeQuery($,_,K)}return}if(A.isListSchema()){let w=!!A.getMergedTraits().sparse,_=[];for(let $ of q){Y.write([A.getValueSchema(),z],$);let O=Y.flush();if(w||O!==void 0)_.push(O)}K[z.httpQuery]=_}else Y.write([A,z],q),K[z.httpQuery]=Y.flush()}async deserializeResponse(A,q,K){let Y=this.deserializer,z=RR.NormalizedSchema.of(A.output),w={};if(K.statusCode>=300){let $=await S36(K.body,q);if($.byteLength>0)Object.assign(w,await Y.read(15,$));throw await this.handleError(A,q,K,w,this.deserializeMetadata(K)),Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let $ in K.headers){let O=K.headers[$];delete K.headers[$],K.headers[$.toLowerCase()]=O}let _=await this.deserializeHttpMessage(z,q,K,w);if(_.length){let $=await S36(K.body,q);if($.byteLength>0){let O=await Y.read(z,$);for(let H of _)w[H]=O[H]}}else if(_.discardResponseBody)await S36(K.body,q);return w.$metadata=this.deserializeMetadata(K),w}async deserializeHttpMessage(A,q,K,Y,z){let w;if(Y instanceof Set)w=z;else w=Y;let _=!0,$=this.deserializer,O=RR.NormalizedSchema.of(A),H=[];for(let[j,J]of O.structIterator()){let M=J.getMemberTraits();if(M.httpPayload){if(_=!1,J.isStreaming())if(J.isStructSchema())w[j]=await this.deserializeEventStream({response:K,responseSchema:O});else w[j]=K21.sdkStreamMixin(K.body);else if(K.body){let X=await S36(K.body,q);if(X.byteLength>0)w[j]=await $.read(J,X)}}else if(M.httpHeader){let D=String(M.httpHeader).toLowerCase(),X=K.headers[D];if(X!=null)if(J.isListSchema()){let P=J.getValueSchema();P.getMergedTraits().httpHeader=D;let W;if(P.isTimestampSchema()&&P.getSchema()===4)W=yR.splitEvery(X,",",2);else W=yR.splitHeader(X);let Z=[];for(let G of W)Z.push(await $.read(P,G.trim()));w[j]=Z}else w[j]=await $.read(J,X)}else if(M.httpPrefixHeaders!==void 0){w[j]={};for(let[D,X]of Object.entries(K.headers))if(D.startsWith(M.httpPrefixHeaders)){let P=J.getValueSchema();P.getMergedTraits().httpHeader=D,w[j][D.slice(M.httpPrefixHeaders.length)]=await $.read(P,X)}}else if(M.httpResponseCode)w[j]=K.statusCode;else H.push(j)}return H.discardResponseBody=_,H}}class yz7 extends z21{async serializeRequest(A,q,K){let Y=this.serializer,z={},w={},_=await K.endpoint(),$=RR.NormalizedSchema.of(A?.input),O=$.getSchema(),H,j=new du6.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:z,headers:w,body:void 0});if(_)this.updateServiceEndpoint(j,_),this.setHostPrefix(j,A,q);let J={...q};if(q){let M=$.getEventStreamMember();if(M){if(J[M]){let D={};for(let[X,P]of $.structIterator())if(X!==M&&J[X])Y.write(P,J[X]),D[X]=Y.flush();H=await this.serializeEventStream({eventStream:J[M],requestSchema:$,initialRequest:D})}}else Y.write(O,J),H=Y.flush()}return j.headers=w,j.query=z,j.body=H,j.method="POST",j}async deserializeResponse(A,q,K){let Y=this.deserializer,z=RR.NormalizedSchema.of(A.output),w={};if(K.statusCode>=300){let $=await S36(K.body,q);if($.byteLength>0)Object.assign(w,await Y.read(15,$));throw await this.handleError(A,q,K,w,this.deserializeMetadata(K)),Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let $ in K.headers){let O=K.headers[$];delete K.headers[$],K.headers[$.toLowerCase()]=O}let _=z.getEventStreamMember();if(_)w[_]=await this.deserializeEventStream({response:K,responseSchema:z,initialResponseContainer:w});else{let $=await S36(K.body,q);if($.byteLength>0)Object.assign(w,await Y.read(z,$))}return w.$metadata=this.deserializeMetadata(K),w}}var Rz7=(A,q,K,Y,z,w)=>{if(q!=null&&q[K]!==void 0){let _=Y();if(_.length<=0)throw Error("Empty value provided for input HTTP label: "+K+".");A=A.replace(z,w?_.split("/").map(($)=>cu6($)).join("/"):cu6(_))}else throw Error("No value provided for input HTTP label: "+K+".");return A};function yg3(A,q){return new w58(A,q)}class w58{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(A,q){this.input=A,this.context=q}async build(){let{hostname:A,protocol:q="https",port:K,path:Y}=await this.context.endpoint();this.path=Y;for(let z of this.resolvePathStack)z(this.path);return new du6.HttpRequest({protocol:q,hostname:this.hostname||A,port:K,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(A){return this.hostname=A,this}bp(A){return this.resolvePathStack.push((q)=>{this.path=`${q?.endsWith("/")?q.slice(0,-1):q||""}`+A}),this}p(A,q,K,Y){return this.resolvePathStack.push((z)=>{this.path=Rz7(z,this.input,A,q,K,Y)}),this}h(A){return this.headers=A,this}q(A){return this.query=A,this}b(A){return this.body=A,this}m(A){return this.method=A,this}}function _58(A,q){if(q.timestampFormat.useTrait){if(A.isTimestampSchema()&&(A.getSchema()===5||A.getSchema()===6||A.getSchema()===7))return A.getSchema()}let{httpLabel:K,httpPrefixHeaders:Y,httpHeader:z,httpQuery:w}=A.getMergedTraits();return(q.httpBindings?typeof Y==="string"||Boolean(z)?6:Boolean(w)||Boolean(K)?5:void 0:void 0)??q.timestampFormat.default}class $58 extends qP6{settings;constructor(A){super();this.settings=A}read(A,q){let K=RR.NormalizedSchema.of(A);if(K.isListSchema())return yR.splitHeader(q).map((Y)=>this.read(K.getValueSchema(),Y));if(K.isBlobSchema())return(this.serdeContext?.base64Decoder??Y21.fromBase64)(q);if(K.isTimestampSchema())switch(_58(K,this.settings)){case 5:return yR._parseRfc3339DateTimeWithOffset(q);case 6:return yR._parseRfc7231DateTime(q);case 7:return yR._parseEpochTimestamp(q);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",q),new Date(q)}if(K.isStringSchema()){let Y=K.getMergedTraits().mediaType,z=q;if(Y){if(K.getMergedTraits().httpHeader)z=this.base64ToUtf8(z);if(Y==="application/json"||Y.endsWith("+json"))z=yR.LazyJsonString.from(z);return z}}if(K.isNumericSchema())return Number(q);if(K.isBigIntegerSchema())return BigInt(q);if(K.isBigDecimalSchema())return new yR.NumericValue(q,"bigDecimal");if(K.isBooleanSchema())return String(q).toLowerCase()==="true";return q}base64ToUtf8(A){return(this.serdeContext?.utf8Encoder??z58.toUtf8)((this.serdeContext?.base64Decoder??Y21.fromBase64)(A))}}class Sz7 extends qP6{codecDeserializer;stringDeserializer;constructor(A,q){super();this.codecDeserializer=A,this.stringDeserializer=new $58(q)}setSerdeContext(A){this.stringDeserializer.setSerdeContext(A),this.codecDeserializer.setSerdeContext(A),this.serdeContext=A}read(A,q){let K=RR.NormalizedSchema.of(A),Y=K.getMergedTraits(),z=this.serdeContext?.utf8Encoder??z58.toUtf8;if(Y.httpHeader||Y.httpResponseCode)return this.stringDeserializer.read(K,z(q));if(Y.httpPayload){if(K.isBlobSchema()){let w=this.serdeContext?.utf8Decoder??z58.fromUtf8;if(typeof q==="string")return w(q);return q}else if(K.isStringSchema()){if("byteLength"in q)return z(q);return q}}return this.codecDeserializer.read(K,q)}}class O58 extends qP6{settings;stringBuffer="";constructor(A){super();this.settings=A}write(A,q){let K=RR.NormalizedSchema.of(A);switch(typeof q){case"object":if(q===null){this.stringBuffer="null";return}if(K.isTimestampSchema()){if(!(q instanceof Date))throw Error(`@smithy/core/protocols - received non-Date value ${q} when schema expected Date in ${K.getName(!0)}`);switch(_58(K,this.settings)){case 5:this.stringBuffer=q.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=yR.dateToUtcString(q);break;case 7:this.stringBuffer=String(q.getTime()/1000);break;default:console.warn("Missing timestamp format, using epoch seconds",q),this.stringBuffer=String(q.getTime()/1000)}return}if(K.isBlobSchema()&&"byteLength"in q){this.stringBuffer=(this.serdeContext?.base64Encoder??Y21.toBase64)(q);return}if(K.isListSchema()&&Array.isArray(q)){let w="";for(let _ of q){this.write([K.getValueSchema(),K.getMergedTraits()],_);let $=this.flush(),O=K.getValueSchema().isTimestampSchema()?$:yR.quoteHeader($);if(w!=="")w+=", ";w+=O}this.stringBuffer=w;return}this.stringBuffer=JSON.stringify(q,null,2);break;case"string":let Y=K.getMergedTraits().mediaType,z=q;if(Y){if(Y==="application/json"||Y.endsWith("+json"))z=yR.LazyJsonString.from(z);if(K.getMergedTraits().httpHeader){this.stringBuffer=(this.serdeContext?.base64Encoder??Y21.toBase64)(z.toString());return}}this.stringBuffer=q;break;default:if(K.isIdempotencyToken())this.stringBuffer=yR.generateIdempotencyToken();else this.stringBuffer=String(q)}}flush(){let A=this.stringBuffer;return this.stringBuffer="",A}}class Cz7{codecSerializer;stringSerializer;buffer;constructor(A,q,K=new O58(q)){this.codecSerializer=A,this.stringSerializer=K}setSerdeContext(A){this.codecSerializer.setSerdeContext(A),this.stringSerializer.setSerdeContext(A)}write(A,q){let K=RR.NormalizedSchema.of(A),Y=K.getMergedTraits();if(Y.httpHeader||Y.httpLabel||Y.httpQuery){this.stringSerializer.write(K,q),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(K,q)}flush(){if(this.buffer!==void 0){let A=this.buffer;return this.buffer=void 0,A}return this.codecSerializer.flush()}}Rg3.FromStringShapeDeserializer=$58;Rg3.HttpBindingProtocol=Lz7;Rg3.HttpInterceptingShapeDeserializer=Sz7;Rg3.HttpInterceptingShapeSerializer=Cz7;Rg3.HttpProtocol=z21;Rg3.RequestBuilder=w58;Rg3.RpcProtocol=yz7;Rg3.SerdeContext=qP6;Rg3.ToStringShapeSerializer=O58;Rg3.collectBody=S36;Rg3.determineTimestampFormat=_58;Rg3.extendedEncodeURIComponent=cu6;Rg3.requestBuilder=yg3;Rg3.resolvedPath=Rz7});var dz7=C((YP6)=>{var bz7=Qm(),D58=MN(),j58=j38(),dg3=lO(),hz7=JN();class xz7{config;middlewareStack=bz7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var H58="***SensitiveInformation***";function J58(A,q){if(q==null)return q;let K=dg3.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return H58;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return H58}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return H58}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=J58(_,Y[w]);return z}return q}class X58{middlewareStack=bz7.constructStack();schema;static classBuilder(){return new uz7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[j58.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class uz7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends X58{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?J58.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?J58.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var cg3="***SensitiveInformation***",lg3=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class KP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return KP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===KP6)return KP6.isInstance(A);if(KP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var Bz7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},mz7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=ng3(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw Bz7(_,q)},ig3=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{mz7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},ng3=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),rg3=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},Iz7=!1,og3=(A)=>{if(A&&!Iz7&&parseInt(A.substring(1,A.indexOf(".")))<16)Iz7=!0},ag3=(A)=>{let q=[];for(let K in j58.AlgorithmId){let Y=j58.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},sg3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},tg3=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},eg3=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},gz7=(A)=>{return Object.assign(ag3(A),tg3(A))},AF3=gz7,qF3=(A)=>{return Object.assign(sg3(A),eg3(A))},KF3=(A)=>Array.isArray(A)?A:[A],Fz7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=Fz7(A[K]);return A},YF3=(A)=>{return A!=null};class Qz7{trace(){}debug(){}info(){}warn(){}error(){}}function Uz7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,_F3(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}pz7(Y,null,w,_)}return Y}var zF3=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},wF3=(A,q)=>{let K={};for(let Y in q)pz7(K,A,q,Y);return K},_F3=(A,q,K)=>{return Uz7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},pz7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=$F3,O=OF3,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},$F3=(A)=>A!=null,OF3=(A)=>A,HF3=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},jF3=(A)=>A.toISOString().replace(".000Z","Z"),M58=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(M58);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=M58(A[K])}return q}return A};Object.defineProperty(YP6,"collectBody",{enumerable:!0,get:function(){return D58.collectBody}});Object.defineProperty(YP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return D58.extendedEncodeURIComponent}});Object.defineProperty(YP6,"resolvedPath",{enumerable:!0,get:function(){return D58.resolvedPath}});YP6.Client=xz7;YP6.Command=X58;YP6.NoOpLogger=Qz7;YP6.SENSITIVE_STRING=cg3;YP6.ServiceException=KP6;YP6._json=M58;YP6.convertMap=zF3;YP6.createAggregatedClient=lg3;YP6.decorateServiceException=Bz7;YP6.emitWarningIfUnsupportedVersion=og3;YP6.getArrayIfSingleItem=KF3;YP6.getDefaultClientConfiguration=AF3;YP6.getDefaultExtensionConfiguration=gz7;YP6.getValueFromTextNode=Fz7;YP6.isSerializableHeaderValue=YF3;YP6.loadConfigsForDefaultMode=rg3;YP6.map=Uz7;YP6.resolveDefaultRuntimeConfig=qF3;YP6.serializeDateTime=jF3;YP6.serializeFloat=HF3;YP6.take=wF3;YP6.throwDefaultError=mz7;YP6.withBaseException=ig3;Object.keys(hz7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(YP6,A))Object.defineProperty(YP6,A,{enumerable:!0,get:function(){return hz7[A]}})})});var lz7=C((cz7)=>{Object.defineProperty(cz7,"__esModule",{value:!0});cz7.createGetRequest=mF3;cz7.getCredentials=gF3;var P58=EM(),xF3=H97(),uF3=dz7(),BF3=L38();function mF3(A){return new xF3.HttpRequest({protocol:A.protocol,hostname:A.hostname,port:Number(A.port),path:A.pathname,query:Array.from(A.searchParams.entries()).reduce((q,[K,Y])=>{return q[K]=Y,q},{}),fragment:A.hash})}async function gF3(A,q){let Y=await(0,BF3.sdkStreamMixin)(A.body).transformToString();if(A.statusCode===200){let z=JSON.parse(Y);if(typeof z.AccessKeyId!=="string"||typeof z.SecretAccessKey!=="string"||typeof z.Token!=="string"||typeof z.Expiration!=="string")throw new P58.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:q});return{accessKeyId:z.AccessKeyId,secretAccessKey:z.SecretAccessKey,sessionToken:z.Token,expiration:(0,uF3.parseRfc3339DateTime)(z.Expiration)}}if(A.statusCode>=400&&A.statusCode<500){let z={};try{z=JSON.parse(Y)}catch(w){}throw Object.assign(new P58.CredentialsProviderError(`Server responded with status: ${A.statusCode}`,{logger:q}),{Code:z.Code,Message:z.Message})}throw new P58.CredentialsProviderError(`Server responded with status: ${A.statusCode}`,{logger:q})}});var rz7=C((iz7)=>{Object.defineProperty(iz7,"__esModule",{value:!0});iz7.retryWrapper=void 0;var UF3=(A,q,K)=>{return async()=>{for(let Y=0;Y<q;++Y)try{return await A()}catch(z){await new Promise((w)=>setTimeout(w,K))}return await A()}};iz7.retryWrapper=UF3});var ez7=C((sz7)=>{Object.defineProperty(sz7,"__esModule",{value:!0});sz7.fromHttp=void 0;var pF3=d2(),dF3=ON(),cF3=$N(),oz7=EM(),lF3=pF3.__importDefault(g6("fs/promises")),iF3=w97(),az7=lz7(),nF3=rz7(),rF3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",oF3="http://169.254.170.2",aF3="AWS_CONTAINER_CREDENTIALS_FULL_URI",sF3="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",tF3="AWS_CONTAINER_AUTHORIZATION_TOKEN",eF3=(A={})=>{A.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let q,K=A.awsContainerCredentialsRelativeUri??process.env[rF3],Y=A.awsContainerCredentialsFullUri??process.env[aF3],z=A.awsContainerAuthorizationToken??process.env[tF3],w=A.awsContainerAuthorizationTokenFile??process.env[sF3],_=A.logger?.constructor?.name==="NoOpLogger"||!A.logger?.warn?console.warn:A.logger.warn.bind(A.logger);if(K&&Y)_("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),_("awsContainerCredentialsFullUri will take precedence.");if(z&&w)_("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),_("awsContainerAuthorizationToken will take precedence.");if(Y)q=Y;else if(K)q=`${oF3}${K}`;else throw new oz7.CredentialsProviderError(`No HTTP credential provider host provided.
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:A.logger});let $=new URL(q);(0,iF3.checkUrl)($,A.logger);let O=cF3.NodeHttpHandler.create({requestTimeout:A.timeout??1000,connectionTimeout:A.timeout??1000});return(0,nF3.retryWrapper)(async()=>{let H=(0,az7.createGetRequest)($);if(z)H.headers.Authorization=z;else if(w)H.headers.Authorization=(await lF3.default.readFile(w)).toString();try{let j=await O.handle(H);return(0,az7.getCredentials)(j.response).then((J)=>(0,dF3.setCredentialFeature)(J,"CREDENTIALS_HTTP","z"))}catch(j){throw new oz7.CredentialsProviderError(String(j),{logger:A.logger})}},A.maxRetries??3,A.timeout??1000)};sz7.fromHttp=eF3});var w21=C((W58)=>{Object.defineProperty(W58,"__esModule",{value:!0});W58.fromHttp=void 0;var AQ3=ez7();Object.defineProperty(W58,"fromHttp",{enumerable:!0,get:function(){return AQ3.fromHttp}})});var v58=C(($Q3)=>{$Q3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})($Q3.HttpAuthLocation||($Q3.HttpAuthLocation={}));$Q3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})($Q3.HttpApiKeyAuthLocation||($Q3.HttpApiKeyAuthLocation={}));$Q3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})($Q3.EndpointURLScheme||($Q3.EndpointURLScheme={}));$Q3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})($Q3.AlgorithmId||($Q3.AlgorithmId={}));var KQ3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>$Q3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>$Q3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},YQ3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},zQ3=(A)=>{return KQ3(A)},wQ3=(A)=>{return YQ3(A)};$Q3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})($Q3.FieldPosition||($Q3.FieldPosition={}));var _Q3="__smithy_context";$Q3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})($Q3.IniSectionType||($Q3.IniSectionType={}));$Q3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})($Q3.RequestHandlerProtocol||($Q3.RequestHandlerProtocol={}));$Q3.SMITHY_CONTEXT_KEY=_Q3;$Q3.getDefaultClientConfiguration=zQ3;$Q3.resolveDefaultRuntimeConfig=wQ3});var $21=C((WQ3)=>{var JQ3=v58(),MQ3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},DQ3=(A)=>{return{httpHandler:A.httpHandler()}};class Aw7{name;kind;values;constructor({name:A,kind:q=JQ3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class qw7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class _21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new _21({...A,headers:{...A.headers}});if(q.query)q.query=XQ3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return _21.clone(this)}}function XQ3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class Kw7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function PQ3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}WQ3.Field=Aw7;WQ3.Fields=qw7;WQ3.HttpRequest=_21;WQ3.HttpResponse=Kw7;WQ3.getHttpHandlerExtensionConfiguration=MQ3;WQ3.isValidHostname=PQ3;WQ3.resolveHttpHandlerRuntimeConfig=DQ3});var Yw7=C((SQ3)=>{SQ3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(SQ3.HttpAuthLocation||(SQ3.HttpAuthLocation={}));SQ3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(SQ3.HttpApiKeyAuthLocation||(SQ3.HttpApiKeyAuthLocation={}));SQ3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(SQ3.EndpointURLScheme||(SQ3.EndpointURLScheme={}));SQ3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(SQ3.AlgorithmId||(SQ3.AlgorithmId={}));var kQ3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>SQ3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>SQ3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},EQ3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},LQ3=(A)=>{return kQ3(A)},yQ3=(A)=>{return EQ3(A)};SQ3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(SQ3.FieldPosition||(SQ3.FieldPosition={}));var RQ3="__smithy_context";SQ3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(SQ3.IniSectionType||(SQ3.IniSectionType={}));SQ3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(SQ3.RequestHandlerProtocol||(SQ3.RequestHandlerProtocol={}));SQ3.SMITHY_CONTEXT_KEY=RQ3;SQ3.getDefaultClientConfiguration=LQ3;SQ3.resolveDefaultRuntimeConfig=yQ3});var $w7=C((gQ3)=>{var bQ3=Yw7(),xQ3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},uQ3=(A)=>{return{httpHandler:A.httpHandler()}};class zw7{name;kind;values;constructor({name:A,kind:q=bQ3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class ww7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class O21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new O21({...A,headers:{...A.headers}});if(q.query)q.query=BQ3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return O21.clone(this)}}function BQ3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class _w7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function mQ3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}gQ3.Field=zw7;gQ3.Fields=ww7;gQ3.HttpRequest=O21;gQ3.HttpResponse=_w7;gQ3.getHttpHandlerExtensionConfiguration=xQ3;gQ3.isValidHostname=mQ3;gQ3.resolveHttpHandlerRuntimeConfig=uQ3});var h58=C((rQ3)=>{var iQ3=$w7(),Ow7=(A,q)=>(K,Y)=>async(z)=>{let{response:w}=await K(z);try{let _=await q(w,A);return{response:w,output:_}}catch(_){if(Object.defineProperty(_,"$response",{value:w,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in _)){try{_.message+=`
  Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(O){if(!Y.logger||Y.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else Y.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof _.$responseBodyText<"u"){if(_.$response)_.$response.body=_.$responseBodyText}try{if(iQ3.HttpResponse.isInstance(w)){let{headers:O={}}=w,H=Object.entries(O);_.$metadata={httpStatusCode:w.statusCode,requestId:C58(/^x-[\w-]+-request-?id$/,H),extendedRequestId:C58(/^x-[\w-]+-id-2$/,H),cfId:C58(/^x-[\w-]+-cf-id$/,H)}}}catch(O){}}throw _}},C58=(A,q)=>{return(q.find(([K])=>{return K.match(A)})||[void 0,void 0])[1]},Hw7=(A,q)=>(K,Y)=>async(z)=>{let w=A,_=Y.endpointV2?.url&&w.urlParser?async()=>w.urlParser(Y.endpointV2.url):w.endpoint;if(!_)throw Error("No valid endpoint provider available.");let $=await q(z.input,{...A,endpoint:_});return K({...z,request:$})},jw7={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Jw7={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function nQ3(A,q,K){return{applyToStack:(Y)=>{Y.add(Ow7(A,K),jw7),Y.add(Hw7(A,q),Jw7)}}}rQ3.deserializerMiddleware=Ow7;rQ3.deserializerMiddlewareOption=jw7;rQ3.getSerdePlugin=nQ3;rQ3.serializerMiddleware=Hw7;rQ3.serializerMiddlewareOption=Jw7});var pw=C((kw7)=>{var H21=b38(),Mw7=pZ(),AU3=h58(),I58=Iu6(),qU3=MN(),KU3=(A)=>A[H21.SMITHY_CONTEXT_KEY]||(A[H21.SMITHY_CONTEXT_KEY]={}),YU3=(A,q)=>{if(!q||q.length===0)return A;let K=[];for(let Y of q)for(let z of A)if(z.schemeId.split("#")[1]===Y)K.push(z);for(let Y of A)if(!K.find(({schemeId:z})=>z===Y.schemeId))K.push(Y);return K};function zU3(A){let q=new Map;for(let K of A)q.set(K.schemeId,K);return q}var b58=(A,q)=>(K,Y)=>async(z)=>{let w=A.httpAuthSchemeProvider(await q.httpAuthSchemeParametersProvider(A,Y,z.input)),_=A.authSchemePreference?await A.authSchemePreference():[],$=YU3(w,_),O=zU3(A.httpAuthSchemes),H=Mw7.getSmithyContext(Y),j=[];for(let J of $){let M=O.get(J.schemeId);if(!M){j.push(`HttpAuthScheme \`${J.schemeId}\` was not enabled for this service.`);continue}let D=M.identityProvider(await q.identityProviderConfigProvider(A));if(!D){j.push(`HttpAuthScheme \`${J.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:X={},signingProperties:P={}}=J.propertiesExtractor?.(A,Y)||{};J.identityProperties=Object.assign(J.identityProperties||{},X),J.signingProperties=Object.assign(J.signingProperties||{},P),H.selectedHttpAuthScheme={httpAuthOption:J,identity:await D(J.identityProperties),signer:M.signer};break}if(!H.selectedHttpAuthScheme)throw Error(j.join(`
`));return K(z)},Dw7={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},wU3=(A,{httpAuthSchemeParametersProvider:q,identityProviderConfigProvider:K})=>({applyToStack:(Y)=>{Y.addRelativeTo(b58(A,{httpAuthSchemeParametersProvider:q,identityProviderConfigProvider:K}),Dw7)}}),Xw7={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:AU3.serializerMiddlewareOption.name},_U3=(A,{httpAuthSchemeParametersProvider:q,identityProviderConfigProvider:K})=>({applyToStack:(Y)=>{Y.addRelativeTo(b58(A,{httpAuthSchemeParametersProvider:q,identityProviderConfigProvider:K}),Xw7)}}),$U3=(A)=>(q)=>{throw q},OU3=(A,q)=>{},Pw7=(A)=>(q,K)=>async(Y)=>{if(!I58.HttpRequest.isInstance(Y.request))return q(Y);let w=Mw7.getSmithyContext(K).selectedHttpAuthScheme;if(!w)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:_={}},identity:$,signer:O}=w,H=await q({...Y,request:await O.sign(Y.request,$,_)}).catch((O.errorHandler||$U3)(_));return(O.successHandler||OU3)(H.response,_),H},Ww7={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},HU3=(A)=>({applyToStack:(q)=>{q.addRelativeTo(Pw7(),Ww7)}}),jU3=(A)=>{if(typeof A==="function")return A;let q=Promise.resolve(A);return()=>q},JU3=async(A,q,K,Y=(w)=>w,...z)=>{let w=new A(K);return w=Y(w)??w,await q.send(w,...z)};function MU3(A,q,K,Y,z){return async function*(_,$,...O){let H=$,j=_.startingToken??H[K],J=!0,M;while(J){if(H[K]=j,z)H[z]=H[z]??_.pageSize;if(_.client instanceof A)M=await JU3(q,_.client,$,_.withCommand,...O);else throw Error(`Invalid client, expected instance of ${A.name}`);yield M;let D=j;j=DU3(M,Y),J=!!(j&&(!_.stopOnSameToken||j!==D))}return}}var DU3=(A,q)=>{let K=A,Y=q.split(".");for(let z of Y){if(!K||typeof K!=="object")return;K=K[z]}return K};function XU3(A,q,K){if(!A.__smithy_context)A.__smithy_context={features:{}};else if(!A.__smithy_context.features)A.__smithy_context.features={};A.__smithy_context.features[q]=K}class Zw7{authSchemes=new Map;constructor(A){for(let[q,K]of Object.entries(A))if(K!==void 0)this.authSchemes.set(q,K)}getIdentityProvider(A){return this.authSchemes.get(A)}}class Gw7{async sign(A,q,K){if(!K)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!K.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!K.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!q.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let Y=I58.HttpRequest.clone(A);if(K.in===H21.HttpApiKeyAuthLocation.QUERY)Y.query[K.name]=q.apiKey;else if(K.in===H21.HttpApiKeyAuthLocation.HEADER)Y.headers[K.name]=K.scheme?`${K.scheme} ${q.apiKey}`:q.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+K.in+"`");return Y}}class fw7{async sign(A,q,K){let Y=I58.HttpRequest.clone(A);if(!q.token)throw Error("request could not be signed with `token` since the `token` is not defined");return Y.headers.Authorization=`Bearer ${q.token}`,Y}}class Tw7{async sign(A,q,K){return A}}var Vw7=(A)=>function(K){return vw7(K)&&K.expiration.getTime()-Date.now()<A},Nw7=300000,PU3=Vw7(Nw7),vw7=(A)=>A.expiration!==void 0,WU3=(A,q,K)=>{if(A===void 0)return;let Y=typeof A!=="function"?async()=>Promise.resolve(A):A,z,w,_,$=!1,O=async(H)=>{if(!w)w=Y(H);try{z=await w,_=!0,$=!1}finally{w=void 0}return z};if(q===void 0)return async(H)=>{if(!_||H?.forceRefresh)z=await O(H);return z};return async(H)=>{if(!_||H?.forceRefresh)z=await O(H);if($)return z;if(!K(z))return $=!0,z;if(q(z))return await O(H),z;return z}};Object.defineProperty(kw7,"requestBuilder",{enumerable:!0,get:function(){return qU3.requestBuilder}});kw7.DefaultIdentityProviderConfig=Zw7;kw7.EXPIRATION_MS=Nw7;kw7.HttpApiKeyAuthSigner=Gw7;kw7.HttpBearerAuthSigner=fw7;kw7.NoAuthSigner=Tw7;kw7.createIsIdentityExpiredFunction=Vw7;kw7.createPaginator=MU3;kw7.doesIdentityRequireRefresh=vw7;kw7.getHttpAuthSchemeEndpointRuleSetPlugin=wU3;kw7.getHttpAuthSchemePlugin=_U3;kw7.getHttpSigningPlugin=HU3;kw7.getSmithyContext=KU3;kw7.httpAuthSchemeEndpointRuleSetMiddlewareOptions=Dw7;kw7.httpAuthSchemeMiddleware=b58;kw7.httpAuthSchemeMiddlewareOptions=Xw7;kw7.httpSigningMiddleware=Pw7;kw7.httpSigningMiddlewareOptions=Ww7;kw7.isIdentityExpired=PU3;kw7.memoizeIdentityProvider=WU3;kw7.normalizeProvider=jU3;kw7.setFeature=XU3});var Lw7=C((QU3)=>{var Ew7={},x58={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;Ew7[A]=q,x58[q]=A}function gU3(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K<A.length;K+=2){let Y=A.slice(K,K+2).toLowerCase();if(Y in x58)q[K/2]=x58[Y];else throw Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return q}function FU3(A){let q="";for(let K=0;K<A.byteLength;K++)q+=Ew7[A[K]];return q}QU3.fromHex=gU3;QU3.toHex=FU3});var yw7=C((cU3)=>{var dU3=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";cU3.isArrayBuffer=dU3});var Sw7=C((rU3)=>{var Rw7=(A)=>encodeURIComponent(A).replace(/[!'()*]/g,iU3),iU3=(A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,nU3=(A)=>A.split("/").map(Rw7).join("/");rU3.escapeUri=Rw7;rU3.escapeUriPath=nU3});var l58=C(($p3)=>{var Ht=Lw7(),C36=Z2(),sU3=yw7(),bw7=$21(),Cw7=pZ(),j21=Sw7(),xw7="X-Amz-Algorithm",uw7="X-Amz-Credential",m58="X-Amz-Date",Bw7="X-Amz-SignedHeaders",mw7="X-Amz-Expires",g58="X-Amz-Signature",F58="X-Amz-Security-Token",tU3="X-Amz-Region-Set",Q58="authorization",U58=m58.toLowerCase(),gw7="date",Fw7=[Q58,U58,gw7],Qw7=g58.toLowerCase(),P21="x-amz-content-sha256",Uw7=F58.toLowerCase(),eU3="host",pw7={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},dw7=/^proxy-/,cw7=/^sec-/,Ap3=[/^proxy-/i,/^sec-/i],J21="AWS4-HMAC-SHA256",qp3="AWS4-ECDSA-P256-SHA256",lw7="AWS4-HMAC-SHA256-PAYLOAD",iw7="UNSIGNED-PAYLOAD",nw7=50,p58="aws4_request",rw7=604800,zP6={},M21=[],D21=(A,q,K)=>`${A}/${q}/${K}/${p58}`,ow7=async(A,q,K,Y,z)=>{let w=await hw7(A,q.secretAccessKey,q.accessKeyId),_=`${K}:${Y}:${z}:${Ht.toHex(w)}:${q.sessionToken}`;if(_ in zP6)return zP6[_];M21.push(_);while(M21.length>nw7)delete zP6[M21.shift()];let $=`AWS4${q.secretAccessKey}`;for(let O of[K,Y,z,p58])$=await hw7(A,$,O);return zP6[_]=$},Kp3=()=>{M21.length=0,Object.keys(zP6).forEach((A)=>{delete zP6[A]})},hw7=(A,q,K)=>{let Y=new A(q);return Y.update(C36.toUint8Array(K)),Y.digest()},u58=({headers:A},q,K)=>{let Y={};for(let z of Object.keys(A).sort()){if(A[z]==null)continue;let w=z.toLowerCase();if(w in pw7||q?.has(w)||dw7.test(w)||cw7.test(w)){if(!K||K&&!K.has(w))continue}Y[w]=A[z].trim().replace(/\s+/g," ")}return Y},X21=async({headers:A,body:q},K)=>{for(let Y of Object.keys(A))if(Y.toLowerCase()===P21)return A[Y];if(q==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof q==="string"||ArrayBuffer.isView(q)||sU3.isArrayBuffer(q)){let Y=new K;return Y.update(C36.toUint8Array(q)),Ht.toHex(await Y.digest())}return iw7};class aw7{format(A){let q=[];for(let z of Object.keys(A)){let w=C36.fromUtf8(z);q.push(Uint8Array.from([w.byteLength]),w,this.formatHeaderValue(A[z]))}let K=new Uint8Array(q.reduce((z,w)=>z+w.byteLength,0)),Y=0;for(let z of q)K.set(z,Y),Y+=z.byteLength;return K}formatHeaderValue(A){switch(A.type){case"boolean":return Uint8Array.from([A.value?0:1]);case"byte":return Uint8Array.from([2,A.value]);case"short":let q=new DataView(new ArrayBuffer(3));return q.setUint8(0,3),q.setInt16(1,A.value,!1),new Uint8Array(q.buffer);case"integer":let K=new DataView(new ArrayBuffer(5));return K.setUint8(0,4),K.setInt32(1,A.value,!1),new Uint8Array(K.buffer);case"long":let Y=new Uint8Array(9);return Y[0]=5,Y.set(A.value.bytes,1),Y;case"binary":let z=new DataView(new ArrayBuffer(3+A.value.byteLength));z.setUint8(0,6),z.setUint16(1,A.value.byteLength,!1);let w=new Uint8Array(z.buffer);return w.set(A.value,3),w;case"string":let _=C36.fromUtf8(A.value),$=new DataView(new ArrayBuffer(3+_.byteLength));$.setUint8(0,7),$.setUint16(1,_.byteLength,!1);let O=new Uint8Array($.buffer);return O.set(_,3),O;case"timestamp":let H=new Uint8Array(9);return H[0]=8,H.set(d58.fromNumber(A.value.valueOf()).bytes,1),H;case"uuid":if(!Yp3.test(A.value))throw Error(`Invalid UUID received: ${A.value}`);let j=new Uint8Array(17);return j[0]=9,j.set(Ht.fromHex(A.value.replace(/\-/g,"")),1),j}}}var Yp3=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class d58{bytes;constructor(A){if(this.bytes=A,A.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(A){if(A>9223372036854776000||A<-9223372036854776000)throw Error(`${A} is too large (or, if negative, too small) to represent as an Int64`);let q=new Uint8Array(8);for(let K=7,Y=Math.abs(Math.round(A));K>-1&&Y>0;K--,Y/=256)q[K]=Y;if(A<0)Iw7(q);return new d58(q)}valueOf(){let A=this.bytes.slice(0),q=A[0]&128;if(q)Iw7(A);return parseInt(Ht.toHex(A),16)*(q?-1:1)}toString(){return String(this.valueOf())}}function Iw7(A){for(let q=0;q<8;q++)A[q]^=255;for(let q=7;q>-1;q--)if(A[q]++,A[q]!==0)break}var sw7=(A,q)=>{A=A.toLowerCase();for(let K of Object.keys(q))if(A===K.toLowerCase())return!0;return!1},tw7=(A,q={})=>{let{headers:K,query:Y={}}=bw7.HttpRequest.clone(A);for(let z of Object.keys(K)){let w=z.toLowerCase();if(w.slice(0,6)==="x-amz-"&&!q.unhoistableHeaders?.has(w)||q.hoistableHeaders?.has(w))Y[z]=K[z],delete K[z]}return{...A,headers:K,query:Y}},B58=(A)=>{A=bw7.HttpRequest.clone(A);for(let q of Object.keys(A.headers))if(Fw7.indexOf(q.toLowerCase())>-1)delete A.headers[q];return A},ew7=({query:A={}})=>{let q=[],K={};for(let Y of Object.keys(A)){if(Y.toLowerCase()===Qw7)continue;let z=j21.escapeUri(Y);q.push(z);let w=A[Y];if(typeof w==="string")K[z]=`${z}=${j21.escapeUri(w)}`;else if(Array.isArray(w))K[z]=w.slice(0).reduce((_,$)=>_.concat([`${z}=${j21.escapeUri($)}`]),[]).sort().join("&")}return q.sort().map((Y)=>K[Y]).filter((Y)=>Y).join("&")},zp3=(A)=>wp3(A).toISOString().replace(/\.\d{3}Z$/,"Z"),wp3=(A)=>{if(typeof A==="number")return new Date(A*1000);if(typeof A==="string"){if(Number(A))return new Date(Number(A)*1000);return new Date(A)}return A};class c58{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:A,credentials:q,region:K,service:Y,sha256:z,uriEscapePath:w=!0}){this.service=Y,this.sha256=z,this.uriEscapePath=w,this.applyChecksum=typeof A==="boolean"?A:!0,this.regionProvider=Cw7.normalizeProvider(K),this.credentialProvider=Cw7.normalizeProvider(q)}createCanonicalRequest(A,q,K){let Y=Object.keys(q).sort();return`${A.method}
${this.getCanonicalPath(A)}
${ew7(A)}
${Y.map((z)=>`${z}:${q[z]}`).join(`
`)}

${Y.join(";")}
${K}`}async createStringToSign(A,q,K,Y){let z=new this.sha256;z.update(C36.toUint8Array(K));let w=await z.digest();return`${Y}
${A}
${q}
${Ht.toHex(w)}`}getCanonicalPath({path:A}){if(this.uriEscapePath){let q=[];for(let z of A.split("/")){if(z?.length===0)continue;if(z===".")continue;if(z==="..")q.pop();else q.push(z)}let K=`${A?.startsWith("/")?"/":""}${q.join("/")}${q.length>0&&A?.endsWith("/")?"/":""}`;return j21.escapeUri(K).replace(/%2F/g,"/")}return A}validateResolvedCredentials(A){if(typeof A!=="object"||typeof A.accessKeyId!=="string"||typeof A.secretAccessKey!=="string")throw Error("Resolved credential object is not valid")}formatDate(A){let q=zp3(A).replace(/[\-:]/g,"");return{longDate:q,shortDate:q.slice(0,8)}}getCanonicalHeaderList(A){return Object.keys(A).sort().join(";")}}class A27 extends c58{headerFormatter=new aw7;constructor({applyChecksum:A,credentials:q,region:K,service:Y,sha256:z,uriEscapePath:w=!0}){super({applyChecksum:A,credentials:q,region:K,service:Y,sha256:z,uriEscapePath:w})}async presign(A,q={}){let{signingDate:K=new Date,expiresIn:Y=3600,unsignableHeaders:z,unhoistableHeaders:w,signableHeaders:_,hoistableHeaders:$,signingRegion:O,signingService:H}=q,j=await this.credentialProvider();this.validateResolvedCredentials(j);let J=O??await this.regionProvider(),{longDate:M,shortDate:D}=this.formatDate(K);if(Y>rw7)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let X=D21(D,J,H??this.service),P=tw7(B58(A),{unhoistableHeaders:w,hoistableHeaders:$});if(j.sessionToken)P.query[F58]=j.sessionToken;P.query[xw7]=J21,P.query[uw7]=`${j.accessKeyId}/${X}`,P.query[m58]=M,P.query[mw7]=Y.toString(10);let W=u58(P,z,_);return P.query[Bw7]=this.getCanonicalHeaderList(W),P.query[g58]=await this.getSignature(M,X,this.getSigningKey(j,J,D,H),this.createCanonicalRequest(P,W,await X21(A,this.sha256))),P}async sign(A,q){if(typeof A==="string")return this.signString(A,q);else if(A.headers&&A.payload)return this.signEvent(A,q);else if(A.message)return this.signMessage(A,q);else return this.signRequest(A,q)}async signEvent({headers:A,payload:q},{signingDate:K=new Date,priorSignature:Y,signingRegion:z,signingService:w}){let _=z??await this.regionProvider(),{shortDate:$,longDate:O}=this.formatDate(K),H=D21($,_,w??this.service),j=await X21({headers:{},body:q},this.sha256),J=new this.sha256;J.update(A);let M=Ht.toHex(await J.digest()),D=[lw7,O,H,Y,M,j].join(`
`);return this.signString(D,{signingDate:K,signingRegion:_,signingService:w})}async signMessage(A,{signingDate:q=new Date,signingRegion:K,signingService:Y}){return this.signEvent({headers:this.headerFormatter.format(A.message.headers),payload:A.message.body},{signingDate:q,signingRegion:K,signingService:Y,priorSignature:A.priorSignature}).then((w)=>{return{message:A.message,signature:w}})}async signString(A,{signingDate:q=new Date,signingRegion:K,signingService:Y}={}){let z=await this.credentialProvider();this.validateResolvedCredentials(z);let w=K??await this.regionProvider(),{shortDate:_}=this.formatDate(q),$=new this.sha256(await this.getSigningKey(z,w,_,Y));return $.update(C36.toUint8Array(A)),Ht.toHex(await $.digest())}async signRequest(A,{signingDate:q=new Date,signableHeaders:K,unsignableHeaders:Y,signingRegion:z,signingService:w}={}){let _=await this.credentialProvider();this.validateResolvedCredentials(_);let $=z??await this.regionProvider(),O=B58(A),{longDate:H,shortDate:j}=this.formatDate(q),J=D21(j,$,w??this.service);if(O.headers[U58]=H,_.sessionToken)O.headers[Uw7]=_.sessionToken;let M=await X21(O,this.sha256);if(!sw7(P21,O.headers)&&this.applyChecksum)O.headers[P21]=M;let D=u58(O,Y,K),X=await this.getSignature(H,J,this.getSigningKey(_,$,j,w),this.createCanonicalRequest(O,D,M));return O.headers[Q58]=`${J21} Credential=${_.accessKeyId}/${J}, SignedHeaders=${this.getCanonicalHeaderList(D)}, Signature=${X}`,O}async getSignature(A,q,K,Y){let z=await this.createStringToSign(A,q,Y,J21),w=new this.sha256(await K);return w.update(C36.toUint8Array(z)),Ht.toHex(await w.digest())}getSigningKey(A,q,K,Y){return ow7(this.sha256,A,K,q,Y||this.service)}}var _p3={SignatureV4a:null};$p3.ALGORITHM_IDENTIFIER=J21;$p3.ALGORITHM_IDENTIFIER_V4A=qp3;$p3.ALGORITHM_QUERY_PARAM=xw7;$p3.ALWAYS_UNSIGNABLE_HEADERS=pw7;$p3.AMZ_DATE_HEADER=U58;$p3.AMZ_DATE_QUERY_PARAM=m58;$p3.AUTH_HEADER=Q58;$p3.CREDENTIAL_QUERY_PARAM=uw7;$p3.DATE_HEADER=gw7;$p3.EVENT_ALGORITHM_IDENTIFIER=lw7;$p3.EXPIRES_QUERY_PARAM=mw7;$p3.GENERATED_HEADERS=Fw7;$p3.HOST_HEADER=eU3;$p3.KEY_TYPE_IDENTIFIER=p58;$p3.MAX_CACHE_SIZE=nw7;$p3.MAX_PRESIGNED_TTL=rw7;$p3.PROXY_HEADER_PATTERN=dw7;$p3.REGION_SET_PARAM=tU3;$p3.SEC_HEADER_PATTERN=cw7;$p3.SHA256_HEADER=P21;$p3.SIGNATURE_HEADER=Qw7;$p3.SIGNATURE_QUERY_PARAM=g58;$p3.SIGNED_HEADERS_QUERY_PARAM=Bw7;$p3.SignatureV4=A27;$p3.SignatureV4Base=c58;$p3.TOKEN_HEADER=Uw7;$p3.TOKEN_QUERY_PARAM=F58;$p3.UNSIGNABLE_PATTERNS=Ap3;$p3.UNSIGNED_PAYLOAD=iw7;$p3.clearCredentialCache=Kp3;$p3.createScope=D21;$p3.getCanonicalHeaders=u58;$p3.getCanonicalQuery=ew7;$p3.getPayloadHash=X21;$p3.getSigningKey=ow7;$p3.hasHeader=sw7;$p3.moveHeadersToQuery=tw7;$p3.prepareRequest=B58;$p3.signatureV4aContainer=_p3});var J27=C((Kd3)=>{var i58=$21(),jt=pw(),q27=EM(),np3=ON(),K27=l58(),Y27=(A)=>i58.HttpResponse.isInstance(A)?A.headers?.date??A.headers?.Date:void 0,n58=(A)=>new Date(Date.now()+A),rp3=(A,q)=>Math.abs(n58(q).getTime()-A)>=300000,z27=(A,q)=>{let K=Date.parse(A);if(rp3(K,q))return K-Date.now();return q},nu6=(A,q)=>{if(!q)throw Error(`Property \`${A}\` is not resolved for AWS SDK SigV4Auth`);return q},r58=async(A)=>{let q=nu6("context",A.context),K=nu6("config",A.config),Y=q.endpointV2?.properties?.authSchemes?.[0],w=await nu6("signer",K.signer)(Y),_=A?.signingRegion,$=A?.signingRegionSet,O=A?.signingName;return{config:K,signer:w,signingRegion:_,signingRegionSet:$,signingName:O}};class W21{async sign(A,q,K){if(!i58.HttpRequest.isInstance(A))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let Y=await r58(K),{config:z,signer:w}=Y,{signingRegion:_,signingName:$}=Y,O=K.context;if(O?.authSchemes?.length??!1){let[j,J]=O.authSchemes;if(j?.name==="sigv4a"&&J?.name==="sigv4")_=J?.signingRegion??_,$=J?.signingName??$}return await w.sign(A,{signingDate:n58(z.systemClockOffset),signingRegion:_,signingService:$})}errorHandler(A){return(q)=>{let K=q.ServerTime??Y27(q.$response);if(K){let Y=nu6("config",A.config),z=Y.systemClockOffset;if(Y.systemClockOffset=z27(K,Y.systemClockOffset),Y.systemClockOffset!==z&&q.$metadata)q.$metadata.clockSkewCorrected=!0}throw q}}successHandler(A,q){let K=Y27(A);if(K){let Y=nu6("config",q.config);Y.systemClockOffset=z27(K,Y.systemClockOffset)}}}var op3=W21;class O27 extends W21{async sign(A,q,K){if(!i58.HttpRequest.isInstance(A))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:Y,signer:z,signingRegion:w,signingRegionSet:_,signingName:$}=await r58(K),H=(await Y.sigv4aSigningRegionSet?.()??_??[w]).join(",");return await z.sign(A,{signingDate:n58(Y.systemClockOffset),signingRegion:H,signingService:$})}}var w27=(A)=>typeof A==="string"&&A.length>0?A.split(",").map((q)=>q.trim()):[],H27=(A)=>`AWS_BEARER_TOKEN_${A.replace(/[\s-]/g,"_").toUpperCase()}`,_27="AWS_AUTH_SCHEME_PREFERENCE",$27="auth_scheme_preference",ap3={environmentVariableSelector:(A,q)=>{if(q?.signingName){if(H27(q.signingName)in A)return["httpBearerAuth"]}if(!(_27 in A))return;return w27(A[_27])},configFileSelector:(A)=>{if(!($27 in A))return;return w27(A[$27])},default:[]},sp3=(A)=>{return A.sigv4aSigningRegionSet=jt.normalizeProvider(A.sigv4aSigningRegionSet),A},tp3={environmentVariableSelector(A){if(A.AWS_SIGV4A_SIGNING_REGION_SET)return A.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((q)=>q.trim());throw new q27.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(A){if(A.sigv4a_signing_region_set)return(A.sigv4a_signing_region_set??"").split(",").map((q)=>q.trim());throw new q27.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},j27=(A)=>{let q=A.credentials,K=!!A.credentials,Y=void 0;Object.defineProperty(A,"credentials",{set(H){if(H&&H!==q&&H!==Y)K=!0;q=H;let j=Ad3(A,{credentials:q,credentialDefaultProvider:A.credentialDefaultProvider}),J=qd3(A,j);if(K&&!J.attributed)Y=async(M)=>J(M).then((D)=>np3.setCredentialFeature(D,"CREDENTIALS_CODE","e")),Y.memoized=J.memoized,Y.configBound=J.configBound,Y.attributed=!0;else Y=J},get(){return Y},enumerable:!0,configurable:!0}),A.credentials=q;let{signingEscapePath:z=!0,systemClockOffset:w=A.systemClockOffset||0,sha256:_}=A,$;if(A.signer)$=jt.normalizeProvider(A.signer);else if(A.regionInfoProvider)$=()=>jt.normalizeProvider(A.region)().then(async(H)=>[await A.regionInfoProvider(H,{useFipsEndpoint:await A.useFipsEndpoint(),useDualstackEndpoint:await A.useDualstackEndpoint()})||{},H]).then(([H,j])=>{let{signingRegion:J,signingService:M}=H;A.signingRegion=A.signingRegion||J||j,A.signingName=A.signingName||M||A.serviceId;let D={...A,credentials:A.credentials,region:A.signingRegion,service:A.signingName,sha256:_,uriEscapePath:z};return new(A.signerConstructor||K27.SignatureV4)(D)});else $=async(H)=>{H=Object.assign({},{name:"sigv4",signingName:A.signingName||A.defaultSigningName,signingRegion:await jt.normalizeProvider(A.region)(),properties:{}},H);let{signingRegion:j,signingName:J}=H;A.signingRegion=A.signingRegion||j,A.signingName=A.signingName||J||A.serviceId;let M={...A,credentials:A.credentials,region:A.signingRegion,service:A.signingName,sha256:_,uriEscapePath:z};return new(A.signerConstructor||K27.SignatureV4)(M)};return Object.assign(A,{systemClockOffset:w,signingEscapePath:z,signer:$})},ep3=j27;function Ad3(A,{credentials:q,credentialDefaultProvider:K}){let Y;if(q)if(!q?.memoized)Y=jt.memoizeIdentityProvider(q,jt.isIdentityExpired,jt.doesIdentityRequireRefresh);else Y=q;else if(K)Y=jt.normalizeProvider(K(Object.assign({},A,{parentClientConfig:A})));else Y=async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return Y.memoized=!0,Y}function qd3(A,q){if(q.configBound)return q;let K=async(Y)=>q({...Y,callerClientConfig:A});return K.memoized=q.memoized,K.configBound=!0,K}Kd3.AWSSDKSigV4Signer=op3;Kd3.AwsSdkSigV4ASigner=O27;Kd3.AwsSdkSigV4Signer=W21;Kd3.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS=ap3;Kd3.NODE_SIGV4A_CONFIG_OPTIONS=tp3;Kd3.getBearerTokenEnvKey=H27;Kd3.resolveAWSSDKSigV4Config=ep3;Kd3.resolveAwsSdkSigV4AConfig=sp3;Kd3.resolveAwsSdkSigV4Config=j27;Kd3.validateSigningProperties=r58});var M27=C((Gd3)=>{Gd3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Gd3.HttpAuthLocation||(Gd3.HttpAuthLocation={}));Gd3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Gd3.HttpApiKeyAuthLocation||(Gd3.HttpApiKeyAuthLocation={}));Gd3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Gd3.EndpointURLScheme||(Gd3.EndpointURLScheme={}));Gd3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Gd3.AlgorithmId||(Gd3.AlgorithmId={}));var Dd3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Gd3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Gd3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Xd3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Pd3=(A)=>{return Dd3(A)},Wd3=(A)=>{return Xd3(A)};Gd3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Gd3.FieldPosition||(Gd3.FieldPosition={}));var Zd3="__smithy_context";Gd3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Gd3.IniSectionType||(Gd3.IniSectionType={}));Gd3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Gd3.RequestHandlerProtocol||(Gd3.RequestHandlerProtocol={}));Gd3.SMITHY_CONTEXT_KEY=Zd3;Gd3.getDefaultClientConfiguration=Pd3;Gd3.resolveDefaultRuntimeConfig=Wd3});var W27=C((yd3)=>{var Nd3=M27(),vd3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},kd3=(A)=>{return{httpHandler:A.httpHandler()}};class D27{name;kind;values;constructor({name:A,kind:q=Nd3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class X27{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class Z21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new Z21({...A,headers:{...A.headers}});if(q.query)q.query=Ed3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return Z21.clone(this)}}function Ed3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class P27{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Ld3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}yd3.Field=D27;yd3.Fields=X27;yd3.HttpRequest=Z21;yd3.HttpResponse=P27;yd3.getHttpHandlerExtensionConfiguration=vd3;yd3.isValidHostname=Ld3;yd3.resolveHttpHandlerRuntimeConfig=kd3});var Dc=C((gd3)=>{var ud3=W27();function Bd3(A){return A}var Z27=(A)=>(q)=>async(K)=>{if(!ud3.HttpRequest.isInstance(K.request))return q(K);let{request:Y}=K,{handlerProtocol:z=""}=A.requestHandler.metadata||{};if(z.indexOf("h2")>=0&&!Y.headers[":authority"])delete Y.headers.host,Y.headers[":authority"]=Y.hostname+(Y.port?":"+Y.port:"");else if(!Y.headers.host){let w=Y.hostname;if(Y.port!=null)w+=`:${Y.port}`;Y.headers.host=w}return q(K)},G27={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},md3=(A)=>({applyToStack:(q)=>{q.add(Z27(A),G27)}});gd3.getHostHeaderPlugin=md3;gd3.hostHeaderMiddleware=Z27;gd3.hostHeaderMiddlewareOptions=G27;gd3.resolveHostHeaderConfig=Bd3});var Xc=C((cd3)=>{var f27=()=>(A,q)=>async(K)=>{try{let Y=await A(K),{clientName:z,commandName:w,logger:_,dynamoDbDocumentClientOptions:$={}}=q,{overrideInputFilterSensitiveLog:O,overrideOutputFilterSensitiveLog:H}=$,j=O??q.inputFilterSensitiveLog,J=H??q.outputFilterSensitiveLog,{$metadata:M,...D}=Y.output;return _?.info?.({clientName:z,commandName:w,input:j(K.input),output:J(D),metadata:M}),Y}catch(Y){let{clientName:z,commandName:w,logger:_,dynamoDbDocumentClientOptions:$={}}=q,{overrideInputFilterSensitiveLog:O}=$,H=O??q.inputFilterSensitiveLog;throw _?.error?.({clientName:z,commandName:w,input:H(K.input),error:Y,metadata:Y.$metadata}),Y}},T27={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},dd3=(A)=>({applyToStack:(q)=>{q.add(f27(),T27)}});cd3.getLoggerPlugin=dd3;cd3.loggerMiddleware=f27;cd3.loggerMiddlewareOptions=T27});var N27=C((rd3)=>{var ou6={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")},q98=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!q98)globalThis.awslambda=globalThis.awslambda||{};class G21{static PROTECTED_KEYS=ou6;isProtectedKey(A){return Object.values(ou6).includes(A)}getRequestId(){return this.get(ou6.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(ou6.X_RAY_TRACE_ID)}getTenantId(){return this.get(ou6.TENANT_ID)}}class V27 extends G21{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(A){return this.currentContext?.[A]}set(A,q){if(this.isProtectedKey(A))throw Error(`Cannot modify protected Lambda context field: ${String(A)}`);this.currentContext=this.currentContext||{},this.currentContext[A]=q}run(A,q){this.currentContext=A;try{return q()}finally{this.currentContext=void 0}}}class Y98 extends G21{als;static async create(){let A=new Y98,q=await import("node:async_hooks");return A.als=new q.AsyncLocalStorage,A}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(A){return this.als.getStore()?.[A]}set(A,q){if(this.isProtectedKey(A))throw Error(`Cannot modify protected Lambda context field: ${String(A)}`);let K=this.als.getStore();if(!K)throw Error("No context available");K[A]=q}run(A,q){return this.als.run(A,q)}}rd3.InvokeStore=void 0;(function(A){let q=null;async function K(){if(!q)q=(async()=>{let z="AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await Y98.create():new V27;if(!q98&&globalThis.awslambda?.InvokeStore)return globalThis.awslambda.InvokeStore;else if(!q98&&globalThis.awslambda)return globalThis.awslambda.InvokeStore=z,z;else return z})();return q}A.getInstanceAsync=K,A._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{if(q=null,globalThis.awslambda?.InvokeStore)delete globalThis.awslambda.InvokeStore;globalThis.awslambda={}}}:void 0})(rd3.InvokeStore||(rd3.InvokeStore={}));rd3.InvokeStoreBase=G21});var v27=C((qc3)=>{qc3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(qc3.HttpAuthLocation||(qc3.HttpAuthLocation={}));qc3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(qc3.HttpApiKeyAuthLocation||(qc3.HttpApiKeyAuthLocation={}));qc3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(qc3.EndpointURLScheme||(qc3.EndpointURLScheme={}));qc3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(qc3.AlgorithmId||(qc3.AlgorithmId={}));var ad3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>qc3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>qc3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},sd3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},td3=(A)=>{return ad3(A)},ed3=(A)=>{return sd3(A)};qc3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(qc3.FieldPosition||(qc3.FieldPosition={}));var Ac3="__smithy_context";qc3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(qc3.IniSectionType||(qc3.IniSectionType={}));qc3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(qc3.RequestHandlerProtocol||(qc3.RequestHandlerProtocol={}));qc3.SMITHY_CONTEXT_KEY=Ac3;qc3.getDefaultClientConfiguration=td3;qc3.resolveDefaultRuntimeConfig=ed3});var y27=C((jc3)=>{var wc3=v27(),_c3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},$c3=(A)=>{return{httpHandler:A.httpHandler()}};class k27{name;kind;values;constructor({name:A,kind:q=wc3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class E27{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class f21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new f21({...A,headers:{...A.headers}});if(q.query)q.query=Oc3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return f21.clone(this)}}function Oc3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class L27{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Hc3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}jc3.Field=k27;jc3.Fields=E27;jc3.HttpRequest=f21;jc3.HttpResponse=L27;jc3.getHttpHandlerExtensionConfiguration=_c3;jc3.isValidHostname=Hc3;jc3.resolveHttpHandlerRuntimeConfig=$c3});var C27=C((R27)=>{Object.defineProperty(R27,"__esModule",{value:!0});R27.recursionDetectionMiddleware=void 0;var Gc3=N27(),fc3=y27(),j98="X-Amzn-Trace-Id",Tc3="AWS_LAMBDA_FUNCTION_NAME",Vc3="_X_AMZN_TRACE_ID",Nc3=()=>(A)=>async(q)=>{let{request:K}=q;if(!fc3.HttpRequest.isInstance(K))return A(q);let Y=Object.keys(K.headers??{}).find((j)=>j.toLowerCase()===j98.toLowerCase())??j98;if(K.headers.hasOwnProperty(Y))return A(q);let z=process.env[Tc3],w=process.env[Vc3],O=(await Gc3.InvokeStore.getInstanceAsync())?.getXRayTraceId()??w,H=(j)=>typeof j==="string"&&j.length>0;if(H(z)&&H(O))K.headers[j98]=O;return A({...q,request:K})};R27.recursionDetectionMiddleware=Nc3});var Pc=C((M98)=>{var J98=C27(),vc3={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},kc3=(A)=>({applyToStack:(q)=>{q.add(J98.recursionDetectionMiddleware(),vc3)}});M98.getRecursionDetectionPlugin=kc3;Object.keys(J98).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(M98,A))Object.defineProperty(M98,A,{enumerable:!0,get:function(){return J98[A]}})})});var h27=C((hc3)=>{hc3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(hc3.HttpAuthLocation||(hc3.HttpAuthLocation={}));hc3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(hc3.HttpApiKeyAuthLocation||(hc3.HttpApiKeyAuthLocation={}));hc3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(hc3.EndpointURLScheme||(hc3.EndpointURLScheme={}));hc3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(hc3.AlgorithmId||(hc3.AlgorithmId={}));var Lc3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>hc3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>hc3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},yc3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Rc3=(A)=>{return Lc3(A)},Sc3=(A)=>{return yc3(A)};hc3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(hc3.FieldPosition||(hc3.FieldPosition={}));var Cc3="__smithy_context";hc3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(hc3.IniSectionType||(hc3.IniSectionType={}));hc3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(hc3.RequestHandlerProtocol||(hc3.RequestHandlerProtocol={}));hc3.SMITHY_CONTEXT_KEY=Cc3;hc3.getDefaultClientConfiguration=Rc3;hc3.resolveDefaultRuntimeConfig=Sc3});var Ab=C((Al3)=>{var T98=h27();class I27{capacity;data=new Map;parameters=[];constructor({size:A,params:q}){if(this.capacity=A??50,q)this.parameters=q}get(A,q){let K=this.hash(A);if(K===!1)return q();if(!this.data.has(K)){if(this.data.size>this.capacity+10){let Y=this.data.keys(),z=0;while(!0){let{value:w,done:_}=Y.next();if(this.data.delete(w),_||++z>10)break}}this.data.set(K,q())}return this.data.get(K)}size(){return this.data.size}hash(A){let q="",{parameters:K}=this;if(K.length===0)return!1;for(let Y of K){let z=String(A[Y]??"");if(z.includes("|;"))return!1;q+=z+"|;"}return q}}var uc3=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),b27=(A)=>uc3.test(A)||A.startsWith("[")&&A.endsWith("]"),Bc3=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),N98=(A,q=!1)=>{if(!q)return Bc3.test(A);let K=A.split(".");for(let Y of K)if(!N98(Y))return!1;return!0},V98={},tu6="endpoints";function Jt(A){if(typeof A!=="object"||A==null)return A;if("ref"in A)return`$${Jt(A.ref)}`;if("fn"in A)return`${A.fn}(${(A.argv||[]).map(Jt).join(", ")})`;return JSON.stringify(A,null,2)}class pf extends Error{constructor(A){super(A);this.name="EndpointError"}}var mc3=(A,q)=>A===q,gc3=(A)=>{let q=A.split("."),K=[];for(let Y of q){let z=Y.indexOf("[");if(z!==-1){if(Y.indexOf("]")!==Y.length-1)throw new pf(`Path: '${A}' does not end with ']'`);let w=Y.slice(z+1,-1);if(Number.isNaN(parseInt(w)))throw new pf(`Invalid array index: '${w}' in path: '${A}'`);if(z!==0)K.push(Y.slice(0,z));K.push(w)}else K.push(Y)}return K},x27=(A,q)=>gc3(q).reduce((K,Y)=>{if(typeof K!=="object")throw new pf(`Index '${Y}' in '${q}' not found in '${JSON.stringify(A)}'`);else if(Array.isArray(K))return K[parseInt(Y)];return K[Y]},A),Fc3=(A)=>A!=null,Qc3=(A)=>!A,f98={[T98.EndpointURLScheme.HTTP]:80,[T98.EndpointURLScheme.HTTPS]:443},Uc3=(A)=>{let q=(()=>{try{if(A instanceof URL)return A;if(typeof A==="object"&&"hostname"in A){let{hostname:M,port:D,protocol:X="",path:P="",query:W={}}=A,Z=new URL(`${X}//${M}${D?`:${D}`:""}${P}`);return Z.search=Object.entries(W).map(([G,f])=>`${G}=${f}`).join("&"),Z}return new URL(A)}catch(M){return null}})();if(!q)return console.error(`Unable to parse ${JSON.stringify(A)} as a whatwg URL.`),null;let K=q.href,{host:Y,hostname:z,pathname:w,protocol:_,search:$}=q;if($)return null;let O=_.slice(0,-1);if(!Object.values(T98.EndpointURLScheme).includes(O))return null;let H=b27(z),j=K.includes(`${Y}:${f98[O]}`)||typeof A==="string"&&A.includes(`${Y}:${f98[O]}`),J=`${Y}${j?`:${f98[O]}`:""}`;return{scheme:O,authority:J,path:w,normalizedPath:w.endsWith("/")?w:`${w}/`,isIp:H}},pc3=(A,q)=>A===q,dc3=(A,q,K,Y)=>{if(q>=K||A.length<K)return null;if(!Y)return A.substring(q,K);return A.substring(A.length-K,A.length-q)},cc3=(A)=>encodeURIComponent(A).replace(/[!*'()]/g,(q)=>`%${q.charCodeAt(0).toString(16).toUpperCase()}`),lc3={booleanEquals:mc3,getAttr:x27,isSet:Fc3,isValidHostLabel:N98,not:Qc3,parseURL:Uc3,stringEquals:pc3,substring:dc3,uriEncode:cc3},u27=(A,q)=>{let K=[],Y={...q.endpointParams,...q.referenceRecord},z=0;while(z<A.length){let w=A.indexOf("{",z);if(w===-1){K.push(A.slice(z));break}K.push(A.slice(z,w));let _=A.indexOf("}",w);if(_===-1){K.push(A.slice(w));break}if(A[w+1]==="{"&&A[_+1]==="}")K.push(A.slice(w+1,_)),z=_+2;let $=A.substring(w+1,_);if($.includes("#")){let[O,H]=$.split("#");K.push(x27(Y[O],H))}else K.push(Y[$]);z=_+1}return K.join("")},ic3=({ref:A},q)=>{return{...q.endpointParams,...q.referenceRecord}[A]},T21=(A,q,K)=>{if(typeof A==="string")return u27(A,K);else if(A.fn)return m27.callFunction(A,K);else if(A.ref)return ic3(A,K);throw new pf(`'${q}': ${String(A)} is not a string, function or reference.`)},B27=({fn:A,argv:q},K)=>{let Y=q.map((w)=>["boolean","number"].includes(typeof w)?w:m27.evaluateExpression(w,"arg",K)),z=A.split(".");if(z[0]in V98&&z[1]!=null)return V98[z[0]][z[1]](...Y);return lc3[A](...Y)},m27={evaluateExpression:T21,callFunction:B27},nc3=({assign:A,...q},K)=>{if(A&&A in K.referenceRecord)throw new pf(`'${A}' is already defined in Reference Record.`);let Y=B27(q,K);return K.logger?.debug?.(`${tu6} evaluateCondition: ${Jt(q)} = ${Jt(Y)}`),{result:Y===""?!0:!!Y,...A!=null&&{toAssign:{name:A,value:Y}}}},v98=(A=[],q)=>{let K={};for(let Y of A){let{result:z,toAssign:w}=nc3(Y,{...q,referenceRecord:{...q.referenceRecord,...K}});if(!z)return{result:z};if(w)K[w.name]=w.value,q.logger?.debug?.(`${tu6} assign: ${w.name} := ${Jt(w.value)}`)}return{result:!0,referenceRecord:K}},rc3=(A,q)=>Object.entries(A).reduce((K,[Y,z])=>({...K,[Y]:z.map((w)=>{let _=T21(w,"Header value entry",q);if(typeof _!=="string")throw new pf(`Header '${Y}' value '${_}' is not a string`);return _})}),{}),g27=(A,q)=>Object.entries(A).reduce((K,[Y,z])=>({...K,[Y]:Q27.getEndpointProperty(z,q)}),{}),F27=(A,q)=>{if(Array.isArray(A))return A.map((K)=>F27(K,q));switch(typeof A){case"string":return u27(A,q);case"object":if(A===null)throw new pf(`Unexpected endpoint property: ${A}`);return Q27.getEndpointProperties(A,q);case"boolean":return A;default:throw new pf(`Unexpected endpoint property type: ${typeof A}`)}},Q27={getEndpointProperty:F27,getEndpointProperties:g27},oc3=(A,q)=>{let K=T21(A,"Endpoint URL",q);if(typeof K==="string")try{return new URL(K)}catch(Y){throw console.error(`Failed to construct URL with ${K}`,Y),Y}throw new pf(`Endpoint URL must be a string, got ${typeof K}`)},ac3=(A,q)=>{let{conditions:K,endpoint:Y}=A,{result:z,referenceRecord:w}=v98(K,q);if(!z)return;let _={...q,referenceRecord:{...q.referenceRecord,...w}},{url:$,properties:O,headers:H}=Y;return q.logger?.debug?.(`${tu6} Resolving endpoint from template: ${Jt(Y)}`),{...H!=null&&{headers:rc3(H,_)},...O!=null&&{properties:g27(O,_)},url:oc3($,_)}},sc3=(A,q)=>{let{conditions:K,error:Y}=A,{result:z,referenceRecord:w}=v98(K,q);if(!z)return;throw new pf(T21(Y,"Error",{...q,referenceRecord:{...q.referenceRecord,...w}}))},U27=(A,q)=>{for(let K of A)if(K.type==="endpoint"){let Y=ac3(K,q);if(Y)return Y}else if(K.type==="error")sc3(K,q);else if(K.type==="tree"){let Y=p27.evaluateTreeRule(K,q);if(Y)return Y}else throw new pf(`Unknown endpoint rule: ${K}`);throw new pf("Rules evaluation failed")},tc3=(A,q)=>{let{conditions:K,rules:Y}=A,{result:z,referenceRecord:w}=v98(K,q);if(!z)return;return p27.evaluateRules(Y,{...q,referenceRecord:{...q.referenceRecord,...w}})},p27={evaluateRules:U27,evaluateTreeRule:tc3},ec3=(A,q)=>{let{endpointParams:K,logger:Y}=q,{parameters:z,rules:w}=A;q.logger?.debug?.(`${tu6} Initial EndpointParams: ${Jt(K)}`);let _=Object.entries(z).filter(([,H])=>H.default!=null).map(([H,j])=>[H,j.default]);if(_.length>0)for(let[H,j]of _)K[H]=K[H]??j;let $=Object.entries(z).filter(([,H])=>H.required).map(([H])=>H);for(let H of $)if(K[H]==null)throw new pf(`Missing required parameter: '${H}'`);let O=U27(w,{endpointParams:K,logger:Y,referenceRecord:{}});return q.logger?.debug?.(`${tu6} Resolved endpoint: ${Jt(O)}`),O};Al3.EndpointCache=I27;Al3.EndpointError=pf;Al3.customEndpointFunctions=V98;Al3.isIpAddress=b27;Al3.isValidHostLabel=N98;Al3.resolveEndpoint=ec3});var pm=C((V21)=>{var wP6=Ab(),$l3=LR(),c27=(A,q=!1)=>{if(q){for(let K of A.split("."))if(!c27(K))return!1;return!0}if(!wP6.isValidHostLabel(A))return!1;if(A.length<3||A.length>63)return!1;if(A!==A.toLowerCase())return!1;if(wP6.isIpAddress(A))return!1;return!0},d27=":",Ol3="/",Hl3=(A)=>{let q=A.split(d27);if(q.length<6)return null;let[K,Y,z,w,_,...$]=q;if(K!=="arn"||Y===""||z===""||$.join(d27)==="")return null;let O=$.map((H)=>H.split(Ol3)).flat();return{partition:Y,service:z,region:w,accountId:_,resourceId:O}},jl3=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Jl3="1.1",l27={partitions:jl3,version:Jl3},i27=l27,n27="",r27=(A)=>{let{partitions:q}=i27;for(let Y of q){let{regions:z,outputs:w}=Y;for(let[_,$]of Object.entries(z))if(_===A)return{...w,...$}}for(let Y of q){let{regionRegex:z,outputs:w}=Y;if(new RegExp(z).test(A))return{...w}}let K=q.find((Y)=>Y.id==="aws");if(!K)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...K.outputs}},o27=(A,q="")=>{i27=A,n27=q},Ml3=()=>{o27(l27,"")},Dl3=()=>n27,a27={isVirtualHostableS3Bucket:c27,parseArn:Hl3,partition:r27};wP6.customEndpointFunctions.aws=a27;var Xl3=(A)=>{if(typeof A.endpointProvider!=="function")throw Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:q}=A;if(q===void 0)A.endpoint=async()=>{return s27(A.endpointProvider({Region:typeof A.region==="function"?await A.region():A.region,UseDualStack:typeof A.useDualstackEndpoint==="function"?await A.useDualstackEndpoint():A.useDualstackEndpoint,UseFIPS:typeof A.useFipsEndpoint==="function"?await A.useFipsEndpoint():A.useFipsEndpoint,Endpoint:void 0},{logger:A.logger}))};return A},s27=(A)=>$l3.parseUrl(A.url);Object.defineProperty(V21,"EndpointError",{enumerable:!0,get:function(){return wP6.EndpointError}});Object.defineProperty(V21,"isIpAddress",{enumerable:!0,get:function(){return wP6.isIpAddress}});Object.defineProperty(V21,"resolveEndpoint",{enumerable:!0,get:function(){return wP6.resolveEndpoint}});V21.awsEndpointFunctions=a27;V21.getUserAgentPrefix=Dl3;V21.partition=r27;V21.resolveDefaultAwsRegionalEndpointsConfig=Xl3;V21.setPartitionInfo=o27;V21.toEndpointV1=s27;V21.useDefaultPartitionInfo=Ml3});var t27=C((yl3)=>{yl3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(yl3.HttpAuthLocation||(yl3.HttpAuthLocation={}));yl3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(yl3.HttpApiKeyAuthLocation||(yl3.HttpApiKeyAuthLocation={}));yl3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(yl3.EndpointURLScheme||(yl3.EndpointURLScheme={}));yl3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(yl3.AlgorithmId||(yl3.AlgorithmId={}));var Nl3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>yl3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>yl3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},vl3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},kl3=(A)=>{return Nl3(A)},El3=(A)=>{return vl3(A)};yl3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(yl3.FieldPosition||(yl3.FieldPosition={}));var Ll3="__smithy_context";yl3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(yl3.IniSectionType||(yl3.IniSectionType={}));yl3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(yl3.RequestHandlerProtocol||(yl3.RequestHandlerProtocol={}));yl3.SMITHY_CONTEXT_KEY=Ll3;yl3.getDefaultClientConfiguration=kl3;yl3.resolveDefaultRuntimeConfig=El3});var K_7=C((Bl3)=>{var hl3=t27(),Il3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},bl3=(A)=>{return{httpHandler:A.httpHandler()}};class e27{name;kind;values;constructor({name:A,kind:q=hl3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class A_7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class N21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new N21({...A,headers:{...A.headers}});if(q.query)q.query=xl3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return N21.clone(this)}}function xl3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class q_7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function ul3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Bl3.Field=e27;Bl3.Fields=A_7;Bl3.HttpRequest=N21;Bl3.HttpResponse=q_7;Bl3.getHttpHandlerExtensionConfiguration=Il3;Bl3.isValidHostname=ul3;Bl3.resolveHttpHandlerRuntimeConfig=bl3});var z_7=C((ll3)=>{var Y_7=typeof TextEncoder=="function"?new TextEncoder:null,cl3=(A)=>{if(typeof A==="string"){if(Y_7)return Y_7.encode(A).byteLength;let q=A.length;for(let K=q-1;K>=0;K--){let Y=A.charCodeAt(K);if(Y>127&&Y<=2047)q++;else if(Y>2047&&Y<=65535)q+=2;if(Y>=56320&&Y<=57343)K--}return q}else if(typeof A.byteLength==="number")return A.byteLength;else if(typeof A.size==="number")return A.size;throw Error(`Body Length computation failed for ${A}`)};ll3.calculateBodyLength=cl3});var d98=C((Pi3)=>{var y21=JN(),O_7=Z2(),qB6=MN(),nl3=Iu6(),rl3=z_7(),_P6=lO(),ol3=pZ(),H_7=Y58(),E21=0,L21=1,h36=2,Mt=3,AB6=4,v21=5,j_7=6,C98=7,J_7=20,b98=21,M_7=22,al3=23,u98=24,I36=25,b36=26,Dt=27,B98=31;function $P6(A){return typeof Buffer<"u"?Buffer.alloc(A):new Uint8Array(A)}var m98=Symbol("@smithy/core/cbor::tagSymbol");function g98(A){return A[m98]=!0,A}var sl3=typeof TextDecoder<"u",tl3=typeof Buffer<"u",c2=$P6(0),Gc=new DataView(c2.buffer,c2.byteOffset,c2.byteLength),w_7=sl3?new TextDecoder:null,u9=0;function el3(A){c2=A,Gc=new DataView(c2.buffer,c2.byteOffset,c2.byteLength)}function fc(A,q){if(A>=q)throw Error("unexpected end of (decode) payload.");let K=(c2[A]&224)>>5,Y=c2[A]&31;switch(K){case E21:case L21:case j_7:let z,w;if(Y<24)z=Y,w=1;else switch(Y){case u98:case I36:case b36:case Dt:let _=X_7[Y],$=_+1;if(w=$,q-A<$)throw Error(`countLength ${_} greater than remaining buf len.`);let O=A+1;if(_===1)z=c2[O];else if(_===2)z=Gc.getUint16(O);else if(_===4)z=Gc.getUint32(O);else z=Gc.getBigUint64(O);break;default:throw Error(`unexpected minor value ${Y}.`)}if(K===E21)return u9=w,h98(z);else if(K===L21){let _;if(typeof z==="bigint")_=BigInt(-1)-z;else _=-1-z;return u9=w,h98(_)}else if(Y===2||Y===3){let _=KB6(A+w,q),$=BigInt(0),O=A+w+u9;for(let H=O;H<O+_;++H)$=$<<BigInt(8)|BigInt(c2[H]);return u9=w+u9+_,Y===3?-$-BigInt(1):$}else if(Y===4){let _=fc(A+w,q),[$,O]=_,H=O<0?-1:1,j="0".repeat(Math.abs($)+1)+String(BigInt(H)*BigInt(O)),J,M=O<0?"-":"";if(J=$===0?j:j.slice(0,j.length+$)+"."+j.slice($),J=J.replace(/^0+/g,""),J==="")J="0";if(J[0]===".")J="0"+J;return J=M+J,u9=w+u9,y21.nv(J)}else{let _=fc(A+w,q);return u9=w+u9,g98({tag:h98(z),value:_})}case Mt:case v21:case AB6:case h36:if(Y===B98)switch(K){case Mt:return Yi3(A,q);case v21:return Oi3(A,q);case AB6:return _i3(A,q);case h36:return zi3(A,q)}else switch(K){case Mt:return Ki3(A,q);case v21:return $i3(A,q);case AB6:return wi3(A,q);case h36:return F98(A,q)}default:return Hi3(A,q)}}function D_7(A,q,K){if(tl3&&A.constructor?.name==="Buffer")return A.toString("utf-8",q,K);if(w_7)return w_7.decode(A.subarray(q,K));return O_7.toUtf8(A.subarray(q,K))}function Ai3(A){let q=Number(A);if(q<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<q)console.warn(Error(`@smithy/core/cbor - truncating BigInt(${A}) to ${q} with loss of precision.`));return q}var X_7={[u98]:1,[I36]:2,[b36]:4,[Dt]:8};function qi3(A,q){let K=A>>7,Y=(A&124)>>2,z=(A&3)<<8|q,w=K===0?1:-1,_,$;if(Y===0)if(z===0)return 0;else _=Math.pow(2,-14),$=0;else if(Y===31)if(z===0)return w*(1/0);else return NaN;else _=Math.pow(2,Y-15),$=1;return $+=z/1024,w*(_*$)}function KB6(A,q){let K=c2[A]&31;if(K<24)return u9=1,K;if(K===u98||K===I36||K===b36||K===Dt){let Y=X_7[K];if(u9=Y+1,q-A<u9)throw Error(`countLength ${Y} greater than remaining buf len.`);let z=A+1;if(Y===1)return c2[z];else if(Y===2)return Gc.getUint16(z);else if(Y===4)return Gc.getUint32(z);return Ai3(Gc.getBigUint64(z))}throw Error(`unexpected minor value ${K}.`)}function Ki3(A,q){let K=KB6(A,q),Y=u9;if(A+=Y,q-A<K)throw Error(`string len ${K} greater than remaining buf len.`);let z=D_7(c2,A,A+K);return u9=Y+K,z}function Yi3(A,q){A+=1;let K=[];for(let Y=A;A<q;){if(c2[A]===255){let O=$P6(K.length);return O.set(K,0),u9=A-Y+2,D_7(O,0,O.length)}let z=(c2[A]&224)>>5,w=c2[A]&31;if(z!==Mt)throw Error(`unexpected major type ${z} in indefinite string.`);if(w===B98)throw Error("nested indefinite string.");let _=F98(A,q);A+=u9;for(let O=0;O<_.length;++O)K.push(_[O])}throw Error("expected break marker.")}function F98(A,q){let K=KB6(A,q),Y=u9;if(A+=Y,q-A<K)throw Error(`unstructured byte string len ${K} greater than remaining buf len.`);let z=c2.subarray(A,A+K);return u9=Y+K,z}function zi3(A,q){A+=1;let K=[];for(let Y=A;A<q;){if(c2[A]===255){let O=$P6(K.length);return O.set(K,0),u9=A-Y+2,O}let z=(c2[A]&224)>>5,w=c2[A]&31;if(z!==h36)throw Error(`unexpected major type ${z} in indefinite string.`);if(w===B98)throw Error("nested indefinite string.");let _=F98(A,q);A+=u9;for(let O=0;O<_.length;++O)K.push(_[O])}throw Error("expected break marker.")}function wi3(A,q){let K=KB6(A,q),Y=u9;A+=Y;let z=A,w=Array(K);for(let _=0;_<K;++_){let $=fc(A,q),O=u9;w[_]=$,A+=O}return u9=Y+(A-z),w}function _i3(A,q){A+=1;let K=[];for(let Y=A;A<q;){if(c2[A]===255)return u9=A-Y+2,K;let z=fc(A,q);A+=u9,K.push(z)}throw Error("expected break marker.")}function $i3(A,q){let K=KB6(A,q),Y=u9;A+=Y;let z=A,w={};for(let _=0;_<K;++_){if(A>=q)throw Error("unexpected end of map payload.");let $=(c2[A]&224)>>5;if($!==Mt)throw Error(`unexpected major type ${$} for map key at index ${A}.`);let O=fc(A,q);A+=u9;let H=fc(A,q);A+=u9,w[O]=H}return u9=Y+(A-z),w}function Oi3(A,q){A+=1;let K=A,Y={};for(;A<q;){if(A>=q)throw Error("unexpected end of map payload.");if(c2[A]===255)return u9=A-K+2,Y;let z=(c2[A]&224)>>5;if(z!==Mt)throw Error(`unexpected major type ${z} for map key.`);let w=fc(A,q);A+=u9;let _=fc(A,q);A+=u9,Y[w]=_}throw Error("expected break marker.")}function Hi3(A,q){let K=c2[A]&31;switch(K){case b98:case J_7:return u9=1,K===b98;case M_7:return u9=1,null;case al3:return u9=1,null;case I36:if(q-A<3)throw Error("incomplete float16 at end of buf.");return u9=3,qi3(c2[A+1],c2[A+2]);case b36:if(q-A<5)throw Error("incomplete float32 at end of buf.");return u9=5,Gc.getFloat32(A+1);case Dt:if(q-A<9)throw Error("incomplete float64 at end of buf.");return u9=9,Gc.getFloat64(A+1);default:throw Error(`unexpected minor value ${K}.`)}}function h98(A){if(typeof A==="number")return A;let q=Number(A);if(Number.MIN_SAFE_INTEGER<=q&&q<=Number.MAX_SAFE_INTEGER)return q;return A}var __7=typeof Buffer<"u",ji3=2048,m3=$P6(ji3),Zc=new DataView(m3.buffer,m3.byteOffset,m3.byteLength),tq=0;function I98(A){if(m3.byteLength-tq<A)if(tq<16000000)x98(Math.max(m3.byteLength*4,m3.byteLength+A));else x98(m3.byteLength+A+16000000)}function $_7(){let A=$P6(tq);return A.set(m3.subarray(0,tq),0),tq=0,A}function x98(A){let q=m3;if(m3=$P6(A),q)if(q.copy)q.copy(m3,0,0,q.byteLength);else m3.set(q,0);Zc=new DataView(m3.buffer,m3.byteOffset,m3.byteLength)}function Wc(A,q){if(q<24)m3[tq++]=A<<5|q;else if(q<256)m3[tq++]=A<<5|24,m3[tq++]=q;else if(q<65536)m3[tq++]=A<<5|I36,Zc.setUint16(tq,q),tq+=2;else if(q<4294967296)m3[tq++]=A<<5|b36,Zc.setUint32(tq,q),tq+=4;else m3[tq++]=A<<5|Dt,Zc.setBigUint64(tq,typeof q==="bigint"?q:BigInt(q)),tq+=8}function Ji3(A){let q=[A];while(q.length){let K=q.pop();if(I98(typeof K==="string"?K.length*4:64),typeof K==="string"){if(__7)Wc(Mt,Buffer.byteLength(K)),tq+=m3.write(K,tq);else{let Y=O_7.fromUtf8(K);Wc(Mt,Y.byteLength),m3.set(Y,tq),tq+=Y.byteLength}continue}else if(typeof K==="number"){if(Number.isInteger(K)){let Y=K>=0,z=Y?E21:L21,w=Y?K:-K-1;if(w<24)m3[tq++]=z<<5|w;else if(w<256)m3[tq++]=z<<5|24,m3[tq++]=w;else if(w<65536)m3[tq++]=z<<5|I36,m3[tq++]=w>>8,m3[tq++]=w;else if(w<4294967296)m3[tq++]=z<<5|b36,Zc.setUint32(tq,w),tq+=4;else m3[tq++]=z<<5|Dt,Zc.setBigUint64(tq,BigInt(w)),tq+=8;continue}m3[tq++]=C98<<5|Dt,Zc.setFloat64(tq,K),tq+=8;continue}else if(typeof K==="bigint"){let Y=K>=0,z=Y?E21:L21,w=Y?K:-K-BigInt(1),_=Number(w);if(_<24)m3[tq++]=z<<5|_;else if(_<256)m3[tq++]=z<<5|24,m3[tq++]=_;else if(_<65536)m3[tq++]=z<<5|I36,m3[tq++]=_>>8,m3[tq++]=_&255;else if(_<4294967296)m3[tq++]=z<<5|b36,Zc.setUint32(tq,_),tq+=4;else if(w<BigInt("18446744073709551616"))m3[tq++]=z<<5|Dt,Zc.setBigUint64(tq,w),tq+=8;else{let $=w.toString(2),O=new Uint8Array(Math.ceil($.length/8)),H=w,j=0;while(O.byteLength-++j>=0)O[O.byteLength-j]=Number(H&BigInt(255)),H>>=BigInt(8);if(I98(O.byteLength*2),m3[tq++]=Y?194:195,__7)Wc(h36,Buffer.byteLength(O));else Wc(h36,O.byteLength);m3.set(O,tq),tq+=O.byteLength}continue}else if(K===null){m3[tq++]=C98<<5|M_7;continue}else if(typeof K==="boolean"){m3[tq++]=C98<<5|(K?b98:J_7);continue}else if(typeof K>"u")throw Error("@smithy/core/cbor: client may not serialize undefined value.");else if(Array.isArray(K)){for(let Y=K.length-1;Y>=0;--Y)q.push(K[Y]);Wc(AB6,K.length);continue}else if(typeof K.byteLength==="number"){I98(K.length*2),Wc(h36,K.length),m3.set(K,tq),tq+=K.byteLength;continue}else if(typeof K==="object"){if(K instanceof y21.NumericValue){let z=K.string.indexOf("."),w=z===-1?0:z-K.string.length+1,_=BigInt(K.string.replace(".",""));m3[tq++]=196,q.push(_),q.push(w),Wc(AB6,2);continue}if(K[m98])if("tag"in K&&"value"in K){q.push(K.value),Wc(j_7,K.tag);continue}else throw Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(K));let Y=Object.keys(K);for(let z=Y.length-1;z>=0;--z){let w=Y[z];q.push(K[w]),q.push(w)}Wc(v21,Y.length);continue}throw Error(`data type ${K?.constructor?.name??typeof K} not compatible for encoding.`)}}var R21={deserialize(A){return el3(A),fc(0,A.length)},serialize(A){try{return Ji3(A),$_7()}catch(q){throw $_7(),q}},resizeEncodingBuffer(A){x98(A)}},P_7=(A,q)=>{return qB6.collectBody(A,q).then(async(K)=>{if(K.length)try{return R21.deserialize(K)}catch(Y){throw Object.defineProperty(Y,"$responseBodyText",{value:q.utf8Encoder(K)}),Y}return{}})},k21=(A)=>{return g98({tag:1,value:A.getTime()/1000})},Mi3=async(A,q)=>{let K=await P_7(A,q);return K.message=K.message??K.Message,K},W_7=(A,q)=>{let K=(z)=>{let w=z;if(typeof w==="number")w=w.toString();if(w.indexOf(",")>=0)w=w.split(",")[0];if(w.indexOf(":")>=0)w=w.split(":")[0];if(w.indexOf("#")>=0)w=w.split("#")[1];return w};if(q.__type!==void 0)return K(q.__type);let Y=Object.keys(q).find((z)=>z.toLowerCase()==="code");if(Y&&q[Y]!==void 0)return K(q[Y])},Di3=(A)=>{if(String(A.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor")throw Error("Malformed RPCv2 CBOR response, status: "+A.statusCode)},Xi3=async(A,q,K,Y,z)=>{let{hostname:w,protocol:_="https",port:$,path:O}=await A.endpoint(),H={protocol:_,hostname:w,port:$,method:"POST",path:O.endsWith("/")?O.slice(0,-1)+K:O+K,headers:{...q}};if(Y!==void 0)H.hostname=Y;if(z!==void 0){H.body=z;try{H.headers["content-length"]=String(rl3.calculateBodyLength(z))}catch(j){}}return new nl3.HttpRequest(H)};class Q98 extends qB6.SerdeContext{createSerializer(){let A=new U98;return A.setSerdeContext(this.serdeContext),A}createDeserializer(){let A=new p98;return A.setSerdeContext(this.serdeContext),A}}class U98 extends qB6.SerdeContext{value;write(A,q){this.value=this.serialize(A,q)}serialize(A,q){let K=_P6.NormalizedSchema.of(A);if(q==null){if(K.isIdempotencyToken())return y21.generateIdempotencyToken();return q}if(K.isBlobSchema()){if(typeof q==="string")return(this.serdeContext?.base64Decoder??H_7.fromBase64)(q);return q}if(K.isTimestampSchema()){if(typeof q==="number"||typeof q==="bigint")return k21(new Date(Number(q)/1000|0));return k21(q)}if(typeof q==="function"||typeof q==="object"){let Y=q;if(K.isListSchema()&&Array.isArray(Y)){let w=!!K.getMergedTraits().sparse,_=[],$=0;for(let O of Y){let H=this.serialize(K.getValueSchema(),O);if(H!=null||w)_[$++]=H}return _}if(Y instanceof Date)return k21(Y);let z={};if(K.isMapSchema()){let w=!!K.getMergedTraits().sparse;for(let _ of Object.keys(Y)){let $=this.serialize(K.getValueSchema(),Y[_]);if($!=null||w)z[_]=$}}else if(K.isStructSchema())for(let[w,_]of K.structIterator()){let $=this.serialize(_,Y[w]);if($!=null)z[w]=$}else if(K.isDocumentSchema())for(let w of Object.keys(Y))z[w]=this.serialize(K.getValueSchema(),Y[w]);return z}return q}flush(){let A=R21.serialize(this.value);return this.value=void 0,A}}class p98 extends qB6.SerdeContext{read(A,q){let K=R21.deserialize(q);return this.readValue(A,K)}readValue(A,q){let K=_P6.NormalizedSchema.of(A);if(K.isTimestampSchema()&&typeof q==="number")return y21._parseEpochTimestamp(q);if(K.isBlobSchema()){if(typeof q==="string")return(this.serdeContext?.base64Decoder??H_7.fromBase64)(q);return q}if(typeof q>"u"||typeof q==="boolean"||typeof q==="number"||typeof q==="string"||typeof q==="bigint"||typeof q==="symbol")return q;else if(typeof q==="function"||typeof q==="object"){if(q===null)return null;if("byteLength"in q)return q;if(q instanceof Date)return q;if(K.isDocumentSchema())return q;if(K.isListSchema()){let z=[],w=K.getValueSchema(),_=!!K.getMergedTraits().sparse;for(let $ of q){let O=this.readValue(w,$);if(O!=null||_)z.push(O)}return z}let Y={};if(K.isMapSchema()){let z=!!K.getMergedTraits().sparse,w=K.getValueSchema();for(let _ of Object.keys(q)){let $=this.readValue(w,q[_]);if($!=null||z)Y[_]=$}}else if(K.isStructSchema())for(let[z,w]of K.structIterator()){let _=this.readValue(w,q[z]);if(_!=null)Y[z]=_}return Y}else return q}}class Z_7 extends qB6.RpcProtocol{codec=new Q98;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:A}){super({defaultNamespace:A})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(Object.assign(Y.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),_P6.deref(A.input)==="unit")delete Y.body,delete Y.headers["content-type"];else{if(!Y.body)this.serializer.write(15,{}),Y.body=this.serializer.flush();try{Y.headers["content-length"]=String(Y.body.byteLength)}catch($){}}let{service:z,operation:w}=ol3.getSmithyContext(K),_=`/service/${z}/operation/${w}`;if(Y.path.endsWith("/"))Y.path+=_.slice(1);else Y.path+=_;return Y}async deserializeResponse(A,q,K){return super.deserializeResponse(A,q,K)}async handleError(A,q,K,Y,z){let w=W_7(K,Y)??"Unknown",_=this.options.defaultNamespace;if(w.includes("#"))[_]=w.split("#");let $={$metadata:z,$fault:K.statusCode<=500?"client":"server"},O=_P6.TypeRegistry.for(_),H;try{H=O.getSchema(w)}catch(P){if(Y.Message)Y.message=Y.Message;let W=_P6.TypeRegistry.for("smithy.ts.sdk.synthetic."+_),Z=W.getBaseException();if(Z){let G=W.getErrorCtor(Z);throw Object.assign(new G({name:w}),$,Y)}throw Object.assign(Error(w),$,Y)}let j=_P6.NormalizedSchema.of(H),J=O.getErrorCtor(H),M=Y.message??Y.Message??"Unknown",D=new J(M),X={};for(let[P,W]of j.structIterator())X[P]=this.deserializer.readValue(W,Y[P]);throw Object.assign(D,$,{$fault:j.getMergedTraits().error,message:M},X)}getDefaultContentType(){return"application/cbor"}}Pi3.CborCodec=Q98;Pi3.CborShapeDeserializer=p98;Pi3.CborShapeSerializer=U98;Pi3.SmithyRpcV2CborProtocol=Z_7;Pi3.buildHttpRpcRequest=Xi3;Pi3.cbor=R21;Pi3.checkCborResponse=Di3;Pi3.dateToTag=k21;Pi3.loadSmithyRpcV2CborErrorCode=W_7;Pi3.parseCborBody=P_7;Pi3.parseCborErrorBody=Mi3;Pi3.tag=g98;Pi3.tagSymbol=m98});var a98=C((HP6)=>{var T_7=Qm(),r98=MN(),l98=v58(),Si3=lO(),G_7=JN();class V_7{config;middlewareStack=T_7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var c98="***SensitiveInformation***";function i98(A,q){if(q==null)return q;let K=Si3.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return c98;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return c98}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return c98}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=i98(_,Y[w]);return z}return q}class o98{middlewareStack=T_7.constructStack();schema;static classBuilder(){return new N_7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[l98.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class N_7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends o98{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?i98.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?i98.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var Ci3="***SensitiveInformation***",hi3=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class OP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return OP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===OP6)return OP6.isInstance(A);if(OP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var v_7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},k_7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=bi3(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw v_7(_,q)},Ii3=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{k_7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},bi3=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),xi3=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},f_7=!1,ui3=(A)=>{if(A&&!f_7&&parseInt(A.substring(1,A.indexOf(".")))<16)f_7=!0},Bi3=(A)=>{let q=[];for(let K in l98.AlgorithmId){let Y=l98.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},mi3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},gi3=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},Fi3=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},E_7=(A)=>{return Object.assign(Bi3(A),gi3(A))},Qi3=E_7,Ui3=(A)=>{return Object.assign(mi3(A),Fi3(A))},pi3=(A)=>Array.isArray(A)?A:[A],L_7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=L_7(A[K]);return A},di3=(A)=>{return A!=null};class y_7{trace(){}debug(){}info(){}warn(){}error(){}}function R_7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,ii3(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}S_7(Y,null,w,_)}return Y}var ci3=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},li3=(A,q)=>{let K={};for(let Y in q)S_7(K,A,q,Y);return K},ii3=(A,q,K)=>{return R_7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},S_7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=ni3,O=ri3,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},ni3=(A)=>A!=null,ri3=(A)=>A,oi3=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},ai3=(A)=>A.toISOString().replace(".000Z","Z"),n98=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(n98);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=n98(A[K])}return q}return A};Object.defineProperty(HP6,"collectBody",{enumerable:!0,get:function(){return r98.collectBody}});Object.defineProperty(HP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return r98.extendedEncodeURIComponent}});Object.defineProperty(HP6,"resolvedPath",{enumerable:!0,get:function(){return r98.resolvedPath}});HP6.Client=V_7;HP6.Command=o98;HP6.NoOpLogger=y_7;HP6.SENSITIVE_STRING=Ci3;HP6.ServiceException=OP6;HP6._json=n98;HP6.convertMap=ci3;HP6.createAggregatedClient=hi3;HP6.decorateServiceException=v_7;HP6.emitWarningIfUnsupportedVersion=ui3;HP6.getArrayIfSingleItem=pi3;HP6.getDefaultClientConfiguration=Qi3;HP6.getDefaultExtensionConfiguration=E_7;HP6.getValueFromTextNode=L_7;HP6.isSerializableHeaderValue=di3;HP6.loadConfigsForDefaultMode=xi3;HP6.map=R_7;HP6.resolveDefaultRuntimeConfig=Ui3;HP6.serializeDateTime=ai3;HP6.serializeFloat=oi3;HP6.take=li3;HP6.throwDefaultError=k_7;HP6.withBaseException=Ii3;Object.keys(G_7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(HP6,A))Object.defineProperty(HP6,A,{enumerable:!0,get:function(){return G_7[A]}})})});var C_7=C((Vn3)=>{var Tn3=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";Vn3.isArrayBuffer=Tn3});var t98=C((Ln3)=>{var vn3=C_7(),s98=g6("buffer"),kn3=(A,q=0,K=A.byteLength-q)=>{if(!vn3.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return s98.Buffer.from(A,q,K)},En3=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?s98.Buffer.from(A,q):s98.Buffer.from(A)};Ln3.fromArrayBuffer=kn3;Ln3.fromString=En3});var b_7=C((h_7)=>{Object.defineProperty(h_7,"__esModule",{value:!0});h_7.fromBase64=void 0;var Sn3=t98(),Cn3=/^[A-Za-z0-9+/]*={0,2}$/,hn3=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Cn3.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Sn3.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};h_7.fromBase64=hn3});var B_7=C((x_7)=>{Object.defineProperty(x_7,"__esModule",{value:!0});x_7.toBase64=void 0;var In3=t98(),bn3=Z2(),xn3=(A)=>{let q;if(typeof A==="string")q=(0,bn3.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,In3.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};x_7.toBase64=xn3});var e98=C((YB6)=>{var m_7=b_7(),g_7=B_7();Object.keys(m_7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(YB6,A))Object.defineProperty(YB6,A,{enumerable:!0,get:function(){return m_7[A]}})});Object.keys(g_7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(YB6,A))Object.defineProperty(YB6,A,{enumerable:!0,get:function(){return g_7[A]}})})});var Q_7=C(($M2,F_7)=>{(()=>{var A={d:(T6,v6)=>{for(var A1 in v6)A.o(v6,A1)&&!A.o(T6,A1)&&Object.defineProperty(T6,A1,{enumerable:!0,get:v6[A1]})},o:(T6,v6)=>Object.prototype.hasOwnProperty.call(T6,v6),r:(T6)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(T6,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T6,"__esModule",{value:!0})}},q={};A.r(q),A.d(q,{XMLBuilder:()=>u6,XMLParser:()=>V6,XMLValidator:()=>v1});let K=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Y=new RegExp("^["+K+"]["+K+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function z(T6,v6){let A1=[],F6=v6.exec(T6);for(;F6;){let m6=[];m6.startIndex=v6.lastIndex-F6[0].length;let l6=F6.length;for(let N1=0;N1<l6;N1++)m6.push(F6[N1]);A1.push(m6),F6=v6.exec(T6)}return A1}let w=function(T6){return Y.exec(T6)!=null},_={allowBooleanAttributes:!1,unpairedTags:[]};function $(T6,v6){v6=Object.assign({},_,v6);let A1=[],F6=!1,m6=!1;T6[0]==="\uFEFF"&&(T6=T6.substr(1));for(let l6=0;l6<T6.length;l6++)if(T6[l6]==="<"&&T6[l6+1]==="?"){if(l6+=2,l6=H(T6,l6),l6.err)return l6}else{if(T6[l6]!=="<"){if(O(T6[l6]))continue;return Z("InvalidChar","char '"+T6[l6]+"' is not expected.",f(T6,l6))}{let N1=l6;if(l6++,T6[l6]==="!"){l6=j(T6,l6);continue}{let X1=!1;T6[l6]==="/"&&(X1=!0,l6++);let k1="";for(;l6<T6.length&&T6[l6]!==">"&&T6[l6]!==" "&&T6[l6]!=="\t"&&T6[l6]!==`
`&&T6[l6]!=="\r";l6++)k1+=T6[l6];if(k1=k1.trim(),k1[k1.length-1]==="/"&&(k1=k1.substring(0,k1.length-1),l6--),!w(k1)){let s8;return s8=k1.trim().length===0?"Invalid space after '<'.":"Tag '"+k1+"' is an invalid name.",Z("InvalidTag",s8,f(T6,l6))}let i1=D(T6,l6);if(i1===!1)return Z("InvalidAttr","Attributes for '"+k1+"' have open quote.",f(T6,l6));let t8=i1.value;if(l6=i1.index,t8[t8.length-1]==="/"){let s8=l6-t8.length;t8=t8.substring(0,t8.length-1);let _7=P(t8,v6);if(_7!==!0)return Z(_7.err.code,_7.err.msg,f(T6,s8+_7.err.line));F6=!0}else if(X1){if(!i1.tagClosed)return Z("InvalidTag","Closing tag '"+k1+"' doesn't have proper closing.",f(T6,l6));if(t8.trim().length>0)return Z("InvalidTag","Closing tag '"+k1+"' can't have attributes or invalid starting.",f(T6,N1));if(A1.length===0)return Z("InvalidTag","Closing tag '"+k1+"' has not been opened.",f(T6,N1));{let s8=A1.pop();if(k1!==s8.tagName){let _7=f(T6,s8.tagStartPos);return Z("InvalidTag","Expected closing tag '"+s8.tagName+"' (opened in line "+_7.line+", col "+_7.col+") instead of closing tag '"+k1+"'.",f(T6,N1))}A1.length==0&&(m6=!0)}}else{let s8=P(t8,v6);if(s8!==!0)return Z(s8.err.code,s8.err.msg,f(T6,l6-t8.length+s8.err.line));if(m6===!0)return Z("InvalidXml","Multiple possible root nodes found.",f(T6,l6));v6.unpairedTags.indexOf(k1)!==-1||A1.push({tagName:k1,tagStartPos:N1}),F6=!0}for(l6++;l6<T6.length;l6++)if(T6[l6]==="<"){if(T6[l6+1]==="!"){l6++,l6=j(T6,l6);continue}if(T6[l6+1]!=="?")break;if(l6=H(T6,++l6),l6.err)return l6}else if(T6[l6]==="&"){let s8=W(T6,l6);if(s8==-1)return Z("InvalidChar","char '&' is not expected.",f(T6,l6));l6=s8}else if(m6===!0&&!O(T6[l6]))return Z("InvalidXml","Extra text at the end",f(T6,l6));T6[l6]==="<"&&l6--}}}return F6?A1.length==1?Z("InvalidTag","Unclosed tag '"+A1[0].tagName+"'.",f(T6,A1[0].tagStartPos)):!(A1.length>0)||Z("InvalidXml","Invalid '"+JSON.stringify(A1.map((l6)=>l6.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):Z("InvalidXml","Start tag expected.",1)}function O(T6){return T6===" "||T6==="\t"||T6===`
`||T6==="\r"}function H(T6,v6){let A1=v6;for(;v6<T6.length;v6++)if(T6[v6]!="?"&&T6[v6]!=" ");else{let F6=T6.substr(A1,v6-A1);if(v6>5&&F6==="xml")return Z("InvalidXml","XML declaration allowed only at the start of the document.",f(T6,v6));if(T6[v6]=="?"&&T6[v6+1]==">"){v6++;break}}return v6}function j(T6,v6){if(T6.length>v6+5&&T6[v6+1]==="-"&&T6[v6+2]==="-"){for(v6+=3;v6<T6.length;v6++)if(T6[v6]==="-"&&T6[v6+1]==="-"&&T6[v6+2]===">"){v6+=2;break}}else if(T6.length>v6+8&&T6[v6+1]==="D"&&T6[v6+2]==="O"&&T6[v6+3]==="C"&&T6[v6+4]==="T"&&T6[v6+5]==="Y"&&T6[v6+6]==="P"&&T6[v6+7]==="E"){let A1=1;for(v6+=8;v6<T6.length;v6++)if(T6[v6]==="<")A1++;else if(T6[v6]===">"&&(A1--,A1===0))break}else if(T6.length>v6+9&&T6[v6+1]==="["&&T6[v6+2]==="C"&&T6[v6+3]==="D"&&T6[v6+4]==="A"&&T6[v6+5]==="T"&&T6[v6+6]==="A"&&T6[v6+7]==="["){for(v6+=8;v6<T6.length;v6++)if(T6[v6]==="]"&&T6[v6+1]==="]"&&T6[v6+2]===">"){v6+=2;break}}return v6}let J='"',M="'";function D(T6,v6){let A1="",F6="",m6=!1;for(;v6<T6.length;v6++){if(T6[v6]===J||T6[v6]===M)F6===""?F6=T6[v6]:F6!==T6[v6]||(F6="");else if(T6[v6]===">"&&F6===""){m6=!0;break}A1+=T6[v6]}return F6===""&&{value:A1,index:v6,tagClosed:m6}}let X=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function P(T6,v6){let A1=z(T6,X),F6={};for(let m6=0;m6<A1.length;m6++){if(A1[m6][1].length===0)return Z("InvalidAttr","Attribute '"+A1[m6][2]+"' has no space in starting.",V(A1[m6]));if(A1[m6][3]!==void 0&&A1[m6][4]===void 0)return Z("InvalidAttr","Attribute '"+A1[m6][2]+"' is without value.",V(A1[m6]));if(A1[m6][3]===void 0&&!v6.allowBooleanAttributes)return Z("InvalidAttr","boolean attribute '"+A1[m6][2]+"' is not allowed.",V(A1[m6]));let l6=A1[m6][2];if(!G(l6))return Z("InvalidAttr","Attribute '"+l6+"' is an invalid name.",V(A1[m6]));if(F6.hasOwnProperty(l6))return Z("InvalidAttr","Attribute '"+l6+"' is repeated.",V(A1[m6]));F6[l6]=1}return!0}function W(T6,v6){if(T6[++v6]===";")return-1;if(T6[v6]==="#")return function(F6,m6){let l6=/\d/;for(F6[m6]==="x"&&(m6++,l6=/[\da-fA-F]/);m6<F6.length;m6++){if(F6[m6]===";")return m6;if(!F6[m6].match(l6))break}return-1}(T6,++v6);let A1=0;for(;v6<T6.length;v6++,A1++)if(!(T6[v6].match(/\w/)&&A1<20)){if(T6[v6]===";")break;return-1}return v6}function Z(T6,v6,A1){return{err:{code:T6,msg:v6,line:A1.line||A1,col:A1.col}}}function G(T6){return w(T6)}function f(T6,v6){let A1=T6.substring(0,v6).split(/\r?\n/);return{line:A1.length,col:A1[A1.length-1].length+1}}function V(T6){return T6.startIndex+T6[1].length}let N={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(T6,v6){return v6},attributeValueProcessor:function(T6,v6){return v6},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(T6,v6,A1){return T6},captureMetaData:!1},v;v=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class y{constructor(T6){this.tagname=T6,this.child=[],this[":@"]={}}add(T6,v6){T6==="__proto__"&&(T6="#__proto__"),this.child.push({[T6]:v6})}addChild(T6,v6){T6.tagname==="__proto__"&&(T6.tagname="#__proto__"),T6[":@"]&&Object.keys(T6[":@"]).length>0?this.child.push({[T6.tagname]:T6.child,":@":T6[":@"]}):this.child.push({[T6.tagname]:T6.child}),v6!==void 0&&(this.child[this.child.length-1][v]={startIndex:v6})}static getMetaDataSymbol(){return v}}function R(T6,v6){let A1={};if(T6[v6+3]!=="O"||T6[v6+4]!=="C"||T6[v6+5]!=="T"||T6[v6+6]!=="Y"||T6[v6+7]!=="P"||T6[v6+8]!=="E")throw Error("Invalid Tag instead of DOCTYPE");{v6+=9;let F6=1,m6=!1,l6=!1,N1="";for(;v6<T6.length;v6++)if(T6[v6]!=="<"||l6)if(T6[v6]===">"){if(l6?T6[v6-1]==="-"&&T6[v6-2]==="-"&&(l6=!1,F6--):F6--,F6===0)break}else T6[v6]==="["?m6=!0:N1+=T6[v6];else{if(m6&&b(T6,"!ENTITY",v6)){let X1,k1;v6+=7,[X1,k1,v6]=B(T6,v6+1),k1.indexOf("&")===-1&&(A1[X1]={regx:RegExp(`&${X1};`,"g"),val:k1})}else if(m6&&b(T6,"!ELEMENT",v6)){v6+=8;let{index:X1}=g(T6,v6+1);v6=X1}else if(m6&&b(T6,"!ATTLIST",v6))v6+=8;else if(m6&&b(T6,"!NOTATION",v6)){v6+=9;let{index:X1}=x(T6,v6+1);v6=X1}else{if(!b(T6,"!--",v6))throw Error("Invalid DOCTYPE");l6=!0}F6++,N1=""}if(F6!==0)throw Error("Unclosed DOCTYPE")}return{entities:A1,i:v6}}let h=(T6,v6)=>{for(;v6<T6.length&&/\s/.test(T6[v6]);)v6++;return v6};function B(T6,v6){v6=h(T6,v6);let A1="";for(;v6<T6.length&&!/\s/.test(T6[v6])&&T6[v6]!=='"'&&T6[v6]!=="'";)A1+=T6[v6],v6++;if(U(A1),v6=h(T6,v6),T6.substring(v6,v6+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");if(T6[v6]==="%")throw Error("Parameter entities are not supported");let F6="";return[v6,F6]=F(T6,v6,"entity"),[A1,F6,--v6]}function x(T6,v6){v6=h(T6,v6);let A1="";for(;v6<T6.length&&!/\s/.test(T6[v6]);)A1+=T6[v6],v6++;U(A1),v6=h(T6,v6);let F6=T6.substring(v6,v6+6).toUpperCase();if(F6!=="SYSTEM"&&F6!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${F6}"`);v6+=F6.length,v6=h(T6,v6);let m6=null,l6=null;if(F6==="PUBLIC")[v6,m6]=F(T6,v6,"publicIdentifier"),T6[v6=h(T6,v6)]!=='"'&&T6[v6]!=="'"||([v6,l6]=F(T6,v6,"systemIdentifier"));else if(F6==="SYSTEM"&&([v6,l6]=F(T6,v6,"systemIdentifier"),!l6))throw Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:A1,publicIdentifier:m6,systemIdentifier:l6,index:--v6}}function F(T6,v6,A1){let F6="",m6=T6[v6];if(m6!=='"'&&m6!=="'")throw Error(`Expected quoted string, found "${m6}"`);for(v6++;v6<T6.length&&T6[v6]!==m6;)F6+=T6[v6],v6++;if(T6[v6]!==m6)throw Error(`Unterminated ${A1} value`);return[++v6,F6]}function g(T6,v6){v6=h(T6,v6);let A1="";for(;v6<T6.length&&!/\s/.test(T6[v6]);)A1+=T6[v6],v6++;if(!U(A1))throw Error(`Invalid element name: "${A1}"`);let F6="";if(T6[v6=h(T6,v6)]==="E"&&b(T6,"MPTY",v6))v6+=4;else if(T6[v6]==="A"&&b(T6,"NY",v6))v6+=2;else{if(T6[v6]!=="(")throw Error(`Invalid Element Expression, found "${T6[v6]}"`);for(v6++;v6<T6.length&&T6[v6]!==")";)F6+=T6[v6],v6++;if(T6[v6]!==")")throw Error("Unterminated content model")}return{elementName:A1,contentModel:F6.trim(),index:v6}}function b(T6,v6,A1){for(let F6=0;F6<v6.length;F6++)if(v6[F6]!==T6[A1+F6+1])return!1;return!0}function U(T6){if(w(T6))return T6;throw Error(`Invalid entity name ${T6}`)}let d=/^[-+]?0x[a-fA-F0-9]+$/,l=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},s=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function H6(T6){return typeof T6=="function"?T6:Array.isArray(T6)?(v6)=>{for(let A1 of T6){if(typeof A1=="string"&&v6===A1)return!0;if(A1 instanceof RegExp&&A1.test(v6))return!0}}:()=>!1}class Z6{constructor(T6){this.options=T6,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(v6,A1)=>String.fromCodePoint(Number.parseInt(A1,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(v6,A1)=>String.fromCodePoint(Number.parseInt(A1,16))}},this.addExternalEntities=G6,this.parseXml=k6,this.parseTextData=q6,this.resolveNameSpace=w6,this.buildAttributesMap=_6,this.isItStopNode=z6,this.replaceEntitiesValue=A6,this.readStopNodeData=X6,this.saveTextToParentTag=K6,this.addChild=P6,this.ignoreAttributesFn=H6(this.options.ignoreAttributes)}}function G6(T6){let v6=Object.keys(T6);for(let A1=0;A1<v6.length;A1++){let F6=v6[A1];this.lastEntities[F6]={regex:new RegExp("&"+F6+";","g"),val:T6[F6]}}}function q6(T6,v6,A1,F6,m6,l6,N1){if(T6!==void 0&&(this.options.trimValues&&!F6&&(T6=T6.trim()),T6.length>0)){N1||(T6=this.replaceEntitiesValue(T6));let X1=this.options.tagValueProcessor(v6,T6,A1,m6,l6);return X1==null?T6:typeof X1!=typeof T6||X1!==T6?X1:this.options.trimValues||T6.trim()===T6?O6(T6,this.options.parseTagValue,this.options.numberParseOptions):T6}}function w6(T6){if(this.options.removeNSPrefix){let v6=T6.split(":"),A1=T6.charAt(0)==="/"?"/":"";if(v6[0]==="xmlns")return"";v6.length===2&&(T6=A1+v6[1])}return T6}let j6=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function _6(T6,v6,A1){if(this.options.ignoreAttributes!==!0&&typeof T6=="string"){let F6=z(T6,j6),m6=F6.length,l6={};for(let N1=0;N1<m6;N1++){let X1=this.resolveNameSpace(F6[N1][1]);if(this.ignoreAttributesFn(X1,v6))continue;let k1=F6[N1][4],i1=this.options.attributeNamePrefix+X1;if(X1.length)if(this.options.transformAttributeName&&(i1=this.options.transformAttributeName(i1)),i1==="__proto__"&&(i1="#__proto__"),k1!==void 0){this.options.trimValues&&(k1=k1.trim()),k1=this.replaceEntitiesValue(k1);let t8=this.options.attributeValueProcessor(X1,k1,v6);l6[i1]=t8==null?k1:typeof t8!=typeof k1||t8!==k1?t8:O6(k1,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(l6[i1]=!0)}if(!Object.keys(l6).length)return;if(this.options.attributesGroupName){let N1={};return N1[this.options.attributesGroupName]=l6,N1}return l6}}let k6=function(T6){T6=T6.replace(/\r\n?/g,`
`);let v6=new y("!xml"),A1=v6,F6="",m6="";for(let l6=0;l6<T6.length;l6++)if(T6[l6]==="<")if(T6[l6+1]==="/"){let N1=a(T6,">",l6,"Closing Tag is not closed."),X1=T6.substring(l6+2,N1).trim();if(this.options.removeNSPrefix){let t8=X1.indexOf(":");t8!==-1&&(X1=X1.substr(t8+1))}this.options.transformTagName&&(X1=this.options.transformTagName(X1)),A1&&(F6=this.saveTextToParentTag(F6,A1,m6));let k1=m6.substring(m6.lastIndexOf(".")+1);if(X1&&this.options.unpairedTags.indexOf(X1)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${X1}>`);let i1=0;k1&&this.options.unpairedTags.indexOf(k1)!==-1?(i1=m6.lastIndexOf(".",m6.lastIndexOf(".")-1),this.tagsNodeStack.pop()):i1=m6.lastIndexOf("."),m6=m6.substring(0,i1),A1=this.tagsNodeStack.pop(),F6="",l6=N1}else if(T6[l6+1]==="?"){let N1=r(T6,l6,!1,"?>");if(!N1)throw Error("Pi Tag is not closed.");if(F6=this.saveTextToParentTag(F6,A1,m6),this.options.ignoreDeclaration&&N1.tagName==="?xml"||this.options.ignorePiTags);else{let X1=new y(N1.tagName);X1.add(this.options.textNodeName,""),N1.tagName!==N1.tagExp&&N1.attrExpPresent&&(X1[":@"]=this.buildAttributesMap(N1.tagExp,m6,N1.tagName)),this.addChild(A1,X1,m6,l6)}l6=N1.closeIndex+1}else if(T6.substr(l6+1,3)==="!--"){let N1=a(T6,"-->",l6+4,"Comment is not closed.");if(this.options.commentPropName){let X1=T6.substring(l6+4,N1-2);F6=this.saveTextToParentTag(F6,A1,m6),A1.add(this.options.commentPropName,[{[this.options.textNodeName]:X1}])}l6=N1}else if(T6.substr(l6+1,2)==="!D"){let N1=R(T6,l6);this.docTypeEntities=N1.entities,l6=N1.i}else if(T6.substr(l6+1,2)==="!["){let N1=a(T6,"]]>",l6,"CDATA is not closed.")-2,X1=T6.substring(l6+9,N1);F6=this.saveTextToParentTag(F6,A1,m6);let k1=this.parseTextData(X1,A1.tagname,m6,!0,!1,!0,!0);k1==null&&(k1=""),this.options.cdataPropName?A1.add(this.options.cdataPropName,[{[this.options.textNodeName]:X1}]):A1.add(this.options.textNodeName,k1),l6=N1+2}else{let N1=r(T6,l6,this.options.removeNSPrefix),X1=N1.tagName,k1=N1.rawTagName,i1=N1.tagExp,t8=N1.attrExpPresent,s8=N1.closeIndex;this.options.transformTagName&&(X1=this.options.transformTagName(X1)),A1&&F6&&A1.tagname!=="!xml"&&(F6=this.saveTextToParentTag(F6,A1,m6,!1));let _7=A1;_7&&this.options.unpairedTags.indexOf(_7.tagname)!==-1&&(A1=this.tagsNodeStack.pop(),m6=m6.substring(0,m6.lastIndexOf("."))),X1!==v6.tagname&&(m6+=m6?"."+X1:X1);let X7=l6;if(this.isItStopNode(this.options.stopNodes,m6,X1)){let RA="";if(i1.length>0&&i1.lastIndexOf("/")===i1.length-1)X1[X1.length-1]==="/"?(X1=X1.substr(0,X1.length-1),m6=m6.substr(0,m6.length-1),i1=X1):i1=i1.substr(0,i1.length-1),l6=N1.closeIndex;else if(this.options.unpairedTags.indexOf(X1)!==-1)l6=N1.closeIndex;else{let Fq=this.readStopNodeData(T6,k1,s8+1);if(!Fq)throw Error(`Unexpected end of ${k1}`);l6=Fq.i,RA=Fq.tagContent}let M7=new y(X1);X1!==i1&&t8&&(M7[":@"]=this.buildAttributesMap(i1,m6,X1)),RA&&(RA=this.parseTextData(RA,X1,m6,!0,t8,!0,!0)),m6=m6.substr(0,m6.lastIndexOf(".")),M7.add(this.options.textNodeName,RA),this.addChild(A1,M7,m6,X7)}else{if(i1.length>0&&i1.lastIndexOf("/")===i1.length-1){X1[X1.length-1]==="/"?(X1=X1.substr(0,X1.length-1),m6=m6.substr(0,m6.length-1),i1=X1):i1=i1.substr(0,i1.length-1),this.options.transformTagName&&(X1=this.options.transformTagName(X1));let RA=new y(X1);X1!==i1&&t8&&(RA[":@"]=this.buildAttributesMap(i1,m6,X1)),this.addChild(A1,RA,m6,X7),m6=m6.substr(0,m6.lastIndexOf("."))}else{let RA=new y(X1);this.tagsNodeStack.push(A1),X1!==i1&&t8&&(RA[":@"]=this.buildAttributesMap(i1,m6,X1)),this.addChild(A1,RA,m6,X7),A1=RA}F6="",l6=s8}}else F6+=T6[l6];return v6.child};function P6(T6,v6,A1,F6){this.options.captureMetaData||(F6=void 0);let m6=this.options.updateTag(v6.tagname,A1,v6[":@"]);m6===!1||(typeof m6=="string"?(v6.tagname=m6,T6.addChild(v6,F6)):T6.addChild(v6,F6))}let A6=function(T6){if(this.options.processEntities){for(let v6 in this.docTypeEntities){let A1=this.docTypeEntities[v6];T6=T6.replace(A1.regx,A1.val)}for(let v6 in this.lastEntities){let A1=this.lastEntities[v6];T6=T6.replace(A1.regex,A1.val)}if(this.options.htmlEntities)for(let v6 in this.htmlEntities){let A1=this.htmlEntities[v6];T6=T6.replace(A1.regex,A1.val)}T6=T6.replace(this.ampEntity.regex,this.ampEntity.val)}return T6};function K6(T6,v6,A1,F6){return T6&&(F6===void 0&&(F6=v6.child.length===0),(T6=this.parseTextData(T6,v6.tagname,A1,!1,!!v6[":@"]&&Object.keys(v6[":@"]).length!==0,F6))!==void 0&&T6!==""&&v6.add(this.options.textNodeName,T6),T6=""),T6}function z6(T6,v6,A1){let F6="*."+A1;for(let m6 in T6){let l6=T6[m6];if(F6===l6||v6===l6)return!0}return!1}function a(T6,v6,A1,F6){let m6=T6.indexOf(v6,A1);if(m6===-1)throw Error(F6);return m6+v6.length-1}function r(T6,v6,A1,F6=">"){let m6=function(s8,_7,X7=">"){let RA,M7="";for(let Fq=_7;Fq<s8.length;Fq++){let aA=s8[Fq];if(RA)aA===RA&&(RA="");else if(aA==='"'||aA==="'")RA=aA;else if(aA===X7[0]){if(!X7[1])return{data:M7,index:Fq};if(s8[Fq+1]===X7[1])return{data:M7,index:Fq}}else aA==="\t"&&(aA=" ");M7+=aA}}(T6,v6+1,F6);if(!m6)return;let{data:l6,index:N1}=m6,X1=l6.search(/\s/),k1=l6,i1=!0;X1!==-1&&(k1=l6.substring(0,X1),l6=l6.substring(X1+1).trimStart());let t8=k1;if(A1){let s8=k1.indexOf(":");s8!==-1&&(k1=k1.substr(s8+1),i1=k1!==m6.data.substr(s8+1))}return{tagName:k1,tagExp:l6,closeIndex:N1,attrExpPresent:i1,rawTagName:t8}}function X6(T6,v6,A1){let F6=A1,m6=1;for(;A1<T6.length;A1++)if(T6[A1]==="<")if(T6[A1+1]==="/"){let l6=a(T6,">",A1,`${v6} is not closed`);if(T6.substring(A1+2,l6).trim()===v6&&(m6--,m6===0))return{tagContent:T6.substring(F6,A1),i:l6};A1=l6}else if(T6[A1+1]==="?")A1=a(T6,"?>",A1+1,"StopNode is not closed.");else if(T6.substr(A1+1,3)==="!--")A1=a(T6,"-->",A1+3,"StopNode is not closed.");else if(T6.substr(A1+1,2)==="![")A1=a(T6,"]]>",A1,"StopNode is not closed.")-2;else{let l6=r(T6,A1,">");l6&&((l6&&l6.tagName)===v6&&l6.tagExp[l6.tagExp.length-1]!=="/"&&m6++,A1=l6.closeIndex)}}function O6(T6,v6,A1){if(v6&&typeof T6=="string"){let F6=T6.trim();return F6==="true"||F6!=="false"&&function(m6,l6={}){if(l6=Object.assign({},t,l6),!m6||typeof m6!="string")return m6;let N1=m6.trim();if(l6.skipLike!==void 0&&l6.skipLike.test(N1))return m6;if(m6==="0")return 0;if(l6.hex&&d.test(N1))return function(k1){if(parseInt)return parseInt(k1,16);if(Number.parseInt)return Number.parseInt(k1,16);if(window&&window.parseInt)return window.parseInt(k1,16);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}(N1);if(N1.search(/.+[eE].+/)!==-1)return function(k1,i1,t8){if(!t8.eNotation)return k1;let s8=i1.match(s);if(s8){let _7=s8[1]||"",X7=s8[3].indexOf("e")===-1?"E":"e",RA=s8[2],M7=_7?k1[RA.length+1]===X7:k1[RA.length]===X7;return RA.length>1&&M7?k1:RA.length!==1||!s8[3].startsWith(`.${X7}`)&&s8[3][0]!==X7?t8.leadingZeros&&!M7?(i1=(s8[1]||"")+s8[3],Number(i1)):k1:Number(i1)}return k1}(m6,N1,l6);{let k1=l.exec(N1);if(k1){let i1=k1[1]||"",t8=k1[2],s8=(X1=k1[3])&&X1.indexOf(".")!==-1?((X1=X1.replace(/0+$/,""))==="."?X1="0":X1[0]==="."?X1="0"+X1:X1[X1.length-1]==="."&&(X1=X1.substring(0,X1.length-1)),X1):X1,_7=i1?m6[t8.length+1]===".":m6[t8.length]===".";if(!l6.leadingZeros&&(t8.length>1||t8.length===1&&!_7))return m6;{let X7=Number(N1),RA=String(X7);if(X7===0||X7===-0)return X7;if(RA.search(/[eE]/)!==-1)return l6.eNotation?X7:m6;if(N1.indexOf(".")!==-1)return RA==="0"||RA===s8||RA===`${i1}${s8}`?X7:m6;let M7=t8?s8:N1;return t8?M7===RA||i1+M7===RA?X7:m6:M7===RA||M7===i1+RA?X7:m6}}return m6}var X1}(T6,A1)}return T6!==void 0?T6:""}let D6=y.getMetaDataSymbol();function y6(T6,v6){return C6(T6,v6)}function C6(T6,v6,A1){let F6,m6={};for(let l6=0;l6<T6.length;l6++){let N1=T6[l6],X1=h6(N1),k1="";if(k1=A1===void 0?X1:A1+"."+X1,X1===v6.textNodeName)F6===void 0?F6=N1[X1]:F6+=""+N1[X1];else{if(X1===void 0)continue;if(N1[X1]){let i1=C6(N1[X1],v6,k1),t8=M6(i1,v6);N1[D6]!==void 0&&(i1[D6]=N1[D6]),N1[":@"]?f6(i1,N1[":@"],k1,v6):Object.keys(i1).length!==1||i1[v6.textNodeName]===void 0||v6.alwaysCreateTextNode?Object.keys(i1).length===0&&(v6.alwaysCreateTextNode?i1[v6.textNodeName]="":i1=""):i1=i1[v6.textNodeName],m6[X1]!==void 0&&m6.hasOwnProperty(X1)?(Array.isArray(m6[X1])||(m6[X1]=[m6[X1]]),m6[X1].push(i1)):v6.isArray(X1,k1,t8)?m6[X1]=[i1]:m6[X1]=i1}}}return typeof F6=="string"?F6.length>0&&(m6[v6.textNodeName]=F6):F6!==void 0&&(m6[v6.textNodeName]=F6),m6}function h6(T6){let v6=Object.keys(T6);for(let A1=0;A1<v6.length;A1++){let F6=v6[A1];if(F6!==":@")return F6}}function f6(T6,v6,A1,F6){if(v6){let m6=Object.keys(v6),l6=m6.length;for(let N1=0;N1<l6;N1++){let X1=m6[N1];F6.isArray(X1,A1+"."+X1,!0,!0)?T6[X1]=[v6[X1]]:T6[X1]=v6[X1]}}}function M6(T6,v6){let{textNodeName:A1}=v6,F6=Object.keys(T6).length;return F6===0||!(F6!==1||!T6[A1]&&typeof T6[A1]!="boolean"&&T6[A1]!==0)}class V6{constructor(T6){this.externalEntities={},this.options=function(v6){return Object.assign({},N,v6)}(T6)}parse(T6,v6){if(typeof T6=="string");else{if(!T6.toString)throw Error("XML data is accepted in String or Bytes[] form.");T6=T6.toString()}if(v6){v6===!0&&(v6={});let m6=$(T6,v6);if(m6!==!0)throw Error(`${m6.err.msg}:${m6.err.line}:${m6.err.col}`)}let A1=new Z6(this.options);A1.addExternalEntities(this.externalEntities);let F6=A1.parseXml(T6);return this.options.preserveOrder||F6===void 0?F6:y6(F6,this.options)}addEntity(T6,v6){if(v6.indexOf("&")!==-1)throw Error("Entity value can't have '&'");if(T6.indexOf("&")!==-1||T6.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(v6==="&")throw Error("An entity with value '&' is not permitted");this.externalEntities[T6]=v6}static getMetaDataSymbol(){return y.getMetaDataSymbol()}}function p6(T6,v6){let A1="";return v6.format&&v6.indentBy.length>0&&(A1=`
`),b6(T6,v6,"",A1)}function b6(T6,v6,A1,F6){let m6="",l6=!1;for(let N1=0;N1<T6.length;N1++){let X1=T6[N1],k1=R6(X1);if(k1===void 0)continue;let i1="";if(i1=A1.length===0?k1:`${A1}.${k1}`,k1===v6.textNodeName){let X7=X1[k1];d6(i1,v6)||(X7=v6.tagValueProcessor(k1,X7),X7=t6(X7,v6)),l6&&(m6+=F6),m6+=X7,l6=!1;continue}if(k1===v6.cdataPropName){l6&&(m6+=F6),m6+=`<![CDATA[${X1[k1][0][v6.textNodeName]}]]>`,l6=!1;continue}if(k1===v6.commentPropName){m6+=F6+`<!--${X1[k1][0][v6.textNodeName]}-->`,l6=!0;continue}if(k1[0]==="?"){let X7=x6(X1[":@"],v6),RA=k1==="?xml"?"":F6,M7=X1[k1][0][v6.textNodeName];M7=M7.length!==0?" "+M7:"",m6+=RA+`<${k1}${M7}${X7}?>`,l6=!0;continue}let t8=F6;t8!==""&&(t8+=v6.indentBy);let s8=F6+`<${k1}${x6(X1[":@"],v6)}`,_7=b6(X1[k1],v6,i1,t8);v6.unpairedTags.indexOf(k1)!==-1?v6.suppressUnpairedNode?m6+=s8+">":m6+=s8+"/>":_7&&_7.length!==0||!v6.suppressEmptyNode?_7&&_7.endsWith(">")?m6+=s8+`>${_7}${F6}</${k1}>`:(m6+=s8+">",_7&&F6!==""&&(_7.includes("/>")||_7.includes("</"))?m6+=F6+v6.indentBy+_7+F6:m6+=_7,m6+=`</${k1}>`):m6+=s8+"/>",l6=!0}return m6}function R6(T6){let v6=Object.keys(T6);for(let A1=0;A1<v6.length;A1++){let F6=v6[A1];if(T6.hasOwnProperty(F6)&&F6!==":@")return F6}}function x6(T6,v6){let A1="";if(T6&&!v6.ignoreAttributes)for(let F6 in T6){if(!T6.hasOwnProperty(F6))continue;let m6=v6.attributeValueProcessor(F6,T6[F6]);m6=t6(m6,v6),m6===!0&&v6.suppressBooleanAttributes?A1+=` ${F6.substr(v6.attributeNamePrefix.length)}`:A1+=` ${F6.substr(v6.attributeNamePrefix.length)}="${m6}"`}return A1}function d6(T6,v6){let A1=(T6=T6.substr(0,T6.length-v6.textNodeName.length-1)).substr(T6.lastIndexOf(".")+1);for(let F6 in v6.stopNodes)if(v6.stopNodes[F6]===T6||v6.stopNodes[F6]==="*."+A1)return!0;return!1}function t6(T6,v6){if(T6&&T6.length>0&&v6.processEntities)for(let A1=0;A1<v6.entities.length;A1++){let F6=v6.entities[A1];T6=T6.replace(F6.regex,F6.val)}return T6}let L6={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(T6,v6){return v6},attributeValueProcessor:function(T6,v6){return v6},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function u6(T6){this.options=Object.assign({},L6,T6),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=H6(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Z1),this.processTextOrObjNode=e6,this.options.format?(this.indentate=H1,this.tagEndChar=`>
`,this.newLine=`
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function e6(T6,v6,A1,F6){let m6=this.j2x(T6,A1+1,F6.concat(v6));return T6[this.options.textNodeName]!==void 0&&Object.keys(T6).length===1?this.buildTextValNode(T6[this.options.textNodeName],v6,m6.attrStr,A1):this.buildObjectNode(m6.val,v6,m6.attrStr,A1)}function H1(T6){return this.options.indentBy.repeat(T6)}function Z1(T6){return!(!T6.startsWith(this.options.attributeNamePrefix)||T6===this.options.textNodeName)&&T6.substr(this.attrPrefixLen)}u6.prototype.build=function(T6){return this.options.preserveOrder?p6(T6,this.options):(Array.isArray(T6)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(T6={[this.options.arrayNodeName]:T6}),this.j2x(T6,0,[]).val)},u6.prototype.j2x=function(T6,v6,A1){let F6="",m6="",l6=A1.join(".");for(let N1 in T6)if(Object.prototype.hasOwnProperty.call(T6,N1))if(T6[N1]===void 0)this.isAttribute(N1)&&(m6+="");else if(T6[N1]===null)this.isAttribute(N1)||N1===this.options.cdataPropName?m6+="":N1[0]==="?"?m6+=this.indentate(v6)+"<"+N1+"?"+this.tagEndChar:m6+=this.indentate(v6)+"<"+N1+"/"+this.tagEndChar;else if(T6[N1]instanceof Date)m6+=this.buildTextValNode(T6[N1],N1,"",v6);else if(typeof T6[N1]!="object"){let X1=this.isAttribute(N1);if(X1&&!this.ignoreAttributesFn(X1,l6))F6+=this.buildAttrPairStr(X1,""+T6[N1]);else if(!X1)if(N1===this.options.textNodeName){let k1=this.options.tagValueProcessor(N1,""+T6[N1]);m6+=this.replaceEntitiesValue(k1)}else m6+=this.buildTextValNode(T6[N1],N1,"",v6)}else if(Array.isArray(T6[N1])){let X1=T6[N1].length,k1="",i1="";for(let t8=0;t8<X1;t8++){let s8=T6[N1][t8];if(s8===void 0);else if(s8===null)N1[0]==="?"?m6+=this.indentate(v6)+"<"+N1+"?"+this.tagEndChar:m6+=this.indentate(v6)+"<"+N1+"/"+this.tagEndChar;else if(typeof s8=="object")if(this.options.oneListGroup){let _7=this.j2x(s8,v6+1,A1.concat(N1));k1+=_7.val,this.options.attributesGroupName&&s8.hasOwnProperty(this.options.attributesGroupName)&&(i1+=_7.attrStr)}else k1+=this.processTextOrObjNode(s8,N1,v6,A1);else if(this.options.oneListGroup){let _7=this.options.tagValueProcessor(N1,s8);_7=this.replaceEntitiesValue(_7),k1+=_7}else k1+=this.buildTextValNode(s8,N1,"",v6)}this.options.oneListGroup&&(k1=this.buildObjectNode(k1,N1,i1,v6)),m6+=k1}else if(this.options.attributesGroupName&&N1===this.options.attributesGroupName){let X1=Object.keys(T6[N1]),k1=X1.length;for(let i1=0;i1<k1;i1++)F6+=this.buildAttrPairStr(X1[i1],""+T6[N1][X1[i1]])}else m6+=this.processTextOrObjNode(T6[N1],N1,v6,A1);return{attrStr:F6,val:m6}},u6.prototype.buildAttrPairStr=function(T6,v6){return v6=this.options.attributeValueProcessor(T6,""+v6),v6=this.replaceEntitiesValue(v6),this.options.suppressBooleanAttributes&&v6==="true"?" "+T6:" "+T6+'="'+v6+'"'},u6.prototype.buildObjectNode=function(T6,v6,A1,F6){if(T6==="")return v6[0]==="?"?this.indentate(F6)+"<"+v6+A1+"?"+this.tagEndChar:this.indentate(F6)+"<"+v6+A1+this.closeTag(v6)+this.tagEndChar;{let m6="</"+v6+this.tagEndChar,l6="";return v6[0]==="?"&&(l6="?",m6=""),!A1&&A1!==""||T6.indexOf("<")!==-1?this.options.commentPropName!==!1&&v6===this.options.commentPropName&&l6.length===0?this.indentate(F6)+`<!--${T6}-->`+this.newLine:this.indentate(F6)+"<"+v6+A1+l6+this.tagEndChar+T6+this.indentate(F6)+m6:this.indentate(F6)+"<"+v6+A1+l6+">"+T6+m6}},u6.prototype.closeTag=function(T6){let v6="";return this.options.unpairedTags.indexOf(T6)!==-1?this.options.suppressUnpairedNode||(v6="/"):v6=this.options.suppressEmptyNode?"/":`></${T6}`,v6},u6.prototype.buildTextValNode=function(T6,v6,A1,F6){if(this.options.cdataPropName!==!1&&v6===this.options.cdataPropName)return this.indentate(F6)+`<![CDATA[${T6}]]>`+this.newLine;if(this.options.commentPropName!==!1&&v6===this.options.commentPropName)return this.indentate(F6)+`<!--${T6}-->`+this.newLine;if(v6[0]==="?")return this.indentate(F6)+"<"+v6+A1+"?"+this.tagEndChar;{let m6=this.options.tagValueProcessor(v6,T6);return m6=this.replaceEntitiesValue(m6),m6===""?this.indentate(F6)+"<"+v6+A1+this.closeTag(v6)+this.tagEndChar:this.indentate(F6)+"<"+v6+A1+">"+m6+"</"+v6+this.tagEndChar}},u6.prototype.replaceEntitiesValue=function(T6){if(T6&&T6.length>0&&this.options.processEntities)for(let v6=0;v6<this.options.entities.length;v6++){let A1=this.options.entities[v6];T6=T6.replace(A1.regex,A1.val)}return T6};let v1={validate:$};F_7.exports=q})()});var p_7=C((U_7)=>{Object.defineProperty(U_7,"__esModule",{value:!0});U_7.parseXML=Bn3;var un3=Q_7(),AY8=new un3.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(A,q)=>q.trim()===""&&q.includes(`
`)?"":void 0});AY8.addEntity("#xD","\r");AY8.addEntity("#10",`
`);function Bn3(A){return AY8.parse(A,!0)}});var KY8=C((d_7)=>{var gn3=p_7();function Fn3(A){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Qn3(A){return A.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class qY8{value;constructor(A){this.value=A}toString(){return Qn3(""+this.value)}}class zB6{name;children;attributes={};static of(A,q,K){let Y=new zB6(A);if(q!==void 0)Y.addChildNode(new qY8(q));if(K!==void 0)Y.withName(K);return Y}constructor(A,q=[]){this.name=A,this.children=q}withName(A){return this.name=A,this}addAttribute(A,q){return this.attributes[A]=q,this}addChildNode(A){return this.children.push(A),this}removeAttribute(A){return delete this.attributes[A],this}n(A){return this.name=A,this}c(A){return this.children.push(A),this}a(A,q){if(q!=null)this.attributes[A]=q;return this}cc(A,q,K=q){if(A[q]!=null){let Y=zB6.of(q,A[q]).withName(K);this.c(Y)}}l(A,q,K,Y){if(A[q]!=null)Y().map((w)=>{w.withName(K),this.c(w)})}lc(A,q,K,Y){if(A[q]!=null){let z=Y(),w=new zB6(K);z.map((_)=>{w.c(_)}),this.c(w)}}toString(){let A=Boolean(this.children.length),q=`<${this.name}`,K=this.attributes;for(let Y of Object.keys(K)){let z=K[Y];if(z!=null)q+=` ${Y}="${Fn3(""+z)}"`}return q+=!A?"/>":`>${this.children.map((Y)=>Y.toString()).join("")}</${this.name}>`}}Object.defineProperty(d_7,"parseXML",{enumerable:!0,get:function(){return gn3.parseXML}});d_7.XmlNode=zB6;d_7.XmlText=qY8});var O$=C((Hr3)=>{var zY8=$21(),Xt=pw(),c_7=EM(),dn3=ON(),l_7=l58(),i_7=d98(),G2=lO(),Tc=a98(),C0=MN(),oX=JN(),_B6=e98(),e_7=Z2(),SR=KY8(),YY8={warningEmitted:!1},cn3=(A)=>{if(A&&!YY8.warningEmitted&&parseInt(A.substring(1,A.indexOf(".")))<18)YY8.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
no longer support Node.js 16.x on January 6, 2025.

To continue receiving updates to AWS services, bug fixes, and security
updates please upgrade to a supported Node.js LTS version.

More information can be found at: https://a.co/74kJMmI`)};function ln3(A,q,K){if(!A.$source)A.$source={};return A.$source[q]=K,A}function in3(A,q,K){if(!A.__aws_sdk_context)A.__aws_sdk_context={features:{}};else if(!A.__aws_sdk_context.features)A.__aws_sdk_context.features={};A.__aws_sdk_context.features[q]=K}function nn3(A,q,K){if(!A.$source)A.$source={};return A.$source[q]=K,A}var n_7=(A)=>zY8.HttpResponse.isInstance(A)?A.headers?.date??A.headers?.Date:void 0,wY8=(A)=>new Date(Date.now()+A),rn3=(A,q)=>Math.abs(wY8(q).getTime()-A)>=300000,r_7=(A,q)=>{let K=Date.parse(A);if(rn3(K,q))return K-Date.now();return q},wB6=(A,q)=>{if(!q)throw Error(`Property \`${A}\` is not resolved for AWS SDK SigV4Auth`);return q},_Y8=async(A)=>{let q=wB6("context",A.context),K=wB6("config",A.config),Y=q.endpointV2?.properties?.authSchemes?.[0],w=await wB6("signer",K.signer)(Y),_=A?.signingRegion,$=A?.signingRegionSet,O=A?.signingName;return{config:K,signer:w,signingRegion:_,signingRegionSet:$,signingName:O}};class S21{async sign(A,q,K){if(!zY8.HttpRequest.isInstance(A))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let Y=await _Y8(K),{config:z,signer:w}=Y,{signingRegion:_,signingName:$}=Y,O=K.context;if(O?.authSchemes?.length??!1){let[j,J]=O.authSchemes;if(j?.name==="sigv4a"&&J?.name==="sigv4")_=J?.signingRegion??_,$=J?.signingName??$}return await w.sign(A,{signingDate:wY8(z.systemClockOffset),signingRegion:_,signingService:$})}errorHandler(A){return(q)=>{let K=q.ServerTime??n_7(q.$response);if(K){let Y=wB6("config",A.config),z=Y.systemClockOffset;if(Y.systemClockOffset=r_7(K,Y.systemClockOffset),Y.systemClockOffset!==z&&q.$metadata)q.$metadata.clockSkewCorrected=!0}throw q}}successHandler(A,q){let K=n_7(A);if(K){let Y=wB6("config",q.config);Y.systemClockOffset=r_7(K,Y.systemClockOffset)}}}var on3=S21;class A$7 extends S21{async sign(A,q,K){if(!zY8.HttpRequest.isInstance(A))throw Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:Y,signer:z,signingRegion:w,signingRegionSet:_,signingName:$}=await _Y8(K),H=(await Y.sigv4aSigningRegionSet?.()??_??[w]).join(",");return await z.sign(A,{signingDate:wY8(Y.systemClockOffset),signingRegion:H,signingService:$})}}var o_7=(A)=>typeof A==="string"&&A.length>0?A.split(",").map((q)=>q.trim()):[],q$7=(A)=>`AWS_BEARER_TOKEN_${A.replace(/[\s-]/g,"_").toUpperCase()}`,a_7="AWS_AUTH_SCHEME_PREFERENCE",s_7="auth_scheme_preference",an3={environmentVariableSelector:(A,q)=>{if(q?.signingName){if(q$7(q.signingName)in A)return["httpBearerAuth"]}if(!(a_7 in A))return;return o_7(A[a_7])},configFileSelector:(A)=>{if(!(s_7 in A))return;return o_7(A[s_7])},default:[]},sn3=(A)=>{return A.sigv4aSigningRegionSet=Xt.normalizeProvider(A.sigv4aSigningRegionSet),A},tn3={environmentVariableSelector(A){if(A.AWS_SIGV4A_SIGNING_REGION_SET)return A.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((q)=>q.trim());throw new c_7.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(A){if(A.sigv4a_signing_region_set)return(A.sigv4a_signing_region_set??"").split(",").map((q)=>q.trim());throw new c_7.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},K$7=(A)=>{let q=A.credentials,K=!!A.credentials,Y=void 0;Object.defineProperty(A,"credentials",{set(H){if(H&&H!==q&&H!==Y)K=!0;q=H;let j=Ar3(A,{credentials:q,credentialDefaultProvider:A.credentialDefaultProvider}),J=qr3(A,j);if(K&&!J.attributed)Y=async(M)=>J(M).then((D)=>dn3.setCredentialFeature(D,"CREDENTIALS_CODE","e")),Y.memoized=J.memoized,Y.configBound=J.configBound,Y.attributed=!0;else Y=J},get(){return Y},enumerable:!0,configurable:!0}),A.credentials=q;let{signingEscapePath:z=!0,systemClockOffset:w=A.systemClockOffset||0,sha256:_}=A,$;if(A.signer)$=Xt.normalizeProvider(A.signer);else if(A.regionInfoProvider)$=()=>Xt.normalizeProvider(A.region)().then(async(H)=>[await A.regionInfoProvider(H,{useFipsEndpoint:await A.useFipsEndpoint(),useDualstackEndpoint:await A.useDualstackEndpoint()})||{},H]).then(([H,j])=>{let{signingRegion:J,signingService:M}=H;A.signingRegion=A.signingRegion||J||j,A.signingName=A.signingName||M||A.serviceId;let D={...A,credentials:A.credentials,region:A.signingRegion,service:A.signingName,sha256:_,uriEscapePath:z};return new(A.signerConstructor||l_7.SignatureV4)(D)});else $=async(H)=>{H=Object.assign({},{name:"sigv4",signingName:A.signingName||A.defaultSigningName,signingRegion:await Xt.normalizeProvider(A.region)(),properties:{}},H);let{signingRegion:j,signingName:J}=H;A.signingRegion=A.signingRegion||j,A.signingName=A.signingName||J||A.serviceId;let M={...A,credentials:A.credentials,region:A.signingRegion,service:A.signingName,sha256:_,uriEscapePath:z};return new(A.signerConstructor||l_7.SignatureV4)(M)};return Object.assign(A,{systemClockOffset:w,signingEscapePath:z,signer:$})},en3=K$7;function Ar3(A,{credentials:q,credentialDefaultProvider:K}){let Y;if(q)if(!q?.memoized)Y=Xt.memoizeIdentityProvider(q,Xt.isIdentityExpired,Xt.doesIdentityRequireRefresh);else Y=q;else if(K)Y=Xt.normalizeProvider(K(Object.assign({},A,{parentClientConfig:A})));else Y=async()=>{throw Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return Y.memoized=!0,Y}function qr3(A,q){if(q.configBound)return q;let K=async(Y)=>q({...Y,callerClientConfig:A});return K.memoized=q.memoized,K.configBound=!0,K}class jP6{queryCompat;constructor(A=!1){this.queryCompat=A}resolveRestContentType(A,q){let K=q.getMemberSchemas(),Y=Object.values(K).find((z)=>{return!!z.getMergedTraits().httpPayload});if(Y){let z=Y.getMergedTraits().mediaType;if(z)return z;else if(Y.isStringSchema())return"text/plain";else if(Y.isBlobSchema())return"application/octet-stream";else return A}else if(!q.isUnitSchema()){if(Object.values(K).find((w)=>{let{httpQuery:_,httpQueryParams:$,httpHeader:O,httpLabel:H,httpPrefixHeaders:j}=w.getMergedTraits();return!_&&!$&&!O&&!H&&j===void 0}))return A}}async getErrorSchemaOrThrowBaseException(A,q,K,Y,z,w){let _=q,$=A;if(A.includes("#"))[_,$]=A.split("#");let O={$metadata:z,$fault:K.statusCode<500?"client":"server"},H=G2.TypeRegistry.for(_);try{return{errorSchema:w?.(H,$)??H.getSchema(A),errorMetadata:O}}catch(j){Y.message=Y.message??Y.Message??"UnknownError";let J=G2.TypeRegistry.for("smithy.ts.sdk.synthetic."+_),M=J.getBaseException();if(M){let D=J.getErrorCtor(M)??Error;throw this.decorateServiceException(Object.assign(new D({name:$}),O),Y)}throw this.decorateServiceException(Object.assign(Error($),O),Y)}}decorateServiceException(A,q={}){if(this.queryCompat){let K=A.Message??q.Message,Y=Tc.decorateServiceException(A,q);if(K)Y.Message=K,Y.message=K;return Y}return Tc.decorateServiceException(A,q)}setQueryCompatError(A,q){let K=q.headers?.["x-amzn-query-error"];if(A!==void 0&&K!=null){let[Y,z]=K.split(";"),w=Object.entries(A),_={Code:Y,Type:z};Object.assign(A,_);for(let[$,O]of w)_[$]=O;delete _.__type,A.Error=_}}queryCompatOutput(A,q){if(A.Error)q.Error=A.Error;if(A.Type)q.Type=A.Type;if(A.Code)q.Code=A.Code}}class Y$7 extends i_7.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:A,awsQueryCompatible:q}){super({defaultNamespace:A});this.awsQueryCompatible=!!q,this.mixin=new jP6(this.awsQueryCompatible)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(this.awsQueryCompatible)Y.headers["x-amzn-query-mode"]="true";return Y}async handleError(A,q,K,Y,z){if(this.awsQueryCompatible)this.mixin.setQueryCompatError(Y,K);let w=i_7.loadSmithyRpcV2CborErrorCode(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=G2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(G2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H),M={};for(let[D,X]of O.structIterator())M[D]=this.deserializer.readValue(X,Y[D]);if(this.awsQueryCompatible)this.mixin.queryCompatOutput(Y,M);throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}}var Kr3=(A)=>{if(A==null)return A;if(typeof A==="number"||typeof A==="bigint"){let q=Error(`Received number ${A} where a string was expected.`);return q.name="Warning",console.warn(q),String(A)}if(typeof A==="boolean"){let q=Error(`Received boolean ${A} where a string was expected.`);return q.name="Warning",console.warn(q),String(A)}return A},Yr3=(A)=>{if(A==null)return A;if(typeof A==="string"){let q=A.toLowerCase();if(A!==""&&q!=="false"&&q!=="true"){let K=Error(`Received string "${A}" where a boolean was expected.`);K.name="Warning",console.warn(K)}return A!==""&&q!=="false"}return A},zr3=(A)=>{if(A==null)return A;if(typeof A==="string"){let q=Number(A);if(q.toString()!==A){let K=Error(`Received string "${A}" where a number was expected.`);return K.name="Warning",console.warn(K),A}return q}return A};class Pt{serdeContext;setSerdeContext(A){this.serdeContext=A}}function wr3(A,q,K){if(K?.source){let Y=K.source;if(typeof q==="number"){if(q>Number.MAX_SAFE_INTEGER||q<Number.MIN_SAFE_INTEGER||Y!==String(q))if(Y.includes("."))return new oX.NumericValue(Y,"bigDecimal");else return BigInt(Y)}}return q}var z$7=(A,q)=>Tc.collectBody(A,q).then((K)=>(q?.utf8Encoder??e_7.toUtf8)(K)),$Y8=(A,q)=>z$7(A,q).then((K)=>{if(K.length)try{return JSON.parse(K)}catch(Y){if(Y?.name==="SyntaxError")Object.defineProperty(Y,"$responseBodyText",{value:K});throw Y}return{}}),_r3=async(A,q)=>{let K=await $Y8(A,q);return K.message=K.message??K.Message,K},OY8=(A,q)=>{let K=(w,_)=>Object.keys(w).find(($)=>$.toLowerCase()===_.toLowerCase()),Y=(w)=>{let _=w;if(typeof _==="number")_=_.toString();if(_.indexOf(",")>=0)_=_.split(",")[0];if(_.indexOf(":")>=0)_=_.split(":")[0];if(_.indexOf("#")>=0)_=_.split("#")[1];return _},z=K(A.headers,"x-amzn-errortype");if(z!==void 0)return Y(A.headers[z]);if(q&&typeof q==="object"){let w=K(q,"code");if(w&&q[w]!==void 0)return Y(q[w]);if(q.__type!==void 0)return Y(q.__type)}};class HY8 extends Pt{settings;constructor(A){super();this.settings=A}async read(A,q){return this._read(A,typeof q==="string"?JSON.parse(q,wr3):await $Y8(q,this.serdeContext))}readObject(A,q){return this._read(A,q)}_read(A,q){let K=q!==null&&typeof q==="object",Y=G2.NormalizedSchema.of(A);if(Y.isListSchema()&&Array.isArray(q)){let w=Y.getValueSchema(),_=[],$=!!Y.getMergedTraits().sparse;for(let O of q)if($||O!=null)_.push(this._read(w,O));return _}else if(Y.isMapSchema()&&K){let w=Y.getValueSchema(),_={},$=!!Y.getMergedTraits().sparse;for(let[O,H]of Object.entries(q))if($||H!=null)_[O]=this._read(w,H);return _}else if(Y.isStructSchema()&&K){let w={};for(let[_,$]of Y.structIterator()){let O=this.settings.jsonName?$.getMergedTraits().jsonName??_:_,H=this._read($,q[O]);if(H!=null)w[_]=H}return w}if(Y.isBlobSchema()&&typeof q==="string")return _B6.fromBase64(q);let z=Y.getMergedTraits().mediaType;if(Y.isStringSchema()&&typeof q==="string"&&z){if(z==="application/json"||z.endsWith("+json"))return oX.LazyJsonString.from(q)}if(Y.isTimestampSchema()&&q!=null)switch(C0.determineTimestampFormat(Y,this.settings)){case 5:return oX.parseRfc3339DateTimeWithOffset(q);case 6:return oX.parseRfc7231DateTime(q);case 7:return oX.parseEpochTimestamp(q);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",q),new Date(q)}if(Y.isBigIntegerSchema()&&(typeof q==="number"||typeof q==="string"))return BigInt(q);if(Y.isBigDecimalSchema()&&q!=null){if(q instanceof oX.NumericValue)return q;let w=q;if(w.type==="bigDecimal"&&"string"in w)return new oX.NumericValue(w.string,w.type);return new oX.NumericValue(String(q),"bigDecimal")}if(Y.isNumericSchema()&&typeof q==="string")switch(q){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}if(Y.isDocumentSchema())if(K){let w=Array.isArray(q)?[]:{};for(let[_,$]of Object.entries(q))if($ instanceof oX.NumericValue)w[_]=$;else w[_]=this._read(Y,$);return w}else return structuredClone(q);return q}}var t_7=String.fromCharCode(925);class w$7{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(A,q)=>{if(q instanceof oX.NumericValue){let K=`${t_7+"nv"+this.counter++}_`+q.string;return this.values.set(`"${K}"`,q.string),K}if(typeof q==="bigint"){let K=q.toString(),Y=`${t_7+"b"+this.counter++}_`+K;return this.values.set(`"${Y}"`,K),Y}return q}}replaceInJson(A){if(this.stage===0)throw Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return A;for(let[q,K]of this.values)A=A.replace(q,K);return A}}class jY8 extends Pt{settings;buffer;rootSchema;constructor(A){super();this.settings=A}write(A,q){this.rootSchema=G2.NormalizedSchema.of(A),this.buffer=this._write(this.rootSchema,q)}writeDiscriminatedDocument(A,q){if(this.write(A,q),typeof this.buffer==="object")this.buffer.__type=G2.NormalizedSchema.of(A).getName(!0)}flush(){let{rootSchema:A}=this;if(this.rootSchema=void 0,A?.isStructSchema()||A?.isDocumentSchema()){let q=new w$7;return q.replaceInJson(JSON.stringify(this.buffer,q.createReplacer(),0))}return this.buffer}_write(A,q,K){let Y=q!==null&&typeof q==="object",z=G2.NormalizedSchema.of(A);if(z.isListSchema()&&Array.isArray(q)){let w=z.getValueSchema(),_=[],$=!!z.getMergedTraits().sparse;for(let O of q)if($||O!=null)_.push(this._write(w,O));return _}else if(z.isMapSchema()&&Y){let w=z.getValueSchema(),_={},$=!!z.getMergedTraits().sparse;for(let[O,H]of Object.entries(q))if($||H!=null)_[O]=this._write(w,H);return _}else if(z.isStructSchema()&&Y){let w={};for(let[_,$]of z.structIterator()){let O=this.settings.jsonName?$.getMergedTraits().jsonName??_:_,H=this._write($,q[_],z);if(H!==void 0)w[O]=H}return w}if(q===null&&K?.isStructSchema())return;if(z.isBlobSchema()&&(q instanceof Uint8Array||typeof q==="string")||z.isDocumentSchema()&&q instanceof Uint8Array){if(z===this.rootSchema)return q;return(this.serdeContext?.base64Encoder??_B6.toBase64)(q)}if((z.isTimestampSchema()||z.isDocumentSchema())&&q instanceof Date)switch(C0.determineTimestampFormat(z,this.settings)){case 5:return q.toISOString().replace(".000Z","Z");case 6:return oX.dateToUtcString(q);case 7:return q.getTime()/1000;default:return console.warn("Missing timestamp format, using epoch seconds",q),q.getTime()/1000}if(z.isNumericSchema()&&typeof q==="number"){if(Math.abs(q)===1/0||isNaN(q))return String(q)}if(z.isStringSchema()){if(typeof q>"u"&&z.isIdempotencyToken())return oX.generateIdempotencyToken();let w=z.getMergedTraits().mediaType;if(q!=null&&w){if(w==="application/json"||w.endsWith("+json"))return oX.LazyJsonString.from(q)}}if(z.isDocumentSchema())if(Y){let w=Array.isArray(q)?[]:{};for(let[_,$]of Object.entries(q))if($ instanceof oX.NumericValue)w[_]=$;else w[_]=this._write(z,$);return w}else return structuredClone(q);return q}}class C21 extends Pt{settings;constructor(A){super();this.settings=A}createSerializer(){let A=new jY8(this.settings);return A.setSerdeContext(this.serdeContext),A}createDeserializer(){let A=new HY8(this.settings);return A.setSerdeContext(this.serdeContext),A}}class h21 extends C0.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A});this.serviceTarget=q,this.codec=new C21({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!K,this.mixin=new jP6(this.awsQueryCompatible)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(!Y.path.endsWith("/"))Y.path+="/";if(Object.assign(Y.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${A.name}`}),this.awsQueryCompatible)Y.headers["x-amzn-query-mode"]="true";if(G2.deref(A.input)==="unit"||!Y.body)Y.body="{}";return Y}getPayloadCodec(){return this.codec}async handleError(A,q,K,Y,z){if(this.awsQueryCompatible)this.mixin.setQueryCompatError(Y,K);let w=OY8(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=G2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(G2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H),M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().jsonName??D;M[D]=this.codec.createDeserializer().readObject(X,Y[P])}if(this.awsQueryCompatible)this.mixin.queryCompatOutput(Y,M);throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}}class _$7 extends h21{constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class $$7 extends h21{constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class O$7 extends C0.HttpBindingProtocol{serializer;deserializer;codec;mixin=new jP6;constructor({defaultNamespace:A}){super({defaultNamespace:A});let q={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new C21(q),this.serializer=new C0.HttpInterceptingShapeSerializer(this.codec.createSerializer(),q),this.deserializer=new C0.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),q)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(A){this.codec.setSerdeContext(A),super.setSerdeContext(A)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K),z=G2.NormalizedSchema.of(A.input);if(!Y.headers["content-type"]){let w=this.mixin.resolveRestContentType(this.getDefaultContentType(),z);if(w)Y.headers["content-type"]=w}if(Y.body==null&&Y.headers["content-type"]===this.getDefaultContentType())Y.body="{}";return Y}async deserializeResponse(A,q,K){let Y=await super.deserializeResponse(A,q,K),z=G2.NormalizedSchema.of(A.output);for(let[w,_]of z.structIterator())if(_.getMemberTraits().httpPayload&&!(w in Y))Y[w]=null;return Y}async handleError(A,q,K,Y,z){let w=OY8(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=G2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(G2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H);await this.deserializeHttpMessage(_,q,K,Y);let M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().jsonName??D;M[D]=this.codec.createDeserializer().readObject(X,Y[P])}throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}getDefaultContentType(){return"application/json"}}var $r3=(A)=>{if(A==null)return;if(typeof A==="object"&&"__type"in A)delete A.__type;return Tc.expectUnion(A)};class I21 extends Pt{settings;stringDeserializer;constructor(A){super();this.settings=A,this.stringDeserializer=new C0.FromStringShapeDeserializer(A)}setSerdeContext(A){this.serdeContext=A,this.stringDeserializer.setSerdeContext(A)}read(A,q,K){let Y=G2.NormalizedSchema.of(A),z=Y.getMemberSchemas();if(Y.isStructSchema()&&Y.isMemberSchema()&&!!Object.values(z).find((O)=>{return!!O.getMemberTraits().eventPayload})){let O={},H=Object.keys(z)[0];if(z[H].isBlobSchema())O[H]=q;else O[H]=this.read(z[H],q);return O}let _=(this.serdeContext?.utf8Encoder??e_7.toUtf8)(q),$=this.parseXml(_);return this.readSchema(A,K?$[K]:$)}readSchema(A,q){let K=G2.NormalizedSchema.of(A);if(K.isUnitSchema())return;let Y=K.getMergedTraits();if(K.isListSchema()&&!Array.isArray(q))return this.readSchema(K,[q]);if(q==null)return q;if(typeof q==="object"){let z=!!Y.sparse,w=!!Y.xmlFlattened;if(K.isListSchema()){let $=K.getValueSchema(),O=[],H=$.getMergedTraits().xmlName??"member",j=w?q:(q[0]??q)[H],J=Array.isArray(j)?j:[j];for(let M of J)if(M!=null||z)O.push(this.readSchema($,M));return O}let _={};if(K.isMapSchema()){let $=K.getKeySchema(),O=K.getValueSchema(),H;if(w)H=Array.isArray(q)?q:[q];else H=Array.isArray(q.entry)?q.entry:[q.entry];let j=$.getMergedTraits().xmlName??"key",J=O.getMergedTraits().xmlName??"value";for(let M of H){let D=M[j],X=M[J];if(X!=null||z)_[D]=this.readSchema(O,X)}return _}if(K.isStructSchema()){for(let[$,O]of K.structIterator()){let H=O.getMergedTraits(),j=!H.httpPayload?O.getMemberTraits().xmlName??$:H.xmlName??O.getName();if(q[j]!=null)_[$]=this.readSchema(O,q[j])}return _}if(K.isDocumentSchema())return q;throw Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${K.getName(!0)}`)}if(K.isListSchema())return[];if(K.isMapSchema()||K.isStructSchema())return{};return this.stringDeserializer.read(K,q)}parseXml(A){if(A.length){let q;try{q=SR.parseXML(A)}catch(w){if(w&&typeof w==="object")Object.defineProperty(w,"$responseBodyText",{value:A});throw w}let K="#text",Y=Object.keys(q)[0],z=q[Y];if(z[K])z[Y]=z[K],delete z[K];return Tc.getValueFromTextNode(z)}return{}}}class H$7 extends Pt{settings;buffer;constructor(A){super();this.settings=A}write(A,q,K=""){if(this.buffer===void 0)this.buffer="";let Y=G2.NormalizedSchema.of(A);if(K&&!K.endsWith("."))K+=".";if(Y.isBlobSchema()){if(typeof q==="string"||q instanceof Uint8Array)this.writeKey(K),this.writeValue((this.serdeContext?.base64Encoder??_B6.toBase64)(q))}else if(Y.isBooleanSchema()||Y.isNumericSchema()||Y.isStringSchema()){if(q!=null)this.writeKey(K),this.writeValue(String(q));else if(Y.isIdempotencyToken())this.writeKey(K),this.writeValue(oX.generateIdempotencyToken())}else if(Y.isBigIntegerSchema()){if(q!=null)this.writeKey(K),this.writeValue(String(q))}else if(Y.isBigDecimalSchema()){if(q!=null)this.writeKey(K),this.writeValue(q instanceof oX.NumericValue?q.string:String(q))}else if(Y.isTimestampSchema()){if(q instanceof Date)switch(this.writeKey(K),C0.determineTimestampFormat(Y,this.settings)){case 5:this.writeValue(q.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Tc.dateToUtcString(q));break;case 7:this.writeValue(String(q.getTime()/1000));break}}else if(Y.isDocumentSchema())throw Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${Y.getName(!0)}`);else if(Y.isListSchema()){if(Array.isArray(q))if(q.length===0){if(this.settings.serializeEmptyLists)this.writeKey(K),this.writeValue("")}else{let z=Y.getValueSchema(),w=this.settings.flattenLists||Y.getMergedTraits().xmlFlattened,_=1;for(let $ of q){if($==null)continue;let O=this.getKey("member",z.getMergedTraits().xmlName),H=w?`${K}${_}`:`${K}${O}.${_}`;this.write(z,$,H),++_}}}else if(Y.isMapSchema()){if(q&&typeof q==="object"){let z=Y.getKeySchema(),w=Y.getValueSchema(),_=Y.getMergedTraits().xmlFlattened,$=1;for(let[O,H]of Object.entries(q)){if(H==null)continue;let j=this.getKey("key",z.getMergedTraits().xmlName),J=_?`${K}${$}.${j}`:`${K}entry.${$}.${j}`,M=this.getKey("value",w.getMergedTraits().xmlName),D=_?`${K}${$}.${M}`:`${K}entry.${$}.${M}`;this.write(z,O,J),this.write(w,H,D),++$}}}else if(Y.isStructSchema()){if(q&&typeof q==="object")for(let[z,w]of Y.structIterator()){if(q[z]==null&&!w.isIdempotencyToken())continue;let _=this.getKey(z,w.getMergedTraits().xmlName),$=`${K}${_}`;this.write(w,q[z],$)}}else if(Y.isUnitSchema());else throw Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${Y.getName(!0)}`)}flush(){if(this.buffer===void 0)throw Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");let A=this.buffer;return delete this.buffer,A}getKey(A,q){let K=q??A;if(this.settings.capitalizeKeys)return K[0].toUpperCase()+K.slice(1);return K}writeKey(A){if(A.endsWith("."))A=A.slice(0,A.length-1);this.buffer+=`&${C0.extendedEncodeURIComponent(A)}=`}writeValue(A){this.buffer+=C0.extendedEncodeURIComponent(A)}}class JY8 extends C0.RpcProtocol{options;serializer;deserializer;mixin=new jP6;constructor(A){super({defaultNamespace:A.defaultNamespace});this.options=A;let q={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:A.xmlNamespace,serviceNamespace:A.defaultNamespace,serializeEmptyLists:!0};this.serializer=new H$7(q),this.deserializer=new I21(q)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(A){this.serializer.setSerdeContext(A),this.deserializer.setSerdeContext(A)}getPayloadCodec(){throw Error("AWSQuery protocol has no payload codec.")}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(!Y.path.endsWith("/"))Y.path+="/";if(Object.assign(Y.headers,{"content-type":"application/x-www-form-urlencoded"}),G2.deref(A.input)==="unit"||!Y.body)Y.body="";let z=A.name.split("#")[1]??A.name;if(Y.body=`Action=${z}&Version=${this.options.version}`+Y.body,Y.body.endsWith("&"))Y.body=Y.body.slice(-1);return Y}async deserializeResponse(A,q,K){let Y=this.deserializer,z=G2.NormalizedSchema.of(A.output),w={};if(K.statusCode>=300){let j=await C0.collectBody(K.body,q);if(j.byteLength>0)Object.assign(w,await Y.read(15,j));await this.handleError(A,q,K,w,this.deserializeMetadata(K))}for(let j in K.headers){let J=K.headers[j];delete K.headers[j],K.headers[j.toLowerCase()]=J}let _=A.name.split("#")[1]??A.name,$=z.isStructSchema()&&this.useNestedResult()?_+"Result":void 0,O=await C0.collectBody(K.body,q);if(O.byteLength>0)Object.assign(w,await Y.read(z,O,$));return{$metadata:this.deserializeMetadata(K),...w}}useNestedResult(){return!0}async handleError(A,q,K,Y,z){let w=this.loadQueryErrorCode(K,Y)??"Unknown",_=this.loadQueryError(Y),$=this.loadQueryErrorMessage(Y);_.message=$,_.Error={Type:_.Type,Code:_.Code,Message:$};let{errorSchema:O,errorMetadata:H}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,_,z,(X,P)=>{try{return X.getSchema(P)}catch(W){return X.find((Z)=>G2.NormalizedSchema.of(Z).getMergedTraits().awsQueryError?.[0]===P)}}),j=G2.NormalizedSchema.of(O),M=new(G2.TypeRegistry.for(O[1]).getErrorCtor(O)??Error)($),D={Error:_.Error};for(let[X,P]of j.structIterator()){let W=P.getMergedTraits().xmlName??X,Z=_[W]??Y[W];D[X]=this.deserializer.readSchema(P,Z)}throw this.mixin.decorateServiceException(Object.assign(M,H,{$fault:j.getMergedTraits().error,message:$},D),Y)}loadQueryErrorCode(A,q){let K=(q.Errors?.[0]?.Error??q.Errors?.Error??q.Error)?.Code;if(K!==void 0)return K;if(A.statusCode==404)return"NotFound"}loadQueryError(A){return A.Errors?.[0]?.Error??A.Errors?.Error??A.Error}loadQueryErrorMessage(A){let q=this.loadQueryError(A);return q?.message??q?.Message??A.message??A.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class j$7 extends JY8{options;constructor(A){super(A);this.options=A;let q={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,q)}useNestedResult(){return!1}}var J$7=(A,q)=>z$7(A,q).then((K)=>{if(K.length){let Y;try{Y=SR.parseXML(K)}catch($){if($&&typeof $==="object")Object.defineProperty($,"$responseBodyText",{value:K});throw $}let z="#text",w=Object.keys(Y)[0],_=Y[w];if(_[z])_[w]=_[z],delete _[z];return Tc.getValueFromTextNode(_)}return{}}),Or3=async(A,q)=>{let K=await J$7(A,q);if(K.Error)K.Error.message=K.Error.message??K.Error.Message;return K},M$7=(A,q)=>{if(q?.Error?.Code!==void 0)return q.Error.Code;if(q?.Code!==void 0)return q.Code;if(A.statusCode==404)return"NotFound"};class MY8 extends Pt{settings;stringBuffer;byteBuffer;buffer;constructor(A){super();this.settings=A}write(A,q){let K=G2.NormalizedSchema.of(A);if(K.isStringSchema()&&typeof q==="string")this.stringBuffer=q;else if(K.isBlobSchema())this.byteBuffer="byteLength"in q?q:(this.serdeContext?.base64Decoder??_B6.fromBase64)(q);else{this.buffer=this.writeStruct(K,q,void 0);let Y=K.getMergedTraits();if(Y.httpPayload&&!Y.xmlName)this.buffer.withName(K.getName())}}flush(){if(this.byteBuffer!==void 0){let q=this.byteBuffer;return delete this.byteBuffer,q}if(this.stringBuffer!==void 0){let q=this.stringBuffer;return delete this.stringBuffer,q}let A=this.buffer;if(this.settings.xmlNamespace){if(!A?.attributes?.xmlns)A.addAttribute("xmlns",this.settings.xmlNamespace)}return delete this.buffer,A.toString()}writeStruct(A,q,K){let Y=A.getMergedTraits(),z=A.isMemberSchema()&&!Y.httpPayload?A.getMemberTraits().xmlName??A.getMemberName():Y.xmlName??A.getName();if(!z||!A.isStructSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${A.getName(!0)}.`);let w=SR.XmlNode.of(z),[_,$]=this.getXmlnsAttribute(A,K);for(let[O,H]of A.structIterator()){let j=q[O];if(j!=null||H.isIdempotencyToken()){if(H.getMergedTraits().xmlAttribute){w.addAttribute(H.getMergedTraits().xmlName??O,this.writeSimple(H,j));continue}if(H.isListSchema())this.writeList(H,j,w,$);else if(H.isMapSchema())this.writeMap(H,j,w,$);else if(H.isStructSchema())w.addChildNode(this.writeStruct(H,j,$));else{let J=SR.XmlNode.of(H.getMergedTraits().xmlName??H.getMemberName());this.writeSimpleInto(H,j,J,$),w.addChildNode(J)}}}if($)w.addAttribute(_,$);return w}writeList(A,q,K,Y){if(!A.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${A.getName(!0)}`);let z=A.getMergedTraits(),w=A.getValueSchema(),_=w.getMergedTraits(),$=!!_.sparse,O=!!z.xmlFlattened,[H,j]=this.getXmlnsAttribute(A,Y),J=(M,D)=>{if(w.isListSchema())this.writeList(w,Array.isArray(D)?D:[D],M,j);else if(w.isMapSchema())this.writeMap(w,D,M,j);else if(w.isStructSchema()){let X=this.writeStruct(w,D,j);M.addChildNode(X.withName(O?z.xmlName??A.getMemberName():_.xmlName??"member"))}else{let X=SR.XmlNode.of(O?z.xmlName??A.getMemberName():_.xmlName??"member");this.writeSimpleInto(w,D,X,j),M.addChildNode(X)}};if(O){for(let M of q)if($||M!=null)J(K,M)}else{let M=SR.XmlNode.of(z.xmlName??A.getMemberName());if(j)M.addAttribute(H,j);for(let D of q)if($||D!=null)J(M,D);K.addChildNode(M)}}writeMap(A,q,K,Y,z=!1){if(!A.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${A.getName(!0)}`);let w=A.getMergedTraits(),_=A.getKeySchema(),O=_.getMergedTraits().xmlName??"key",H=A.getValueSchema(),j=H.getMergedTraits(),J=j.xmlName??"value",M=!!j.sparse,D=!!w.xmlFlattened,[X,P]=this.getXmlnsAttribute(A,Y),W=(Z,G,f)=>{let V=SR.XmlNode.of(O,G),[N,v]=this.getXmlnsAttribute(_,P);if(v)V.addAttribute(N,v);Z.addChildNode(V);let y=SR.XmlNode.of(J);if(H.isListSchema())this.writeList(H,f,y,P);else if(H.isMapSchema())this.writeMap(H,f,y,P,!0);else if(H.isStructSchema())y=this.writeStruct(H,f,P);else this.writeSimpleInto(H,f,y,P);Z.addChildNode(y)};if(D){for(let[Z,G]of Object.entries(q))if(M||G!=null){let f=SR.XmlNode.of(w.xmlName??A.getMemberName());W(f,Z,G),K.addChildNode(f)}}else{let Z;if(!z){if(Z=SR.XmlNode.of(w.xmlName??A.getMemberName()),P)Z.addAttribute(X,P);K.addChildNode(Z)}for(let[G,f]of Object.entries(q))if(M||f!=null){let V=SR.XmlNode.of("entry");W(V,G,f),(z?K:Z).addChildNode(V)}}}writeSimple(A,q){if(q===null)throw Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");let K=G2.NormalizedSchema.of(A),Y=null;if(q&&typeof q==="object")if(K.isBlobSchema())Y=(this.serdeContext?.base64Encoder??_B6.toBase64)(q);else if(K.isTimestampSchema()&&q instanceof Date)switch(C0.determineTimestampFormat(K,this.settings)){case 5:Y=q.toISOString().replace(".000Z","Z");break;case 6:Y=Tc.dateToUtcString(q);break;case 7:Y=String(q.getTime()/1000);break;default:console.warn("Missing timestamp format, using http date",q),Y=Tc.dateToUtcString(q);break}else if(K.isBigDecimalSchema()&&q){if(q instanceof oX.NumericValue)return q.string;return String(q)}else if(K.isMapSchema()||K.isListSchema())throw Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.");else throw Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${K.getName(!0)}`);if(K.isBooleanSchema()||K.isNumericSchema()||K.isBigIntegerSchema()||K.isBigDecimalSchema())Y=String(q);if(K.isStringSchema())if(q===void 0&&K.isIdempotencyToken())Y=oX.generateIdempotencyToken();else Y=String(q);if(Y===null)throw Error(`Unhandled schema-value pair ${K.getName(!0)}=${q}`);return Y}writeSimpleInto(A,q,K,Y){let z=this.writeSimple(A,q),w=G2.NormalizedSchema.of(A),_=new SR.XmlText(z),[$,O]=this.getXmlnsAttribute(w,Y);if(O)K.addAttribute($,O);K.addChildNode(_)}getXmlnsAttribute(A,q){let K=A.getMergedTraits(),[Y,z]=K.xmlNamespace??[];if(z&&z!==q)return[Y?`xmlns:${Y}`:"xmlns",z];return[void 0,void 0]}}class DY8 extends Pt{settings;constructor(A){super();this.settings=A}createSerializer(){let A=new MY8(this.settings);return A.setSerdeContext(this.serdeContext),A}createDeserializer(){let A=new I21(this.settings);return A.setSerdeContext(this.serdeContext),A}}class D$7 extends C0.HttpBindingProtocol{codec;serializer;deserializer;mixin=new jP6;constructor(A){super(A);let q={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:A.xmlNamespace,serviceNamespace:A.defaultNamespace};this.codec=new DY8(q),this.serializer=new C0.HttpInterceptingShapeSerializer(this.codec.createSerializer(),q),this.deserializer=new C0.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),q)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K),z=G2.NormalizedSchema.of(A.input);if(!Y.headers["content-type"]){let w=this.mixin.resolveRestContentType(this.getDefaultContentType(),z);if(w)Y.headers["content-type"]=w}if(Y.headers["content-type"]===this.getDefaultContentType()){if(typeof Y.body==="string")Y.body='<?xml version="1.0" encoding="UTF-8"?>'+Y.body}return Y}async deserializeResponse(A,q,K){return super.deserializeResponse(A,q,K)}async handleError(A,q,K,Y,z){let w=M$7(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=G2.NormalizedSchema.of(_),H=Y.Error?.message??Y.Error?.Message??Y.message??Y.Message??"Unknown",J=new(G2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H);await this.deserializeHttpMessage(_,q,K,Y);let M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().xmlName??D,W=Y.Error?.[P]??Y[P];M[D]=this.codec.createDeserializer().readSchema(X,W)}throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}getDefaultContentType(){return"application/xml"}}Hr3.AWSSDKSigV4Signer=on3;Hr3.AwsEc2QueryProtocol=j$7;Hr3.AwsJson1_0Protocol=_$7;Hr3.AwsJson1_1Protocol=$$7;Hr3.AwsJsonRpcProtocol=h21;Hr3.AwsQueryProtocol=JY8;Hr3.AwsRestJsonProtocol=O$7;Hr3.AwsRestXmlProtocol=D$7;Hr3.AwsSdkSigV4ASigner=A$7;Hr3.AwsSdkSigV4Signer=S21;Hr3.AwsSmithyRpcV2CborProtocol=Y$7;Hr3.JsonCodec=C21;Hr3.JsonShapeDeserializer=HY8;Hr3.JsonShapeSerializer=jY8;Hr3.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS=an3;Hr3.NODE_SIGV4A_CONFIG_OPTIONS=tn3;Hr3.XmlCodec=DY8;Hr3.XmlShapeDeserializer=I21;Hr3.XmlShapeSerializer=MY8;Hr3._toBool=Yr3;Hr3._toNum=zr3;Hr3._toStr=Kr3;Hr3.awsExpectUnion=$r3;Hr3.emitWarningIfUnsupportedVersion=cn3;Hr3.getBearerTokenEnvKey=q$7;Hr3.loadRestJsonErrorCode=OY8;Hr3.loadRestXmlErrorCode=M$7;Hr3.parseJsonBody=$Y8;Hr3.parseJsonErrorBody=_r3;Hr3.parseXmlBody=J$7;Hr3.parseXmlErrorBody=Or3;Hr3.resolveAWSSDKSigV4Config=en3;Hr3.resolveAwsSdkSigV4AConfig=sn3;Hr3.resolveAwsSdkSigV4Config=K$7;Hr3.setCredentialFeature=ln3;Hr3.setFeature=in3;Hr3.setTokenFeature=nn3;Hr3.state=YY8;Hr3.validateSigningProperties=_Y8});var cm=C(($o3)=>{var or3=pw(),ar3=pm(),sr3=K_7(),dm=O$(),Z$7=void 0;function tr3(A){if(A===void 0)return!0;return typeof A==="string"&&A.length<=50}function er3(A){let q=or3.normalizeProvider(A.userAgentAppId??Z$7),{customUserAgent:K}=A;return Object.assign(A,{customUserAgent:typeof K==="string"?[[K]]:K,userAgentAppId:async()=>{let Y=await q();if(!tr3(Y)){let z=A.logger?.constructor?.name==="NoOpLogger"||!A.logger?console:A.logger;if(typeof Y!=="string")z?.warn("userAgentAppId must be a string or undefined.");else if(Y.length>50)z?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return Y}})}var Ao3=/\d{12}\.ddb/;async function qo3(A,q,K){if(K.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")dm.setFeature(A,"PROTOCOL_RPC_V2_CBOR","M");if(typeof q.retryStrategy==="function"){let w=await q.retryStrategy();if(typeof w.acquireInitialRetryToken==="function")if(w.constructor?.name?.includes("Adaptive"))dm.setFeature(A,"RETRY_MODE_ADAPTIVE","F");else dm.setFeature(A,"RETRY_MODE_STANDARD","E");else dm.setFeature(A,"RETRY_MODE_LEGACY","D")}if(typeof q.accountIdEndpointMode==="function"){let w=A.endpointV2;if(String(w?.url?.hostname).match(Ao3))dm.setFeature(A,"ACCOUNT_ID_ENDPOINT","O");switch(await q.accountIdEndpointMode?.()){case"disabled":dm.setFeature(A,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":dm.setFeature(A,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":dm.setFeature(A,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let z=A.__smithy_context?.selectedHttpAuthScheme?.identity;if(z?.$source){let w=z;if(w.accountId)dm.setFeature(A,"RESOLVED_ACCOUNT_ID","T");for(let[_,$]of Object.entries(w.$source??{}))dm.setFeature(A,_,$)}}var X$7="user-agent",XY8="x-amz-user-agent",P$7=" ",PY8="/",Ko3=/[^!$%&'*+\-.^_`|~\w]/g,Yo3=/[^!$%&'*+\-.^_`|~\w#]/g,W$7="-",zo3=1024;function wo3(A){let q="";for(let K in A){let Y=A[K];if(q.length+Y.length+1<=zo3){if(q.length)q+=","+Y;else q+=Y;continue}break}return q}var G$7=(A)=>(q,K)=>async(Y)=>{let{request:z}=Y;if(!sr3.HttpRequest.isInstance(z))return q(Y);let{headers:w}=z,_=K?.userAgent?.map(b21)||[],$=(await A.defaultUserAgentProvider()).map(b21);await qo3(K,A,Y);let O=K;$.push(`m/${wo3(Object.assign({},K.__smithy_context?.features,O.__aws_sdk_context?.features))}`);let H=A?.customUserAgent?.map(b21)||[],j=await A.userAgentAppId();if(j)$.push(b21(["app",`${j}`]));let J=ar3.getUserAgentPrefix(),M=(J?[J]:[]).concat([...$,..._,...H]).join(P$7),D=[...$.filter((X)=>X.startsWith("aws-sdk-")),...H].join(P$7);if(A.runtime!=="browser"){if(D)w[XY8]=w[XY8]?`${w[X$7]} ${D}`:D;w[X$7]=M}else w[XY8]=M;return q({...Y,request:z})},b21=(A)=>{let q=A[0].split(PY8).map((_)=>_.replace(Ko3,W$7)).join(PY8),K=A[1]?.replace(Yo3,W$7),Y=q.indexOf(PY8),z=q.substring(0,Y),w=q.substring(Y+1);if(z==="api")w=w.toLowerCase();return[z,w,K].filter((_)=>_&&_.length>0).reduce((_,$,O)=>{switch(O){case 0:return $;case 1:return`${_}/${$}`;default:return`${_}#${$}`}},"")},f$7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},_o3=(A)=>({applyToStack:(q)=>{q.add(G$7(A),f$7)}});$o3.DEFAULT_UA_APP_ID=Z$7;$o3.getUserAgentMiddlewareOptions=f$7;$o3.getUserAgentPlugin=_o3;$o3.resolveUserAgentConfig=er3;$o3.userAgentMiddleware=G$7});var T$7=C((Po3)=>{var Do3=(A,q,K)=>{if(!(q in A))return;if(A[q]==="true")return!0;if(A[q]==="false")return!1;throw Error(`Cannot load ${K} "${q}". Expected "true" or "false", got ${A[q]}.`)},Xo3=(A,q,K)=>{if(!(q in A))return;let Y=parseInt(A[q],10);if(Number.isNaN(Y))throw TypeError(`Cannot load ${K} '${q}'. Expected number, got '${A[q]}'.`);return Y};Po3.SelectorType=void 0;(function(A){A.ENV="env",A.CONFIG="shared config entry"})(Po3.SelectorType||(Po3.SelectorType={}));Po3.booleanSelector=Do3;Po3.numberSelector=Xo3});var NJ=C((uo3)=>{var Wt=T$7(),x21=pZ(),Go3=Ab(),v$7="AWS_USE_DUALSTACK_ENDPOINT",k$7="use_dualstack_endpoint",fo3=!1,To3={environmentVariableSelector:(A)=>Wt.booleanSelector(A,v$7,Wt.SelectorType.ENV),configFileSelector:(A)=>Wt.booleanSelector(A,k$7,Wt.SelectorType.CONFIG),default:!1},E$7="AWS_USE_FIPS_ENDPOINT",L$7="use_fips_endpoint",Vo3=!1,No3={environmentVariableSelector:(A)=>Wt.booleanSelector(A,E$7,Wt.SelectorType.ENV),configFileSelector:(A)=>Wt.booleanSelector(A,L$7,Wt.SelectorType.CONFIG),default:!1},vo3=(A)=>{let{tls:q,endpoint:K,urlParser:Y,useDualstackEndpoint:z}=A;return Object.assign(A,{tls:q??!0,endpoint:x21.normalizeProvider(typeof K==="string"?Y(K):K),isCustomEndpoint:!0,useDualstackEndpoint:x21.normalizeProvider(z??!1)})},ko3=async(A)=>{let{tls:q=!0}=A,K=await A.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(K))throw Error("Invalid region in client config");let z=await A.useDualstackEndpoint(),w=await A.useFipsEndpoint(),{hostname:_}=await A.regionInfoProvider(K,{useDualstackEndpoint:z,useFipsEndpoint:w})??{};if(!_)throw Error("Cannot resolve hostname from client config");return A.urlParser(`${q?"https:":"http:"}//${_}`)},Eo3=(A)=>{let q=x21.normalizeProvider(A.useDualstackEndpoint??!1),{endpoint:K,useFipsEndpoint:Y,urlParser:z,tls:w}=A;return Object.assign(A,{tls:w??!0,endpoint:K?x21.normalizeProvider(typeof K==="string"?z(K):K):()=>ko3({...A,useDualstackEndpoint:q,useFipsEndpoint:Y}),isCustomEndpoint:!!K,useDualstackEndpoint:q})},y$7="AWS_REGION",R$7="region",Lo3={environmentVariableSelector:(A)=>A[y$7],configFileSelector:(A)=>A[R$7],default:()=>{throw Error("Region is missing")}},yo3={preferredFile:"credentials"},V$7=new Set,Ro3=(A,q=Go3.isValidHostLabel)=>{if(!V$7.has(A)&&!q(A))if(A==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw Error(`Region not accepted: region="${A}" is not a valid hostname component.`);else V$7.add(A)},S$7=(A)=>typeof A==="string"&&(A.startsWith("fips-")||A.endsWith("-fips")),So3=(A)=>S$7(A)?["fips-aws-global","aws-fips"].includes(A)?"us-east-1":A.replace(/fips-(dkr-|prod-)?|-fips/,""):A,Co3=(A)=>{let{region:q,useFipsEndpoint:K}=A;if(!q)throw Error("Region is missing");return Object.assign(A,{region:async()=>{let Y=typeof q==="function"?await q():q,z=So3(Y);return Ro3(z),z},useFipsEndpoint:async()=>{let Y=typeof q==="string"?q:await q();if(S$7(Y))return!0;return typeof K!=="function"?Promise.resolve(!!K):K()}})},N$7=(A=[],{useFipsEndpoint:q,useDualstackEndpoint:K})=>A.find(({tags:Y})=>q===Y.includes("fips")&&K===Y.includes("dualstack"))?.hostname,ho3=(A,{regionHostname:q,partitionHostname:K})=>q?q:K?K.replace("{region}",A):void 0,Io3=(A,{partitionHash:q})=>Object.keys(q||{}).find((K)=>q[K].regions.includes(A))??"aws",bo3=(A,{signingRegion:q,regionRegex:K,useFipsEndpoint:Y})=>{if(q)return q;else if(Y){let z=K.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),w=A.match(z);if(w)return w[0].slice(1,-1)}},xo3=(A,{useFipsEndpoint:q=!1,useDualstackEndpoint:K=!1,signingService:Y,regionHash:z,partitionHash:w})=>{let _=Io3(A,{partitionHash:w}),$=A in z?A:w[_]?.endpoint??A,O={useFipsEndpoint:q,useDualstackEndpoint:K},H=N$7(z[$]?.variants,O),j=N$7(w[_]?.variants,O),J=ho3($,{regionHostname:H,partitionHostname:j});if(J===void 0)throw Error(`Endpoint resolution failed for: ${{resolvedRegion:$,useFipsEndpoint:q,useDualstackEndpoint:K}}`);let M=bo3(J,{signingRegion:z[$]?.signingRegion,regionRegex:w[_].regionRegex,useFipsEndpoint:q});return{partition:_,signingService:Y,hostname:J,...M&&{signingRegion:M},...z[$]?.signingService&&{signingService:z[$].signingService}}};uo3.CONFIG_USE_DUALSTACK_ENDPOINT=k$7;uo3.CONFIG_USE_FIPS_ENDPOINT=L$7;uo3.DEFAULT_USE_DUALSTACK_ENDPOINT=fo3;uo3.DEFAULT_USE_FIPS_ENDPOINT=Vo3;uo3.ENV_USE_DUALSTACK_ENDPOINT=v$7;uo3.ENV_USE_FIPS_ENDPOINT=E$7;uo3.NODE_REGION_CONFIG_FILE_OPTIONS=yo3;uo3.NODE_REGION_CONFIG_OPTIONS=Lo3;uo3.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=To3;uo3.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=No3;uo3.REGION_ENV_NAME=y$7;uo3.REGION_INI_NAME=R$7;uo3.getRegionInfo=xo3;uo3.resolveCustomEndpointsConfig=vo3;uo3.resolveEndpointsConfig=Eo3;uo3.resolveRegionConfig=Co3});var C$7=C((Ya3)=>{Ya3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ya3.HttpAuthLocation||(Ya3.HttpAuthLocation={}));Ya3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ya3.HttpApiKeyAuthLocation||(Ya3.HttpApiKeyAuthLocation={}));Ya3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Ya3.EndpointURLScheme||(Ya3.EndpointURLScheme={}));Ya3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Ya3.AlgorithmId||(Ya3.AlgorithmId={}));var to3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Ya3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Ya3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},eo3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Aa3=(A)=>{return to3(A)},qa3=(A)=>{return eo3(A)};Ya3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Ya3.FieldPosition||(Ya3.FieldPosition={}));var Ka3="__smithy_context";Ya3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Ya3.IniSectionType||(Ya3.IniSectionType={}));Ya3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Ya3.RequestHandlerProtocol||(Ya3.RequestHandlerProtocol={}));Ya3.SMITHY_CONTEXT_KEY=Ka3;Ya3.getDefaultClientConfiguration=Aa3;Ya3.resolveDefaultRuntimeConfig=qa3});var x$7=C((Ma3)=>{var $a3=C$7(),Oa3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},Ha3=(A)=>{return{httpHandler:A.httpHandler()}};class h$7{name;kind;values;constructor({name:A,kind:q=$a3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class I$7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class u21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new u21({...A,headers:{...A.headers}});if(q.query)q.query=ja3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return u21.clone(this)}}function ja3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class b$7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Ja3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}Ma3.Field=h$7;Ma3.Fields=I$7;Ma3.HttpRequest=u21;Ma3.HttpResponse=b$7;Ma3.getHttpHandlerExtensionConfiguration=Oa3;Ma3.isValidHostname=Ja3;Ma3.resolveHttpHandlerRuntimeConfig=Ha3});var Vc=C((Na3)=>{var Ta3=x$7(),u$7="content-length";function B$7(A){return(q)=>async(K)=>{let Y=K.request;if(Ta3.HttpRequest.isInstance(Y)){let{body:z,headers:w}=Y;if(z&&Object.keys(w).map((_)=>_.toLowerCase()).indexOf(u$7)===-1)try{let _=A(z);Y.headers={...Y.headers,[u$7]:String(_)}}catch(_){}}return q({...K,request:Y})}}var m$7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Va3=(A)=>({applyToStack:(q)=>{q.add(B$7(A.bodyLengthChecker),m$7)}});Na3.contentLengthMiddleware=B$7;Na3.contentLengthMiddlewareOptions=m$7;Na3.getContentLengthPlugin=Va3});var d$7=C((U$7)=>{Object.defineProperty(U$7,"__esModule",{value:!0});U$7.getEndpointUrlConfig=void 0;var g$7=gm(),F$7="AWS_ENDPOINT_URL",Q$7="endpoint_url",La3=(A)=>({environmentVariableSelector:(q)=>{let K=A.split(" ").map((w)=>w.toUpperCase()),Y=q[[F$7,...K].join("_")];if(Y)return Y;let z=q[F$7];if(z)return z;return},configFileSelector:(q,K)=>{if(K&&q.services){let z=K[["services",q.services].join(g$7.CONFIG_PREFIX_SEPARATOR)];if(z){let w=A.split(" ").map(($)=>$.toLowerCase()),_=z[[w.join("_"),Q$7].join(g$7.CONFIG_PREFIX_SEPARATOR)];if(_)return _}}let Y=q[Q$7];if(Y)return Y;return},default:void 0});U$7.getEndpointUrlConfig=La3});var i$7=C((c$7)=>{Object.defineProperty(c$7,"__esModule",{value:!0});c$7.getEndpointFromConfig=void 0;var ya3=HN(),Ra3=d$7(),Sa3=async(A)=>(0,ya3.loadConfig)((0,Ra3.getEndpointUrlConfig)(A??""))();c$7.getEndpointFromConfig=Sa3});var qb=C((pa3)=>{var r$7=i$7(),n$7=LR(),Ca3=pw(),B21=pZ(),ha3=h58(),Ia3=async(A)=>{let q=A?.Bucket||"";if(typeof A.Bucket==="string")A.Bucket=q.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(ma3(q)){if(A.ForcePathStyle===!0)throw Error("Path-style addressing cannot be used with ARN buckets")}else if(!Ba3(q)||q.indexOf(".")!==-1&&!String(A.Endpoint).startsWith("http:")||q.toLowerCase()!==q||q.length<3)A.ForcePathStyle=!0;if(A.DisableMultiRegionAccessPoints)A.disableMultiRegionAccessPoints=!0,A.DisableMRAP=!0;return A},ba3=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,xa3=/(\d+\.){3}\d+/,ua3=/\.\./,Ba3=(A)=>ba3.test(A)&&!xa3.test(A)&&!ua3.test(A),ma3=(A)=>{let[q,K,Y,,,z]=A.split(":"),w=q==="arn"&&A.split(":").length>=6,_=Boolean(w&&K&&Y&&z);if(w&&!_)throw Error(`Invalid ARN: ${A} was an invalid ARN.`);return _},ga3=(A,q,K)=>{let Y=async()=>{let z=K[A]??K[q];if(typeof z==="function")return z();return z};if(A==="credentialScope"||q==="CredentialScope")return async()=>{let z=typeof K.credentials==="function"?await K.credentials():K.credentials;return z?.credentialScope??z?.CredentialScope};if(A==="accountId"||q==="AccountId")return async()=>{let z=typeof K.credentials==="function"?await K.credentials():K.credentials;return z?.accountId??z?.AccountId};if(A==="endpoint"||q==="endpoint")return async()=>{if(K.isCustomEndpoint===!1)return;let z=await Y();if(z&&typeof z==="object"){if("url"in z)return z.url.href;if("hostname"in z){let{protocol:w,hostname:_,port:$,path:O}=z;return`${w}//${_}${$?":"+$:""}${O}`}}return z};return Y},vY8=(A)=>{if(typeof A==="object"){if("url"in A)return n$7.parseUrl(A.url);return A}return n$7.parseUrl(A)},o$7=async(A,q,K,Y)=>{if(!K.isCustomEndpoint){let _;if(K.serviceConfiguredEndpoint)_=await K.serviceConfiguredEndpoint();else _=await r$7.getEndpointFromConfig(K.serviceId);if(_)K.endpoint=()=>Promise.resolve(vY8(_)),K.isCustomEndpoint=!0}let z=await a$7(A,q,K);if(typeof K.endpointProvider!=="function")throw Error("config.endpointProvider is not set.");return K.endpointProvider(z,Y)},a$7=async(A,q,K)=>{let Y={},z=q?.getEndpointParameterInstructions?.()||{};for(let[w,_]of Object.entries(z))switch(_.type){case"staticContextParams":Y[w]=_.value;break;case"contextParams":Y[w]=A[_.name];break;case"clientContextParams":case"builtInParams":Y[w]=await ga3(_.name,w,K)();break;case"operationContextParams":Y[w]=_.get(A);break;default:throw Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(_))}if(Object.keys(z).length===0)Object.assign(Y,K);if(String(K.serviceId).toLowerCase()==="s3")await Ia3(Y);return Y},s$7=({config:A,instructions:q})=>{return(K,Y)=>async(z)=>{if(A.isCustomEndpoint)Ca3.setFeature(Y,"ENDPOINT_OVERRIDE","N");let w=await o$7(z.input,{getEndpointParameterInstructions(){return q}},{...A},Y);Y.endpointV2=w,Y.authSchemes=w.properties?.authSchemes;let _=Y.authSchemes?.[0];if(_){Y.signing_region=_.signingRegion,Y.signing_service=_.signingName;let O=B21.getSmithyContext(Y)?.selectedHttpAuthScheme?.httpAuthOption;if(O)O.signingProperties=Object.assign(O.signingProperties||{},{signing_region:_.signingRegion,signingRegion:_.signingRegion,signing_service:_.signingName,signingName:_.signingName,signingRegionSet:_.signingRegionSet},_.properties)}return K({...z})}},t$7={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ha3.serializerMiddlewareOption.name},Fa3=(A,q)=>({applyToStack:(K)=>{K.addRelativeTo(s$7({config:A,instructions:q}),t$7)}}),Qa3=(A)=>{let q=A.tls??!0,{endpoint:K,useDualstackEndpoint:Y,useFipsEndpoint:z}=A,w=K!=null?async()=>vY8(await B21.normalizeProvider(K)()):void 0,$=Object.assign(A,{endpoint:w,tls:q,isCustomEndpoint:!!K,useDualstackEndpoint:B21.normalizeProvider(Y??!1),useFipsEndpoint:B21.normalizeProvider(z??!1)}),O=void 0;return $.serviceConfiguredEndpoint=async()=>{if(A.serviceId&&!O)O=r$7.getEndpointFromConfig(A.serviceId);return O},$},Ua3=(A)=>{let{endpoint:q}=A;if(q===void 0)A.endpoint=async()=>{throw Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")};return A};pa3.endpointMiddleware=s$7;pa3.endpointMiddlewareOptions=t$7;pa3.getEndpointFromInstructions=o$7;pa3.getEndpointPlugin=Fa3;pa3.resolveEndpointConfig=Qa3;pa3.resolveEndpointRequiredConfig=Ua3;pa3.resolveParams=a$7;pa3.toEndpointV1=vY8});var EY8=C((_s3)=>{var sa3=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],ta3=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ea3=["TimeoutError","RequestTimeout","RequestTimeoutException"],As3=[500,502,503,504],qs3=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Ks3=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],e$7=(A)=>A?.$retryable!==void 0,Ys3=(A)=>sa3.includes(A.name),AO7=(A)=>A.$metadata?.clockSkewCorrected,qO7=(A)=>{let q=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(A&&A instanceof TypeError))return!1;return q.has(A.message)},zs3=(A)=>A.$metadata?.httpStatusCode===429||ta3.includes(A.name)||A.$retryable?.throttling==!0,kY8=(A,q=0)=>e$7(A)||AO7(A)||ea3.includes(A.name)||qs3.includes(A?.code||"")||Ks3.includes(A?.code||"")||As3.includes(A.$metadata?.httpStatusCode||0)||qO7(A)||A.cause!==void 0&&q<=10&&kY8(A.cause,q+1),ws3=(A)=>{if(A.$metadata?.httpStatusCode!==void 0){let q=A.$metadata.httpStatusCode;if(500<=q&&q<=599&&!kY8(A))return!0;return!1}return!1};_s3.isBrowserNetworkError=qO7;_s3.isClockSkewCorrectedError=AO7;_s3.isClockSkewError=Ys3;_s3.isRetryableByTrait=e$7;_s3.isServerError=ws3;_s3.isThrottlingError=zs3;_s3.isTransientError=kY8});var lm=C((fs3)=>{var Xs3=EY8();fs3.RETRY_MODES=void 0;(function(A){A.STANDARD="standard",A.ADAPTIVE="adaptive"})(fs3.RETRY_MODES||(fs3.RETRY_MODES={}));var LY8=3,Ps3=fs3.RETRY_MODES.STANDARD;class m21{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(A){this.beta=A?.beta??0.7,this.minCapacity=A?.minCapacity??1,this.minFillRate=A?.minFillRate??0.5,this.scaleConstant=A?.scaleConstant??0.4,this.smooth=A?.smooth??0.8;let q=this.getCurrentTimeInSeconds();this.lastThrottleTime=q,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(A){if(!this.enabled)return;if(this.refillTokenBucket(),A>this.currentCapacity){let q=(A-this.currentCapacity)/this.fillRate*1000;await new Promise((K)=>m21.setTimeoutFn(K,q))}this.currentCapacity=this.currentCapacity-A}refillTokenBucket(){let A=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=A;return}let q=(A-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+q),this.lastTimestamp=A}updateClientSendingRate(A){let q;if(this.updateMeasuredRate(),Xs3.isThrottlingError(A)){let Y=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=Y,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),q=this.cubicThrottle(Y),this.enableTokenBucket()}else this.calculateTimeWindow(),q=this.cubicSuccess(this.getCurrentTimeInSeconds());let K=Math.min(q,2*this.measuredTxRate);this.updateTokenBucketRate(K)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(A){return this.getPrecise(A*this.beta)}cubicSuccess(A){return this.getPrecise(this.scaleConstant*Math.pow(A-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(A){this.refillTokenBucket(),this.fillRate=Math.max(A,this.minFillRate),this.maxCapacity=Math.max(A,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let A=this.getCurrentTimeInSeconds(),q=Math.floor(A*2)/2;if(this.requestCount++,q>this.lastTxRateBucket){let K=this.requestCount/(q-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(K*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=q}}getPrecise(A){return parseFloat(A.toFixed(8))}}var OB6=100,RY8=20000,YO7=500,yY8=500,zO7=5,wO7=10,_O7=1,Ws3="amz-sdk-invocation-id",Zs3="amz-sdk-request",Gs3=()=>{let A=OB6;return{computeNextBackoffDelay:(Y)=>{return Math.floor(Math.min(RY8,Math.random()*2**Y*A))},setDelayBase:(Y)=>{A=Y}}},KO7=({retryDelay:A,retryCount:q,retryCost:K})=>{return{getRetryCount:()=>q,getRetryDelay:()=>Math.min(RY8,A),getRetryCost:()=>K}};class g21{maxAttempts;mode=fs3.RETRY_MODES.STANDARD;capacity=yY8;retryBackoffStrategy=Gs3();maxAttemptsProvider;constructor(A){this.maxAttempts=A,this.maxAttemptsProvider=typeof A==="function"?A:async()=>A}async acquireInitialRetryToken(A){return KO7({retryDelay:OB6,retryCount:0})}async refreshRetryTokenForRetry(A,q){let K=await this.getMaxAttempts();if(this.shouldRetry(A,q,K)){let Y=q.errorType;this.retryBackoffStrategy.setDelayBase(Y==="THROTTLING"?YO7:OB6);let z=this.retryBackoffStrategy.computeNextBackoffDelay(A.getRetryCount()),w=q.retryAfterHint?Math.max(q.retryAfterHint.getTime()-Date.now()||0,z):z,_=this.getCapacityCost(Y);return this.capacity-=_,KO7({retryDelay:w,retryCount:A.getRetryCount()+1,retryCost:_})}throw Error("No retry token available")}recordSuccess(A){this.capacity=Math.max(yY8,this.capacity+(A.getRetryCost()??_O7))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(A){return console.warn(`Max attempts provider could not resolve. Using default of ${LY8}`),LY8}}shouldRetry(A,q,K){return A.getRetryCount()+1<K&&this.capacity>=this.getCapacityCost(q.errorType)&&this.isRetryableError(q.errorType)}getCapacityCost(A){return A==="TRANSIENT"?wO7:zO7}isRetryableError(A){return A==="THROTTLING"||A==="TRANSIENT"}}class $O7{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=fs3.RETRY_MODES.ADAPTIVE;constructor(A,q){this.maxAttemptsProvider=A;let{rateLimiter:K}=q??{};this.rateLimiter=K??new m21,this.standardRetryStrategy=new g21(A)}async acquireInitialRetryToken(A){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(A)}async refreshRetryTokenForRetry(A,q){return this.rateLimiter.updateClientSendingRate(q),this.standardRetryStrategy.refreshRetryTokenForRetry(A,q)}recordSuccess(A){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(A)}}class OO7 extends g21{computeNextBackoffDelay;constructor(A,q=OB6){super(typeof A==="function"?A:async()=>A);if(typeof q==="number")this.computeNextBackoffDelay=()=>q;else this.computeNextBackoffDelay=q}async refreshRetryTokenForRetry(A,q){let K=await super.refreshRetryTokenForRetry(A,q);return K.getRetryDelay=()=>this.computeNextBackoffDelay(K.getRetryCount()),K}}fs3.AdaptiveRetryStrategy=$O7;fs3.ConfiguredRetryStrategy=OO7;fs3.DEFAULT_MAX_ATTEMPTS=LY8;fs3.DEFAULT_RETRY_DELAY_BASE=OB6;fs3.DEFAULT_RETRY_MODE=Ps3;fs3.DefaultRateLimiter=m21;fs3.INITIAL_RETRY_TOKENS=yY8;fs3.INVOCATION_ID_HEADER=Ws3;fs3.MAXIMUM_RETRY_DELAY=RY8;fs3.NO_RETRY_INCREMENT=_O7;fs3.REQUEST_HEADER=Zs3;fs3.RETRY_COST=zO7;fs3.StandardRetryStrategy=g21;fs3.THROTTLING_RETRY_DELAY_BASE=YO7;fs3.TIMEOUT_RETRY_COST=wO7});var uY8=C((Qs3)=>{Qs3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Qs3.HttpAuthLocation||(Qs3.HttpAuthLocation={}));Qs3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Qs3.HttpApiKeyAuthLocation||(Qs3.HttpApiKeyAuthLocation={}));Qs3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Qs3.EndpointURLScheme||(Qs3.EndpointURLScheme={}));Qs3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Qs3.AlgorithmId||(Qs3.AlgorithmId={}));var us3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Qs3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Qs3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Bs3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},ms3=(A)=>{return us3(A)},gs3=(A)=>{return Bs3(A)};Qs3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Qs3.FieldPosition||(Qs3.FieldPosition={}));var Fs3="__smithy_context";Qs3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Qs3.IniSectionType||(Qs3.IniSectionType={}));Qs3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Qs3.RequestHandlerProtocol||(Qs3.RequestHandlerProtocol={}));Qs3.SMITHY_CONTEXT_KEY=Fs3;Qs3.getDefaultClientConfiguration=ms3;Qs3.resolveDefaultRuntimeConfig=gs3});var MO7=C((os3)=>{var cs3=uY8(),ls3=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},is3=(A)=>{return{httpHandler:A.httpHandler()}};class HO7{name;kind;values;constructor({name:A,kind:q=cs3.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class jO7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class F21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new F21({...A,headers:{...A.headers}});if(q.query)q.query=ns3(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return F21.clone(this)}}function ns3(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class JO7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function rs3(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}os3.Field=HO7;os3.Fields=jO7;os3.HttpRequest=F21;os3.HttpResponse=JO7;os3.getHttpHandlerExtensionConfiguration=ls3;os3.isValidHostname=rs3;os3.resolveHttpHandlerRuntimeConfig=is3});var EO7=C((DP6)=>{var PO7=Qm(),QY8=MN(),mY8=uY8(),Yt3=lO(),DO7=JN();class WO7{config;middlewareStack=PO7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var BY8="***SensitiveInformation***";function gY8(A,q){if(q==null)return q;let K=Yt3.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return BY8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return BY8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return BY8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=gY8(_,Y[w]);return z}return q}class UY8{middlewareStack=PO7.constructStack();schema;static classBuilder(){return new ZO7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[mY8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class ZO7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends UY8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?gY8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?gY8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var zt3="***SensitiveInformation***",wt3=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class MP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return MP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===MP6)return MP6.isInstance(A);if(MP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var GO7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},fO7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=$t3(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw GO7(_,q)},_t3=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{fO7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},$t3=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),Ot3=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},XO7=!1,Ht3=(A)=>{if(A&&!XO7&&parseInt(A.substring(1,A.indexOf(".")))<16)XO7=!0},jt3=(A)=>{let q=[];for(let K in mY8.AlgorithmId){let Y=mY8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Jt3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Mt3=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},Dt3=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},TO7=(A)=>{return Object.assign(jt3(A),Mt3(A))},Xt3=TO7,Pt3=(A)=>{return Object.assign(Jt3(A),Dt3(A))},Wt3=(A)=>Array.isArray(A)?A:[A],VO7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=VO7(A[K]);return A},Zt3=(A)=>{return A!=null};class NO7{trace(){}debug(){}info(){}warn(){}error(){}}function vO7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,Tt3(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}kO7(Y,null,w,_)}return Y}var Gt3=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},ft3=(A,q)=>{let K={};for(let Y in q)kO7(K,A,q,Y);return K},Tt3=(A,q,K)=>{return vO7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},kO7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=Vt3,O=Nt3,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},Vt3=(A)=>A!=null,Nt3=(A)=>A,vt3=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},kt3=(A)=>A.toISOString().replace(".000Z","Z"),FY8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(FY8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=FY8(A[K])}return q}return A};Object.defineProperty(DP6,"collectBody",{enumerable:!0,get:function(){return QY8.collectBody}});Object.defineProperty(DP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return QY8.extendedEncodeURIComponent}});Object.defineProperty(DP6,"resolvedPath",{enumerable:!0,get:function(){return QY8.resolvedPath}});DP6.Client=WO7;DP6.Command=UY8;DP6.NoOpLogger=NO7;DP6.SENSITIVE_STRING=zt3;DP6.ServiceException=MP6;DP6._json=FY8;DP6.convertMap=Gt3;DP6.createAggregatedClient=wt3;DP6.decorateServiceException=GO7;DP6.emitWarningIfUnsupportedVersion=Ht3;DP6.getArrayIfSingleItem=Wt3;DP6.getDefaultClientConfiguration=Xt3;DP6.getDefaultExtensionConfiguration=TO7;DP6.getValueFromTextNode=VO7;DP6.isSerializableHeaderValue=Zt3;DP6.loadConfigsForDefaultMode=Ot3;DP6.map=vO7;DP6.resolveDefaultRuntimeConfig=Pt3;DP6.serializeDateTime=kt3;DP6.serializeFloat=vt3;DP6.take=ft3;DP6.throwDefaultError=fO7;DP6.withBaseException=_t3;Object.keys(DO7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(DP6,A))Object.defineProperty(DP6,A,{enumerable:!0,get:function(){return DO7[A]}})})});var RO7=C((LO7)=>{Object.defineProperty(LO7,"__esModule",{value:!0});LO7.isStreamingPayload=void 0;var rt3=g6("stream"),ot3=(A)=>A?.body instanceof rt3.Readable||typeof ReadableStream<"u"&&A?.body instanceof ReadableStream;LO7.isStreamingPayload=ot3});var h0=C((Oe3)=>{var gH=lm(),XP6=MO7(),Zt=EY8(),CO7=d38(),SO7=pZ(),at3=EO7(),st3=RO7(),tt3=(A,q)=>{let K=A,Y=gH.NO_RETRY_INCREMENT,z=gH.RETRY_COST,w=gH.TIMEOUT_RETRY_COST,_=A,$=(J)=>J.name==="TimeoutError"?w:z,O=(J)=>$(J)<=_;return Object.freeze({hasRetryTokens:O,retrieveRetryTokens:(J)=>{if(!O(J))throw Error("No retry token available");let M=$(J);return _-=M,M},releaseRetryTokens:(J)=>{_+=J??Y,_=Math.min(_,K)}})},hO7=(A,q)=>Math.floor(Math.min(gH.MAXIMUM_RETRY_DELAY,Math.random()*2**q*A)),IO7=(A)=>{if(!A)return!1;return Zt.isRetryableByTrait(A)||Zt.isClockSkewError(A)||Zt.isThrottlingError(A)||Zt.isTransientError(A)},bO7=(A)=>{if(A instanceof Error)return A;if(A instanceof Object)return Object.assign(Error(),A);if(typeof A==="string")return Error(A);return Error(`AWS SDK error wrapper for ${A}`)};class cY8{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=gH.RETRY_MODES.STANDARD;constructor(A,q){this.maxAttemptsProvider=A,this.retryDecider=q?.retryDecider??IO7,this.delayDecider=q?.delayDecider??hO7,this.retryQuota=q?.retryQuota??tt3(gH.INITIAL_RETRY_TOKENS)}shouldRetry(A,q,K){return q<K&&this.retryDecider(A)&&this.retryQuota.hasRetryTokens(A)}async getMaxAttempts(){let A;try{A=await this.maxAttemptsProvider()}catch(q){A=gH.DEFAULT_MAX_ATTEMPTS}return A}async retry(A,q,K){let Y,z=0,w=0,_=await this.getMaxAttempts(),{request:$}=q;if(XP6.HttpRequest.isInstance($))$.headers[gH.INVOCATION_ID_HEADER]=CO7.v4();while(!0)try{if(XP6.HttpRequest.isInstance($))$.headers[gH.REQUEST_HEADER]=`attempt=${z+1}; max=${_}`;if(K?.beforeRequest)await K.beforeRequest();let{response:O,output:H}=await A(q);if(K?.afterRequest)K.afterRequest(O);return this.retryQuota.releaseRetryTokens(Y),H.$metadata.attempts=z+1,H.$metadata.totalRetryDelay=w,{response:O,output:H}}catch(O){let H=bO7(O);if(z++,this.shouldRetry(H,z,_)){Y=this.retryQuota.retrieveRetryTokens(H);let j=this.delayDecider(Zt.isThrottlingError(H)?gH.THROTTLING_RETRY_DELAY_BASE:gH.DEFAULT_RETRY_DELAY_BASE,z),J=et3(H.$response),M=Math.max(J||0,j);w+=M,await new Promise((D)=>setTimeout(D,M));continue}if(!H.$metadata)H.$metadata={};throw H.$metadata.attempts=z,H.$metadata.totalRetryDelay=w,H}}}var et3=(A)=>{if(!XP6.HttpResponse.isInstance(A))return;let q=Object.keys(A.headers).find((w)=>w.toLowerCase()==="retry-after");if(!q)return;let K=A.headers[q],Y=Number(K);if(!Number.isNaN(Y))return Y*1000;return new Date(K).getTime()-Date.now()};class xO7 extends cY8{rateLimiter;constructor(A,q){let{rateLimiter:K,...Y}=q??{};super(A,Y);this.rateLimiter=K??new gH.DefaultRateLimiter,this.mode=gH.RETRY_MODES.ADAPTIVE}async retry(A,q){return super.retry(A,q,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(K)=>{this.rateLimiter.updateClientSendingRate(K)}})}}var pY8="AWS_MAX_ATTEMPTS",dY8="max_attempts",Ae3={environmentVariableSelector:(A)=>{let q=A[pY8];if(!q)return;let K=parseInt(q);if(Number.isNaN(K))throw Error(`Environment variable ${pY8} mast be a number, got "${q}"`);return K},configFileSelector:(A)=>{let q=A[dY8];if(!q)return;let K=parseInt(q);if(Number.isNaN(K))throw Error(`Shared config file entry ${dY8} mast be a number, got "${q}"`);return K},default:gH.DEFAULT_MAX_ATTEMPTS},qe3=(A)=>{let{retryStrategy:q,retryMode:K,maxAttempts:Y}=A,z=SO7.normalizeProvider(Y??gH.DEFAULT_MAX_ATTEMPTS);return Object.assign(A,{maxAttempts:z,retryStrategy:async()=>{if(q)return q;if(await SO7.normalizeProvider(K)()===gH.RETRY_MODES.ADAPTIVE)return new gH.AdaptiveRetryStrategy(z);return new gH.StandardRetryStrategy(z)}})},uO7="AWS_RETRY_MODE",BO7="retry_mode",Ke3={environmentVariableSelector:(A)=>A[uO7],configFileSelector:(A)=>A[BO7],default:gH.DEFAULT_RETRY_MODE},mO7=()=>(A)=>async(q)=>{let{request:K}=q;if(XP6.HttpRequest.isInstance(K))delete K.headers[gH.INVOCATION_ID_HEADER],delete K.headers[gH.REQUEST_HEADER];return A(q)},gO7={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Ye3=(A)=>({applyToStack:(q)=>{q.addRelativeTo(mO7(),gO7)}}),FO7=(A)=>(q,K)=>async(Y)=>{let z=await A.retryStrategy(),w=await A.maxAttempts();if(ze3(z)){z=z;let _=await z.acquireInitialRetryToken(K.partition_id),$=Error(),O=0,H=0,{request:j}=Y,J=XP6.HttpRequest.isInstance(j);if(J)j.headers[gH.INVOCATION_ID_HEADER]=CO7.v4();while(!0)try{if(J)j.headers[gH.REQUEST_HEADER]=`attempt=${O+1}; max=${w}`;let{response:M,output:D}=await q(Y);return z.recordSuccess(_),D.$metadata.attempts=O+1,D.$metadata.totalRetryDelay=H,{response:M,output:D}}catch(M){let D=we3(M);if($=bO7(M),J&&st3.isStreamingPayload(j))throw(K.logger instanceof at3.NoOpLogger?console:K.logger)?.warn("An error was encountered in a non-retryable streaming request."),$;try{_=await z.refreshRetryTokenForRetry(_,D)}catch(P){if(!$.$metadata)$.$metadata={};throw $.$metadata.attempts=O+1,$.$metadata.totalRetryDelay=H,$}O=_.getRetryCount();let X=_.getRetryDelay();H+=X,await new Promise((P)=>setTimeout(P,X))}}else{if(z=z,z?.mode)K.userAgent=[...K.userAgent||[],["cfg/retry-mode",z.mode]];return z.retry(q,Y)}},ze3=(A)=>typeof A.acquireInitialRetryToken<"u"&&typeof A.refreshRetryTokenForRetry<"u"&&typeof A.recordSuccess<"u",we3=(A)=>{let q={error:A,errorType:_e3(A)},K=UO7(A.$response);if(K)q.retryAfterHint=K;return q},_e3=(A)=>{if(Zt.isThrottlingError(A))return"THROTTLING";if(Zt.isTransientError(A))return"TRANSIENT";if(Zt.isServerError(A))return"SERVER_ERROR";return"CLIENT_ERROR"},QO7={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},$e3=(A)=>({applyToStack:(q)=>{q.add(FO7(A),QO7)}}),UO7=(A)=>{if(!XP6.HttpResponse.isInstance(A))return;let q=Object.keys(A.headers).find((w)=>w.toLowerCase()==="retry-after");if(!q)return;let K=A.headers[q],Y=Number(K);if(!Number.isNaN(Y))return new Date(Y*1000);return new Date(K)};Oe3.AdaptiveRetryStrategy=xO7;Oe3.CONFIG_MAX_ATTEMPTS=dY8;Oe3.CONFIG_RETRY_MODE=BO7;Oe3.ENV_MAX_ATTEMPTS=pY8;Oe3.ENV_RETRY_MODE=uO7;Oe3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=Ae3;Oe3.NODE_RETRY_MODE_CONFIG_OPTIONS=Ke3;Oe3.StandardRetryStrategy=cY8;Oe3.defaultDelayDecider=hO7;Oe3.defaultRetryDecider=IO7;Oe3.getOmitRetryHeadersPlugin=Ye3;Oe3.getRetryAfterHint=UO7;Oe3.getRetryPlugin=$e3;Oe3.omitRetryHeadersMiddleware=mO7;Oe3.omitRetryHeadersMiddlewareOptions=gO7;Oe3.resolveRetryConfig=qe3;Oe3.retryMiddleware=FO7;Oe3.retryMiddlewareOptions=QO7});var sY8=C((Ie3)=>{Ie3.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ie3.HttpAuthLocation||(Ie3.HttpAuthLocation={}));Ie3.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Ie3.HttpApiKeyAuthLocation||(Ie3.HttpApiKeyAuthLocation={}));Ie3.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Ie3.EndpointURLScheme||(Ie3.EndpointURLScheme={}));Ie3.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Ie3.AlgorithmId||(Ie3.AlgorithmId={}));var ye3=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Ie3.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Ie3.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Re3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Se3=(A)=>{return ye3(A)},Ce3=(A)=>{return Re3(A)};Ie3.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Ie3.FieldPosition||(Ie3.FieldPosition={}));var he3="__smithy_context";Ie3.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Ie3.IniSectionType||(Ie3.IniSectionType={}));Ie3.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Ie3.RequestHandlerProtocol||(Ie3.RequestHandlerProtocol={}));Ie3.SMITHY_CONTEXT_KEY=he3;Ie3.getDefaultClientConfiguration=Se3;Ie3.resolveDefaultRuntimeConfig=Ce3});var df=C((WP6)=>{var cO7=Qm(),Kz8=MN(),eY8=sY8(),Be3=lO(),pO7=JN();class lO7{config;middlewareStack=cO7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var tY8="***SensitiveInformation***";function Az8(A,q){if(q==null)return q;let K=Be3.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return tY8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return tY8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return tY8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=Az8(_,Y[w]);return z}return q}class Yz8{middlewareStack=cO7.constructStack();schema;static classBuilder(){return new iO7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[eY8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class iO7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends Yz8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?Az8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?Az8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var me3="***SensitiveInformation***",ge3=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class PP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return PP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===PP6)return PP6.isInstance(A);if(PP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var nO7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},rO7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=Qe3(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw nO7(_,q)},Fe3=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{rO7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},Qe3=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),Ue3=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},dO7=!1,pe3=(A)=>{if(A&&!dO7&&parseInt(A.substring(1,A.indexOf(".")))<16)dO7=!0},de3=(A)=>{let q=[];for(let K in eY8.AlgorithmId){let Y=eY8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},ce3=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},le3=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},ie3=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},oO7=(A)=>{return Object.assign(de3(A),le3(A))},ne3=oO7,re3=(A)=>{return Object.assign(ce3(A),ie3(A))},oe3=(A)=>Array.isArray(A)?A:[A],aO7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=aO7(A[K]);return A},ae3=(A)=>{return A!=null};class sO7{trace(){}debug(){}info(){}warn(){}error(){}}function tO7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,ee3(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}eO7(Y,null,w,_)}return Y}var se3=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},te3=(A,q)=>{let K={};for(let Y in q)eO7(K,A,q,Y);return K},ee3=(A,q,K)=>{return tO7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},eO7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=A65,O=q65,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},A65=(A)=>A!=null,q65=(A)=>A,K65=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},Y65=(A)=>A.toISOString().replace(".000Z","Z"),qz8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(qz8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=qz8(A[K])}return q}return A};Object.defineProperty(WP6,"collectBody",{enumerable:!0,get:function(){return Kz8.collectBody}});Object.defineProperty(WP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return Kz8.extendedEncodeURIComponent}});Object.defineProperty(WP6,"resolvedPath",{enumerable:!0,get:function(){return Kz8.resolvedPath}});WP6.Client=lO7;WP6.Command=Yz8;WP6.NoOpLogger=sO7;WP6.SENSITIVE_STRING=me3;WP6.ServiceException=PP6;WP6._json=qz8;WP6.convertMap=se3;WP6.createAggregatedClient=ge3;WP6.decorateServiceException=nO7;WP6.emitWarningIfUnsupportedVersion=pe3;WP6.getArrayIfSingleItem=oe3;WP6.getDefaultClientConfiguration=ne3;WP6.getDefaultExtensionConfiguration=oO7;WP6.getValueFromTextNode=aO7;WP6.isSerializableHeaderValue=ae3;WP6.loadConfigsForDefaultMode=Ue3;WP6.map=tO7;WP6.resolveDefaultRuntimeConfig=re3;WP6.serializeDateTime=Y65;WP6.serializeFloat=K65;WP6.take=te3;WP6.throwDefaultError=rO7;WP6.withBaseException=Fe3;Object.keys(pO7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(WP6,A))Object.defineProperty(WP6,A,{enumerable:!0,get:function(){return pO7[A]}})})});var wz8=C((AH7)=>{Object.defineProperty(AH7,"__esModule",{value:!0});AH7.resolveHttpAuthSchemeConfig=AH7.defaultSSOOIDCHttpAuthSchemeProvider=AH7.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var y65=O$(),zz8=pZ(),R65=async(A,q,K)=>{return{operation:(0,zz8.getSmithyContext)(q).operation,region:await(0,zz8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};AH7.defaultSSOOIDCHttpAuthSchemeParametersProvider=R65;function S65(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function C65(A){return{schemeId:"smithy.api#noAuth"}}var h65=(A)=>{let q=[];switch(A.operation){case"CreateToken":{q.push(C65(A));break}default:q.push(S65(A))}return q};AH7.defaultSSOOIDCHttpAuthSchemeProvider=h65;var I65=(A)=>{let q=(0,y65.resolveAwsSdkSigV4Config)(A);return Object.assign(q,{authSchemePreference:(0,zz8.normalizeProvider)(A.authSchemePreference??[])})};AH7.resolveHttpAuthSchemeConfig=I65});var Q21=C((IM2,u65)=>{u65.exports={name:"@aws-sdk/nested-clients",version:"3.936.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},sideEffects:!1,author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./package.json":"./package.json","./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"},"./signin":{types:"./dist-types/submodules/signin/index.d.ts",module:"./dist-es/submodules/signin/index.js",node:"./dist-cjs/submodules/signin/index.js",import:"./dist-es/submodules/signin/index.js",require:"./dist-cjs/submodules/signin/index.js"}}}});var Nc=C((U65)=>{var KH7=g6("os"),_z8=g6("process"),B65=cm(),YH7={isCrtAvailable:!1},m65=()=>{if(YH7.isCrtAvailable)return["md/crt-avail"];return null},zH7=({serviceId:A,clientVersion:q})=>{return async(K)=>{let Y=[["aws-sdk-js",q],["ua","2.1"],[`os/${KH7.platform()}`,KH7.release()],["lang/js"],["md/nodejs",`${_z8.versions.node}`]],z=m65();if(z)Y.push(z);if(A)Y.push([`api/${A}`,q]);if(_z8.env.AWS_EXECUTION_ENV)Y.push([`exec-env/${_z8.env.AWS_EXECUTION_ENV}`]);let w=await K?.userAgentAppId?.();return w?[...Y,[`app/${w}`]]:[...Y]}},g65=zH7,wH7="AWS_SDK_UA_APP_ID",_H7="sdk_ua_app_id",F65="sdk-ua-app-id",Q65={environmentVariableSelector:(A)=>A[wH7],configFileSelector:(A)=>A[_H7]??A[F65],default:B65.DEFAULT_UA_APP_ID};U65.NODE_APP_ID_CONFIG_OPTIONS=Q65;U65.UA_APP_ID_ENV_NAME=wH7;U65.UA_APP_ID_INI_NAME=_H7;U65.createDefaultUserAgentProvider=zH7;U65.crtAvailability=YH7;U65.defaultUserAgent=g65});var $H7=C((o65)=>{var r65=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";o65.isArrayBuffer=r65});var OH7=C((A15)=>{var s65=$H7(),$z8=g6("buffer"),t65=(A,q=0,K=A.byteLength-q)=>{if(!s65.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return $z8.Buffer.from(A,q,K)},e65=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?$z8.Buffer.from(A,q):$z8.Buffer.from(A)};A15.fromArrayBuffer=t65;A15.fromString=e65});var vc=C((w15)=>{var Oz8=OH7(),Y15=Z2(),z15=g6("buffer"),HH7=g6("crypto");class JH7{algorithmIdentifier;secret;hash;constructor(A,q){this.algorithmIdentifier=A,this.secret=q,this.reset()}update(A,q){this.hash.update(Y15.toUint8Array(jH7(A,q)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?HH7.createHmac(this.algorithmIdentifier,jH7(this.secret)):HH7.createHash(this.algorithmIdentifier)}}function jH7(A,q){if(z15.Buffer.isBuffer(A))return A;if(typeof A==="string")return Oz8.fromString(A,q);if(ArrayBuffer.isView(A))return Oz8.fromArrayBuffer(A.buffer,A.byteOffset,A.byteLength);return Oz8.fromArrayBuffer(A)}w15.Hash=JH7});var kc=C((O15)=>{var Hz8=g6("node:fs"),$15=(A)=>{if(!A)return 0;if(typeof A==="string")return Buffer.byteLength(A);else if(typeof A.byteLength==="number")return A.byteLength;else if(typeof A.size==="number")return A.size;else if(typeof A.start==="number"&&typeof A.end==="number")return A.end+1-A.start;else if(A instanceof Hz8.ReadStream){if(A.path!=null)return Hz8.lstatSync(A.path).size;else if(typeof A.fd==="number")return Hz8.fstatSync(A.fd).size}throw Error(`Body Length computation failed for ${A}`)};O15.calculateBodyLength=$15});var Lc=C((Z15)=>{var MH7=d98(),f2=lO(),Ec=a98(),I0=MN(),aX=JN(),JB6=e98(),XH7=Z2(),CR=KY8();class ZP6{queryCompat;constructor(A=!1){this.queryCompat=A}resolveRestContentType(A,q){let K=q.getMemberSchemas(),Y=Object.values(K).find((z)=>{return!!z.getMergedTraits().httpPayload});if(Y){let z=Y.getMergedTraits().mediaType;if(z)return z;else if(Y.isStringSchema())return"text/plain";else if(Y.isBlobSchema())return"application/octet-stream";else return A}else if(!q.isUnitSchema()){if(Object.values(K).find((w)=>{let{httpQuery:_,httpQueryParams:$,httpHeader:O,httpLabel:H,httpPrefixHeaders:j}=w.getMergedTraits();return!_&&!$&&!O&&!H&&j===void 0}))return A}}async getErrorSchemaOrThrowBaseException(A,q,K,Y,z,w){let _=q,$=A;if(A.includes("#"))[_,$]=A.split("#");let O={$metadata:z,$fault:K.statusCode<500?"client":"server"},H=f2.TypeRegistry.for(_);try{return{errorSchema:w?.(H,$)??H.getSchema(A),errorMetadata:O}}catch(j){Y.message=Y.message??Y.Message??"UnknownError";let J=f2.TypeRegistry.for("smithy.ts.sdk.synthetic."+_),M=J.getBaseException();if(M){let D=J.getErrorCtor(M)??Error;throw this.decorateServiceException(Object.assign(new D({name:$}),O),Y)}throw this.decorateServiceException(Object.assign(Error($),O),Y)}}decorateServiceException(A,q={}){if(this.queryCompat){let K=A.Message??q.Message,Y=Ec.decorateServiceException(A,q);if(K)Y.Message=K,Y.message=K;return Y}return Ec.decorateServiceException(A,q)}setQueryCompatError(A,q){let K=q.headers?.["x-amzn-query-error"];if(A!==void 0&&K!=null){let[Y,z]=K.split(";"),w=Object.entries(A),_={Code:Y,Type:z};Object.assign(A,_);for(let[$,O]of w)_[$]=O;delete _.__type,A.Error=_}}queryCompatOutput(A,q){if(A.Error)q.Error=A.Error;if(A.Type)q.Type=A.Type;if(A.Code)q.Code=A.Code}}class PH7 extends MH7.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:A,awsQueryCompatible:q}){super({defaultNamespace:A});this.awsQueryCompatible=!!q,this.mixin=new ZP6(this.awsQueryCompatible)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(this.awsQueryCompatible)Y.headers["x-amzn-query-mode"]="true";return Y}async handleError(A,q,K,Y,z){if(this.awsQueryCompatible)this.mixin.setQueryCompatError(Y,K);let w=MH7.loadSmithyRpcV2CborErrorCode(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=f2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(f2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H),M={};for(let[D,X]of O.structIterator())M[D]=this.deserializer.readValue(X,Y[D]);if(this.awsQueryCompatible)this.mixin.queryCompatOutput(Y,M);throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}}var j15=(A)=>{if(A==null)return A;if(typeof A==="number"||typeof A==="bigint"){let q=Error(`Received number ${A} where a string was expected.`);return q.name="Warning",console.warn(q),String(A)}if(typeof A==="boolean"){let q=Error(`Received boolean ${A} where a string was expected.`);return q.name="Warning",console.warn(q),String(A)}return A},J15=(A)=>{if(A==null)return A;if(typeof A==="string"){let q=A.toLowerCase();if(A!==""&&q!=="false"&&q!=="true"){let K=Error(`Received string "${A}" where a boolean was expected.`);K.name="Warning",console.warn(K)}return A!==""&&q!=="false"}return A},M15=(A)=>{if(A==null)return A;if(typeof A==="string"){let q=Number(A);if(q.toString()!==A){let K=Error(`Received string "${A}" where a number was expected.`);return K.name="Warning",console.warn(K),A}return q}return A};class Gt{serdeContext;setSerdeContext(A){this.serdeContext=A}}function D15(A,q,K){if(K?.source){let Y=K.source;if(typeof q==="number"){if(q>Number.MAX_SAFE_INTEGER||q<Number.MIN_SAFE_INTEGER||Y!==String(q))if(Y.includes("."))return new aX.NumericValue(Y,"bigDecimal");else return BigInt(Y)}}return q}var WH7=(A,q)=>Ec.collectBody(A,q).then((K)=>(q?.utf8Encoder??XH7.toUtf8)(K)),jz8=(A,q)=>WH7(A,q).then((K)=>{if(K.length)try{return JSON.parse(K)}catch(Y){if(Y?.name==="SyntaxError")Object.defineProperty(Y,"$responseBodyText",{value:K});throw Y}return{}}),X15=async(A,q)=>{let K=await jz8(A,q);return K.message=K.message??K.Message,K},Jz8=(A,q)=>{let K=(w,_)=>Object.keys(w).find(($)=>$.toLowerCase()===_.toLowerCase()),Y=(w)=>{let _=w;if(typeof _==="number")_=_.toString();if(_.indexOf(",")>=0)_=_.split(",")[0];if(_.indexOf(":")>=0)_=_.split(":")[0];if(_.indexOf("#")>=0)_=_.split("#")[1];return _},z=K(A.headers,"x-amzn-errortype");if(z!==void 0)return Y(A.headers[z]);if(q&&typeof q==="object"){let w=K(q,"code");if(w&&q[w]!==void 0)return Y(q[w]);if(q.__type!==void 0)return Y(q.__type)}};class Mz8 extends Gt{settings;constructor(A){super();this.settings=A}async read(A,q){return this._read(A,typeof q==="string"?JSON.parse(q,D15):await jz8(q,this.serdeContext))}readObject(A,q){return this._read(A,q)}_read(A,q){let K=q!==null&&typeof q==="object",Y=f2.NormalizedSchema.of(A);if(Y.isListSchema()&&Array.isArray(q)){let w=Y.getValueSchema(),_=[],$=!!Y.getMergedTraits().sparse;for(let O of q)if($||O!=null)_.push(this._read(w,O));return _}else if(Y.isMapSchema()&&K){let w=Y.getValueSchema(),_={},$=!!Y.getMergedTraits().sparse;for(let[O,H]of Object.entries(q))if($||H!=null)_[O]=this._read(w,H);return _}else if(Y.isStructSchema()&&K){let w={};for(let[_,$]of Y.structIterator()){let O=this.settings.jsonName?$.getMergedTraits().jsonName??_:_,H=this._read($,q[O]);if(H!=null)w[_]=H}return w}if(Y.isBlobSchema()&&typeof q==="string")return JB6.fromBase64(q);let z=Y.getMergedTraits().mediaType;if(Y.isStringSchema()&&typeof q==="string"&&z){if(z==="application/json"||z.endsWith("+json"))return aX.LazyJsonString.from(q)}if(Y.isTimestampSchema()&&q!=null)switch(I0.determineTimestampFormat(Y,this.settings)){case 5:return aX.parseRfc3339DateTimeWithOffset(q);case 6:return aX.parseRfc7231DateTime(q);case 7:return aX.parseEpochTimestamp(q);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",q),new Date(q)}if(Y.isBigIntegerSchema()&&(typeof q==="number"||typeof q==="string"))return BigInt(q);if(Y.isBigDecimalSchema()&&q!=null){if(q instanceof aX.NumericValue)return q;let w=q;if(w.type==="bigDecimal"&&"string"in w)return new aX.NumericValue(w.string,w.type);return new aX.NumericValue(String(q),"bigDecimal")}if(Y.isNumericSchema()&&typeof q==="string")switch(q){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}if(Y.isDocumentSchema())if(K){let w=Array.isArray(q)?[]:{};for(let[_,$]of Object.entries(q))if($ instanceof aX.NumericValue)w[_]=$;else w[_]=this._read(Y,$);return w}else return structuredClone(q);return q}}var DH7=String.fromCharCode(925);class ZH7{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(A,q)=>{if(q instanceof aX.NumericValue){let K=`${DH7+"nv"+this.counter++}_`+q.string;return this.values.set(`"${K}"`,q.string),K}if(typeof q==="bigint"){let K=q.toString(),Y=`${DH7+"b"+this.counter++}_`+K;return this.values.set(`"${Y}"`,K),Y}return q}}replaceInJson(A){if(this.stage===0)throw Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return A;for(let[q,K]of this.values)A=A.replace(q,K);return A}}class Dz8 extends Gt{settings;buffer;rootSchema;constructor(A){super();this.settings=A}write(A,q){this.rootSchema=f2.NormalizedSchema.of(A),this.buffer=this._write(this.rootSchema,q)}writeDiscriminatedDocument(A,q){if(this.write(A,q),typeof this.buffer==="object")this.buffer.__type=f2.NormalizedSchema.of(A).getName(!0)}flush(){let{rootSchema:A}=this;if(this.rootSchema=void 0,A?.isStructSchema()||A?.isDocumentSchema()){let q=new ZH7;return q.replaceInJson(JSON.stringify(this.buffer,q.createReplacer(),0))}return this.buffer}_write(A,q,K){let Y=q!==null&&typeof q==="object",z=f2.NormalizedSchema.of(A);if(z.isListSchema()&&Array.isArray(q)){let w=z.getValueSchema(),_=[],$=!!z.getMergedTraits().sparse;for(let O of q)if($||O!=null)_.push(this._write(w,O));return _}else if(z.isMapSchema()&&Y){let w=z.getValueSchema(),_={},$=!!z.getMergedTraits().sparse;for(let[O,H]of Object.entries(q))if($||H!=null)_[O]=this._write(w,H);return _}else if(z.isStructSchema()&&Y){let w={};for(let[_,$]of z.structIterator()){let O=this.settings.jsonName?$.getMergedTraits().jsonName??_:_,H=this._write($,q[_],z);if(H!==void 0)w[O]=H}return w}if(q===null&&K?.isStructSchema())return;if(z.isBlobSchema()&&(q instanceof Uint8Array||typeof q==="string")||z.isDocumentSchema()&&q instanceof Uint8Array){if(z===this.rootSchema)return q;return(this.serdeContext?.base64Encoder??JB6.toBase64)(q)}if((z.isTimestampSchema()||z.isDocumentSchema())&&q instanceof Date)switch(I0.determineTimestampFormat(z,this.settings)){case 5:return q.toISOString().replace(".000Z","Z");case 6:return aX.dateToUtcString(q);case 7:return q.getTime()/1000;default:return console.warn("Missing timestamp format, using epoch seconds",q),q.getTime()/1000}if(z.isNumericSchema()&&typeof q==="number"){if(Math.abs(q)===1/0||isNaN(q))return String(q)}if(z.isStringSchema()){if(typeof q>"u"&&z.isIdempotencyToken())return aX.generateIdempotencyToken();let w=z.getMergedTraits().mediaType;if(q!=null&&w){if(w==="application/json"||w.endsWith("+json"))return aX.LazyJsonString.from(q)}}if(z.isDocumentSchema())if(Y){let w=Array.isArray(q)?[]:{};for(let[_,$]of Object.entries(q))if($ instanceof aX.NumericValue)w[_]=$;else w[_]=this._write(z,$);return w}else return structuredClone(q);return q}}class U21 extends Gt{settings;constructor(A){super();this.settings=A}createSerializer(){let A=new Dz8(this.settings);return A.setSerdeContext(this.serdeContext),A}createDeserializer(){let A=new Mz8(this.settings);return A.setSerdeContext(this.serdeContext),A}}class p21 extends I0.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A});this.serviceTarget=q,this.codec=new U21({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!K,this.mixin=new ZP6(this.awsQueryCompatible)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(!Y.path.endsWith("/"))Y.path+="/";if(Object.assign(Y.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${A.name}`}),this.awsQueryCompatible)Y.headers["x-amzn-query-mode"]="true";if(f2.deref(A.input)==="unit"||!Y.body)Y.body="{}";return Y}getPayloadCodec(){return this.codec}async handleError(A,q,K,Y,z){if(this.awsQueryCompatible)this.mixin.setQueryCompatError(Y,K);let w=Jz8(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=f2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(f2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H),M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().jsonName??D;M[D]=this.codec.createDeserializer().readObject(X,Y[P])}if(this.awsQueryCompatible)this.mixin.queryCompatOutput(Y,M);throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}}class GH7 extends p21{constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class fH7 extends p21{constructor({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K}){super({defaultNamespace:A,serviceTarget:q,awsQueryCompatible:K})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class TH7 extends I0.HttpBindingProtocol{serializer;deserializer;codec;mixin=new ZP6;constructor({defaultNamespace:A}){super({defaultNamespace:A});let q={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new U21(q),this.serializer=new I0.HttpInterceptingShapeSerializer(this.codec.createSerializer(),q),this.deserializer=new I0.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),q)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(A){this.codec.setSerdeContext(A),super.setSerdeContext(A)}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K),z=f2.NormalizedSchema.of(A.input);if(!Y.headers["content-type"]){let w=this.mixin.resolveRestContentType(this.getDefaultContentType(),z);if(w)Y.headers["content-type"]=w}if(Y.body==null&&Y.headers["content-type"]===this.getDefaultContentType())Y.body="{}";return Y}async deserializeResponse(A,q,K){let Y=await super.deserializeResponse(A,q,K),z=f2.NormalizedSchema.of(A.output);for(let[w,_]of z.structIterator())if(_.getMemberTraits().httpPayload&&!(w in Y))Y[w]=null;return Y}async handleError(A,q,K,Y,z){let w=Jz8(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=f2.NormalizedSchema.of(_),H=Y.message??Y.Message??"Unknown",J=new(f2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H);await this.deserializeHttpMessage(_,q,K,Y);let M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().jsonName??D;M[D]=this.codec.createDeserializer().readObject(X,Y[P])}throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}getDefaultContentType(){return"application/json"}}var P15=(A)=>{if(A==null)return;if(typeof A==="object"&&"__type"in A)delete A.__type;return Ec.expectUnion(A)};class d21 extends Gt{settings;stringDeserializer;constructor(A){super();this.settings=A,this.stringDeserializer=new I0.FromStringShapeDeserializer(A)}setSerdeContext(A){this.serdeContext=A,this.stringDeserializer.setSerdeContext(A)}read(A,q,K){let Y=f2.NormalizedSchema.of(A),z=Y.getMemberSchemas();if(Y.isStructSchema()&&Y.isMemberSchema()&&!!Object.values(z).find((O)=>{return!!O.getMemberTraits().eventPayload})){let O={},H=Object.keys(z)[0];if(z[H].isBlobSchema())O[H]=q;else O[H]=this.read(z[H],q);return O}let _=(this.serdeContext?.utf8Encoder??XH7.toUtf8)(q),$=this.parseXml(_);return this.readSchema(A,K?$[K]:$)}readSchema(A,q){let K=f2.NormalizedSchema.of(A);if(K.isUnitSchema())return;let Y=K.getMergedTraits();if(K.isListSchema()&&!Array.isArray(q))return this.readSchema(K,[q]);if(q==null)return q;if(typeof q==="object"){let z=!!Y.sparse,w=!!Y.xmlFlattened;if(K.isListSchema()){let $=K.getValueSchema(),O=[],H=$.getMergedTraits().xmlName??"member",j=w?q:(q[0]??q)[H],J=Array.isArray(j)?j:[j];for(let M of J)if(M!=null||z)O.push(this.readSchema($,M));return O}let _={};if(K.isMapSchema()){let $=K.getKeySchema(),O=K.getValueSchema(),H;if(w)H=Array.isArray(q)?q:[q];else H=Array.isArray(q.entry)?q.entry:[q.entry];let j=$.getMergedTraits().xmlName??"key",J=O.getMergedTraits().xmlName??"value";for(let M of H){let D=M[j],X=M[J];if(X!=null||z)_[D]=this.readSchema(O,X)}return _}if(K.isStructSchema()){for(let[$,O]of K.structIterator()){let H=O.getMergedTraits(),j=!H.httpPayload?O.getMemberTraits().xmlName??$:H.xmlName??O.getName();if(q[j]!=null)_[$]=this.readSchema(O,q[j])}return _}if(K.isDocumentSchema())return q;throw Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${K.getName(!0)}`)}if(K.isListSchema())return[];if(K.isMapSchema()||K.isStructSchema())return{};return this.stringDeserializer.read(K,q)}parseXml(A){if(A.length){let q;try{q=CR.parseXML(A)}catch(w){if(w&&typeof w==="object")Object.defineProperty(w,"$responseBodyText",{value:A});throw w}let K="#text",Y=Object.keys(q)[0],z=q[Y];if(z[K])z[Y]=z[K],delete z[K];return Ec.getValueFromTextNode(z)}return{}}}class VH7 extends Gt{settings;buffer;constructor(A){super();this.settings=A}write(A,q,K=""){if(this.buffer===void 0)this.buffer="";let Y=f2.NormalizedSchema.of(A);if(K&&!K.endsWith("."))K+=".";if(Y.isBlobSchema()){if(typeof q==="string"||q instanceof Uint8Array)this.writeKey(K),this.writeValue((this.serdeContext?.base64Encoder??JB6.toBase64)(q))}else if(Y.isBooleanSchema()||Y.isNumericSchema()||Y.isStringSchema()){if(q!=null)this.writeKey(K),this.writeValue(String(q));else if(Y.isIdempotencyToken())this.writeKey(K),this.writeValue(aX.generateIdempotencyToken())}else if(Y.isBigIntegerSchema()){if(q!=null)this.writeKey(K),this.writeValue(String(q))}else if(Y.isBigDecimalSchema()){if(q!=null)this.writeKey(K),this.writeValue(q instanceof aX.NumericValue?q.string:String(q))}else if(Y.isTimestampSchema()){if(q instanceof Date)switch(this.writeKey(K),I0.determineTimestampFormat(Y,this.settings)){case 5:this.writeValue(q.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Ec.dateToUtcString(q));break;case 7:this.writeValue(String(q.getTime()/1000));break}}else if(Y.isDocumentSchema())throw Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${Y.getName(!0)}`);else if(Y.isListSchema()){if(Array.isArray(q))if(q.length===0){if(this.settings.serializeEmptyLists)this.writeKey(K),this.writeValue("")}else{let z=Y.getValueSchema(),w=this.settings.flattenLists||Y.getMergedTraits().xmlFlattened,_=1;for(let $ of q){if($==null)continue;let O=this.getKey("member",z.getMergedTraits().xmlName),H=w?`${K}${_}`:`${K}${O}.${_}`;this.write(z,$,H),++_}}}else if(Y.isMapSchema()){if(q&&typeof q==="object"){let z=Y.getKeySchema(),w=Y.getValueSchema(),_=Y.getMergedTraits().xmlFlattened,$=1;for(let[O,H]of Object.entries(q)){if(H==null)continue;let j=this.getKey("key",z.getMergedTraits().xmlName),J=_?`${K}${$}.${j}`:`${K}entry.${$}.${j}`,M=this.getKey("value",w.getMergedTraits().xmlName),D=_?`${K}${$}.${M}`:`${K}entry.${$}.${M}`;this.write(z,O,J),this.write(w,H,D),++$}}}else if(Y.isStructSchema()){if(q&&typeof q==="object")for(let[z,w]of Y.structIterator()){if(q[z]==null&&!w.isIdempotencyToken())continue;let _=this.getKey(z,w.getMergedTraits().xmlName),$=`${K}${_}`;this.write(w,q[z],$)}}else if(Y.isUnitSchema());else throw Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${Y.getName(!0)}`)}flush(){if(this.buffer===void 0)throw Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");let A=this.buffer;return delete this.buffer,A}getKey(A,q){let K=q??A;if(this.settings.capitalizeKeys)return K[0].toUpperCase()+K.slice(1);return K}writeKey(A){if(A.endsWith("."))A=A.slice(0,A.length-1);this.buffer+=`&${I0.extendedEncodeURIComponent(A)}=`}writeValue(A){this.buffer+=I0.extendedEncodeURIComponent(A)}}class Xz8 extends I0.RpcProtocol{options;serializer;deserializer;mixin=new ZP6;constructor(A){super({defaultNamespace:A.defaultNamespace});this.options=A;let q={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:A.xmlNamespace,serviceNamespace:A.defaultNamespace,serializeEmptyLists:!0};this.serializer=new VH7(q),this.deserializer=new d21(q)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(A){this.serializer.setSerdeContext(A),this.deserializer.setSerdeContext(A)}getPayloadCodec(){throw Error("AWSQuery protocol has no payload codec.")}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K);if(!Y.path.endsWith("/"))Y.path+="/";if(Object.assign(Y.headers,{"content-type":"application/x-www-form-urlencoded"}),f2.deref(A.input)==="unit"||!Y.body)Y.body="";let z=A.name.split("#")[1]??A.name;if(Y.body=`Action=${z}&Version=${this.options.version}`+Y.body,Y.body.endsWith("&"))Y.body=Y.body.slice(-1);return Y}async deserializeResponse(A,q,K){let Y=this.deserializer,z=f2.NormalizedSchema.of(A.output),w={};if(K.statusCode>=300){let j=await I0.collectBody(K.body,q);if(j.byteLength>0)Object.assign(w,await Y.read(15,j));await this.handleError(A,q,K,w,this.deserializeMetadata(K))}for(let j in K.headers){let J=K.headers[j];delete K.headers[j],K.headers[j.toLowerCase()]=J}let _=A.name.split("#")[1]??A.name,$=z.isStructSchema()&&this.useNestedResult()?_+"Result":void 0,O=await I0.collectBody(K.body,q);if(O.byteLength>0)Object.assign(w,await Y.read(z,O,$));return{$metadata:this.deserializeMetadata(K),...w}}useNestedResult(){return!0}async handleError(A,q,K,Y,z){let w=this.loadQueryErrorCode(K,Y)??"Unknown",_=this.loadQueryError(Y),$=this.loadQueryErrorMessage(Y);_.message=$,_.Error={Type:_.Type,Code:_.Code,Message:$};let{errorSchema:O,errorMetadata:H}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,_,z,(X,P)=>{try{return X.getSchema(P)}catch(W){return X.find((Z)=>f2.NormalizedSchema.of(Z).getMergedTraits().awsQueryError?.[0]===P)}}),j=f2.NormalizedSchema.of(O),M=new(f2.TypeRegistry.for(O[1]).getErrorCtor(O)??Error)($),D={Error:_.Error};for(let[X,P]of j.structIterator()){let W=P.getMergedTraits().xmlName??X,Z=_[W]??Y[W];D[X]=this.deserializer.readSchema(P,Z)}throw this.mixin.decorateServiceException(Object.assign(M,H,{$fault:j.getMergedTraits().error,message:$},D),Y)}loadQueryErrorCode(A,q){let K=(q.Errors?.[0]?.Error??q.Errors?.Error??q.Error)?.Code;if(K!==void 0)return K;if(A.statusCode==404)return"NotFound"}loadQueryError(A){return A.Errors?.[0]?.Error??A.Errors?.Error??A.Error}loadQueryErrorMessage(A){let q=this.loadQueryError(A);return q?.message??q?.Message??A.message??A.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class NH7 extends Xz8{options;constructor(A){super(A);this.options=A;let q={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,q)}useNestedResult(){return!1}}var vH7=(A,q)=>WH7(A,q).then((K)=>{if(K.length){let Y;try{Y=CR.parseXML(K)}catch($){if($&&typeof $==="object")Object.defineProperty($,"$responseBodyText",{value:K});throw $}let z="#text",w=Object.keys(Y)[0],_=Y[w];if(_[z])_[w]=_[z],delete _[z];return Ec.getValueFromTextNode(_)}return{}}),W15=async(A,q)=>{let K=await vH7(A,q);if(K.Error)K.Error.message=K.Error.message??K.Error.Message;return K},kH7=(A,q)=>{if(q?.Error?.Code!==void 0)return q.Error.Code;if(q?.Code!==void 0)return q.Code;if(A.statusCode==404)return"NotFound"};class Pz8 extends Gt{settings;stringBuffer;byteBuffer;buffer;constructor(A){super();this.settings=A}write(A,q){let K=f2.NormalizedSchema.of(A);if(K.isStringSchema()&&typeof q==="string")this.stringBuffer=q;else if(K.isBlobSchema())this.byteBuffer="byteLength"in q?q:(this.serdeContext?.base64Decoder??JB6.fromBase64)(q);else{this.buffer=this.writeStruct(K,q,void 0);let Y=K.getMergedTraits();if(Y.httpPayload&&!Y.xmlName)this.buffer.withName(K.getName())}}flush(){if(this.byteBuffer!==void 0){let q=this.byteBuffer;return delete this.byteBuffer,q}if(this.stringBuffer!==void 0){let q=this.stringBuffer;return delete this.stringBuffer,q}let A=this.buffer;if(this.settings.xmlNamespace){if(!A?.attributes?.xmlns)A.addAttribute("xmlns",this.settings.xmlNamespace)}return delete this.buffer,A.toString()}writeStruct(A,q,K){let Y=A.getMergedTraits(),z=A.isMemberSchema()&&!Y.httpPayload?A.getMemberTraits().xmlName??A.getMemberName():Y.xmlName??A.getName();if(!z||!A.isStructSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${A.getName(!0)}.`);let w=CR.XmlNode.of(z),[_,$]=this.getXmlnsAttribute(A,K);for(let[O,H]of A.structIterator()){let j=q[O];if(j!=null||H.isIdempotencyToken()){if(H.getMergedTraits().xmlAttribute){w.addAttribute(H.getMergedTraits().xmlName??O,this.writeSimple(H,j));continue}if(H.isListSchema())this.writeList(H,j,w,$);else if(H.isMapSchema())this.writeMap(H,j,w,$);else if(H.isStructSchema())w.addChildNode(this.writeStruct(H,j,$));else{let J=CR.XmlNode.of(H.getMergedTraits().xmlName??H.getMemberName());this.writeSimpleInto(H,j,J,$),w.addChildNode(J)}}}if($)w.addAttribute(_,$);return w}writeList(A,q,K,Y){if(!A.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${A.getName(!0)}`);let z=A.getMergedTraits(),w=A.getValueSchema(),_=w.getMergedTraits(),$=!!_.sparse,O=!!z.xmlFlattened,[H,j]=this.getXmlnsAttribute(A,Y),J=(M,D)=>{if(w.isListSchema())this.writeList(w,Array.isArray(D)?D:[D],M,j);else if(w.isMapSchema())this.writeMap(w,D,M,j);else if(w.isStructSchema()){let X=this.writeStruct(w,D,j);M.addChildNode(X.withName(O?z.xmlName??A.getMemberName():_.xmlName??"member"))}else{let X=CR.XmlNode.of(O?z.xmlName??A.getMemberName():_.xmlName??"member");this.writeSimpleInto(w,D,X,j),M.addChildNode(X)}};if(O){for(let M of q)if($||M!=null)J(K,M)}else{let M=CR.XmlNode.of(z.xmlName??A.getMemberName());if(j)M.addAttribute(H,j);for(let D of q)if($||D!=null)J(M,D);K.addChildNode(M)}}writeMap(A,q,K,Y,z=!1){if(!A.isMemberSchema())throw Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${A.getName(!0)}`);let w=A.getMergedTraits(),_=A.getKeySchema(),O=_.getMergedTraits().xmlName??"key",H=A.getValueSchema(),j=H.getMergedTraits(),J=j.xmlName??"value",M=!!j.sparse,D=!!w.xmlFlattened,[X,P]=this.getXmlnsAttribute(A,Y),W=(Z,G,f)=>{let V=CR.XmlNode.of(O,G),[N,v]=this.getXmlnsAttribute(_,P);if(v)V.addAttribute(N,v);Z.addChildNode(V);let y=CR.XmlNode.of(J);if(H.isListSchema())this.writeList(H,f,y,P);else if(H.isMapSchema())this.writeMap(H,f,y,P,!0);else if(H.isStructSchema())y=this.writeStruct(H,f,P);else this.writeSimpleInto(H,f,y,P);Z.addChildNode(y)};if(D){for(let[Z,G]of Object.entries(q))if(M||G!=null){let f=CR.XmlNode.of(w.xmlName??A.getMemberName());W(f,Z,G),K.addChildNode(f)}}else{let Z;if(!z){if(Z=CR.XmlNode.of(w.xmlName??A.getMemberName()),P)Z.addAttribute(X,P);K.addChildNode(Z)}for(let[G,f]of Object.entries(q))if(M||f!=null){let V=CR.XmlNode.of("entry");W(V,G,f),(z?K:Z).addChildNode(V)}}}writeSimple(A,q){if(q===null)throw Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");let K=f2.NormalizedSchema.of(A),Y=null;if(q&&typeof q==="object")if(K.isBlobSchema())Y=(this.serdeContext?.base64Encoder??JB6.toBase64)(q);else if(K.isTimestampSchema()&&q instanceof Date)switch(I0.determineTimestampFormat(K,this.settings)){case 5:Y=q.toISOString().replace(".000Z","Z");break;case 6:Y=Ec.dateToUtcString(q);break;case 7:Y=String(q.getTime()/1000);break;default:console.warn("Missing timestamp format, using http date",q),Y=Ec.dateToUtcString(q);break}else if(K.isBigDecimalSchema()&&q){if(q instanceof aX.NumericValue)return q.string;return String(q)}else if(K.isMapSchema()||K.isListSchema())throw Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.");else throw Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${K.getName(!0)}`);if(K.isBooleanSchema()||K.isNumericSchema()||K.isBigIntegerSchema()||K.isBigDecimalSchema())Y=String(q);if(K.isStringSchema())if(q===void 0&&K.isIdempotencyToken())Y=aX.generateIdempotencyToken();else Y=String(q);if(Y===null)throw Error(`Unhandled schema-value pair ${K.getName(!0)}=${q}`);return Y}writeSimpleInto(A,q,K,Y){let z=this.writeSimple(A,q),w=f2.NormalizedSchema.of(A),_=new CR.XmlText(z),[$,O]=this.getXmlnsAttribute(w,Y);if(O)K.addAttribute($,O);K.addChildNode(_)}getXmlnsAttribute(A,q){let K=A.getMergedTraits(),[Y,z]=K.xmlNamespace??[];if(z&&z!==q)return[Y?`xmlns:${Y}`:"xmlns",z];return[void 0,void 0]}}class Wz8 extends Gt{settings;constructor(A){super();this.settings=A}createSerializer(){let A=new Pz8(this.settings);return A.setSerdeContext(this.serdeContext),A}createDeserializer(){let A=new d21(this.settings);return A.setSerdeContext(this.serdeContext),A}}class EH7 extends I0.HttpBindingProtocol{codec;serializer;deserializer;mixin=new ZP6;constructor(A){super(A);let q={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:A.xmlNamespace,serviceNamespace:A.defaultNamespace};this.codec=new Wz8(q),this.serializer=new I0.HttpInterceptingShapeSerializer(this.codec.createSerializer(),q),this.deserializer=new I0.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),q)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(A,q,K){let Y=await super.serializeRequest(A,q,K),z=f2.NormalizedSchema.of(A.input);if(!Y.headers["content-type"]){let w=this.mixin.resolveRestContentType(this.getDefaultContentType(),z);if(w)Y.headers["content-type"]=w}if(Y.headers["content-type"]===this.getDefaultContentType()){if(typeof Y.body==="string")Y.body='<?xml version="1.0" encoding="UTF-8"?>'+Y.body}return Y}async deserializeResponse(A,q,K){return super.deserializeResponse(A,q,K)}async handleError(A,q,K,Y,z){let w=kH7(K,Y)??"Unknown",{errorSchema:_,errorMetadata:$}=await this.mixin.getErrorSchemaOrThrowBaseException(w,this.options.defaultNamespace,K,Y,z),O=f2.NormalizedSchema.of(_),H=Y.Error?.message??Y.Error?.Message??Y.message??Y.Message??"Unknown",J=new(f2.TypeRegistry.for(_[1]).getErrorCtor(_)??Error)(H);await this.deserializeHttpMessage(_,q,K,Y);let M={};for(let[D,X]of O.structIterator()){let P=X.getMergedTraits().xmlName??D,W=Y.Error?.[P]??Y[P];M[D]=this.codec.createDeserializer().readSchema(X,W)}throw this.mixin.decorateServiceException(Object.assign(J,$,{$fault:O.getMergedTraits().error,message:H},M),Y)}getDefaultContentType(){return"application/xml"}}Z15.AwsEc2QueryProtocol=NH7;Z15.AwsJson1_0Protocol=GH7;Z15.AwsJson1_1Protocol=fH7;Z15.AwsJsonRpcProtocol=p21;Z15.AwsQueryProtocol=Xz8;Z15.AwsRestJsonProtocol=TH7;Z15.AwsRestXmlProtocol=EH7;Z15.AwsSmithyRpcV2CborProtocol=PH7;Z15.JsonCodec=U21;Z15.JsonShapeDeserializer=Mz8;Z15.JsonShapeSerializer=Dz8;Z15.XmlCodec=Wz8;Z15.XmlShapeDeserializer=d21;Z15.XmlShapeSerializer=Pz8;Z15._toBool=J15;Z15._toNum=M15;Z15._toStr=j15;Z15.awsExpectUnion=P15;Z15.loadRestJsonErrorCode=Jz8;Z15.loadRestXmlErrorCode=kH7;Z15.parseJsonBody=jz8;Z15.parseJsonErrorBody=X15;Z15.parseXmlBody=vH7;Z15.parseXmlErrorBody=W15});var LH7=C((d15)=>{var p15=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";d15.isArrayBuffer=p15});var Gz8=C((r15)=>{var l15=LH7(),Zz8=g6("buffer"),i15=(A,q=0,K=A.byteLength-q)=>{if(!l15.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return Zz8.Buffer.from(A,q,K)},n15=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?Zz8.Buffer.from(A,q):Zz8.Buffer.from(A)};r15.fromArrayBuffer=i15;r15.fromString=n15});var SH7=C((yH7)=>{Object.defineProperty(yH7,"__esModule",{value:!0});yH7.fromBase64=void 0;var s15=Gz8(),t15=/^[A-Za-z0-9+/]*={0,2}$/,e15=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!t15.exec(A))throw TypeError("Invalid base64 string.");let q=(0,s15.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};yH7.fromBase64=e15});var IH7=C((CH7)=>{Object.defineProperty(CH7,"__esModule",{value:!0});CH7.toBase64=void 0;var A85=Gz8(),q85=Z2(),K85=(A)=>{let q;if(typeof A==="string")q=(0,q85.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,A85.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};CH7.toBase64=K85});var c21=C((MB6)=>{var bH7=SH7(),xH7=IH7();Object.keys(bH7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(MB6,A))Object.defineProperty(MB6,A,{enumerable:!0,get:function(){return bH7[A]}})});Object.keys(xH7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(MB6,A))Object.defineProperty(MB6,A,{enumerable:!0,get:function(){return xH7[A]}})})});var sH7=C((oH7)=>{Object.defineProperty(oH7,"__esModule",{value:!0});oH7.ruleSet=void 0;var lH7="required",IR="fn",bR="argv",TP6="ref",uH7=!0,BH7="isSet",DB6="booleanEquals",GP6="error",fP6="endpoint",yc="tree",fz8="PartitionResult",Tz8="getAttr",mH7={[lH7]:!1,type:"string"},gH7={[lH7]:!0,default:!1,type:"boolean"},FH7={[TP6]:"Endpoint"},iH7={[IR]:DB6,[bR]:[{[TP6]:"UseFIPS"},!0]},nH7={[IR]:DB6,[bR]:[{[TP6]:"UseDualStack"},!0]},hR={},QH7={[IR]:Tz8,[bR]:[{[TP6]:fz8},"supportsFIPS"]},rH7={[TP6]:fz8},UH7={[IR]:DB6,[bR]:[!0,{[IR]:Tz8,[bR]:[rH7,"supportsDualStack"]}]},pH7=[iH7],dH7=[nH7],cH7=[{[TP6]:"Region"}],Y85={version:"1.0",parameters:{Region:mH7,UseDualStack:gH7,UseFIPS:gH7,Endpoint:mH7},rules:[{conditions:[{[IR]:BH7,[bR]:[FH7]}],rules:[{conditions:pH7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:GP6},{conditions:dH7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:GP6},{endpoint:{url:FH7,properties:hR,headers:hR},type:fP6}],type:yc},{conditions:[{[IR]:BH7,[bR]:cH7}],rules:[{conditions:[{[IR]:"aws.partition",[bR]:cH7,assign:fz8}],rules:[{conditions:[iH7,nH7],rules:[{conditions:[{[IR]:DB6,[bR]:[uH7,QH7]},UH7],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:hR,headers:hR},type:fP6}],type:yc},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:GP6}],type:yc},{conditions:pH7,rules:[{conditions:[{[IR]:DB6,[bR]:[QH7,uH7]}],rules:[{conditions:[{[IR]:"stringEquals",[bR]:[{[IR]:Tz8,[bR]:[rH7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:hR,headers:hR},type:fP6},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:hR,headers:hR},type:fP6}],type:yc},{error:"FIPS is enabled but this partition does not support FIPS",type:GP6}],type:yc},{conditions:dH7,rules:[{conditions:[UH7],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:hR,headers:hR},type:fP6}],type:yc},{error:"DualStack is enabled but this partition does not support DualStack",type:GP6}],type:yc},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:hR,headers:hR},type:fP6}],type:yc}],type:yc},{error:"Invalid Configuration: Missing Region",type:GP6}]};oH7.ruleSet=Y85});var Aj7=C((tH7)=>{Object.defineProperty(tH7,"__esModule",{value:!0});tH7.defaultEndpointResolver=void 0;var z85=pm(),Vz8=Ab(),w85=sH7(),_85=new Vz8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),$85=(A,q={})=>{return _85.get(A,()=>(0,Vz8.resolveEndpoint)(w85.ruleSet,{endpointParams:A,logger:q.logger}))};tH7.defaultEndpointResolver=$85;Vz8.customEndpointFunctions.aws=z85.awsEndpointFunctions});var wj7=C((Yj7)=>{Object.defineProperty(Yj7,"__esModule",{value:!0});Yj7.getRuntimeConfig=void 0;var O85=O$(),H85=Lc(),j85=pw(),J85=df(),M85=LR(),qj7=c21(),Kj7=Z2(),D85=wz8(),X85=Aj7(),P85=(A)=>{return{apiVersion:"2019-06-10",base64Decoder:A?.base64Decoder??qj7.fromBase64,base64Encoder:A?.base64Encoder??qj7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??X85.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??D85.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new O85.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j85.NoAuthSigner}],logger:A?.logger??new J85.NoOpLogger,protocol:A?.protocol??new H85.AwsRestJsonProtocol({defaultNamespace:"com.amazonaws.ssooidc"}),serviceId:A?.serviceId??"SSO OIDC",urlParser:A?.urlParser??M85.parseUrl,utf8Decoder:A?.utf8Decoder??Kj7.fromUtf8,utf8Encoder:A?.utf8Encoder??Kj7.toUtf8}};Yj7.getRuntimeConfig=P85});var Rc=C((R85)=>{var W85=NJ(),_j7=HN(),Z85=EM(),G85="AWS_EXECUTION_ENV",$j7="AWS_REGION",Oj7="AWS_DEFAULT_REGION",f85="AWS_EC2_METADATA_DISABLED",T85=["in-region","cross-region","mobile","standard","legacy"],V85="/latest/meta-data/placement/region",N85="AWS_DEFAULTS_MODE",v85="defaults_mode",k85={environmentVariableSelector:(A)=>{return A[N85]},configFileSelector:(A)=>{return A[v85]},default:"legacy"},E85=({region:A=_j7.loadConfig(W85.NODE_REGION_CONFIG_OPTIONS),defaultsMode:q=_j7.loadConfig(k85)}={})=>Z85.memoize(async()=>{let K=typeof q==="function"?await q():q;switch(K?.toLowerCase()){case"auto":return L85(A);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(K?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw Error(`Invalid parameter for "defaultsMode", expect ${T85.join(", ")}, got ${K}`)}}),L85=async(A)=>{if(A){let q=typeof A==="function"?await A():A,K=await y85();if(!K)return"standard";if(q===K)return"in-region";else return"cross-region"}return"standard"},y85=async()=>{if(process.env[G85]&&(process.env[$j7]||process.env[Oj7]))return process.env[$j7]??process.env[Oj7];if(!process.env[f85])try{let{getInstanceMetadataEndpoint:A,httpRequest:q}=await Promise.resolve().then(() => e(L36())),K=await A();return(await q({...K,path:V85})).toString()}catch(A){}};R85.resolveDefaultsModeConfig=E85});var Pj7=C((Dj7)=>{Object.defineProperty(Dj7,"__esModule",{value:!0});Dj7.getRuntimeConfig=void 0;var C85=d2(),h85=C85.__importDefault(Q21()),Hj7=O$(),jj7=Nc(),l21=NJ(),I85=vc(),Jj7=h0(),x36=HN(),Mj7=$N(),b85=kc(),x85=lm(),u85=wj7(),B85=df(),m85=Rc(),g85=df(),F85=(A)=>{(0,g85.emitWarningIfUnsupportedVersion)(process.version);let q=(0,m85.resolveDefaultsModeConfig)(A),K=()=>q().then(B85.loadConfigsForDefaultMode),Y=(0,u85.getRuntimeConfig)(A);(0,Hj7.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,x36.loadConfig)(Hj7.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??b85.calculateBodyLength,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,jj7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:h85.default.version}),maxAttempts:A?.maxAttempts??(0,x36.loadConfig)(Jj7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,x36.loadConfig)(l21.NODE_REGION_CONFIG_OPTIONS,{...l21.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:Mj7.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,x36.loadConfig)({...Jj7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||x85.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??I85.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??Mj7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,x36.loadConfig)(l21.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,x36.loadConfig)(l21.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,x36.loadConfig)(jj7.NODE_APP_ID_CONFIG_OPTIONS,z)}};Dj7.getRuntimeConfig=F85});var Gj7=C((Zj7)=>{Object.defineProperty(Zj7,"__esModule",{value:!0});Zj7.warning=void 0;Zj7.stsRegionDefaultResolver=U85;var Wj7=NJ(),Q85=HN();function U85(A={}){return(0,Q85.loadConfig)({...Wj7.NODE_REGION_CONFIG_OPTIONS,async default(){if(!Zj7.warning.silence)console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");return"us-east-1"}},{...Wj7.NODE_REGION_CONFIG_FILE_OPTIONS,...A})}Zj7.warning={silence:!1}});var Kb=C((ft)=>{var XB6=NJ(),fj7=Gj7(),d85=(A)=>{return{setRegion(q){A.region=q},region(){return A.region}}},c85=(A)=>{return{region:A.region()}};Object.defineProperty(ft,"NODE_REGION_CONFIG_FILE_OPTIONS",{enumerable:!0,get:function(){return XB6.NODE_REGION_CONFIG_FILE_OPTIONS}});Object.defineProperty(ft,"NODE_REGION_CONFIG_OPTIONS",{enumerable:!0,get:function(){return XB6.NODE_REGION_CONFIG_OPTIONS}});Object.defineProperty(ft,"REGION_ENV_NAME",{enumerable:!0,get:function(){return XB6.REGION_ENV_NAME}});Object.defineProperty(ft,"REGION_INI_NAME",{enumerable:!0,get:function(){return XB6.REGION_INI_NAME}});Object.defineProperty(ft,"resolveRegionConfig",{enumerable:!0,get:function(){return XB6.resolveRegionConfig}});ft.getAwsRegionExtensionConfiguration=d85;ft.resolveAwsRegionExtensionConfiguration=c85;Object.keys(fj7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(ft,A))Object.defineProperty(ft,A,{enumerable:!0,get:function(){return fj7[A]}})})});var n21=C((t85)=>{var n85=sY8(),r85=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},o85=(A)=>{return{httpHandler:A.httpHandler()}};class Tj7{name;kind;values;constructor({name:A,kind:q=n85.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class Vj7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class i21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new i21({...A,headers:{...A.headers}});if(q.query)q.query=a85(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return i21.clone(this)}}function a85(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class Nj7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function s85(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}t85.Field=Tj7;t85.Fields=Vj7;t85.HttpRequest=i21;t85.HttpResponse=Nj7;t85.getHttpHandlerExtensionConfiguration=r85;t85.isValidHostname=s85;t85.resolveHttpHandlerRuntimeConfig=o85});var Rz8=C((yz8)=>{var vj7=Dc(),_A5=Xc(),$A5=Pc(),kj7=cm(),OA5=NJ(),vz8=pw(),WE=lO(),HA5=Vc(),Sj7=qb(),Ej7=h0(),Tt=df(),Lj7=wz8(),jA5=Pj7(),yj7=Kb(),Rj7=n21(),JA5=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},MA5={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},DA5=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}},XA5=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}},PA5=(A,q)=>{let K=Object.assign(yj7.getAwsRegionExtensionConfiguration(A),Tt.getDefaultExtensionConfiguration(A),Rj7.getHttpHandlerExtensionConfiguration(A),DA5(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,yj7.resolveAwsRegionExtensionConfiguration(K),Tt.resolveDefaultRuntimeConfig(K),Rj7.resolveHttpHandlerRuntimeConfig(K),XA5(K))};class kz8 extends Tt.Client{config;constructor(...[A]){let q=jA5.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=JA5(q),Y=kj7.resolveUserAgentConfig(K),z=Ej7.resolveRetryConfig(Y),w=OA5.resolveRegionConfig(z),_=vj7.resolveHostHeaderConfig(w),$=Sj7.resolveEndpointConfig(_),O=Lj7.resolveHttpAuthSchemeConfig($),H=PA5(O,A?.extensions||[]);this.config=H,this.middlewareStack.use(WE.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(kj7.getUserAgentPlugin(this.config)),this.middlewareStack.use(Ej7.getRetryPlugin(this.config)),this.middlewareStack.use(HA5.getContentLengthPlugin(this.config)),this.middlewareStack.use(vj7.getHostHeaderPlugin(this.config)),this.middlewareStack.use(_A5.getLoggerPlugin(this.config)),this.middlewareStack.use($A5.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(vz8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Lj7.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new vz8.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use(vz8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var ZE=class A extends Tt.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},Cj7=class A extends ZE{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(q){super({name:"AccessDeniedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.reason=q.reason,this.error_description=q.error_description}},hj7=class A extends ZE{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(q){super({name:"AuthorizationPendingException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},Ij7=class A extends ZE{name="ExpiredTokenException";$fault="client";error;error_description;constructor(q){super({name:"ExpiredTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},bj7=class A extends ZE{name="InternalServerException";$fault="server";error;error_description;constructor(q){super({name:"InternalServerException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},xj7=class A extends ZE{name="InvalidClientException";$fault="client";error;error_description;constructor(q){super({name:"InvalidClientException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},uj7=class A extends ZE{name="InvalidGrantException";$fault="client";error;error_description;constructor(q){super({name:"InvalidGrantException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},Bj7=class A extends ZE{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(q){super({name:"InvalidRequestException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.reason=q.reason,this.error_description=q.error_description}},mj7=class A extends ZE{name="InvalidScopeException";$fault="client";error;error_description;constructor(q){super({name:"InvalidScopeException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},gj7=class A extends ZE{name="SlowDownException";$fault="client";error;error_description;constructor(q){super({name:"SlowDownException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},Fj7=class A extends ZE{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(q){super({name:"UnauthorizedClientException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},Qj7=class A extends ZE{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(q){super({name:"UnsupportedGrantTypeException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error,this.error_description=q.error_description}},WA5="AccessDeniedException",ZA5="AuthorizationPendingException",GA5="AccessToken",fA5="ClientSecret",TA5="CreateToken",VA5="CreateTokenRequest",NA5="CreateTokenResponse",vA5="CodeVerifier",kA5="ExpiredTokenException",EA5="InvalidClientException",LA5="InvalidGrantException",yA5="InvalidRequestException",RA5="InternalServerException",SA5="InvalidScopeException",CA5="IdToken",hA5="RefreshToken",IA5="SlowDownException",bA5="UnauthorizedClientException",xA5="UnsupportedGrantTypeException",uA5="accessToken",im="client",BA5="clientId",mA5="clientSecret",gA5="codeVerifier",FA5="code",QA5="deviceCode",gj="error",UA5="expiresIn",Yb="error_description",pA5="grantType",dA5="http",zb="httpError",cA5="idToken",Uj7="reason",pj7="refreshToken",lA5="redirectUri",iA5="scope",nA5="server",dj7="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",rA5="tokenType",dw="com.amazonaws.ssooidc",oA5=[0,dw,GA5,8,0],aA5=[0,dw,fA5,8,0],sA5=[0,dw,vA5,8,0],tA5=[0,dw,CA5,8,0],cj7=[0,dw,hA5,8,0],eA5=[-3,dw,WA5,{[gj]:im,[zb]:400},[gj,Uj7,Yb],[0,0,0]];WE.TypeRegistry.for(dw).registerError(eA5,Cj7);var A75=[-3,dw,ZA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(A75,hj7);var q75=[3,dw,VA5,0,[BA5,mA5,pA5,QA5,FA5,pj7,iA5,lA5,gA5],[0,[()=>aA5,0],0,0,0,[()=>cj7,0],64,0,[()=>sA5,0]]],K75=[3,dw,NA5,0,[uA5,rA5,UA5,pj7,cA5],[[()=>oA5,0],0,1,[()=>cj7,0],[()=>tA5,0]]],Y75=[-3,dw,kA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(Y75,Ij7);var z75=[-3,dw,RA5,{[gj]:nA5,[zb]:500},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(z75,bj7);var w75=[-3,dw,EA5,{[gj]:im,[zb]:401},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(w75,xj7);var _75=[-3,dw,LA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(_75,uj7);var $75=[-3,dw,yA5,{[gj]:im,[zb]:400},[gj,Uj7,Yb],[0,0,0]];WE.TypeRegistry.for(dw).registerError($75,Bj7);var O75=[-3,dw,SA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(O75,mj7);var H75=[-3,dw,IA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(H75,gj7);var j75=[-3,dw,bA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(j75,Fj7);var J75=[-3,dw,xA5,{[gj]:im,[zb]:400},[gj,Yb],[0,0]];WE.TypeRegistry.for(dw).registerError(J75,Qj7);var M75=[-3,dj7,"SSOOIDCServiceException",0,[],[]];WE.TypeRegistry.for(dj7).registerError(M75,ZE);var D75=[9,dw,TA5,{[dA5]:["POST","/token",200]},()=>q75,()=>K75];class Ez8 extends Tt.Command.classBuilder().ep(MA5).m(function(A,q,K,Y){return[Sj7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(D75).build(){}var X75={CreateTokenCommand:Ez8};class Lz8 extends kz8{}Tt.createAggregatedClient(X75,Lz8);var P75={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},W75={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};Object.defineProperty(yz8,"$Command",{enumerable:!0,get:function(){return Tt.Command}});Object.defineProperty(yz8,"__Client",{enumerable:!0,get:function(){return Tt.Client}});yz8.AccessDeniedException=Cj7;yz8.AccessDeniedExceptionReason=P75;yz8.AuthorizationPendingException=hj7;yz8.CreateTokenCommand=Ez8;yz8.ExpiredTokenException=Ij7;yz8.InternalServerException=bj7;yz8.InvalidClientException=xj7;yz8.InvalidGrantException=uj7;yz8.InvalidRequestException=Bj7;yz8.InvalidRequestExceptionReason=W75;yz8.InvalidScopeException=mj7;yz8.SSOOIDC=Lz8;yz8.SSOOIDCClient=kz8;yz8.SSOOIDCServiceException=ZE;yz8.SlowDownException=gj7;yz8.UnauthorizedClientException=Fj7;yz8.UnsupportedGrantTypeException=Qj7});var r21=C((l75)=>{var x75=ON(),u75=J27(),GE=EM(),PB6=gm(),B75=g6("fs"),m75=({logger:A,signingName:q}={})=>async()=>{if(A?.debug?.("@aws-sdk/token-providers - fromEnvSigningName"),!q)throw new GE.TokenProviderError("Please pass 'signingName' to compute environment variable key",{logger:A});let K=u75.getBearerTokenEnvKey(q);if(!(K in process.env))throw new GE.TokenProviderError(`Token not present in '${K}' environment variable`,{logger:A});let Y={token:process.env[K]};return x75.setTokenFeature(Y,"BEARER_SERVICE_ENV_VARS","3"),Y},g75=300000,Sz8="To refresh this SSO session run 'aws sso login' with the corresponding profile.",F75=async(A,q={})=>{let{SSOOIDCClient:K}=await Promise.resolve().then(() => e(Rz8())),Y=(w)=>q.clientConfig?.[w]??q.parentClientConfig?.[w];return new K(Object.assign({},q.clientConfig??{},{region:A??q.clientConfig?.region,logger:Y("logger"),userAgentAppId:Y("userAgentAppId")}))},Q75=async(A,q,K={})=>{let{CreateTokenCommand:Y}=await Promise.resolve().then(() => e(Rz8()));return(await F75(q,K)).send(new Y({clientId:A.clientId,clientSecret:A.clientSecret,refreshToken:A.refreshToken,grantType:"refresh_token"}))},lj7=(A)=>{if(A.expiration&&A.expiration.getTime()<Date.now())throw new GE.TokenProviderError(`Token is expired. ${Sz8}`,!1)},u36=(A,q,K=!1)=>{if(typeof q>"u")throw new GE.TokenProviderError(`Value not present for '${A}' in SSO Token${K?". Cannot refresh":""}. ${Sz8}`,!1)},{writeFile:U75}=B75.promises,p75=(A,q)=>{let K=PB6.getSSOTokenFilepath(A),Y=JSON.stringify(q,null,2);return U75(K,Y)},ij7=new Date(0),nj7=(A={})=>async({callerClientConfig:q}={})=>{let K={...A,parentClientConfig:{...q,...A.parentClientConfig}};K.logger?.debug("@aws-sdk/token-providers - fromSso");let Y=await PB6.parseKnownFiles(K),z=PB6.getProfileName({profile:K.profile??q?.profile}),w=Y[z];if(!w)throw new GE.TokenProviderError(`Profile '${z}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new GE.TokenProviderError(`Profile '${z}' is missing required property 'sso_session'.`);let _=w.sso_session,O=(await PB6.loadSsoSessionData(K))[_];if(!O)throw new GE.TokenProviderError(`Sso session '${_}' could not be found in shared credentials file.`,!1);for(let X of["sso_start_url","sso_region"])if(!O[X])throw new GE.TokenProviderError(`Sso session '${_}' is missing required property '${X}'.`,!1);O.sso_start_url;let H=O.sso_region,j;try{j=await PB6.getSSOTokenFromFile(_)}catch(X){throw new GE.TokenProviderError(`The SSO session token associated with profile=${z} was not found or is invalid. ${Sz8}`,!1)}u36("accessToken",j.accessToken),u36("expiresAt",j.expiresAt);let{accessToken:J,expiresAt:M}=j,D={token:J,expiration:new Date(M)};if(D.expiration.getTime()-Date.now()>g75)return D;if(Date.now()-ij7.getTime()<30000)return lj7(D),D;u36("clientId",j.clientId,!0),u36("clientSecret",j.clientSecret,!0),u36("refreshToken",j.refreshToken,!0);try{ij7.setTime(Date.now());let X=await Q75(j,H,K);u36("accessToken",X.accessToken),u36("expiresIn",X.expiresIn);let P=new Date(Date.now()+X.expiresIn*1000);try{await p75(_,{...j,accessToken:X.accessToken,expiresAt:P.toISOString(),refreshToken:X.refreshToken})}catch(W){}return{token:X.accessToken,expiration:P}}catch(X){return lj7(D),D}},d75=({token:A,logger:q})=>async()=>{if(q?.debug("@aws-sdk/token-providers - fromStatic"),!A||!A.token)throw new GE.TokenProviderError("Please pass a valid token to fromStatic",!1);return A},c75=(A={})=>GE.memoize(GE.chain(nj7(A),async()=>{throw new GE.TokenProviderError("Could not load token from any providers",!1)}),(q)=>q.expiration!==void 0&&q.expiration.getTime()-Date.now()<300000,(q)=>q.expiration!==void 0);l75.fromEnvSigningName=m75;l75.fromSso=nj7;l75.fromStatic=d75;l75.nodeProvider=c75});var Bz8=C((q45)=>{q45.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(q45.HttpAuthLocation||(q45.HttpAuthLocation={}));q45.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(q45.HttpApiKeyAuthLocation||(q45.HttpApiKeyAuthLocation={}));q45.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(q45.EndpointURLScheme||(q45.EndpointURLScheme={}));q45.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(q45.AlgorithmId||(q45.AlgorithmId={}));var a75=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>q45.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>q45.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},s75=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},t75=(A)=>{return a75(A)},e75=(A)=>{return s75(A)};q45.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(q45.FieldPosition||(q45.FieldPosition={}));var A45="__smithy_context";q45.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(q45.IniSectionType||(q45.IniSectionType={}));q45.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(q45.RequestHandlerProtocol||(q45.RequestHandlerProtocol={}));q45.SMITHY_CONTEXT_KEY=A45;q45.getDefaultClientConfiguration=t75;q45.resolveDefaultRuntimeConfig=e75});var ZB6=C((NP6)=>{var aj7=Qm(),Uz8=MN(),gz8=Bz8(),w45=lO(),rj7=JN();class sj7{config;middlewareStack=aj7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var mz8="***SensitiveInformation***";function Fz8(A,q){if(q==null)return q;let K=w45.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return mz8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return mz8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return mz8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=Fz8(_,Y[w]);return z}return q}class pz8{middlewareStack=aj7.constructStack();schema;static classBuilder(){return new tj7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[gz8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class tj7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends pz8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?Fz8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?Fz8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var _45="***SensitiveInformation***",$45=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class VP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return VP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===VP6)return VP6.isInstance(A);if(VP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var ej7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},AJ7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=H45(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw ej7(_,q)},O45=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{AJ7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},H45=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),j45=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},oj7=!1,J45=(A)=>{if(A&&!oj7&&parseInt(A.substring(1,A.indexOf(".")))<16)oj7=!0},M45=(A)=>{let q=[];for(let K in gz8.AlgorithmId){let Y=gz8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},D45=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},X45=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},P45=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},qJ7=(A)=>{return Object.assign(M45(A),X45(A))},W45=qJ7,Z45=(A)=>{return Object.assign(D45(A),P45(A))},G45=(A)=>Array.isArray(A)?A:[A],KJ7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=KJ7(A[K]);return A},f45=(A)=>{return A!=null};class YJ7{trace(){}debug(){}info(){}warn(){}error(){}}function zJ7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,N45(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}wJ7(Y,null,w,_)}return Y}var T45=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},V45=(A,q)=>{let K={};for(let Y in q)wJ7(K,A,q,Y);return K},N45=(A,q,K)=>{return zJ7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},wJ7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=v45,O=k45,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},v45=(A)=>A!=null,k45=(A)=>A,E45=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},L45=(A)=>A.toISOString().replace(".000Z","Z"),Qz8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(Qz8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=Qz8(A[K])}return q}return A};Object.defineProperty(NP6,"collectBody",{enumerable:!0,get:function(){return Uz8.collectBody}});Object.defineProperty(NP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return Uz8.extendedEncodeURIComponent}});Object.defineProperty(NP6,"resolvedPath",{enumerable:!0,get:function(){return Uz8.resolvedPath}});NP6.Client=sj7;NP6.Command=pz8;NP6.NoOpLogger=YJ7;NP6.SENSITIVE_STRING=_45;NP6.ServiceException=VP6;NP6._json=Qz8;NP6.convertMap=T45;NP6.createAggregatedClient=$45;NP6.decorateServiceException=ej7;NP6.emitWarningIfUnsupportedVersion=J45;NP6.getArrayIfSingleItem=G45;NP6.getDefaultClientConfiguration=W45;NP6.getDefaultExtensionConfiguration=qJ7;NP6.getValueFromTextNode=KJ7;NP6.isSerializableHeaderValue=f45;NP6.loadConfigsForDefaultMode=j45;NP6.map=zJ7;NP6.resolveDefaultRuntimeConfig=Z45;NP6.serializeDateTime=L45;NP6.serializeFloat=E45;NP6.take=V45;NP6.throwDefaultError=AJ7;NP6.withBaseException=O45;Object.keys(rj7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(NP6,A))Object.defineProperty(NP6,A,{enumerable:!0,get:function(){return rj7[A]}})})});var cz8=C((_J7)=>{Object.defineProperty(_J7,"__esModule",{value:!0});_J7.resolveHttpAuthSchemeConfig=_J7.defaultSSOHttpAuthSchemeProvider=_J7.defaultSSOHttpAuthSchemeParametersProvider=void 0;var a45=O$(),dz8=pZ(),s45=async(A,q,K)=>{return{operation:(0,dz8.getSmithyContext)(q).operation,region:await(0,dz8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};_J7.defaultSSOHttpAuthSchemeParametersProvider=s45;function t45(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function o21(A){return{schemeId:"smithy.api#noAuth"}}var e45=(A)=>{let q=[];switch(A.operation){case"GetRoleCredentials":{q.push(o21(A));break}case"ListAccountRoles":{q.push(o21(A));break}case"ListAccounts":{q.push(o21(A));break}case"Logout":{q.push(o21(A));break}default:q.push(t45(A))}return q};_J7.defaultSSOHttpAuthSchemeProvider=e45;var Aq5=(A)=>{let q=(0,a45.resolveAwsSdkSigV4Config)(A);return Object.assign(q,{authSchemePreference:(0,dz8.normalizeProvider)(A.authSchemePreference??[])})};_J7.resolveHttpAuthSchemeConfig=Aq5});var OJ7=C((zD2,Yq5)=>{Yq5.exports={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.936.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var HJ7=C((wq5)=>{var zq5=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";wq5.isArrayBuffer=zq5});var iz8=C((jq5)=>{var $q5=HJ7(),lz8=g6("buffer"),Oq5=(A,q=0,K=A.byteLength-q)=>{if(!$q5.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return lz8.Buffer.from(A,q,K)},Hq5=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?lz8.Buffer.from(A,q):lz8.Buffer.from(A)};jq5.fromArrayBuffer=Oq5;jq5.fromString=Hq5});var MJ7=C((jJ7)=>{Object.defineProperty(jJ7,"__esModule",{value:!0});jJ7.fromBase64=void 0;var Dq5=iz8(),Xq5=/^[A-Za-z0-9+/]*={0,2}$/,Pq5=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Xq5.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Dq5.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};jJ7.fromBase64=Pq5});var PJ7=C((DJ7)=>{Object.defineProperty(DJ7,"__esModule",{value:!0});DJ7.toBase64=void 0;var Wq5=iz8(),Zq5=Z2(),Gq5=(A)=>{let q;if(typeof A==="string")q=(0,Zq5.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Wq5.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};DJ7.toBase64=Gq5});var GJ7=C((GB6)=>{var WJ7=MJ7(),ZJ7=PJ7();Object.keys(WJ7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(GB6,A))Object.defineProperty(GB6,A,{enumerable:!0,get:function(){return WJ7[A]}})});Object.keys(ZJ7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(GB6,A))Object.defineProperty(GB6,A,{enumerable:!0,get:function(){return ZJ7[A]}})})});var uJ7=C((bJ7)=>{Object.defineProperty(bJ7,"__esModule",{value:!0});bJ7.ruleSet=void 0;var SJ7="required",uR="fn",BR="argv",EP6="ref",fJ7=!0,TJ7="isSet",fB6="booleanEquals",vP6="error",kP6="endpoint",Sc="tree",nz8="PartitionResult",rz8="getAttr",VJ7={[SJ7]:!1,type:"string"},NJ7={[SJ7]:!0,default:!1,type:"boolean"},vJ7={[EP6]:"Endpoint"},CJ7={[uR]:fB6,[BR]:[{[EP6]:"UseFIPS"},!0]},hJ7={[uR]:fB6,[BR]:[{[EP6]:"UseDualStack"},!0]},xR={},kJ7={[uR]:rz8,[BR]:[{[EP6]:nz8},"supportsFIPS"]},IJ7={[EP6]:nz8},EJ7={[uR]:fB6,[BR]:[!0,{[uR]:rz8,[BR]:[IJ7,"supportsDualStack"]}]},LJ7=[CJ7],yJ7=[hJ7],RJ7=[{[EP6]:"Region"}],fq5={version:"1.0",parameters:{Region:VJ7,UseDualStack:NJ7,UseFIPS:NJ7,Endpoint:VJ7},rules:[{conditions:[{[uR]:TJ7,[BR]:[vJ7]}],rules:[{conditions:LJ7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vP6},{conditions:yJ7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vP6},{endpoint:{url:vJ7,properties:xR,headers:xR},type:kP6}],type:Sc},{conditions:[{[uR]:TJ7,[BR]:RJ7}],rules:[{conditions:[{[uR]:"aws.partition",[BR]:RJ7,assign:nz8}],rules:[{conditions:[CJ7,hJ7],rules:[{conditions:[{[uR]:fB6,[BR]:[fJ7,kJ7]},EJ7],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xR,headers:xR},type:kP6}],type:Sc},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:vP6}],type:Sc},{conditions:LJ7,rules:[{conditions:[{[uR]:fB6,[BR]:[kJ7,fJ7]}],rules:[{conditions:[{[uR]:"stringEquals",[BR]:[{[uR]:rz8,[BR]:[IJ7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:xR,headers:xR},type:kP6},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:xR,headers:xR},type:kP6}],type:Sc},{error:"FIPS is enabled but this partition does not support FIPS",type:vP6}],type:Sc},{conditions:yJ7,rules:[{conditions:[EJ7],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xR,headers:xR},type:kP6}],type:Sc},{error:"DualStack is enabled but this partition does not support DualStack",type:vP6}],type:Sc},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:xR,headers:xR},type:kP6}],type:Sc}],type:Sc},{error:"Invalid Configuration: Missing Region",type:vP6}]};bJ7.ruleSet=fq5});var gJ7=C((BJ7)=>{Object.defineProperty(BJ7,"__esModule",{value:!0});BJ7.defaultEndpointResolver=void 0;var Tq5=pm(),oz8=Ab(),Vq5=uJ7(),Nq5=new oz8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),vq5=(A,q={})=>{return Nq5.get(A,()=>(0,oz8.resolveEndpoint)(Vq5.ruleSet,{endpointParams:A,logger:q.logger}))};BJ7.defaultEndpointResolver=vq5;oz8.customEndpointFunctions.aws=Tq5.awsEndpointFunctions});var dJ7=C((UJ7)=>{Object.defineProperty(UJ7,"__esModule",{value:!0});UJ7.getRuntimeConfig=void 0;var kq5=O$(),Eq5=Lc(),Lq5=pw(),yq5=ZB6(),Rq5=LR(),FJ7=GJ7(),QJ7=Z2(),Sq5=cz8(),Cq5=gJ7(),hq5=(A)=>{return{apiVersion:"2019-06-10",base64Decoder:A?.base64Decoder??FJ7.fromBase64,base64Encoder:A?.base64Encoder??FJ7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??Cq5.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??Sq5.defaultSSOHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new kq5.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Lq5.NoAuthSigner}],logger:A?.logger??new yq5.NoOpLogger,protocol:A?.protocol??new Eq5.AwsRestJsonProtocol({defaultNamespace:"com.amazonaws.sso"}),serviceId:A?.serviceId??"SSO",urlParser:A?.urlParser??Rq5.parseUrl,utf8Decoder:A?.utf8Decoder??QJ7.fromUtf8,utf8Encoder:A?.utf8Encoder??QJ7.toUtf8}};UJ7.getRuntimeConfig=hq5});var aJ7=C((rJ7)=>{Object.defineProperty(rJ7,"__esModule",{value:!0});rJ7.getRuntimeConfig=void 0;var Iq5=d2(),bq5=Iq5.__importDefault(OJ7()),cJ7=O$(),lJ7=Nc(),a21=NJ(),xq5=vc(),iJ7=h0(),B36=HN(),nJ7=$N(),uq5=kc(),Bq5=lm(),mq5=dJ7(),gq5=ZB6(),Fq5=Rc(),Qq5=ZB6(),Uq5=(A)=>{(0,Qq5.emitWarningIfUnsupportedVersion)(process.version);let q=(0,Fq5.resolveDefaultsModeConfig)(A),K=()=>q().then(gq5.loadConfigsForDefaultMode),Y=(0,mq5.getRuntimeConfig)(A);(0,cJ7.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,B36.loadConfig)(cJ7.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??uq5.calculateBodyLength,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,lJ7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:bq5.default.version}),maxAttempts:A?.maxAttempts??(0,B36.loadConfig)(iJ7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,B36.loadConfig)(a21.NODE_REGION_CONFIG_OPTIONS,{...a21.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:nJ7.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,B36.loadConfig)({...iJ7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||Bq5.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??xq5.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??nJ7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,B36.loadConfig)(a21.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,B36.loadConfig)(a21.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,B36.loadConfig)(lJ7.NODE_APP_ID_CONFIG_OPTIONS,z)}};rJ7.getRuntimeConfig=Uq5});var AM7=C((nq5)=>{var pq5=Bz8(),dq5=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},cq5=(A)=>{return{httpHandler:A.httpHandler()}};class sJ7{name;kind;values;constructor({name:A,kind:q=pq5.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class tJ7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class s21{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new s21({...A,headers:{...A.headers}});if(q.query)q.query=lq5(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return s21.clone(this)}}function lq5(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class eJ7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function iq5(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}nq5.Field=sJ7;nq5.Fields=tJ7;nq5.HttpRequest=s21;nq5.HttpResponse=eJ7;nq5.getHttpHandlerExtensionConfiguration=dq5;nq5.isValidHostname=iq5;nq5.resolveHttpHandlerRuntimeConfig=cq5});var ZM7=C((ez8)=>{var qM7=Dc(),qK5=Xc(),KK5=Pc(),KM7=cm(),YK5=NJ(),TB6=pw(),LP6=lO(),zK5=Vc(),VB6=qb(),YM7=h0(),wb=ZB6(),zM7=cz8(),wK5=aJ7(),wM7=Kb(),_M7=AM7(),_K5=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},t21={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$K5=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}},OK5=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}},HK5=(A,q)=>{let K=Object.assign(wM7.getAwsRegionExtensionConfiguration(A),wb.getDefaultExtensionConfiguration(A),_M7.getHttpHandlerExtensionConfiguration(A),$K5(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,wM7.resolveAwsRegionExtensionConfiguration(K),wb.resolveDefaultRuntimeConfig(K),_M7.resolveHttpHandlerRuntimeConfig(K),OK5(K))};class NB6 extends wb.Client{config;constructor(...[A]){let q=wK5.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=_K5(q),Y=KM7.resolveUserAgentConfig(K),z=YM7.resolveRetryConfig(Y),w=YK5.resolveRegionConfig(z),_=qM7.resolveHostHeaderConfig(w),$=VB6.resolveEndpointConfig(_),O=zM7.resolveHttpAuthSchemeConfig($),H=HK5(O,A?.extensions||[]);this.config=H,this.middlewareStack.use(LP6.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(KM7.getUserAgentPlugin(this.config)),this.middlewareStack.use(YM7.getRetryPlugin(this.config)),this.middlewareStack.use(zK5.getContentLengthPlugin(this.config)),this.middlewareStack.use(qM7.getHostHeaderPlugin(this.config)),this.middlewareStack.use(qK5.getLoggerPlugin(this.config)),this.middlewareStack.use(KK5.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(TB6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:zM7.defaultSSOHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new TB6.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use(TB6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var yP6=class A extends wb.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},$M7=class A extends yP6{name="InvalidRequestException";$fault="client";constructor(q){super({name:"InvalidRequestException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},OM7=class A extends yP6{name="ResourceNotFoundException";$fault="client";constructor(q){super({name:"ResourceNotFoundException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},HM7=class A extends yP6{name="TooManyRequestsException";$fault="client";constructor(q){super({name:"TooManyRequestsException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},jM7=class A extends yP6{name="UnauthorizedException";$fault="client";constructor(q){super({name:"UnauthorizedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},jK5="AccountInfo",JK5="AccountListType",MK5="AccessTokenType",DK5="GetRoleCredentials",XK5="GetRoleCredentialsRequest",PK5="GetRoleCredentialsResponse",WK5="InvalidRequestException",ZK5="Logout",GK5="ListAccounts",fK5="ListAccountsRequest",TK5="ListAccountRolesRequest",VK5="ListAccountRolesResponse",NK5="ListAccountsResponse",vK5="ListAccountRoles",kK5="LogoutRequest",EK5="RoleCredentials",LK5="RoleInfo",yK5="RoleListType",RK5="ResourceNotFoundException",SK5="SecretAccessKeyType",CK5="SessionTokenType",hK5="TooManyRequestsException",IK5="UnauthorizedException",e21="accountId",bK5="accessKeyId",xK5="accountList",uK5="accountName",A_1="accessToken",JM7="account_id",q_1="client",K_1="error",BK5="emailAddress",mK5="expiration",Y_1="http",z_1="httpError",w_1="httpHeader",m36="httpQuery",__1="message",MM7="maxResults",DM7="max_result",$_1="nextToken",XM7="next_token",gK5="roleCredentials",FK5="roleList",PM7="roleName",QK5="role_name",WM7="smithy.ts.sdk.synthetic.com.amazonaws.sso",UK5="secretAccessKey",pK5="sessionToken",O_1="x-amz-sso_bearer_token",G_="com.amazonaws.sso",H_1=[0,G_,MK5,8,0],dK5=[0,G_,SK5,8,0],cK5=[0,G_,CK5,8,0],lK5=[3,G_,jK5,0,[e21,uK5,BK5],[0,0,0]],iK5=[3,G_,XK5,0,[PM7,e21,A_1],[[0,{[m36]:QK5}],[0,{[m36]:JM7}],[()=>H_1,{[w_1]:O_1}]]],nK5=[3,G_,PK5,0,[gK5],[[()=>q35,0]]],rK5=[-3,G_,WK5,{[K_1]:q_1,[z_1]:400},[__1],[0]];LP6.TypeRegistry.for(G_).registerError(rK5,$M7);var oK5=[3,G_,TK5,0,[$_1,MM7,A_1,e21],[[0,{[m36]:XM7}],[1,{[m36]:DM7}],[()=>H_1,{[w_1]:O_1}],[0,{[m36]:JM7}]]],aK5=[3,G_,VK5,0,[$_1,FK5],[0,()=>O35]],sK5=[3,G_,fK5,0,[$_1,MM7,A_1],[[0,{[m36]:XM7}],[1,{[m36]:DM7}],[()=>H_1,{[w_1]:O_1}]]],tK5=[3,G_,NK5,0,[$_1,xK5],[0,()=>$35]],eK5=[3,G_,kK5,0,[A_1],[[()=>H_1,{[w_1]:O_1}]]],A35=[-3,G_,RK5,{[K_1]:q_1,[z_1]:404},[__1],[0]];LP6.TypeRegistry.for(G_).registerError(A35,OM7);var q35=[3,G_,EK5,0,[bK5,UK5,pK5,mK5],[0,[()=>dK5,0],[()=>cK5,0],1]],K35=[3,G_,LK5,0,[PM7,e21],[0,0]],Y35=[-3,G_,hK5,{[K_1]:q_1,[z_1]:429},[__1],[0]];LP6.TypeRegistry.for(G_).registerError(Y35,HM7);var z35=[-3,G_,IK5,{[K_1]:q_1,[z_1]:401},[__1],[0]];LP6.TypeRegistry.for(G_).registerError(z35,jM7);var w35="unit",_35=[-3,WM7,"SSOServiceException",0,[],[]];LP6.TypeRegistry.for(WM7).registerError(_35,yP6);var $35=[1,G_,JK5,0,()=>lK5],O35=[1,G_,yK5,0,()=>K35],H35=[9,G_,DK5,{[Y_1]:["GET","/federation/credentials",200]},()=>iK5,()=>nK5],j35=[9,G_,vK5,{[Y_1]:["GET","/assignment/roles",200]},()=>oK5,()=>aK5],J35=[9,G_,GK5,{[Y_1]:["GET","/assignment/accounts",200]},()=>sK5,()=>tK5],M35=[9,G_,ZK5,{[Y_1]:["POST","/logout",200]},()=>eK5,()=>w35];class az8 extends wb.Command.classBuilder().ep(t21).m(function(A,q,K,Y){return[VB6.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(H35).build(){}class j_1 extends wb.Command.classBuilder().ep(t21).m(function(A,q,K,Y){return[VB6.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").sc(j35).build(){}class J_1 extends wb.Command.classBuilder().ep(t21).m(function(A,q,K,Y){return[VB6.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").sc(J35).build(){}class sz8 extends wb.Command.classBuilder().ep(t21).m(function(A,q,K,Y){return[VB6.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").sc(M35).build(){}var D35={GetRoleCredentialsCommand:az8,ListAccountRolesCommand:j_1,ListAccountsCommand:J_1,LogoutCommand:sz8};class tz8 extends NB6{}wb.createAggregatedClient(D35,tz8);var X35=TB6.createPaginator(NB6,j_1,"nextToken","nextToken","maxResults"),P35=TB6.createPaginator(NB6,J_1,"nextToken","nextToken","maxResults");Object.defineProperty(ez8,"$Command",{enumerable:!0,get:function(){return wb.Command}});Object.defineProperty(ez8,"__Client",{enumerable:!0,get:function(){return wb.Client}});ez8.GetRoleCredentialsCommand=az8;ez8.InvalidRequestException=$M7;ez8.ListAccountRolesCommand=j_1;ez8.ListAccountsCommand=J_1;ez8.LogoutCommand=sz8;ez8.ResourceNotFoundException=OM7;ez8.SSO=tz8;ez8.SSOClient=NB6;ez8.SSOServiceException=yP6;ez8.TooManyRequestsException=HM7;ez8.UnauthorizedException=jM7;ez8.paginateListAccountRoles=X35;ez8.paginateListAccounts=P35});var fM7=C((Aw8)=>{var GM7=ZM7();Object.defineProperty(Aw8,"GetRoleCredentialsCommand",{enumerable:!0,get:function(){return GM7.GetRoleCredentialsCommand}});Object.defineProperty(Aw8,"SSOClient",{enumerable:!0,get:function(){return GM7.SSOClient}})});var D_1=C((h35)=>{var _b=EM(),M_1=gm(),TM7=ON(),S35=r21(),NM7=(A)=>A&&(typeof A.sso_start_url==="string"||typeof A.sso_account_id==="string"||typeof A.sso_session==="string"||typeof A.sso_region==="string"||typeof A.sso_role_name==="string"),vB6=!1,VM7=async({ssoStartUrl:A,ssoSession:q,ssoAccountId:K,ssoRegion:Y,ssoRoleName:z,ssoClient:w,clientConfig:_,parentClientConfig:$,profile:O,filepath:H,configFilepath:j,ignoreCache:J,logger:M})=>{let D,X="To refresh this SSO session run aws sso login with the corresponding profile.";if(q)try{let x=await S35.fromSso({profile:O,filepath:H,configFilepath:j,ignoreCache:J})();D={accessToken:x.token,expiresAt:new Date(x.expiration).toISOString()}}catch(x){throw new _b.CredentialsProviderError(x.message,{tryNextLink:vB6,logger:M})}else try{D=await M_1.getSSOTokenFromFile(A)}catch(x){throw new _b.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:vB6,logger:M})}if(new Date(D.expiresAt).getTime()-Date.now()<=0)throw new _b.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:vB6,logger:M});let{accessToken:P}=D,{SSOClient:W,GetRoleCredentialsCommand:Z}=await Promise.resolve().then(function(){return fM7()}),G=w||new W(Object.assign({},_??{},{logger:_?.logger??$?.logger,region:_?.region??Y,userAgentAppId:_?.userAgentAppId??$?.userAgentAppId})),f;try{f=await G.send(new Z({accountId:K,roleName:z,accessToken:P}))}catch(x){throw new _b.CredentialsProviderError(x,{tryNextLink:vB6,logger:M})}let{roleCredentials:{accessKeyId:V,secretAccessKey:N,sessionToken:v,expiration:y,credentialScope:R,accountId:h}={}}=f;if(!V||!N||!v||!y)throw new _b.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:vB6,logger:M});let B={accessKeyId:V,secretAccessKey:N,sessionToken:v,expiration:new Date(y),...R&&{credentialScope:R},...h&&{accountId:h}};if(q)TM7.setCredentialFeature(B,"CREDENTIALS_SSO","s");else TM7.setCredentialFeature(B,"CREDENTIALS_SSO_LEGACY","u");return B},vM7=(A,q)=>{let{sso_start_url:K,sso_account_id:Y,sso_region:z,sso_role_name:w}=A;if(!K||!Y||!z||!w)throw new _b.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(A).join(", ")}
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:q});return A},C35=(A={})=>async({callerClientConfig:q}={})=>{A.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:K,ssoAccountId:Y,ssoRegion:z,ssoRoleName:w,ssoSession:_}=A,{ssoClient:$}=A,O=M_1.getProfileName({profile:A.profile??q?.profile});if(!K&&!Y&&!z&&!w&&!_){let j=(await M_1.parseKnownFiles(A))[O];if(!j)throw new _b.CredentialsProviderError(`Profile ${O} was not found.`,{logger:A.logger});if(!NM7(j))throw new _b.CredentialsProviderError(`Profile ${O} is not configured with SSO credentials.`,{logger:A.logger});if(j?.sso_session){let Z=(await M_1.loadSsoSessionData(A))[j.sso_session],G=` configurations in profile ${O} and sso-session ${j.sso_session}`;if(z&&z!==Z.sso_region)throw new _b.CredentialsProviderError("Conflicting SSO region"+G,{tryNextLink:!1,logger:A.logger});if(K&&K!==Z.sso_start_url)throw new _b.CredentialsProviderError("Conflicting SSO start_url"+G,{tryNextLink:!1,logger:A.logger});j.sso_region=Z.sso_region,j.sso_start_url=Z.sso_start_url}let{sso_start_url:J,sso_account_id:M,sso_region:D,sso_role_name:X,sso_session:P}=vM7(j,A.logger);return VM7({ssoStartUrl:J,ssoSession:P,ssoAccountId:M,ssoRegion:D,ssoRoleName:X,ssoClient:$,clientConfig:A.clientConfig,parentClientConfig:A.parentClientConfig,profile:O,filepath:A.filepath,configFilepath:A.configFilepath,ignoreCache:A.ignoreCache,logger:A.logger})}else if(!K||!Y||!z||!w)throw new _b.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:A.logger});else return VM7({ssoStartUrl:K,ssoSession:_,ssoAccountId:Y,ssoRegion:z,ssoRoleName:w,ssoClient:$,clientConfig:A.clientConfig,parentClientConfig:A.parentClientConfig,profile:O,filepath:A.filepath,configFilepath:A.configFilepath,ignoreCache:A.ignoreCache,logger:A.logger})};h35.fromSSO=C35;h35.isSsoProfile=NM7;h35.validateSsoProfile=vM7});var kM7=C((Q35)=>{Q35.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Q35.HttpAuthLocation||(Q35.HttpAuthLocation={}));Q35.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(Q35.HttpApiKeyAuthLocation||(Q35.HttpApiKeyAuthLocation={}));Q35.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(Q35.EndpointURLScheme||(Q35.EndpointURLScheme={}));Q35.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(Q35.AlgorithmId||(Q35.AlgorithmId={}));var u35=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>Q35.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>Q35.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},B35=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},m35=(A)=>{return u35(A)},g35=(A)=>{return B35(A)};Q35.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(Q35.FieldPosition||(Q35.FieldPosition={}));var F35="__smithy_context";Q35.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(Q35.IniSectionType||(Q35.IniSectionType={}));Q35.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(Q35.RequestHandlerProtocol||(Q35.RequestHandlerProtocol={}));Q35.SMITHY_CONTEXT_KEY=F35;Q35.getDefaultClientConfiguration=m35;Q35.resolveDefaultRuntimeConfig=g35});var RM7=C((o35)=>{var c35=kM7(),l35=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},i35=(A)=>{return{httpHandler:A.httpHandler()}};class EM7{name;kind;values;constructor({name:A,kind:q=c35.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class LM7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class X_1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new X_1({...A,headers:{...A.headers}});if(q.query)q.query=n35(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return X_1.clone(this)}}function n35(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class yM7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function r35(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}o35.Field=EM7;o35.Fields=LM7;o35.HttpRequest=X_1;o35.HttpResponse=yM7;o35.getHttpHandlerExtensionConfiguration=l35;o35.isValidHostname=r35;o35.resolveHttpHandlerRuntimeConfig=i35});var Ow8=C((SM7)=>{Object.defineProperty(SM7,"__esModule",{value:!0});SM7.resolveHttpAuthSchemeConfig=SM7.defaultSigninHttpAuthSchemeProvider=SM7.defaultSigninHttpAuthSchemeParametersProvider=void 0;var Y55=O$(),$w8=pZ(),z55=async(A,q,K)=>{return{operation:(0,$w8.getSmithyContext)(q).operation,region:await(0,$w8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};SM7.defaultSigninHttpAuthSchemeParametersProvider=z55;function w55(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function _55(A){return{schemeId:"smithy.api#noAuth"}}var $55=(A)=>{let q=[];switch(A.operation){case"CreateOAuth2Token":{q.push(_55(A));break}default:q.push(w55(A))}return q};SM7.defaultSigninHttpAuthSchemeProvider=$55;var O55=(A)=>{let q=(0,Y55.resolveAwsSdkSigV4Config)(A);return Object.assign(q,{authSchemePreference:(0,$w8.normalizeProvider)(A.authSchemePreference??[])})};SM7.resolveHttpAuthSchemeConfig=O55});var pM7=C((QM7)=>{Object.defineProperty(QM7,"__esModule",{value:!0});QM7.ruleSet=void 0;var FM7="required",lZ="fn",iZ="argv",Cc="ref",hM7=!0,IM7="isSet",g36="booleanEquals",RP6="error",Vt="endpoint",$b="tree",Z_1="PartitionResult",Hw8="stringEquals",bM7={[FM7]:!0,default:!1,type:"boolean"},xM7={[FM7]:!1,type:"string"},uM7={[Cc]:"Endpoint"},jw8={[lZ]:g36,[iZ]:[{[Cc]:"UseFIPS"},!0]},Jw8={[lZ]:g36,[iZ]:[{[Cc]:"UseDualStack"},!0]},cZ={},Mw8={[lZ]:"getAttr",[iZ]:[{[Cc]:Z_1},"name"]},P_1={[lZ]:g36,[iZ]:[{[Cc]:"UseFIPS"},!1]},W_1={[lZ]:g36,[iZ]:[{[Cc]:"UseDualStack"},!1]},BM7={[lZ]:"getAttr",[iZ]:[{[Cc]:Z_1},"supportsFIPS"]},mM7={[lZ]:g36,[iZ]:[!0,{[lZ]:"getAttr",[iZ]:[{[Cc]:Z_1},"supportsDualStack"]}]},gM7=[{[Cc]:"Region"}],J55={version:"1.0",parameters:{UseDualStack:bM7,UseFIPS:bM7,Endpoint:xM7,Region:xM7},rules:[{conditions:[{[lZ]:IM7,[iZ]:[uM7]}],rules:[{conditions:[jw8],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:RP6},{rules:[{conditions:[Jw8],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:RP6},{endpoint:{url:uM7,properties:cZ,headers:cZ},type:Vt}],type:$b}],type:$b},{rules:[{conditions:[{[lZ]:IM7,[iZ]:gM7}],rules:[{conditions:[{[lZ]:"aws.partition",[iZ]:gM7,assign:Z_1}],rules:[{conditions:[{[lZ]:Hw8,[iZ]:[Mw8,"aws"]},P_1,W_1],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:cZ,headers:cZ},type:Vt},{conditions:[{[lZ]:Hw8,[iZ]:[Mw8,"aws-cn"]},P_1,W_1],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:cZ,headers:cZ},type:Vt},{conditions:[{[lZ]:Hw8,[iZ]:[Mw8,"aws-us-gov"]},P_1,W_1],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:cZ,headers:cZ},type:Vt},{conditions:[jw8,Jw8],rules:[{conditions:[{[lZ]:g36,[iZ]:[hM7,BM7]},mM7],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cZ,headers:cZ},type:Vt}],type:$b},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:RP6}],type:$b},{conditions:[jw8,W_1],rules:[{conditions:[{[lZ]:g36,[iZ]:[BM7,hM7]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cZ,headers:cZ},type:Vt}],type:$b},{error:"FIPS is enabled but this partition does not support FIPS",type:RP6}],type:$b},{conditions:[P_1,Jw8],rules:[{conditions:[mM7],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cZ,headers:cZ},type:Vt}],type:$b},{error:"DualStack is enabled but this partition does not support DualStack",type:RP6}],type:$b},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:cZ,headers:cZ},type:Vt}],type:$b}],type:$b},{error:"Invalid Configuration: Missing Region",type:RP6}],type:$b}]};QM7.ruleSet=J55});var lM7=C((dM7)=>{Object.defineProperty(dM7,"__esModule",{value:!0});dM7.defaultEndpointResolver=void 0;var M55=pm(),Dw8=Ab(),D55=pM7(),X55=new Dw8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),P55=(A,q={})=>{return X55.get(A,()=>(0,Dw8.resolveEndpoint)(D55.ruleSet,{endpointParams:A,logger:q.logger}))};dM7.defaultEndpointResolver=P55;Dw8.customEndpointFunctions.aws=M55.awsEndpointFunctions});var aM7=C((rM7)=>{Object.defineProperty(rM7,"__esModule",{value:!0});rM7.getRuntimeConfig=void 0;var W55=O$(),Z55=Lc(),G55=pw(),f55=df(),T55=LR(),iM7=c21(),nM7=Z2(),V55=Ow8(),N55=lM7(),v55=(A)=>{return{apiVersion:"2023-01-01",base64Decoder:A?.base64Decoder??iM7.fromBase64,base64Encoder:A?.base64Encoder??iM7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??N55.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??V55.defaultSigninHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new W55.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new G55.NoAuthSigner}],logger:A?.logger??new f55.NoOpLogger,protocol:A?.protocol??new Z55.AwsRestJsonProtocol({defaultNamespace:"com.amazonaws.signin"}),serviceId:A?.serviceId??"Signin",urlParser:A?.urlParser??T55.parseUrl,utf8Decoder:A?.utf8Decoder??nM7.fromUtf8,utf8Encoder:A?.utf8Encoder??nM7.toUtf8}};rM7.getRuntimeConfig=v55});var YD7=C((qD7)=>{Object.defineProperty(qD7,"__esModule",{value:!0});qD7.getRuntimeConfig=void 0;var k55=d2(),E55=k55.__importDefault(Q21()),sM7=O$(),tM7=Nc(),G_1=NJ(),L55=vc(),eM7=h0(),F36=HN(),AD7=$N(),y55=kc(),R55=lm(),S55=aM7(),C55=df(),h55=Rc(),I55=df(),b55=(A)=>{(0,I55.emitWarningIfUnsupportedVersion)(process.version);let q=(0,h55.resolveDefaultsModeConfig)(A),K=()=>q().then(C55.loadConfigsForDefaultMode),Y=(0,S55.getRuntimeConfig)(A);(0,sM7.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,F36.loadConfig)(sM7.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??y55.calculateBodyLength,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,tM7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:E55.default.version}),maxAttempts:A?.maxAttempts??(0,F36.loadConfig)(eM7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,F36.loadConfig)(G_1.NODE_REGION_CONFIG_OPTIONS,{...G_1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:AD7.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,F36.loadConfig)({...eM7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||R55.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??L55.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??AD7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,F36.loadConfig)(G_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,F36.loadConfig)(G_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,F36.loadConfig)(tM7.NODE_APP_ID_CONFIG_OPTIONS,z)}};qD7.getRuntimeConfig=b55});var RD7=C((Tw8)=>{var zD7=Dc(),x55=Xc(),u55=Pc(),wD7=cm(),B55=NJ(),Xw8=pw(),SP6=lO(),m55=Vc(),VD7=qb(),_D7=h0(),Nt=df(),$D7=Ow8(),g55=YD7(),OD7=Kb(),HD7=n21(),F55=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"signin"})},Q55={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},U55=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}},p55=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}},d55=(A,q)=>{let K=Object.assign(OD7.getAwsRegionExtensionConfiguration(A),Nt.getDefaultExtensionConfiguration(A),HD7.getHttpHandlerExtensionConfiguration(A),U55(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,OD7.resolveAwsRegionExtensionConfiguration(K),Nt.resolveDefaultRuntimeConfig(K),HD7.resolveHttpHandlerRuntimeConfig(K),p55(K))};class Pw8 extends Nt.Client{config;constructor(...[A]){let q=g55.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=F55(q),Y=wD7.resolveUserAgentConfig(K),z=_D7.resolveRetryConfig(Y),w=B55.resolveRegionConfig(z),_=zD7.resolveHostHeaderConfig(w),$=VD7.resolveEndpointConfig(_),O=$D7.resolveHttpAuthSchemeConfig($),H=d55(O,A?.extensions||[]);this.config=H,this.middlewareStack.use(SP6.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(wD7.getUserAgentPlugin(this.config)),this.middlewareStack.use(_D7.getRetryPlugin(this.config)),this.middlewareStack.use(m55.getContentLengthPlugin(this.config)),this.middlewareStack.use(zD7.getHostHeaderPlugin(this.config)),this.middlewareStack.use(x55.getLoggerPlugin(this.config)),this.middlewareStack.use(u55.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(Xw8.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$D7.defaultSigninHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new Xw8.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use(Xw8.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var CP6=class A extends Nt.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},ND7=class A extends CP6{name="AccessDeniedException";$fault="client";error;constructor(q){super({name:"AccessDeniedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error}},vD7=class A extends CP6{name="InternalServerException";$fault="server";error;constructor(q){super({name:"InternalServerException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error}},kD7=class A extends CP6{name="TooManyRequestsError";$fault="client";error;constructor(q){super({name:"TooManyRequestsError",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error}},ED7=class A extends CP6{name="ValidationException";$fault="client";error;constructor(q){super({name:"ValidationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.error=q.error}},c55="AccessDeniedException",l55="AccessToken",i55="CreateOAuth2Token",n55="CreateOAuth2TokenRequest",r55="CreateOAuth2TokenRequestBody",o55="CreateOAuth2TokenResponseBody",a55="CreateOAuth2TokenResponse",s55="InternalServerException",t55="RefreshToken",e55="TooManyRequestsError",A95="ValidationException",jD7="accessKeyId",JD7="accessToken",Ww8="client",MD7="clientId",DD7="codeVerifier",q95="code",vt="error",XD7="expiresIn",PD7="grantType",K95="http",Zw8="httpError",WD7="idToken",fE="jsonName",T_1="message",f_1="refreshToken",ZD7="redirectUri",Y95="server",GD7="secretAccessKey",fD7="sessionToken",LD7="smithy.ts.sdk.synthetic.com.amazonaws.signin",z95="tokenInput",w95="tokenOutput",TD7="tokenType",cf="com.amazonaws.signin",yD7=[0,cf,t55,8,0],_95=[-3,cf,c55,{[vt]:Ww8},[vt,T_1],[0,0]];SP6.TypeRegistry.for(cf).registerError(_95,ND7);var $95=[3,cf,l55,8,[jD7,GD7,fD7],[[0,{[fE]:jD7}],[0,{[fE]:GD7}],[0,{[fE]:fD7}]]],O95=[3,cf,n55,0,[z95],[[()=>H95,16]]],H95=[3,cf,r55,0,[MD7,PD7,q95,ZD7,DD7,f_1],[[0,{[fE]:MD7}],[0,{[fE]:PD7}],0,[0,{[fE]:ZD7}],[0,{[fE]:DD7}],[()=>yD7,{[fE]:f_1}]]],j95=[3,cf,a55,0,[w95],[[()=>J95,16]]],J95=[3,cf,o55,0,[JD7,TD7,XD7,f_1,WD7],[[()=>$95,{[fE]:JD7}],[0,{[fE]:TD7}],[1,{[fE]:XD7}],[()=>yD7,{[fE]:f_1}],[0,{[fE]:WD7}]]],M95=[-3,cf,s55,{[vt]:Y95,[Zw8]:500},[vt,T_1],[0,0]];SP6.TypeRegistry.for(cf).registerError(M95,vD7);var D95=[-3,cf,e55,{[vt]:Ww8,[Zw8]:429},[vt,T_1],[0,0]];SP6.TypeRegistry.for(cf).registerError(D95,kD7);var X95=[-3,cf,A95,{[vt]:Ww8,[Zw8]:400},[vt,T_1],[0,0]];SP6.TypeRegistry.for(cf).registerError(X95,ED7);var P95=[-3,LD7,"SigninServiceException",0,[],[]];SP6.TypeRegistry.for(LD7).registerError(P95,CP6);var W95=[9,cf,i55,{[K95]:["POST","/v1/token",200]},()=>O95,()=>j95];class Gw8 extends Nt.Command.classBuilder().ep(Q55).m(function(A,q,K,Y){return[VD7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(W95).build(){}var Z95={CreateOAuth2TokenCommand:Gw8};class fw8 extends Pw8{}Nt.createAggregatedClient(Z95,fw8);var G95={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};Object.defineProperty(Tw8,"$Command",{enumerable:!0,get:function(){return Nt.Command}});Object.defineProperty(Tw8,"__Client",{enumerable:!0,get:function(){return Nt.Client}});Tw8.AccessDeniedException=ND7;Tw8.CreateOAuth2TokenCommand=Gw8;Tw8.InternalServerException=vD7;Tw8.OAuth2ErrorCode=G95;Tw8.Signin=fw8;Tw8.SigninClient=Pw8;Tw8.SigninServiceException=CP6;Tw8.TooManyRequestsError=kD7;Tw8.ValidationException=ED7});var Ew8=C((I95)=>{var R95=ON(),kt=EM(),vw8=gm(),S95=RM7(),V_1=g6("node:crypto"),Vw8=g6("node:fs"),C95=g6("node:os"),Nw8=g6("node:path");class kw8{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(A,q,K){this.profileData=A,this.init=q,this.callerClientConfig=K}async loadCredentials(){let A=await this.loadToken();if(!A)throw new kt.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let q=A.accessToken,K=Date.now();if(new Date(q.expiresAt).getTime()-K<=kw8.REFRESH_THRESHOLD)return this.refresh(A);return{accessKeyId:q.accessKeyId,secretAccessKey:q.secretAccessKey,sessionToken:q.sessionToken,accountId:q.accountId,expiration:new Date(q.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(A){let{SigninClient:q,CreateOAuth2TokenCommand:K}=await Promise.resolve().then(() => e(RD7())),{logger:Y,userAgentAppId:z}=this.callerClientConfig??{},_=((j)=>{return j?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,$=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,O=new q({credentials:{accessKeyId:"",secretAccessKey:""},region:$,requestHandler:_,logger:Y,userAgentAppId:z,...this.init?.clientConfig});this.createDPoPInterceptor(O.middlewareStack);let H={tokenInput:{clientId:A.clientId,refreshToken:A.refreshToken,grantType:"refresh_token"}};try{let j=await O.send(new K(H)),{accessKeyId:J,secretAccessKey:M,sessionToken:D}=j.tokenOutput?.accessToken??{},{refreshToken:X,expiresIn:P}=j.tokenOutput??{};if(!J||!M||!D||!X)throw new kt.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let W=(P??900)*1000,Z=new Date(Date.now()+W),G={...A,accessToken:{...A.accessToken,accessKeyId:J,secretAccessKey:M,sessionToken:D,expiresAt:Z.toISOString()},refreshToken:X};await this.saveToken(G);let f=G.accessToken;return{accessKeyId:f.accessKeyId,secretAccessKey:f.secretAccessKey,sessionToken:f.sessionToken,accountId:f.accountId,expiration:Z}}catch(j){if(j.name==="AccessDeniedException"){let J=j.error,M;switch(J){case"TOKEN_EXPIRED":M="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":M="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":M="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:M=`Failed to refresh token: ${String(j)}. Please re-authenticate using \`aws login\``}throw new kt.CredentialsProviderError(M,{logger:this.logger,tryNextLink:!1})}throw new kt.CredentialsProviderError(`Failed to refresh token: ${String(j)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let A=this.getTokenFilePath();try{let q;try{q=await vw8.readFile(A,{ignoreCache:this.init?.ignoreCache})}catch{q=await Vw8.promises.readFile(A,"utf8")}let K=JSON.parse(q),Y=["accessToken","clientId","refreshToken","dpopKey"].filter((z)=>!K[z]);if(!K.accessToken?.accountId)Y.push("accountId");if(Y.length>0)throw new kt.CredentialsProviderError(`Token validation failed, missing fields: ${Y.join(", ")}`,{logger:this.logger,tryNextLink:!1});return K}catch(q){throw new kt.CredentialsProviderError(`Failed to load token from ${A}: ${String(q)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(A){let q=this.getTokenFilePath(),K=Nw8.dirname(q);try{await Vw8.promises.mkdir(K,{recursive:!0})}catch(Y){}await Vw8.promises.writeFile(q,JSON.stringify(A,null,2),"utf8")}getTokenFilePath(){let A=process.env.AWS_LOGIN_CACHE_DIRECTORY??Nw8.join(C95.homedir(),".aws","login","cache"),q=Buffer.from(this.loginSession,"utf8"),K=V_1.createHash("sha256").update(q).digest("hex");return Nw8.join(A,`${K}.json`)}derToRawSignature(A){let q=2;if(A[q]!==2)throw Error("Invalid DER signature");q++;let K=A[q++],Y=A.subarray(q,q+K);if(q+=K,A[q]!==2)throw Error("Invalid DER signature");q++;let z=A[q++],w=A.subarray(q,q+z);Y=Y[0]===0?Y.subarray(1):Y,w=w[0]===0?w.subarray(1):w;let _=Buffer.concat([Buffer.alloc(32-Y.length),Y]),$=Buffer.concat([Buffer.alloc(32-w.length),w]);return Buffer.concat([_,$])}createDPoPInterceptor(A){A.add((q)=>async(K)=>{if(S95.HttpRequest.isInstance(K.request)){let Y=K.request,z=`${Y.protocol}//${Y.hostname}${Y.port?`:${Y.port}`:""}${Y.path}`,w=await this.generateDpop(Y.method,z);Y.headers={...Y.headers,DPoP:w}}return q(K)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(A="POST",q){let K=await this.loadToken();try{let Y=V_1.createPrivateKey({key:K.dpopKey,format:"pem",type:"sec1"}),w=V_1.createPublicKey(Y).export({format:"der",type:"spki"}),_=-1;for(let Z=0;Z<w.length;Z++)if(w[Z]===4){_=Z;break}let $=w.slice(_+1,_+33),O=w.slice(_+33,_+65),H={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:$.toString("base64url"),y:O.toString("base64url")}},j={jti:crypto.randomUUID(),htm:A,htu:q,iat:Math.floor(Date.now()/1000)},J=Buffer.from(JSON.stringify(H)).toString("base64url"),M=Buffer.from(JSON.stringify(j)).toString("base64url"),D=`${J}.${M}`,X=V_1.sign("sha256",Buffer.from(D),Y),W=this.derToRawSignature(X).toString("base64url");return`${D}.${W}`}catch(Y){throw new kt.CredentialsProviderError(`Failed to generate Dpop proof: ${Y instanceof Error?Y.message:String(Y)}`,{logger:this.logger,tryNextLink:!1})}}}var h95=(A)=>async({callerClientConfig:q}={})=>{A?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let K=await vw8.parseKnownFiles(A||{}),Y=vw8.getProfileName({profile:A?.profile??q?.profile}),z=K[Y];if(!z?.login_session)throw new kt.CredentialsProviderError(`Profile ${Y} does not contain login_session.`,{tryNextLink:!0,logger:A?.logger});let _=await new kw8(z,A,q).loadCredentials();return R95.setCredentialFeature(_,"CREDENTIALS_LOGIN","AD")};I95.fromLoginCredentials=h95});var yw8=C((SD7)=>{Object.defineProperty(SD7,"__esModule",{value:!0});SD7.resolveHttpAuthSchemeConfig=SD7.resolveStsAuthConfig=SD7.defaultSTSHttpAuthSchemeProvider=SD7.defaultSTSHttpAuthSchemeParametersProvider=void 0;var x95=O$(),Lw8=pZ(),u95=Rw8(),B95=async(A,q,K)=>{return{operation:(0,Lw8.getSmithyContext)(q).operation,region:await(0,Lw8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};SD7.defaultSTSHttpAuthSchemeParametersProvider=B95;function m95(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function g95(A){return{schemeId:"smithy.api#noAuth"}}var F95=(A)=>{let q=[];switch(A.operation){case"AssumeRoleWithWebIdentity":{q.push(g95(A));break}default:q.push(m95(A))}return q};SD7.defaultSTSHttpAuthSchemeProvider=F95;var Q95=(A)=>Object.assign(A,{stsClientCtor:u95.STSClient});SD7.resolveStsAuthConfig=Q95;var U95=(A)=>{let q=SD7.resolveStsAuthConfig(A),K=(0,x95.resolveAwsSdkSigV4Config)(q);return Object.assign(K,{authSchemePreference:(0,Lw8.normalizeProvider)(A.authSchemePreference??[])})};SD7.resolveHttpAuthSchemeConfig=U95});var Sw8=C((ID7)=>{Object.defineProperty(ID7,"__esModule",{value:!0});ID7.commonParams=ID7.resolveClientEndpointParameters=void 0;var c95=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,useGlobalEndpoint:A.useGlobalEndpoint??!1,defaultSigningName:"sts"})};ID7.resolveClientEndpointParameters=c95;ID7.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var YX7=C((qX7)=>{Object.defineProperty(qX7,"__esModule",{value:!0});qX7.ruleSet=void 0;var lD7="required",Q5="type",oz="fn",az="argv",Lt="ref",xD7=!1,Cw8=!0,Et="booleanEquals",b0="stringEquals",iD7="sigv4",nD7="sts",rD7="us-east-1",iO="endpoint",uD7="https://sts.{Region}.{PartitionResult#dnsSuffix}",nm="tree",hP6="error",Iw8="getAttr",BD7={[lD7]:!1,[Q5]:"string"},hw8={[lD7]:!0,default:!1,[Q5]:"boolean"},oD7={[Lt]:"Endpoint"},mD7={[oz]:"isSet",[az]:[{[Lt]:"Region"}]},x0={[Lt]:"Region"},gD7={[oz]:"aws.partition",[az]:[x0],assign:"PartitionResult"},aD7={[Lt]:"UseFIPS"},sD7={[Lt]:"UseDualStack"},nZ={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:iD7,signingName:nD7,signingRegion:rD7}]},headers:{}},TE={},FD7={conditions:[{[oz]:b0,[az]:[x0,"aws-global"]}],[iO]:nZ,[Q5]:iO},tD7={[oz]:Et,[az]:[aD7,!0]},eD7={[oz]:Et,[az]:[sD7,!0]},QD7={[oz]:Iw8,[az]:[{[Lt]:"PartitionResult"},"supportsFIPS"]},AX7={[Lt]:"PartitionResult"},UD7={[oz]:Et,[az]:[!0,{[oz]:Iw8,[az]:[AX7,"supportsDualStack"]}]},pD7=[{[oz]:"isSet",[az]:[oD7]}],dD7=[tD7],cD7=[eD7],i95={version:"1.0",parameters:{Region:BD7,UseDualStack:hw8,UseFIPS:hw8,Endpoint:BD7,UseGlobalEndpoint:hw8},rules:[{conditions:[{[oz]:Et,[az]:[{[Lt]:"UseGlobalEndpoint"},Cw8]},{[oz]:"not",[az]:pD7},mD7,gD7,{[oz]:Et,[az]:[aD7,xD7]},{[oz]:Et,[az]:[sD7,xD7]}],rules:[{conditions:[{[oz]:b0,[az]:[x0,"ap-northeast-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"ap-south-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"ap-southeast-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"ap-southeast-2"]}],endpoint:nZ,[Q5]:iO},FD7,{conditions:[{[oz]:b0,[az]:[x0,"ca-central-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"eu-central-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"eu-north-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"eu-west-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"eu-west-2"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"eu-west-3"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"sa-east-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,rD7]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"us-east-2"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"us-west-1"]}],endpoint:nZ,[Q5]:iO},{conditions:[{[oz]:b0,[az]:[x0,"us-west-2"]}],endpoint:nZ,[Q5]:iO},{endpoint:{url:uD7,properties:{authSchemes:[{name:iD7,signingName:nD7,signingRegion:"{Region}"}]},headers:TE},[Q5]:iO}],[Q5]:nm},{conditions:pD7,rules:[{conditions:dD7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Q5]:hP6},{conditions:cD7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Q5]:hP6},{endpoint:{url:oD7,properties:TE,headers:TE},[Q5]:iO}],[Q5]:nm},{conditions:[mD7],rules:[{conditions:[gD7],rules:[{conditions:[tD7,eD7],rules:[{conditions:[{[oz]:Et,[az]:[Cw8,QD7]},UD7],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TE,headers:TE},[Q5]:iO}],[Q5]:nm},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Q5]:hP6}],[Q5]:nm},{conditions:dD7,rules:[{conditions:[{[oz]:Et,[az]:[QD7,Cw8]}],rules:[{conditions:[{[oz]:b0,[az]:[{[oz]:Iw8,[az]:[AX7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:TE,headers:TE},[Q5]:iO},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:TE,headers:TE},[Q5]:iO}],[Q5]:nm},{error:"FIPS is enabled but this partition does not support FIPS",[Q5]:hP6}],[Q5]:nm},{conditions:cD7,rules:[{conditions:[UD7],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TE,headers:TE},[Q5]:iO}],[Q5]:nm},{error:"DualStack is enabled but this partition does not support DualStack",[Q5]:hP6}],[Q5]:nm},FD7,{endpoint:{url:uD7,properties:TE,headers:TE},[Q5]:iO}],[Q5]:nm}],[Q5]:nm},{error:"Invalid Configuration: Missing Region",[Q5]:hP6}]};qX7.ruleSet=i95});var _X7=C((zX7)=>{Object.defineProperty(zX7,"__esModule",{value:!0});zX7.defaultEndpointResolver=void 0;var n95=pm(),bw8=Ab(),r95=YX7(),o95=new bw8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),a95=(A,q={})=>{return o95.get(A,()=>(0,bw8.resolveEndpoint)(r95.ruleSet,{endpointParams:A,logger:q.logger}))};zX7.defaultEndpointResolver=a95;bw8.customEndpointFunctions.aws=n95.awsEndpointFunctions});var JX7=C((HX7)=>{Object.defineProperty(HX7,"__esModule",{value:!0});HX7.getRuntimeConfig=void 0;var s95=O$(),t95=Lc(),e95=pw(),AY5=df(),qY5=LR(),$X7=c21(),OX7=Z2(),KY5=yw8(),YY5=_X7(),zY5=(A)=>{return{apiVersion:"2011-06-15",base64Decoder:A?.base64Decoder??$X7.fromBase64,base64Encoder:A?.base64Encoder??$X7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??YY5.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??KY5.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new s95.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new e95.NoAuthSigner}],logger:A?.logger??new AY5.NoOpLogger,protocol:A?.protocol??new t95.AwsQueryProtocol({defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15"}),serviceId:A?.serviceId??"STS",urlParser:A?.urlParser??qY5.parseUrl,utf8Decoder:A?.utf8Decoder??OX7.fromUtf8,utf8Encoder:A?.utf8Encoder??OX7.toUtf8}};HX7.getRuntimeConfig=zY5});var ZX7=C((PX7)=>{Object.defineProperty(PX7,"__esModule",{value:!0});PX7.getRuntimeConfig=void 0;var wY5=d2(),_Y5=wY5.__importDefault(Q21()),xw8=O$(),MX7=Nc(),N_1=NJ(),$Y5=pw(),OY5=vc(),DX7=h0(),Q36=HN(),XX7=$N(),HY5=kc(),jY5=lm(),JY5=JX7(),MY5=df(),DY5=Rc(),XY5=df(),PY5=(A)=>{(0,XY5.emitWarningIfUnsupportedVersion)(process.version);let q=(0,DY5.resolveDefaultsModeConfig)(A),K=()=>q().then(MY5.loadConfigsForDefaultMode),Y=(0,JY5.getRuntimeConfig)(A);(0,xw8.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,Q36.loadConfig)(xw8.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??HY5.calculateBodyLength,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,MX7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:_Y5.default.version}),httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4")||(async(_)=>await A.credentialDefaultProvider(_?.__config||{})()),signer:new xw8.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $Y5.NoAuthSigner}],maxAttempts:A?.maxAttempts??(0,Q36.loadConfig)(DX7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,Q36.loadConfig)(N_1.NODE_REGION_CONFIG_OPTIONS,{...N_1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:XX7.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,Q36.loadConfig)({...DX7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||jY5.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??OY5.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??XX7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,Q36.loadConfig)(N_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,Q36.loadConfig)(N_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,Q36.loadConfig)(MX7.NODE_APP_ID_CONFIG_OPTIONS,z)}};PX7.getRuntimeConfig=PY5});var TX7=C((GX7)=>{Object.defineProperty(GX7,"__esModule",{value:!0});GX7.resolveHttpAuthRuntimeConfig=GX7.getHttpAuthExtensionConfiguration=void 0;var WY5=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y}=A;return{setHttpAuthScheme(z){let w=q.findIndex((_)=>_.schemeId===z.schemeId);if(w===-1)q.push(z);else q.splice(w,1,z)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(z){K=z},httpAuthSchemeProvider(){return K},setCredentials(z){Y=z},credentials(){return Y}}};GX7.getHttpAuthExtensionConfiguration=WY5;var ZY5=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials()}};GX7.resolveHttpAuthRuntimeConfig=ZY5});var yX7=C((EX7)=>{Object.defineProperty(EX7,"__esModule",{value:!0});EX7.resolveRuntimeExtensions=void 0;var VX7=Kb(),NX7=n21(),vX7=df(),kX7=TX7(),fY5=(A,q)=>{let K=Object.assign((0,VX7.getAwsRegionExtensionConfiguration)(A),(0,vX7.getDefaultExtensionConfiguration)(A),(0,NX7.getHttpHandlerExtensionConfiguration)(A),(0,kX7.getHttpAuthExtensionConfiguration)(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,(0,VX7.resolveAwsRegionExtensionConfiguration)(K),(0,vX7.resolveDefaultRuntimeConfig)(K),(0,NX7.resolveHttpHandlerRuntimeConfig)(K),(0,kX7.resolveHttpAuthRuntimeConfig)(K))};EX7.resolveRuntimeExtensions=fY5});var Rw8=C((Bw8)=>{Object.defineProperty(Bw8,"__esModule",{value:!0});Bw8.STSClient=Bw8.__Client=void 0;var RX7=Dc(),TY5=Xc(),VY5=Pc(),SX7=cm(),NY5=NJ(),uw8=pw(),vY5=lO(),kY5=Vc(),EY5=qb(),CX7=h0(),IX7=df();Object.defineProperty(Bw8,"__Client",{enumerable:!0,get:function(){return IX7.Client}});var hX7=yw8(),LY5=Sw8(),yY5=ZX7(),RY5=yX7();class bX7 extends IX7.Client{config;constructor(...[A]){let q=(0,yY5.getRuntimeConfig)(A||{});super(q);this.initConfig=q;let K=(0,LY5.resolveClientEndpointParameters)(q),Y=(0,SX7.resolveUserAgentConfig)(K),z=(0,CX7.resolveRetryConfig)(Y),w=(0,NY5.resolveRegionConfig)(z),_=(0,RX7.resolveHostHeaderConfig)(w),$=(0,EY5.resolveEndpointConfig)(_),O=(0,hX7.resolveHttpAuthSchemeConfig)($),H=(0,RY5.resolveRuntimeExtensions)(O,A?.extensions||[]);this.config=H,this.middlewareStack.use((0,vY5.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,SX7.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,CX7.getRetryPlugin)(this.config)),this.middlewareStack.use((0,kY5.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,RX7.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,TY5.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,VY5.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,uw8.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:hX7.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new uw8.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials})})),this.middlewareStack.use((0,uw8.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}Bw8.STSClient=bX7});var L_1=C((v_1)=>{var EB6=Rw8(),LB6=df(),uX7=qb(),BX7=Sw8(),yt=lO(),mw8=ON(),SY5=Kb(),hc=class A extends LB6.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},mX7=class A extends hc{name="ExpiredTokenException";$fault="client";constructor(q){super({name:"ExpiredTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},gX7=class A extends hc{name="MalformedPolicyDocumentException";$fault="client";constructor(q){super({name:"MalformedPolicyDocumentException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},FX7=class A extends hc{name="PackedPolicyTooLargeException";$fault="client";constructor(q){super({name:"PackedPolicyTooLargeException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},QX7=class A extends hc{name="RegionDisabledException";$fault="client";constructor(q){super({name:"RegionDisabledException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},UX7=class A extends hc{name="IDPRejectedClaimException";$fault="client";constructor(q){super({name:"IDPRejectedClaimException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},pX7=class A extends hc{name="InvalidIdentityTokenException";$fault="client";constructor(q){super({name:"InvalidIdentityTokenException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},dX7=class A extends hc{name="IDPCommunicationErrorException";$fault="client";constructor(q){super({name:"IDPCommunicationErrorException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},CY5="Arn",hY5="AccessKeyId",IY5="AssumeRole",bY5="AssumedRoleId",xY5="AssumeRoleRequest",uY5="AssumeRoleResponse",gw8="AssumedRoleUser",BY5="AssumeRoleWithWebIdentity",mY5="AssumeRoleWithWebIdentityRequest",gY5="AssumeRoleWithWebIdentityResponse",FY5="Audience",Fw8="Credentials",QY5="ContextAssertion",cX7="DurationSeconds",UY5="Expiration",pY5="ExternalId",dY5="ExpiredTokenException",cY5="IDPCommunicationErrorException",lY5="IDPRejectedClaimException",iY5="InvalidIdentityTokenException",nY5="Key",rY5="MalformedPolicyDocumentException",lX7="Policy",iX7="PolicyArns",oY5="ProviderArn",aY5="ProvidedContexts",sY5="ProvidedContextsListType",tY5="ProvidedContext",eY5="PolicyDescriptorType",Az5="ProviderId",nX7="PackedPolicySize",qz5="PackedPolicyTooLargeException",Kz5="Provider",rX7="RoleArn",Yz5="RegionDisabledException",oX7="RoleSessionName",zz5="SecretAccessKey",wz5="SubjectFromWebIdentityToken",Qw8="SourceIdentity",_z5="SerialNumber",$z5="SessionToken",Oz5="Tags",Hz5="TokenCode",jz5="TransitiveTagKeys",Jz5="Tag",Mz5="Value",Dz5="WebIdentityToken",Xz5="arn",Pz5="accessKeySecretType",U36="awsQueryError",p36="client",Wz5="clientTokenType",d36="error",c36="httpError",l36="message",Zz5="policyDescriptorListType",aX7="smithy.ts.sdk.synthetic.com.amazonaws.sts",Gz5="tagListType",cw="com.amazonaws.sts",fz5=[0,cw,Pz5,8,0],Tz5=[0,cw,Wz5,8,0],sX7=[3,cw,gw8,0,[bY5,CY5],[0,0]],Vz5=[3,cw,xY5,0,[rX7,oX7,iX7,lX7,cX7,Oz5,jz5,pY5,_z5,Hz5,Qw8,aY5],[0,0,()=>eX7,0,1,()=>mz5,64,0,0,0,0,()=>Bz5]],Nz5=[3,cw,uY5,0,[Fw8,gw8,nX7,Qw8],[[()=>tX7,0],()=>sX7,1,0]],vz5=[3,cw,mY5,0,[rX7,oX7,Dz5,Az5,iX7,lX7,cX7],[0,0,[()=>Tz5,0],0,()=>eX7,0,1]],kz5=[3,cw,gY5,0,[Fw8,wz5,gw8,nX7,Kz5,FY5,Qw8],[[()=>tX7,0],0,()=>sX7,1,0,0,0]],tX7=[3,cw,Fw8,0,[hY5,zz5,$z5,UY5],[0,[()=>fz5,0],0,4]],Ez5=[-3,cw,dY5,{[d36]:p36,[c36]:400,[U36]:["ExpiredTokenException",400]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(Ez5,mX7);var Lz5=[-3,cw,cY5,{[d36]:p36,[c36]:400,[U36]:["IDPCommunicationError",400]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(Lz5,dX7);var yz5=[-3,cw,lY5,{[d36]:p36,[c36]:403,[U36]:["IDPRejectedClaim",403]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(yz5,UX7);var Rz5=[-3,cw,iY5,{[d36]:p36,[c36]:400,[U36]:["InvalidIdentityToken",400]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(Rz5,pX7);var Sz5=[-3,cw,rY5,{[d36]:p36,[c36]:400,[U36]:["MalformedPolicyDocument",400]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(Sz5,gX7);var Cz5=[-3,cw,qz5,{[d36]:p36,[c36]:400,[U36]:["PackedPolicyTooLarge",400]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(Cz5,FX7);var hz5=[3,cw,eY5,0,[Xz5],[0]],Iz5=[3,cw,tY5,0,[oY5,QY5],[0,0]],bz5=[-3,cw,Yz5,{[d36]:p36,[c36]:403,[U36]:["RegionDisabledException",403]},[l36],[0]];yt.TypeRegistry.for(cw).registerError(bz5,QX7);var xz5=[3,cw,Jz5,0,[nY5,Mz5],[0,0]],uz5=[-3,aX7,"STSServiceException",0,[],[]];yt.TypeRegistry.for(aX7).registerError(uz5,hc);var eX7=[1,cw,Zz5,0,()=>hz5],Bz5=[1,cw,sY5,0,()=>Iz5],mz5=[1,cw,Gz5,0,()=>xz5],gz5=[9,cw,IY5,0,()=>Vz5,()=>Nz5],Fz5=[9,cw,BY5,0,()=>vz5,()=>kz5];class k_1 extends LB6.Command.classBuilder().ep(BX7.commonParams).m(function(A,q,K,Y){return[uX7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(gz5).build(){}class E_1 extends LB6.Command.classBuilder().ep(BX7.commonParams).m(function(A,q,K,Y){return[uX7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Fz5).build(){}var Qz5={AssumeRoleCommand:k_1,AssumeRoleWithWebIdentityCommand:E_1};class Uw8 extends EB6.STSClient{}LB6.createAggregatedClient(Qz5,Uw8);var AP7=(A)=>{if(typeof A?.Arn==="string"){let q=A.Arn.split(":");if(q.length>4&&q[4]!=="")return q[4]}return},qP7=async(A,q,K,Y={})=>{let z=typeof A==="function"?await A():A,w=typeof q==="function"?await q():q,_=await SY5.stsRegionDefaultResolver(Y)();return K?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${z} (credential provider clientConfig)`,`${w} (contextual client)`,`${_} (STS default: AWS_REGION, profile region, or us-east-1)`),z??w??_},Uz5=(A,q)=>{let K,Y;return async(z,w)=>{if(Y=z,!K){let{logger:j=A?.parentClientConfig?.logger,profile:J=A?.parentClientConfig?.profile,region:M,requestHandler:D=A?.parentClientConfig?.requestHandler,credentialProviderLogger:X,userAgentAppId:P=A?.parentClientConfig?.userAgentAppId}=A,W=await qP7(M,A?.parentClientConfig?.region,X,{logger:j,profile:J}),Z=!KP7(D);K=new q({...A,userAgentAppId:P,profile:J,credentialDefaultProvider:()=>async()=>Y,region:W,requestHandler:Z?D:void 0,logger:j})}let{Credentials:_,AssumedRoleUser:$}=await K.send(new k_1(w));if(!_||!_.AccessKeyId||!_.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${w.RoleArn}`);let O=AP7($),H={accessKeyId:_.AccessKeyId,secretAccessKey:_.SecretAccessKey,sessionToken:_.SessionToken,expiration:_.Expiration,..._.CredentialScope&&{credentialScope:_.CredentialScope},...O&&{accountId:O}};return mw8.setCredentialFeature(H,"CREDENTIALS_STS_ASSUME_ROLE","i"),H}},pz5=(A,q)=>{let K;return async(Y)=>{if(!K){let{logger:O=A?.parentClientConfig?.logger,profile:H=A?.parentClientConfig?.profile,region:j,requestHandler:J=A?.parentClientConfig?.requestHandler,credentialProviderLogger:M,userAgentAppId:D=A?.parentClientConfig?.userAgentAppId}=A,X=await qP7(j,A?.parentClientConfig?.region,M,{logger:O,profile:H}),P=!KP7(J);K=new q({...A,userAgentAppId:D,profile:H,region:X,requestHandler:P?J:void 0,logger:O})}let{Credentials:z,AssumedRoleUser:w}=await K.send(new E_1(Y));if(!z||!z.AccessKeyId||!z.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${Y.RoleArn}`);let _=AP7(w),$={accessKeyId:z.AccessKeyId,secretAccessKey:z.SecretAccessKey,sessionToken:z.SessionToken,expiration:z.Expiration,...z.CredentialScope&&{credentialScope:z.CredentialScope},..._&&{accountId:_}};if(_)mw8.setCredentialFeature($,"RESOLVED_ACCOUNT_ID","T");return mw8.setCredentialFeature($,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),$}},KP7=(A)=>{return A?.metadata?.handlerProtocol==="h2"},YP7=(A,q)=>{if(!q)return A;else return class extends A{constructor(Y){super(Y);for(let z of q)this.middlewareStack.use(z)}}},zP7=(A={},q)=>Uz5(A,YP7(EB6.STSClient,q)),wP7=(A={},q)=>pz5(A,YP7(EB6.STSClient,q)),dz5=(A)=>(q)=>A({roleAssumer:zP7(q),roleAssumerWithWebIdentity:wP7(q),...q});Object.defineProperty(v_1,"$Command",{enumerable:!0,get:function(){return LB6.Command}});v_1.AssumeRoleCommand=k_1;v_1.AssumeRoleWithWebIdentityCommand=E_1;v_1.ExpiredTokenException=mX7;v_1.IDPCommunicationErrorException=dX7;v_1.IDPRejectedClaimException=UX7;v_1.InvalidIdentityTokenException=pX7;v_1.MalformedPolicyDocumentException=gX7;v_1.PackedPolicyTooLargeException=FX7;v_1.RegionDisabledException=QX7;v_1.STS=Uw8;v_1.STSServiceException=hc;v_1.decorateDefaultCredentialProvider=dz5;v_1.getDefaultRoleAssumer=zP7;v_1.getDefaultRoleAssumerWithWebIdentity=wP7;Object.keys(EB6).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(v_1,A))Object.defineProperty(v_1,A,{enumerable:!0,get:function(){return EB6[A]}})})});var y_1=C((jw5)=>{var dw8=gm(),pw8=EM(),zw5=g6("child_process"),ww5=g6("util"),_w5=ON(),$w5=(A,q,K)=>{if(q.Version!==1)throw Error(`Profile ${A} credential_process did not return Version 1.`);if(q.AccessKeyId===void 0||q.SecretAccessKey===void 0)throw Error(`Profile ${A} credential_process returned invalid credentials.`);if(q.Expiration){let w=new Date;if(new Date(q.Expiration)<w)throw Error(`Profile ${A} credential_process returned expired credentials.`)}let Y=q.AccountId;if(!Y&&K?.[A]?.aws_account_id)Y=K[A].aws_account_id;let z={accessKeyId:q.AccessKeyId,secretAccessKey:q.SecretAccessKey,...q.SessionToken&&{sessionToken:q.SessionToken},...q.Expiration&&{expiration:new Date(q.Expiration)},...q.CredentialScope&&{credentialScope:q.CredentialScope},...Y&&{accountId:Y}};return _w5.setCredentialFeature(z,"CREDENTIALS_PROCESS","w"),z},Ow5=async(A,q,K)=>{let Y=q[A];if(q[A]){let z=Y.credential_process;if(z!==void 0){let w=ww5.promisify(dw8.externalDataInterceptor?.getTokenRecord?.().exec??zw5.exec);try{let{stdout:_}=await w(z),$;try{$=JSON.parse(_.trim())}catch{throw Error(`Profile ${A} credential_process returned invalid JSON.`)}return $w5(A,$,q)}catch(_){throw new pw8.CredentialsProviderError(_.message,{logger:K})}}else throw new pw8.CredentialsProviderError(`Profile ${A} did not contain credential_process.`,{logger:K})}else throw new pw8.CredentialsProviderError(`Profile ${A} could not be found in shared credentials file.`,{logger:K})},Hw5=(A={})=>async({callerClientConfig:q}={})=>{A.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let K=await dw8.parseKnownFiles(A);return Ow5(dw8.getProfileName({profile:A.profile??q?.profile}),K,A.logger)};jw5.fromProcess=Hw5});var cw8=C((rm)=>{var Mw5=rm&&rm.__createBinding||(Object.create?function(A,q,K,Y){if(Y===void 0)Y=K;var z=Object.getOwnPropertyDescriptor(q,K);if(!z||("get"in z?!q.__esModule:z.writable||z.configurable))z={enumerable:!0,get:function(){return q[K]}};Object.defineProperty(A,Y,z)}:function(A,q,K,Y){if(Y===void 0)Y=K;A[Y]=q[K]}),Dw5=rm&&rm.__setModuleDefault||(Object.create?function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}:function(A,q){A.default=q}),Xw5=rm&&rm.__importStar||function(){var A=function(q){return A=Object.getOwnPropertyNames||function(K){var Y=[];for(var z in K)if(Object.prototype.hasOwnProperty.call(K,z))Y[Y.length]=z;return Y},A(q)};return function(q){if(q&&q.__esModule)return q;var K={};if(q!=null){for(var Y=A(q),z=0;z<Y.length;z++)if(Y[z]!=="default")Mw5(K,q,Y[z])}return Dw5(K,q),K}}();Object.defineProperty(rm,"__esModule",{value:!0});rm.fromWebToken=void 0;var Pw5=(A)=>async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:K,roleSessionName:Y,webIdentityToken:z,providerId:w,policyArns:_,policy:$,durationSeconds:O}=A,{roleAssumerWithWebIdentity:H}=A;if(!H){let{getDefaultRoleAssumerWithWebIdentity:j}=await Promise.resolve().then(()=>Xw5(L_1()));H=j({...A.clientConfig,credentialProviderLogger:A.logger,parentClientConfig:{...q?.callerClientConfig,...A.parentClientConfig}},A.clientPlugins)}return H({RoleArn:K,RoleSessionName:Y??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:z,ProviderId:w,PolicyArns:_,Policy:$,DurationSeconds:O})};rm.fromWebToken=Pw5});var HP7=C(($P7)=>{Object.defineProperty($P7,"__esModule",{value:!0});$P7.fromTokenFile=void 0;var Ww5=ON(),Zw5=EM(),Gw5=gm(),fw5=g6("fs"),Tw5=cw8(),_P7="AWS_WEB_IDENTITY_TOKEN_FILE",Vw5="AWS_ROLE_ARN",Nw5="AWS_ROLE_SESSION_NAME",vw5=(A={})=>async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let K=A?.webIdentityTokenFile??process.env[_P7],Y=A?.roleArn??process.env[Vw5],z=A?.roleSessionName??process.env[Nw5];if(!K||!Y)throw new Zw5.CredentialsProviderError("Web identity configuration not specified",{logger:A.logger});let w=await(0,Tw5.fromWebToken)({...A,webIdentityToken:Gw5.externalDataInterceptor?.getTokenRecord?.()[K]??(0,fw5.readFileSync)(K,{encoding:"ascii"}),roleArn:Y,roleSessionName:z})(q);if(K===process.env[_P7])(0,Ww5.setCredentialFeature)(w,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return w};$P7.fromTokenFile=vw5});var RB6=C((yB6)=>{var jP7=HP7(),JP7=cw8();Object.keys(jP7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(yB6,A))Object.defineProperty(yB6,A,{enumerable:!0,get:function(){return jP7[A]}})});Object.keys(JP7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(yB6,A))Object.defineProperty(yB6,A,{enumerable:!0,get:function(){return JP7[A]}})})});var nw8=C((Fw5)=>{var iw8=gm(),SB6=EM(),Ic=ON(),kw5=Ew8(),Ew5=(A,q,K)=>{let Y={EcsContainer:async(z)=>{let{fromHttp:w}=await Promise.resolve().then(() => e(w21())),{fromContainerMetadata:_}=await Promise.resolve().then(() => e(L36()));return K?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>SB6.chain(w(z??{}),_(z))().then(lw8)},Ec2InstanceMetadata:async(z)=>{K?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:w}=await Promise.resolve().then(() => e(L36()));return async()=>w(z)().then(lw8)},Environment:async(z)=>{K?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:w}=await Promise.resolve().then(() => e(bw1()));return async()=>w(z)().then(lw8)}};if(A in Y)return Y[A];else throw new SB6.CredentialsProviderError(`Unsupported credential source in profile ${q}. Got ${A}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:K})},lw8=(A)=>Ic.setCredentialFeature(A,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),Lw5=(A,{profile:q="default",logger:K}={})=>{return Boolean(A)&&typeof A==="object"&&typeof A.role_arn==="string"&&["undefined","string"].indexOf(typeof A.role_session_name)>-1&&["undefined","string"].indexOf(typeof A.external_id)>-1&&["undefined","string"].indexOf(typeof A.mfa_serial)>-1&&(yw5(A,{profile:q,logger:K})||Rw5(A,{profile:q,logger:K}))},yw5=(A,{profile:q,logger:K})=>{let Y=typeof A.source_profile==="string"&&typeof A.credential_source>"u";if(Y)K?.debug?.(`    ${q} isAssumeRoleWithSourceProfile source_profile=${A.source_profile}`);return Y},Rw5=(A,{profile:q,logger:K})=>{let Y=typeof A.credential_source==="string"&&typeof A.source_profile>"u";if(Y)K?.debug?.(`    ${q} isCredentialSourceProfile credential_source=${A.credential_source}`);return Y},Sw5=async(A,q,K,Y={},z)=>{K.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let w=q[A],{source_profile:_,region:$}=w;if(!K.roleAssumer){let{getDefaultRoleAssumer:H}=await Promise.resolve().then(() => e(L_1()));K.roleAssumer=H({...K.clientConfig,credentialProviderLogger:K.logger,parentClientConfig:{...K?.parentClientConfig,region:$??K?.parentClientConfig?.region}},K.clientPlugins)}if(_&&_ in Y)throw new SB6.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${iw8.getProfileName(K)}. Profiles visited: `+Object.keys(Y).join(", "),{logger:K.logger});K.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${_?`source_profile=[${_}]`:`profile=[${A}]`}`);let O=_?z(_,q,K,{...Y,[_]:!0},MP7(q[_]??{})):(await Ew5(w.credential_source,A,K.logger)(K))();if(MP7(w))return O.then((H)=>Ic.setCredentialFeature(H,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let H={RoleArn:w.role_arn,RoleSessionName:w.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:w.external_id,DurationSeconds:parseInt(w.duration_seconds||"3600",10)},{mfa_serial:j}=w;if(j){if(!K.mfaCodeProvider)throw new SB6.CredentialsProviderError(`Profile ${A} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:K.logger,tryNextLink:!1});H.SerialNumber=j,H.TokenCode=await K.mfaCodeProvider(j)}let J=await O;return K.roleAssumer(J,H).then((M)=>Ic.setCredentialFeature(M,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},MP7=(A)=>{return!A.role_arn&&!!A.credential_source},Cw5=(A)=>{return Boolean(A&&A.login_session)},hw5=async(A,q)=>{let K=await kw5.fromLoginCredentials({...q,profile:A})();return Ic.setCredentialFeature(K,"CREDENTIALS_PROFILE_LOGIN","AC")},Iw5=(A)=>Boolean(A)&&typeof A==="object"&&typeof A.credential_process==="string",bw5=async(A,q)=>Promise.resolve().then(() => e(y_1())).then(({fromProcess:K})=>K({...A,profile:q})().then((Y)=>Ic.setCredentialFeature(Y,"CREDENTIALS_PROFILE_PROCESS","v"))),xw5=async(A,q,K={})=>{let{fromSSO:Y}=await Promise.resolve().then(() => e(D_1()));return Y({profile:A,logger:K.logger,parentClientConfig:K.parentClientConfig,clientConfig:K.clientConfig})().then((z)=>{if(q.sso_session)return Ic.setCredentialFeature(z,"CREDENTIALS_PROFILE_SSO","r");else return Ic.setCredentialFeature(z,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},uw5=(A)=>A&&(typeof A.sso_start_url==="string"||typeof A.sso_account_id==="string"||typeof A.sso_session==="string"||typeof A.sso_region==="string"||typeof A.sso_role_name==="string"),DP7=(A)=>Boolean(A)&&typeof A==="object"&&typeof A.aws_access_key_id==="string"&&typeof A.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof A.aws_session_token)>-1&&["undefined","string"].indexOf(typeof A.aws_account_id)>-1,XP7=async(A,q)=>{q?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let K={accessKeyId:A.aws_access_key_id,secretAccessKey:A.aws_secret_access_key,sessionToken:A.aws_session_token,...A.aws_credential_scope&&{credentialScope:A.aws_credential_scope},...A.aws_account_id&&{accountId:A.aws_account_id}};return Ic.setCredentialFeature(K,"CREDENTIALS_PROFILE","n")},Bw5=(A)=>Boolean(A)&&typeof A==="object"&&typeof A.web_identity_token_file==="string"&&typeof A.role_arn==="string"&&["undefined","string"].indexOf(typeof A.role_session_name)>-1,mw5=async(A,q)=>Promise.resolve().then(() => e(RB6())).then(({fromTokenFile:K})=>K({webIdentityTokenFile:A.web_identity_token_file,roleArn:A.role_arn,roleSessionName:A.role_session_name,roleAssumerWithWebIdentity:q.roleAssumerWithWebIdentity,logger:q.logger,parentClientConfig:q.parentClientConfig})().then((Y)=>Ic.setCredentialFeature(Y,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))),PP7=async(A,q,K,Y={},z=!1)=>{let w=q[A];if(Object.keys(Y).length>0&&DP7(w))return XP7(w,K);if(z||Lw5(w,{profile:A,logger:K.logger}))return Sw5(A,q,K,Y,PP7);if(DP7(w))return XP7(w,K);if(Bw5(w))return mw5(w,K);if(Iw5(w))return bw5(K,A);if(uw5(w))return await xw5(A,w,K);if(Cw5(w))return hw5(A,K);throw new SB6.CredentialsProviderError(`Could not resolve credentials using profile: [${A}] in configuration/credentials file(s).`,{logger:K.logger})},gw5=(A={})=>async({callerClientConfig:q}={})=>{let K={...A,parentClientConfig:{...q,...A.parentClientConfig}};K.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let Y=await iw8.parseKnownFiles(K);return PP7(iw8.getProfileName({profile:A.profile??q?.profile}),Y,K)};Fw5.fromIni=gw5});var i36=C((nw5)=>{var rw8=bw1(),CB6=EM(),Uw5=gm(),WP7="AWS_EC2_METADATA_DISABLED",pw5=async(A)=>{let{ENV_CMDS_FULL_URI:q,ENV_CMDS_RELATIVE_URI:K,fromContainerMetadata:Y,fromInstanceMetadata:z}=await Promise.resolve().then(() => e(L36()));if(process.env[K]||process.env[q]){A.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:w}=await Promise.resolve().then(() => e(w21()));return CB6.chain(w(A),Y(A))}if(process.env[WP7]&&process.env[WP7]!=="false")return async()=>{throw new CB6.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:A.logger})};return A.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),z(A)};function dw5(A,q){let K=cw5(A),Y,z,w,_=async($)=>{if($?.forceRefresh)return await K($);if(w?.expiration){if(w?.expiration?.getTime()<Date.now())w=void 0}if(Y)await Y;else if(!w||q?.(w))if(w){if(!z)z=K($).then((O)=>{w=O,z=void 0})}else return Y=K($).then((O)=>{w=O,Y=void 0}),_($);return w};return _}var cw5=(A)=>async(q)=>{let K;for(let Y of A)try{return await Y(q)}catch(z){if(K=z,z?.tryNextLink)continue;throw z}throw K},ZP7=!1,lw5=(A={})=>dw5([async()=>{if(A.profile??process.env[Uw5.ENV_PROFILE]){if(process.env[rw8.ENV_KEY]&&process.env[rw8.ENV_SECRET]){if(!ZP7)(A.logger?.warn&&A.logger?.constructor?.name!=="NoOpLogger"?A.logger.warn.bind(A.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
    Multiple credential sources detected: 
    Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
    This SDK will proceed with the AWS_PROFILE value.
    
    However, a future version may change this behavior to prefer the ENV static credentials.
    Please ensure that your environment only sets either the AWS_PROFILE or the
    AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
`),ZP7=!0}throw new CB6.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:A.logger,tryNextLink:!0})}return A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),rw8.fromEnv(A)()},async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:K,ssoAccountId:Y,ssoRegion:z,ssoRoleName:w,ssoSession:_}=A;if(!K&&!Y&&!z&&!w&&!_)throw new CB6.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:A.logger});let{fromSSO:$}=await Promise.resolve().then(() => e(D_1()));return $(A)(q)},async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:K}=await Promise.resolve().then(() => e(nw8()));return K(A)(q)},async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:K}=await Promise.resolve().then(() => e(y_1()));return K(A)(q)},async(q)=>{A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:K}=await Promise.resolve().then(() => e(RB6()));return K(A)(q)},async()=>{return A.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await pw5(A))()},async()=>{throw new CB6.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:A.logger})}],GP7),iw5=(A)=>A?.expiration!==void 0,GP7=(A)=>A?.expiration!==void 0&&A.expiration.getTime()-Date.now()<300000;nw5.credentialsTreatedAsExpired=GP7;nw5.credentialsWillNeedRefresh=iw5;nw5.defaultProvider=lw5});function sw5(A){switch(A.family){case 0:case 4:case 6:return A.family;case"IPv6":return 6;case"IPv4":case void 0:return 4;default:throw Error(`Unsupported address family: ${A.family}`)}}function mR(A=process.env){return A.https_proxy||A.HTTPS_PROXY||A.http_proxy||A.HTTP_PROXY}function tw5(A=process.env){return A.no_proxy||A.NO_PROXY}function Rt(A,q=tw5()){if(!q)return!1;if(q==="*")return!0;try{let K=new URL(A),Y=K.hostname.toLowerCase(),z=K.port||(K.protocol==="https:"?"443":"80"),w=`${Y}:${z}`;return q.split(/[,\s]+/).filter(Boolean).some(($)=>{if($=$.toLowerCase().trim(),$.includes(":"))return w===$;if($.startsWith(".")){let O=$;return Y===$.substring(1)||Y.endsWith(O)}return Y===$})}catch{return!1}}function S_1(A,q={}){let K=ER(),Y=tI(),z={...K&&{cert:K.cert,key:K.key,passphrase:K.passphrase},...Y&&{ca:Y}};if($1(process.env.CLAUDE_CODE_PROXY_RESOLVES_HOSTS))z.lookup=(w,_,$)=>{$(null,w,sw5(_))};return new fP7.HttpsProxyAgent(A,{...z,...q})}function TP7(A={}){let q=mR(),K=yw1(),Y=I8.create({proxy:!1});if(!q){if(K)Y.defaults.httpsAgent=K;return Y}let z=S_1(q,A);return Y.interceptors.request.use((w)=>{if(w.url&&Rt(w.url))w.httpsAgent=K,w.httpAgent=K;else w.httpsAgent=z,w.httpAgent=z;return w}),Y}function bc(A){let q=mR();if(!q)return;if(Rt(A))return;return S_1(q)}function xc(A){let q=mR();if(!q)return;if(Rt(A))return;return q}function n36(){let A=mR();if(A){if(typeof Bun<"u")return{proxy:A,...Rw1()};return{dispatcher:ow8(A)}}return Rw1()}function C_1(){let A=mR(),q=yw1();if(R_1!==void 0)I8.interceptors.request.eject(R_1),R_1=void 0;if(I8.defaults.proxy=void 0,I8.defaults.httpAgent=void 0,I8.defaults.httpsAgent=void 0,A){I8.defaults.proxy=!1;let K=S_1(A);R_1=I8.interceptors.request.use((Y)=>{if(Y.url&&Rt(Y.url))if(q)Y.httpsAgent=q,Y.httpAgent=q;else delete Y.httpsAgent,delete Y.httpAgent;else Y.httpsAgent=K,Y.httpAgent=K;return Y}),Lw1(ow8(A))}else if(q){I8.defaults.httpsAgent=q;let K=Rw1();if(K.dispatcher)Lw1(K.dispatcher)}}async function aw8(){let A=mR();if(!A)return{};let[{NodeHttpHandler:q},{defaultProvider:K}]=await Promise.all([Promise.resolve().then(() => e($N(),1)),Promise.resolve().then(() => e(i36(),1))]),Y=S_1(A),z=new q({httpAgent:Y,httpsAgent:Y});return{requestHandler:z,credentials:K({clientConfig:{requestHandler:z}})}}function VP7(){ow8.cache.clear?.(),L("Cleared proxy agent cache")}var fP7,ow8,R_1;var VE=k(()=>{A3();Eq();EK8();mm();lX6();Z8();G1();fP7=e(Gx6(),1);ow8=T8((A)=>{let q=ER(),K=tI(),Y={httpProxy:A,httpsProxy:A,noProxy:process.env.NO_PROXY||process.env.no_proxy};if(q||K){let z={...q&&{cert:q.cert,key:q.key,passphrase:q.passphrase},...K&&{ca:K}};Y.connect=z,Y.requestTls=z}return new kK8(Y)})});var Y28=C((z25)=>{z25.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(z25.HttpAuthLocation||(z25.HttpAuthLocation={}));z25.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(z25.HttpApiKeyAuthLocation||(z25.HttpApiKeyAuthLocation={}));z25.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(z25.EndpointURLScheme||(z25.EndpointURLScheme={}));z25.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(z25.AlgorithmId||(z25.AlgorithmId={}));var ew5=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>z25.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>z25.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},A25=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},q25=(A)=>{return ew5(A)},K25=(A)=>{return A25(A)};z25.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(z25.FieldPosition||(z25.FieldPosition={}));var Y25="__smithy_context";z25.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(z25.IniSectionType||(z25.IniSectionType={}));z25.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(z25.RequestHandlerProtocol||(z25.RequestHandlerProtocol={}));z25.SMITHY_CONTEXT_KEY=Y25;z25.getDefaultClientConfiguration=q25;z25.resolveDefaultRuntimeConfig=K25});var IB6=C((bP6)=>{var kP7=Qm(),O28=MN(),w28=Y28(),O25=lO(),NP7=JN();class EP7{config;middlewareStack=kP7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var z28="***SensitiveInformation***";function _28(A,q){if(q==null)return q;let K=O25.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return z28;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return z28}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return z28}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=_28(_,Y[w]);return z}return q}class H28{middlewareStack=kP7.constructStack();schema;static classBuilder(){return new LP7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[w28.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class LP7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends H28{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?_28.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?_28.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var H25="***SensitiveInformation***",j25=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class IP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return IP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===IP6)return IP6.isInstance(A);if(IP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var yP7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},RP7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=M25(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw yP7(_,q)},J25=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{RP7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},M25=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),D25=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},vP7=!1,X25=(A)=>{if(A&&!vP7&&parseInt(A.substring(1,A.indexOf(".")))<16)vP7=!0},P25=(A)=>{let q=[];for(let K in w28.AlgorithmId){let Y=w28.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},W25=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Z25=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},G25=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},SP7=(A)=>{return Object.assign(P25(A),Z25(A))},f25=SP7,T25=(A)=>{return Object.assign(W25(A),G25(A))},V25=(A)=>Array.isArray(A)?A:[A],CP7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=CP7(A[K]);return A},N25=(A)=>{return A!=null};class hP7{trace(){}debug(){}info(){}warn(){}error(){}}function IP7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,E25(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}bP7(Y,null,w,_)}return Y}var v25=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},k25=(A,q)=>{let K={};for(let Y in q)bP7(K,A,q,Y);return K},E25=(A,q,K)=>{return IP7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},bP7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=L25,O=y25,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},L25=(A)=>A!=null,y25=(A)=>A,R25=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},S25=(A)=>A.toISOString().replace(".000Z","Z"),$28=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map($28);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=$28(A[K])}return q}return A};Object.defineProperty(bP6,"collectBody",{enumerable:!0,get:function(){return O28.collectBody}});Object.defineProperty(bP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return O28.extendedEncodeURIComponent}});Object.defineProperty(bP6,"resolvedPath",{enumerable:!0,get:function(){return O28.resolvedPath}});bP6.Client=EP7;bP6.Command=H28;bP6.NoOpLogger=hP7;bP6.SENSITIVE_STRING=H25;bP6.ServiceException=IP6;bP6._json=$28;bP6.convertMap=v25;bP6.createAggregatedClient=j25;bP6.decorateServiceException=yP7;bP6.emitWarningIfUnsupportedVersion=X25;bP6.getArrayIfSingleItem=V25;bP6.getDefaultClientConfiguration=f25;bP6.getDefaultExtensionConfiguration=SP7;bP6.getValueFromTextNode=CP7;bP6.isSerializableHeaderValue=N25;bP6.loadConfigsForDefaultMode=D25;bP6.map=IP7;bP6.resolveDefaultRuntimeConfig=T25;bP6.serializeDateTime=S25;bP6.serializeFloat=R25;bP6.take=k25;bP6.throwDefaultError=RP7;bP6.withBaseException=J25;Object.keys(NP7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(bP6,A))Object.defineProperty(bP6,A,{enumerable:!0,get:function(){return NP7[A]}})})});var M28=C((xP7)=>{Object.defineProperty(xP7,"__esModule",{value:!0});xP7.resolveHttpAuthSchemeConfig=xP7.defaultBedrockHttpAuthSchemeProvider=xP7.defaultBedrockHttpAuthSchemeParametersProvider=void 0;var e25=O$(),j28=pw(),J28=pZ(),A_5=async(A,q,K)=>{return{operation:(0,J28.getSmithyContext)(q).operation,region:await(0,J28.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};xP7.defaultBedrockHttpAuthSchemeParametersProvider=A_5;function q_5(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function K_5(A){return{schemeId:"smithy.api#httpBearerAuth",propertiesExtractor:({profile:q,filepath:K,configFilepath:Y,ignoreCache:z},w)=>({identityProperties:{profile:q,filepath:K,configFilepath:Y,ignoreCache:z}})}}var Y_5=(A)=>{let q=[];switch(A.operation){default:q.push(q_5(A)),q.push(K_5(A))}return q};xP7.defaultBedrockHttpAuthSchemeProvider=Y_5;var z_5=(A)=>{let q=(0,j28.memoizeIdentityProvider)(A.token,j28.isIdentityExpired,j28.doesIdentityRequireRefresh),K=(0,e25.resolveAwsSdkSigV4Config)(A);return Object.assign(K,{authSchemePreference:(0,J28.normalizeProvider)(A.authSchemePreference??[]),token:q})};xP7.resolveHttpAuthSchemeConfig=z_5});var BP7=C((qX2,$_5)=>{$_5.exports={name:"@aws-sdk/client-bedrock",description:"AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",version:"3.936.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/credential-provider-node":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/token-providers":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock"}}});var mP7=C((H_5)=>{var O_5=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";H_5.isArrayBuffer=O_5});var X28=C((X_5)=>{var J_5=mP7(),D28=g6("buffer"),M_5=(A,q=0,K=A.byteLength-q)=>{if(!J_5.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return D28.Buffer.from(A,q,K)},D_5=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?D28.Buffer.from(A,q):D28.Buffer.from(A)};X_5.fromArrayBuffer=M_5;X_5.fromString=D_5});var QP7=C((gP7)=>{Object.defineProperty(gP7,"__esModule",{value:!0});gP7.fromBase64=void 0;var Z_5=X28(),G_5=/^[A-Za-z0-9+/]*={0,2}$/,f_5=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!G_5.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Z_5.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};gP7.fromBase64=f_5});var dP7=C((UP7)=>{Object.defineProperty(UP7,"__esModule",{value:!0});UP7.toBase64=void 0;var T_5=X28(),V_5=Z2(),N_5=(A)=>{let q;if(typeof A==="string")q=(0,V_5.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,T_5.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};UP7.toBase64=N_5});var iP7=C((bB6)=>{var cP7=QP7(),lP7=dP7();Object.keys(cP7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(bB6,A))Object.defineProperty(bB6,A,{enumerable:!0,get:function(){return cP7[A]}})});Object.keys(lP7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(bB6,A))Object.defineProperty(bB6,A,{enumerable:!0,get:function(){return lP7[A]}})})});var O07=C((_07)=>{Object.defineProperty(_07,"__esModule",{value:!0});_07.ruleSet=void 0;var Y07="required",am="fn",sm="argv",uP6="ref",nP7=!0,rP7="isSet",uB6="booleanEquals",xP6="error",xB6="endpoint",lf="tree",P28="PartitionResult",oP7={[Y07]:!1,type:"string"},aP7={[Y07]:!0,default:!1,type:"boolean"},sP7={[uP6]:"Endpoint"},z07={[am]:uB6,[sm]:[{[uP6]:"UseFIPS"},!0]},w07={[am]:uB6,[sm]:[{[uP6]:"UseDualStack"},!0]},om={},tP7={[am]:"getAttr",[sm]:[{[uP6]:P28},"supportsFIPS"]},eP7={[am]:uB6,[sm]:[!0,{[am]:"getAttr",[sm]:[{[uP6]:P28},"supportsDualStack"]}]},A07=[z07],q07=[w07],K07=[{[uP6]:"Region"}],v_5={version:"1.0",parameters:{Region:oP7,UseDualStack:aP7,UseFIPS:aP7,Endpoint:oP7},rules:[{conditions:[{[am]:rP7,[sm]:[sP7]}],rules:[{conditions:A07,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:xP6},{rules:[{conditions:q07,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:xP6},{endpoint:{url:sP7,properties:om,headers:om},type:xB6}],type:lf}],type:lf},{rules:[{conditions:[{[am]:rP7,[sm]:K07}],rules:[{conditions:[{[am]:"aws.partition",[sm]:K07,assign:P28}],rules:[{conditions:[z07,w07],rules:[{conditions:[{[am]:uB6,[sm]:[nP7,tP7]},eP7],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:om,headers:om},type:xB6}],type:lf}],type:lf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:xP6}],type:lf},{conditions:A07,rules:[{conditions:[{[am]:uB6,[sm]:[tP7,nP7]}],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}",properties:om,headers:om},type:xB6}],type:lf}],type:lf},{error:"FIPS is enabled but this partition does not support FIPS",type:xP6}],type:lf},{conditions:q07,rules:[{conditions:[eP7],rules:[{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:om,headers:om},type:xB6}],type:lf}],type:lf},{error:"DualStack is enabled but this partition does not support DualStack",type:xP6}],type:lf},{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dnsSuffix}",properties:om,headers:om},type:xB6}],type:lf}],type:lf}],type:lf},{error:"Invalid Configuration: Missing Region",type:xP6}],type:lf}]};_07.ruleSet=v_5});var J07=C((H07)=>{Object.defineProperty(H07,"__esModule",{value:!0});H07.defaultEndpointResolver=void 0;var k_5=pm(),W28=Ab(),E_5=O07(),L_5=new W28.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),y_5=(A,q={})=>{return L_5.get(A,()=>(0,W28.resolveEndpoint)(E_5.ruleSet,{endpointParams:A,logger:q.logger}))};H07.defaultEndpointResolver=y_5;W28.customEndpointFunctions.aws=k_5.awsEndpointFunctions});var W07=C((X07)=>{Object.defineProperty(X07,"__esModule",{value:!0});X07.getRuntimeConfig=void 0;var R_5=O$(),S_5=Lc(),C_5=pw(),h_5=IB6(),I_5=LR(),M07=iP7(),D07=Z2(),b_5=M28(),x_5=J07(),u_5=(A)=>{return{apiVersion:"2023-04-20",base64Decoder:A?.base64Decoder??M07.fromBase64,base64Encoder:A?.base64Encoder??M07.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??x_5.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??b_5.defaultBedrockHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new R_5.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#httpBearerAuth"),signer:new C_5.HttpBearerAuthSigner}],logger:A?.logger??new h_5.NoOpLogger,protocol:A?.protocol??new S_5.AwsRestJsonProtocol({defaultNamespace:"com.amazonaws.bedrock"}),serviceId:A?.serviceId??"Bedrock",urlParser:A?.urlParser??I_5.parseUrl,utf8Decoder:A?.utf8Decoder??D07.fromUtf8,utf8Encoder:A?.utf8Encoder??D07.toUtf8}};X07.getRuntimeConfig=u_5});var v07=C((V07)=>{Object.defineProperty(V07,"__esModule",{value:!0});V07.getRuntimeConfig=void 0;var B_5=d2(),m_5=B_5.__importDefault(BP7()),Z28=O$(),g_5=i36(),Z07=r21(),G07=Nc(),h_1=NJ(),F_5=pw(),Q_5=vc(),f07=h0(),r36=HN(),T07=$N(),U_5=kc(),p_5=lm(),d_5=W07(),c_5=IB6(),l_5=Rc(),i_5=IB6(),n_5=(A)=>{(0,i_5.emitWarningIfUnsupportedVersion)(process.version);let q=(0,l_5.resolveDefaultsModeConfig)(A),K=()=>q().then(c_5.loadConfigsForDefaultMode),Y=(0,d_5.getRuntimeConfig)(A);(0,Z28.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger,signingName:"bedrock"};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,r36.loadConfig)(Z28.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??U_5.calculateBodyLength,credentialDefaultProvider:A?.credentialDefaultProvider??g_5.defaultProvider,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,G07.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:m_5.default.version}),httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new Z28.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#httpBearerAuth")||(async(_)=>{try{return await(0,Z07.fromEnvSigningName)({signingName:"bedrock"})()}catch($){return await(0,Z07.nodeProvider)(_)(_)}}),signer:new F_5.HttpBearerAuthSigner}],maxAttempts:A?.maxAttempts??(0,r36.loadConfig)(f07.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,r36.loadConfig)(h_1.NODE_REGION_CONFIG_OPTIONS,{...h_1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:T07.NodeHttpHandler.create(A?.requestHandler??K),retryMode:A?.retryMode??(0,r36.loadConfig)({...f07.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||p_5.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??Q_5.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??T07.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,r36.loadConfig)(h_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,r36.loadConfig)(h_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,r36.loadConfig)(G07.NODE_APP_ID_CONFIG_OPTIONS,z)}};V07.getRuntimeConfig=n_5});var y07=C((e_5)=>{var r_5=Y28(),o_5=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},a_5=(A)=>{return{httpHandler:A.httpHandler()}};class k07{name;kind;values;constructor({name:A,kind:q=r_5.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class E07{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class I_1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new I_1({...A,headers:{...A.headers}});if(q.query)q.query=s_5(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return I_1.clone(this)}}function s_5(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class L07{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function t_5(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}e_5.Field=k07;e_5.Fields=E07;e_5.HttpRequest=I_1;e_5.HttpResponse=L07;e_5.getHttpHandlerExtensionConfiguration=o_5;e_5.isValidHostname=t_5;e_5.resolveHttpHandlerRuntimeConfig=a_5});var L$1=C((r$8)=>{var R07=Dc(),$$5=Xc(),O$5=Pc(),S07=cm(),H$5=NJ(),LM=pw(),gR=lO(),j$5=Vc(),w7=qb(),C07=h0(),lA=IB6(),h07=M28(),J$5=v07(),I07=Kb(),b07=y07(),M$5=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"bedrock"})},$7={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},D$5=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y,token:z}=A;return{setHttpAuthScheme(w){let _=q.findIndex(($)=>$.schemeId===w.schemeId);if(_===-1)q.push(w);else q.splice(_,1,w)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(w){K=w},httpAuthSchemeProvider(){return K},setCredentials(w){Y=w},credentials(){return Y},setToken(w){z=w},token(){return z}}},X$5=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials(),token:A.token()}},P$5=(A,q)=>{let K=Object.assign(I07.getAwsRegionExtensionConfiguration(A),lA.getDefaultExtensionConfiguration(A),b07.getHttpHandlerExtensionConfiguration(A),D$5(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,I07.resolveAwsRegionExtensionConfiguration(K),lA.resolveDefaultRuntimeConfig(K),b07.resolveHttpHandlerRuntimeConfig(K),X$5(K))};class RM extends lA.Client{config;constructor(...[A]){let q=J$5.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=M$5(q),Y=S07.resolveUserAgentConfig(K),z=C07.resolveRetryConfig(Y),w=H$5.resolveRegionConfig(z),_=R07.resolveHostHeaderConfig(w),$=w7.resolveEndpointConfig(_),O=h07.resolveHttpAuthSchemeConfig($),H=P$5(O,A?.extensions||[]);this.config=H,this.middlewareStack.use(gR.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(S07.getUserAgentPlugin(this.config)),this.middlewareStack.use(C07.getRetryPlugin(this.config)),this.middlewareStack.use(j$5.getContentLengthPlugin(this.config)),this.middlewareStack.use(R07.getHostHeaderPlugin(this.config)),this.middlewareStack.use($$5.getLoggerPlugin(this.config)),this.middlewareStack.use(O$5.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(LM.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:h07.defaultBedrockHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(j)=>new LM.DefaultIdentityProviderConfig({"aws.auth#sigv4":j.credentials,"smithy.api#httpBearerAuth":j.token})})),this.middlewareStack.use(LM.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var FR=class A extends lA.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},qW7=class A extends FR{name="AccessDeniedException";$fault="client";constructor(q){super({name:"AccessDeniedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},KW7=class A extends FR{name="InternalServerException";$fault="server";constructor(q){super({name:"InternalServerException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype)}},YW7=class A extends FR{name="ResourceNotFoundException";$fault="client";constructor(q){super({name:"ResourceNotFoundException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},zW7=class A extends FR{name="ThrottlingException";$fault="client";constructor(q){super({name:"ThrottlingException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},wW7=class A extends FR{name="ValidationException";$fault="client";constructor(q){super({name:"ValidationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},_W7=class A extends FR{name="ConflictException";$fault="client";constructor(q){super({name:"ConflictException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},$W7=class A extends FR{name="ServiceQuotaExceededException";$fault="client";constructor(q){super({name:"ServiceQuotaExceededException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},OW7=class A extends FR{name="TooManyTagsException";$fault="client";resourceName;constructor(q){super({name:"TooManyTagsException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.resourceName=q.resourceName}},HW7=class A extends FR{name="ResourceInUseException";$fault="client";constructor(q){super({name:"ResourceInUseException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},jW7=class A extends FR{name="ServiceUnavailableException";$fault="server";constructor(q){super({name:"ServiceUnavailableException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype)}},W$5="AgreementAvailability",Z$5="AccessDeniedException",G$5="AutomatedEvaluationConfig",f$5="AutomatedEvaluationCustomMetrics",T$5="AutomatedEvaluationCustomMetricConfig",V$5="AutomatedEvaluationCustomMetricSource",N$5="AutomatedReasoningCheckDifferenceScenarioList",v$5="AutomatedReasoningCheckFinding",k$5="AutomatedReasoningCheckFindingList",E$5="AutomatedReasoningCheckImpossibleFinding",L$5="AutomatedReasoningCheckInvalidFinding",y$5="AutomatedReasoningCheckInputTextReference",R$5="AutomatedReasoningCheckInputTextReferenceList",S$5="AutomatedReasoningCheckLogicWarning",C$5="AutomatedReasoningCheckNoTranslationsFinding",h$5="AutomatedReasoningCheckRule",I$5="AutomatedReasoningCheckRuleList",b$5="AutomatedReasoningCheckScenario",x$5="AutomatedReasoningCheckSatisfiableFinding",u$5="AutomatedReasoningCheckTranslation",B$5="AutomatedReasoningCheckTranslationAmbiguousFinding",m$5="AutomatedReasoningCheckTooComplexFinding",g$5="AutomatedReasoningCheckTranslationList",F$5="AutomatedReasoningCheckTranslationOption",Q$5="AutomatedReasoningCheckTranslationOptionList",U$5="AutomatedReasoningCheckValidFinding",p$5="AutomatedReasoningLogicStatement",d$5="AutomatedReasoningLogicStatementContent",c$5="AutomatedReasoningLogicStatementList",l$5="AutomatedReasoningNaturalLanguageStatementContent",i$5="AutomatedReasoningPolicyAnnotation",n$5="AutomatedReasoningPolicyAnnotationFeedbackNaturalLanguage",r$5="AutomatedReasoningPolicyAnnotationIngestContent",o$5="AutomatedReasoningPolicyAnnotationList",a$5="AutomatedReasoningPolicyAddRuleAnnotation",s$5="AutomatedReasoningPolicyAddRuleFromNaturalLanguageAnnotation",t$5="AutomatedReasoningPolicyAddRuleMutation",e$5="AutomatedReasoningPolicyAnnotationRuleNaturalLanguage",AO5="AutomatedReasoningPolicyAddTypeAnnotation",qO5="AutomatedReasoningPolicyAddTypeMutation",KO5="AutomatedReasoningPolicyAddTypeValue",YO5="AutomatedReasoningPolicyAddVariableAnnotation",zO5="AutomatedReasoningPolicyAddVariableMutation",wO5="AutomatedReasoningPolicyBuildDocumentBlob",_O5="AutomatedReasoningPolicyBuildDocumentDescription",$O5="AutomatedReasoningPolicyBuildDocumentName",OO5="AutomatedReasoningPolicyBuildLog",HO5="AutomatedReasoningPolicyBuildLogEntry",jO5="AutomatedReasoningPolicyBuildLogEntryList",JO5="AutomatedReasoningPolicyBuildResultAssets",MO5="AutomatedReasoningPolicyBuildStep",DO5="AutomatedReasoningPolicyBuildStepContext",XO5="AutomatedReasoningPolicyBuildStepList",PO5="AutomatedReasoningPolicyBuildStepMessage",WO5="AutomatedReasoningPolicyBuildStepMessageList",ZO5="AutomatedReasoningPolicyBuildWorkflowDocument",GO5="AutomatedReasoningPolicyBuildWorkflowDocumentList",fO5="AutomatedReasoningPolicyBuildWorkflowRepairContent",TO5="AutomatedReasoningPolicyBuildWorkflowSource",VO5="AutomatedReasoningPolicyBuildWorkflowSummary",NO5="AutomatedReasoningPolicyBuildWorkflowSummaries",vO5="AutomatedReasoningPolicyDescription",kO5="AutomatedReasoningPolicyDefinitionElement",EO5="AutomatedReasoningPolicyDefinitionQualityReport",LO5="AutomatedReasoningPolicyDefinitionRule",yO5="AutomatedReasoningPolicyDeleteRuleAnnotation",RO5="AutomatedReasoningPolicyDefinitionRuleAlternateExpression",SO5="AutomatedReasoningPolicyDefinitionRuleExpression",CO5="AutomatedReasoningPolicyDefinitionRuleList",hO5="AutomatedReasoningPolicyDeleteRuleMutation",IO5="AutomatedReasoningPolicyDisjointRuleSet",bO5="AutomatedReasoningPolicyDisjointRuleSetList",xO5="AutomatedReasoningPolicyDefinitionType",uO5="AutomatedReasoningPolicyDeleteTypeAnnotation",BO5="AutomatedReasoningPolicyDefinitionTypeDescription",mO5="AutomatedReasoningPolicyDefinitionTypeList",gO5="AutomatedReasoningPolicyDeleteTypeMutation",FO5="AutomatedReasoningPolicyDefinitionTypeName",QO5="AutomatedReasoningPolicyDefinitionTypeNameList",UO5="AutomatedReasoningPolicyDefinitionTypeValue",pO5="AutomatedReasoningPolicyDefinitionTypeValueDescription",dO5="AutomatedReasoningPolicyDefinitionTypeValueList",cO5="AutomatedReasoningPolicyDefinitionTypeValuePair",lO5="AutomatedReasoningPolicyDefinitionTypeValuePairList",iO5="AutomatedReasoningPolicyDeleteTypeValue",nO5="AutomatedReasoningPolicyDefinitionVariable",rO5="AutomatedReasoningPolicyDeleteVariableAnnotation",oO5="AutomatedReasoningPolicyDefinitionVariableDescription",aO5="AutomatedReasoningPolicyDefinitionVariableList",sO5="AutomatedReasoningPolicyDeleteVariableMutation",tO5="AutomatedReasoningPolicyDefinitionVariableName",eO5="AutomatedReasoningPolicyDefinitionVariableNameList",AH5="AutomatedReasoningPolicyDefinition",qH5="AutomatedReasoningPolicyGeneratedTestCase",KH5="AutomatedReasoningPolicyGeneratedTestCaseList",YH5="AutomatedReasoningPolicyGeneratedTestCases",zH5="AutomatedReasoningPolicyIngestContentAnnotation",wH5="AutomatedReasoningPolicyMutation",_H5="AutomatedReasoningPolicyName",$H5="AutomatedReasoningPolicyPlanning",OH5="AutomatedReasoningPolicyScenario",HH5="AutomatedReasoningPolicyScenarioAlternateExpression",jH5="AutomatedReasoningPolicyScenarioExpression",JH5="AutomatedReasoningPolicySummary",MH5="AutomatedReasoningPolicySummaries",DH5="AutomatedReasoningPolicyTestCase",XH5="AutomatedReasoningPolicyTestCaseList",PH5="AutomatedReasoningPolicyTestGuardContent",WH5="AutomatedReasoningPolicyTestList",ZH5="AutomatedReasoningPolicyTestQueryContent",GH5="AutomatedReasoningPolicyTestResult",fH5="AutomatedReasoningPolicyTypeValueAnnotation",TH5="AutomatedReasoningPolicyTypeValueAnnotationList",VH5="AutomatedReasoningPolicyUpdateFromRuleFeedbackAnnotation",NH5="AutomatedReasoningPolicyUpdateFromScenarioFeedbackAnnotation",vH5="AutomatedReasoningPolicyUpdateRuleAnnotation",kH5="AutomatedReasoningPolicyUpdateRuleMutation",EH5="AutomatedReasoningPolicyUpdateTypeAnnotation",LH5="AutomatedReasoningPolicyUpdateTypeMutation",yH5="AutomatedReasoningPolicyUpdateTypeValue",RH5="AutomatedReasoningPolicyUpdateVariableAnnotation",SH5="AutomatedReasoningPolicyUpdateVariableMutation",CH5="AutomatedReasoningPolicyWorkflowTypeContent",hH5="ByteContentBlob",IH5="ByteContentDoc",bH5="BatchDeleteEvaluationJob",xH5="BatchDeleteEvaluationJobError",uH5="BatchDeleteEvaluationJobErrors",BH5="BatchDeleteEvaluationJobItem",mH5="BatchDeleteEvaluationJobItems",gH5="BatchDeleteEvaluationJobRequest",FH5="BatchDeleteEvaluationJobResponse",QH5="BedrockEvaluatorModel",UH5="BedrockEvaluatorModels",pH5="CreateAutomatedReasoningPolicy",dH5="CancelAutomatedReasoningPolicyBuildWorkflow",cH5="CancelAutomatedReasoningPolicyBuildWorkflowRequest",lH5="CancelAutomatedReasoningPolicyBuildWorkflowResponse",iH5="CreateAutomatedReasoningPolicyRequest",nH5="CreateAutomatedReasoningPolicyResponse",rH5="CreateAutomatedReasoningPolicyTestCase",oH5="CreateAutomatedReasoningPolicyTestCaseRequest",aH5="CreateAutomatedReasoningPolicyTestCaseResponse",sH5="CreateAutomatedReasoningPolicyVersion",tH5="CreateAutomatedReasoningPolicyVersionRequest",eH5="CreateAutomatedReasoningPolicyVersionResponse",Aj5="CustomizationConfig",qj5="CreateCustomModel",Kj5="CreateCustomModelDeployment",Yj5="CreateCustomModelDeploymentRequest",zj5="CreateCustomModelDeploymentResponse",wj5="CreateCustomModelRequest",_j5="CreateCustomModelResponse",$j5="ConflictException",Oj5="CreateEvaluationJob",Hj5="CreateEvaluationJobRequest",jj5="CreateEvaluationJobResponse",Jj5="CreateFoundationModelAgreement",Mj5="CreateFoundationModelAgreementRequest",Dj5="CreateFoundationModelAgreementResponse",Xj5="CreateGuardrail",Pj5="CreateGuardrailRequest",Wj5="CreateGuardrailResponse",Zj5="CreateGuardrailVersion",Gj5="CreateGuardrailVersionRequest",fj5="CreateGuardrailVersionResponse",Tj5="CreateInferenceProfile",Vj5="CreateInferenceProfileRequest",Nj5="CreateInferenceProfileResponse",vj5="CustomMetricBedrockEvaluatorModel",kj5="CustomMetricBedrockEvaluatorModels",Ej5="CreateModelCopyJob",Lj5="CreateModelCopyJobRequest",yj5="CreateModelCopyJobResponse",Rj5="CreateModelCustomizationJobRequest",Sj5="CreateModelCustomizationJobResponse",Cj5="CreateModelCustomizationJob",hj5="CustomMetricDefinition",Ij5="CustomModelDeploymentSummary",bj5="CustomModelDeploymentSummaryList",xj5="CustomMetricEvaluatorModelConfig",uj5="CreateModelImportJob",Bj5="CreateModelImportJobRequest",mj5="CreateModelImportJobResponse",gj5="CreateModelInvocationJobRequest",Fj5="CreateModelInvocationJobResponse",Qj5="CreateModelInvocationJob",Uj5="CreateMarketplaceModelEndpoint",pj5="CreateMarketplaceModelEndpointRequest",dj5="CreateMarketplaceModelEndpointResponse",cj5="CustomModelSummary",lj5="CustomModelSummaryList",ij5="CustomModelUnits",nj5="CreateProvisionedModelThroughput",rj5="CreateProvisionedModelThroughputRequest",oj5="CreateProvisionedModelThroughputResponse",aj5="CreatePromptRouter",sj5="CreatePromptRouterRequest",tj5="CreatePromptRouterResponse",ej5="CloudWatchConfig",AJ5="DeleteAutomatedReasoningPolicy",qJ5="DeleteAutomatedReasoningPolicyBuildWorkflow",KJ5="DeleteAutomatedReasoningPolicyBuildWorkflowRequest",YJ5="DeleteAutomatedReasoningPolicyBuildWorkflowResponse",zJ5="DeleteAutomatedReasoningPolicyRequest",wJ5="DeleteAutomatedReasoningPolicyResponse",_J5="DeleteAutomatedReasoningPolicyTestCase",$J5="DeleteAutomatedReasoningPolicyTestCaseRequest",OJ5="DeleteAutomatedReasoningPolicyTestCaseResponse",HJ5="DistillationConfig",jJ5="DeleteCustomModel",JJ5="DeleteCustomModelDeployment",MJ5="DeleteCustomModelDeploymentRequest",DJ5="DeleteCustomModelDeploymentResponse",XJ5="DeleteCustomModelRequest",PJ5="DeleteCustomModelResponse",WJ5="DeleteFoundationModelAgreement",ZJ5="DeleteFoundationModelAgreementRequest",GJ5="DeleteFoundationModelAgreementResponse",fJ5="DeleteGuardrail",TJ5="DeleteGuardrailRequest",VJ5="DeleteGuardrailResponse",NJ5="DeleteImportedModel",vJ5="DeleteImportedModelRequest",kJ5="DeleteImportedModelResponse",EJ5="DeleteInferenceProfile",LJ5="DeleteInferenceProfileRequest",yJ5="DeleteInferenceProfileResponse",RJ5="DeleteModelInvocationLoggingConfiguration",SJ5="DeleteModelInvocationLoggingConfigurationRequest",CJ5="DeleteModelInvocationLoggingConfigurationResponse",hJ5="DeleteMarketplaceModelEndpoint",IJ5="DeleteMarketplaceModelEndpointRequest",bJ5="DeleteMarketplaceModelEndpointResponse",xJ5="DeregisterMarketplaceModelEndpointRequest",uJ5="DeregisterMarketplaceModelEndpointResponse",BJ5="DeregisterMarketplaceModelEndpoint",mJ5="DataProcessingDetails",gJ5="DeleteProvisionedModelThroughput",FJ5="DeleteProvisionedModelThroughputRequest",QJ5="DeleteProvisionedModelThroughputResponse",UJ5="DimensionalPriceRate",pJ5="DeletePromptRouterRequest",dJ5="DeletePromptRouterResponse",cJ5="DeletePromptRouter",lJ5="ExportAutomatedReasoningPolicyVersion",iJ5="ExportAutomatedReasoningPolicyVersionRequest",nJ5="ExportAutomatedReasoningPolicyVersionResponse",rJ5="EvaluationBedrockModel",oJ5="EndpointConfig",aJ5="EvaluationConfig",sJ5="EvaluationDataset",tJ5="EvaluationDatasetLocation",eJ5="EvaluationDatasetMetricConfig",AM5="EvaluationDatasetMetricConfigs",qM5="EvaluationDatasetName",KM5="EvaluationInferenceConfig",YM5="EvaluationInferenceConfigSummary",zM5="EvaluationJobDescription",wM5="EvaluationJobIdentifier",_M5="EvaluationJobIdentifiers",$M5="EvaluationModelConfigs",OM5="EvaluationModelConfigSummary",HM5="EvaluationModelConfig",jM5="EvaluatorModelConfig",JM5="EvaluationMetricDescription",MM5="EvaluationModelInferenceParams",DM5="EvaluationMetricName",XM5="EvaluationMetricNames",PM5="EvaluationOutputDataConfig",WM5="EvaluationPrecomputedInferenceSource",ZM5="EvaluationPrecomputedRetrieveAndGenerateSourceConfig",GM5="EvaluationPrecomputedRetrieveSourceConfig",fM5="EvaluationPrecomputedRagSourceConfig",TM5="EvaluationRagConfigSummary",VM5="EvaluationSummary",NM5="ExternalSourcesGenerationConfiguration",vM5="ExternalSourcesRetrieveAndGenerateConfiguration",kM5="EvaluationSummaries",EM5="ExternalSource",LM5="ExternalSources",yM5="FilterAttribute",RM5="FieldForReranking",SM5="FieldsForReranking",CM5="FoundationModelDetails",hM5="FoundationModelLifecycle",IM5="FoundationModelSummary",bM5="FoundationModelSummaryList",xM5="GuardrailAutomatedReasoningPolicy",uM5="GetAutomatedReasoningPolicyAnnotations",BM5="GetAutomatedReasoningPolicyAnnotationsRequest",mM5="GetAutomatedReasoningPolicyAnnotationsResponse",gM5="GetAutomatedReasoningPolicyBuildWorkflow",FM5="GetAutomatedReasoningPolicyBuildWorkflowRequest",QM5="GetAutomatedReasoningPolicyBuildWorkflowResultAssets",UM5="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsRequest",pM5="GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse",dM5="GetAutomatedReasoningPolicyBuildWorkflowResponse",cM5="GuardrailAutomatedReasoningPolicyConfig",lM5="GetAutomatedReasoningPolicyNextScenario",iM5="GetAutomatedReasoningPolicyNextScenarioRequest",nM5="GetAutomatedReasoningPolicyNextScenarioResponse",rM5="GetAutomatedReasoningPolicyRequest",oM5="GetAutomatedReasoningPolicyResponse",aM5="GetAutomatedReasoningPolicyTestCase",sM5="GetAutomatedReasoningPolicyTestCaseRequest",tM5="GetAutomatedReasoningPolicyTestCaseResponse",eM5="GetAutomatedReasoningPolicyTestResult",AD5="GetAutomatedReasoningPolicyTestResultRequest",qD5="GetAutomatedReasoningPolicyTestResultResponse",KD5="GetAutomatedReasoningPolicy",YD5="GuardrailBlockedMessaging",zD5="GenerationConfiguration",wD5="GuardrailContentFilter",_D5="GuardrailContentFilterAction",$D5="GuardrailContentFilterConfig",OD5="GuardrailContentFiltersConfig",HD5="GuardrailContentFiltersTier",jD5="GuardrailContentFiltersTierConfig",JD5="GuardrailContentFiltersTierName",MD5="GuardrailContentFilters",DD5="GuardrailContextualGroundingAction",XD5="GuardrailContextualGroundingFilter",PD5="GuardrailContextualGroundingFilterConfig",WD5="GuardrailContextualGroundingFiltersConfig",ZD5="GuardrailContextualGroundingFilters",GD5="GuardrailContextualGroundingPolicy",fD5="GuardrailContextualGroundingPolicyConfig",TD5="GetCustomModel",VD5="GetCustomModelDeployment",ND5="GetCustomModelDeploymentRequest",vD5="GetCustomModelDeploymentResponse",kD5="GetCustomModelRequest",ED5="GetCustomModelResponse",LD5="GuardrailContentPolicy",yD5="GuardrailContentPolicyConfig",RD5="GuardrailCrossRegionConfig",SD5="GuardrailCrossRegionDetails",CD5="GuardrailConfiguration",hD5="GuardrailDescription",ID5="GetEvaluationJob",bD5="GetEvaluationJobRequest",xD5="GetEvaluationJobResponse",uD5="GetFoundationModel",BD5="GetFoundationModelAvailability",mD5="GetFoundationModelAvailabilityRequest",gD5="GetFoundationModelAvailabilityResponse",FD5="GetFoundationModelRequest",QD5="GetFoundationModelResponse",UD5="GuardrailFailureRecommendation",pD5="GuardrailFailureRecommendations",dD5="GetGuardrail",cD5="GetGuardrailRequest",lD5="GetGuardrailResponse",iD5="GetImportedModel",nD5="GetImportedModelRequest",rD5="GetImportedModelResponse",oD5="GetInferenceProfile",aD5="GetInferenceProfileRequest",sD5="GetInferenceProfileResponse",tD5="GuardrailModality",eD5="GetModelCopyJob",AX5="GetModelCopyJobRequest",qX5="GetModelCopyJobResponse",KX5="GetModelCustomizationJobRequest",YX5="GetModelCustomizationJobResponse",zX5="GetModelCustomizationJob",wX5="GetModelImportJob",_X5="GetModelImportJobRequest",$X5="GetModelImportJobResponse",OX5="GetModelInvocationJobRequest",HX5="GetModelInvocationJobResponse",jX5="GetModelInvocationJob",JX5="GetModelInvocationLoggingConfiguration",MX5="GetModelInvocationLoggingConfigurationRequest",DX5="GetModelInvocationLoggingConfigurationResponse",XX5="GetMarketplaceModelEndpoint",PX5="GetMarketplaceModelEndpointRequest",WX5="GetMarketplaceModelEndpointResponse",ZX5="GuardrailManagedWords",GX5="GuardrailManagedWordsConfig",fX5="GuardrailManagedWordLists",TX5="GuardrailManagedWordListsConfig",VX5="GuardrailModalities",NX5="GuardrailName",vX5="GuardrailPiiEntity",kX5="GuardrailPiiEntityConfig",EX5="GuardrailPiiEntitiesConfig",LX5="GuardrailPiiEntities",yX5="GetProvisionedModelThroughput",RX5="GetProvisionedModelThroughputRequest",SX5="GetProvisionedModelThroughputResponse",CX5="GetPromptRouter",hX5="GetPromptRouterRequest",IX5="GetPromptRouterResponse",bX5="GuardrailRegex",xX5="GuardrailRegexConfig",uX5="GuardrailRegexesConfig",BX5="GuardrailRegexes",mX5="GuardrailSummary",gX5="GuardrailSensitiveInformationPolicy",FX5="GuardrailSensitiveInformationPolicyConfig",QX5="GuardrailStatusReason",UX5="GuardrailStatusReasons",pX5="GuardrailSummaries",dX5="GuardrailTopic",cX5="GuardrailTopicAction",lX5="GuardrailTopicConfig",iX5="GuardrailTopicsConfig",nX5="GuardrailTopicDefinition",rX5="GuardrailTopicExample",oX5="GuardrailTopicExamples",aX5="GuardrailTopicName",sX5="GuardrailTopicPolicy",tX5="GuardrailTopicPolicyConfig",eX5="GuardrailTopicsTier",AP5="GuardrailTopicsTierConfig",qP5="GuardrailTopicsTierName",KP5="GuardrailTopics",YP5="GetUseCaseForModelAccess",zP5="GetUseCaseForModelAccessRequest",wP5="GetUseCaseForModelAccessResponse",_P5="GuardrailWord",$P5="GuardrailWordAction",OP5="GuardrailWordConfig",HP5="GuardrailWordsConfig",jP5="GuardrailWordPolicy",JP5="GuardrailWordPolicyConfig",MP5="GuardrailWords",DP5="HumanEvaluationConfig",XP5="HumanEvaluationCustomMetric",PP5="HumanEvaluationCustomMetrics",WP5="HumanTaskInstructions",ZP5="HumanWorkflowConfig",GP5="Identifier",fP5="ImplicitFilterConfiguration",TP5="InvocationLogsConfig",VP5="InvocationLogSource",NP5="ImportedModelSummary",vP5="ImportedModelSummaryList",kP5="InferenceProfileDescription",EP5="InferenceProfileModel",LP5="InferenceProfileModelSource",yP5="InferenceProfileModels",RP5="InferenceProfileSummary",SP5="InferenceProfileSummaries",CP5="InternalServerException",hP5="KnowledgeBaseConfig",IP5="KnowledgeBaseRetrieveAndGenerateConfiguration",bP5="KnowledgeBaseRetrievalConfiguration",xP5="KnowledgeBaseVectorSearchConfiguration",uP5="KbInferenceConfig",BP5="ListAutomatedReasoningPolicies",mP5="ListAutomatedReasoningPolicyBuildWorkflows",gP5="ListAutomatedReasoningPolicyBuildWorkflowsRequest",FP5="ListAutomatedReasoningPolicyBuildWorkflowsResponse",QP5="ListAutomatedReasoningPoliciesRequest",UP5="ListAutomatedReasoningPoliciesResponse",pP5="ListAutomatedReasoningPolicyTestCases",dP5="ListAutomatedReasoningPolicyTestCasesRequest",cP5="ListAutomatedReasoningPolicyTestCasesResponse",lP5="ListAutomatedReasoningPolicyTestResults",iP5="ListAutomatedReasoningPolicyTestResultsRequest",nP5="ListAutomatedReasoningPolicyTestResultsResponse",rP5="LoggingConfig",oP5="ListCustomModels",aP5="ListCustomModelDeployments",sP5="ListCustomModelDeploymentsRequest",tP5="ListCustomModelDeploymentsResponse",eP5="ListCustomModelsRequest",A05="ListCustomModelsResponse",q05="ListEvaluationJobs",K05="ListEvaluationJobsRequest",Y05="ListEvaluationJobsResponse",z05="ListFoundationModels",w05="ListFoundationModelAgreementOffers",_05="ListFoundationModelAgreementOffersRequest",$05="ListFoundationModelAgreementOffersResponse",O05="ListFoundationModelsRequest",H05="ListFoundationModelsResponse",j05="ListGuardrails",J05="ListGuardrailsRequest",M05="ListGuardrailsResponse",D05="ListImportedModels",X05="ListImportedModelsRequest",P05="ListImportedModelsResponse",W05="ListInferenceProfiles",Z05="ListInferenceProfilesRequest",G05="ListInferenceProfilesResponse",f05="ListModelCopyJobs",T05="ListModelCopyJobsRequest",V05="ListModelCopyJobsResponse",N05="ListModelCustomizationJobsRequest",v05="ListModelCustomizationJobsResponse",k05="ListModelCustomizationJobs",E05="ListModelImportJobs",L05="ListModelImportJobsRequest",y05="ListModelImportJobsResponse",R05="ListModelInvocationJobsRequest",S05="ListModelInvocationJobsResponse",C05="ListModelInvocationJobs",h05="ListMarketplaceModelEndpoints",I05="ListMarketplaceModelEndpointsRequest",b05="ListMarketplaceModelEndpointsResponse",x05="ListProvisionedModelThroughputs",u05="ListProvisionedModelThroughputsRequest",B05="ListProvisionedModelThroughputsResponse",m05="ListPromptRouters",g05="ListPromptRoutersRequest",F05="ListPromptRoutersResponse",Q05="LegalTerm",U05="ListTagsForResource",p05="ListTagsForResourceRequest",d05="ListTagsForResourceResponse",c05="Message",l05="MetadataAttributeSchema",i05="MetadataAttributeSchemaList",n05="MetadataConfigurationForReranking",r05="ModelCopyJobSummary",o05="ModelCustomizationJobSummary",a05="ModelCopyJobSummaries",s05="ModelCustomizationJobSummaries",t05="ModelDataSource",e05="ModelInvocationJobInputDataConfig",AW5="ModelInvocationJobOutputDataConfig",qW5="ModelImportJobSummary",KW5="ModelInvocationJobS3InputDataConfig",YW5="ModelInvocationJobS3OutputDataConfig",zW5="ModelInvocationJobSummary",wW5="ModelImportJobSummaries",_W5="ModelInvocationJobSummaries",$W5="MarketplaceModelEndpoint",OW5="MarketplaceModelEndpointSummary",HW5="MarketplaceModelEndpointSummaries",jW5="MetricName",JW5="Offer",MW5="OrchestrationConfiguration",DW5="OutputDataConfig",XW5="Offers",PW5="PerformanceConfiguration",WW5="PutModelInvocationLoggingConfiguration",ZW5="PutModelInvocationLoggingConfigurationRequest",GW5="PutModelInvocationLoggingConfigurationResponse",fW5="ProvisionedModelSummary",TW5="ProvisionedModelSummaries",VW5="PromptRouterDescription",NW5="PromptRouterSummary",vW5="PromptRouterSummaries",kW5="PromptRouterTargetModel",EW5="PromptRouterTargetModels",LW5="PricingTerm",yW5="PromptTemplate",RW5="PutUseCaseForModelAccess",SW5="PutUseCaseForModelAccessRequest",CW5="PutUseCaseForModelAccessResponse",hW5="QueryTransformationConfiguration",IW5="RetrieveAndGenerateConfiguration",bW5="RAGConfig",xW5="RetrieveConfig",uW5="RagConfigs",BW5="RateCard",mW5="RoutingCriteria",gW5="RetrievalFilter",FW5="RetrievalFilterList",QW5="ResourceInUseException",UW5="RequestMetadataBaseFilters",pW5="RequestMetadataFilters",dW5="RequestMetadataFiltersList",cW5="RequestMetadataMap",lW5="RegisterMarketplaceModelEndpoint",iW5="RegisterMarketplaceModelEndpointRequest",nW5="RegisterMarketplaceModelEndpointResponse",rW5="RerankingMetadataSelectiveModeConfiguration",oW5="ResourceNotFoundException",aW5="RatingScale",sW5="RatingScaleItem",tW5="RatingScaleItemValue",eW5="StartAutomatedReasoningPolicyBuildWorkflow",AZ5="StartAutomatedReasoningPolicyBuildWorkflowRequest",qZ5="StartAutomatedReasoningPolicyBuildWorkflowResponse",KZ5="StartAutomatedReasoningPolicyTestWorkflow",YZ5="StartAutomatedReasoningPolicyTestWorkflowRequest",zZ5="StartAutomatedReasoningPolicyTestWorkflowResponse",wZ5="S3Config",_Z5="StatusDetails",$Z5="S3DataSource",OZ5="StopEvaluationJob",HZ5="StopEvaluationJobRequest",jZ5="StopEvaluationJobResponse",JZ5="StopModelCustomizationJob",MZ5="StopModelCustomizationJobRequest",DZ5="StopModelCustomizationJobResponse",XZ5="SageMakerEndpoint",PZ5="StopModelInvocationJob",WZ5="StopModelInvocationJobRequest",ZZ5="StopModelInvocationJobResponse",GZ5="S3ObjectDoc",fZ5="ServiceQuotaExceededException",TZ5="SupportTerm",VZ5="ServiceUnavailableException",NZ5="Tag",vZ5="TermDetails",kZ5="TrainingDataConfig",EZ5="TrainingDetails",LZ5="ThrottlingException",yZ5="TextInferenceConfig",RZ5="TagList",SZ5="TrainingMetrics",CZ5="TeacherModelConfig",hZ5="TooManyTagsException",IZ5="TextPromptTemplate",bZ5="TagResource",xZ5="TagResourceRequest",uZ5="TagResourceResponse",BZ5="UpdateAutomatedReasoningPolicy",mZ5="UpdateAutomatedReasoningPolicyAnnotations",gZ5="UpdateAutomatedReasoningPolicyAnnotationsRequest",FZ5="UpdateAutomatedReasoningPolicyAnnotationsResponse",QZ5="UpdateAutomatedReasoningPolicyRequest",UZ5="UpdateAutomatedReasoningPolicyResponse",pZ5="UpdateAutomatedReasoningPolicyTestCase",dZ5="UpdateAutomatedReasoningPolicyTestCaseRequest",cZ5="UpdateAutomatedReasoningPolicyTestCaseResponse",lZ5="UpdateGuardrail",iZ5="UpdateGuardrailRequest",nZ5="UpdateGuardrailResponse",rZ5="UpdateMarketplaceModelEndpoint",oZ5="UpdateMarketplaceModelEndpointRequest",aZ5="UpdateMarketplaceModelEndpointResponse",sZ5="UpdateProvisionedModelThroughput",tZ5="UpdateProvisionedModelThroughputRequest",eZ5="UpdateProvisionedModelThroughputResponse",AG5="UntagResource",qG5="UntagResourceRequest",KG5="UntagResourceResponse",YG5="Validator",zG5="VpcConfig",wG5="ValidationDetails",_G5="ValidationDataConfig",$G5="ValidationException",OG5="ValidatorMetric",HG5="ValidationMetrics",jG5="VectorSearchBedrockRerankingConfiguration",JG5="VectorSearchBedrockRerankingModelConfiguration",MG5="VectorSearchRerankingConfiguration",DG5="ValidityTerm",XG5="Validators",PG5="annotation",WG5="agreementAvailability",JW7="andAll",ZG5="agreementDuration",MW7="alternateExpression",GG5="acceptEula",G28="additionalModelRequestFields",DW7="addRule",fG5="addRuleFromNaturalLanguage",TG5="automatedReasoningPolicy",VG5="automatedReasoningPolicyBuildWorkflowSummaries",XW7="automatedReasoningPolicyConfig",NG5="automatedReasoningPolicySummaries",vG5="authorizationStatus",PW7="annotationSetHash",f28="applicationType",x07="applicationTypeEquals",kG5="aggregatedTestFindingsResult",EG5="addTypeValue",WW7="addType",u07="assetType",ZW7="addVariable",gP6="action",T28="annotations",LG5="arn",yG5="automated",RG5="byteContent",B07="byCustomizationType",GW7="bedrockEvaluatorModels",V28="blockedInputMessaging",m07="byInferenceType",SG5="bedrockKnowledgeBaseIdentifiers",CG5="buildLog",hG5="bedrockModel",Q_1="baseModelArn",g07="baseModelArnEquals",IG5="baseModelIdentifier",bG5="bedrockModelIdentifiers",xG5="baseModelName",uG5="bucketName",N28="blockedOutputsMessaging",F07="byOutputModality",Q07="byProvider",BG5="bedrockRerankingConfiguration",mG5="buildSteps",gG5="buildWorkflowAssets",oZ="buildWorkflowId",v28="buildWorkflowType",Ct="client",eX="createdAt",U07="createdAfter",p07="createdBefore",k28="customizationConfig",E28="commitmentDuration",fW7="customerEncryptionKeyId",TW7="commitmentExpirationTime",FG5="copyFrom",QG5="claimsFalseScenario",UG5="contextualGroundingPolicy",VW7="contextualGroundingPolicyConfig",NW7="customMetrics",pG5="customModelArn",dG5="customMetricConfig",cG5="customMetricDefinition",L28="customModelDeploymentArn",vW7="customModelDeploymentIdentifier",lG5="customModelDeploymentName",iG5="customMetricsEvaluatorModelIdentifiers",nG5="customModelKmsKeyId",kW7="customModelName",rG5="customModelTags",oG5="customModelUnits",aG5="customModelUnitsPerModelCopy",sG5="customModelUnitsVersion",tG5="contentPolicy",EW7="contentPolicyConfig",LW7="contradictingRules",yW7="crossRegionConfig",RW7="crossRegionDetails",FH="clientRequestToken",eG5="conflictingRules",SW7="customizationsSupported",gB6="confidenceThreshold",DN="creationTimeAfter",XN="creationTimeBefore",CW7="claimsTrueScenario",Af5="contentType",u0="creationTime",FB6="customizationType",qf5="cloudWatchConfig",hW7="claims",Kf5="confidence",Yf5="code",zf5="context",wf5="content",Sz="description",_f5="distillationConfig",IW7="documentContentType",bW7="documentDescription",U_1="definitionHash",$f5="datasetLocation",xW7="desiredModelArn",uW7="datasetMetricConfigs",Of5="desiredModelId",BW7="desiredModelUnits",mW7="documentName",Hf5="dataProcessingDetails",jf5="desiredProvisionedModelName",gW7="deleteRule",Jf5="disjointRuleSets",Mf5="differenceScenarios",FW7="deleteType",Df5="deleteTypeValue",QW7="deleteVariable",Xf5="data",Pf5="dataset",y28="definition",Wf5="dimension",Zf5="document",Gf5="documents",em="error",FP6="endpointArn",p_1="expectedAggregatedFindingsResult",ff5="entitlementAvailability",UW7="evaluationConfig",R28="endpointConfig",Tf5="embeddingDataDeliveryEnabled",Vf5="endpointIdentifier",Nf5="evaluationJobs",vf5="errorMessage",pW7="evaluatorModelConfig",kf5="evaluatorModelIdentifiers",Ef5="endpointName",Lf5="expectedResult",yf5="executionRole",Rf5="endpointStatus",Sf5="externalSourcesConfiguration",Cf5="endpointStatusMessage",QP6="endTime",hf5="evaluationTaskTypes",If5="entries",dW7="enabled",S28="equals",bf5="errors",d_1="expression",cW7="examples",lW7="feedback",iW7="filtersConfig",nW7="formData",xf5="flowDefinitionArn",C28="fallbackModel",rW7="foundationModelArn",d07="foundationModelArnEquals",ht="failureMessage",uf5="failureMessages",Bf5="fieldName",mf5="failureRecommendations",gf5="fieldsToExclude",Ff5="fieldsToInclude",Qf5="floatValue",oW7="filters",Uf5="filter",c07="force",pf5="guardrails",h28="guardrailArn",c_1="guardContent",aW7="generationConfiguration",sW7="guardrailConfiguration",QB6="guardrailId",BP6="guardrailIdentifier",df5="guardrailProfileArn",cf5="guardrailProfileIdentifier",lf5="guardrailProfileId",if5="greaterThan",tW7="generatedTestCases",nf5="greaterThanOrEquals",BB6="guardrailVersion",rf5="human",Ag="httpError",of5="httpHeader",I28="hyperParameters",hA="httpQuery",af5="humanWorkflowConfig",O7="http",l_1="id",QR="inputAction",eW7="inferenceConfig",sf5="inferenceConfigSummary",tf5="ingestContent",b28="inputDataConfig",ef5="imageDataDeliveryEnabled",UR="inputEnabled",AT5="implicitFilterConfiguration",qT5="initialInstanceCount",KT5="invocationJobSummaries",YT5="invocationLogsConfig",zT5="invocationLogSource",i_1="inputModalities",AZ7="importedModelArn",wT5="importedModelKmsKeyArn",_T5="importedModelKmsKeyId",x28="importedModelName",$T5="importedModelTags",l07="isOwned",OT5="inferenceParams",u28="inferenceProfileArn",qZ7="inferenceProfileIdentifier",KZ7="inferenceProfileId",B28="inferenceProfileName",HT5="inferenceProfileSummaries",YZ7="instructSupported",jT5="inferenceSourceIdentifier",zZ7="inputStrength",JT5="instanceType",wZ7="inferenceTypesSupported",MT5="idempotencyToken",DT5="identifier",XT5="impossible",_Z7="instructions",PT5="in",WT5="invalid",AP="jobArn",$Z7="jobDescription",OZ7="jobExpirationTime",uc="jobIdentifier",ZT5="jobIdentifiers",WN="jobName",GT5="jobStatus",fT5="jobSummaries",m28="jobTags",HZ7="jobType",g28="key",TT5="knowledgeBaseConfiguration",VT5="knowledgeBaseConfig",jZ7="knowledgeBaseId",NT5="knowledgeBaseRetrievalConfiguration",vT5="kmsEncryptionKey",JZ7="kbInferenceConfig",MZ7="kmsKeyArn",F28="kmsKeyId",kT5="keyPrefix",ET5="logic",DZ7="loggingConfig",LT5="listContains",yT5="largeDataDeliveryS3Config",RT5="logGroupName",pR="lastModifiedTime",ST5="legalTerm",CT5="lessThanOrEquals",hT5="lessThan",UB6="lastUpdatedAt",IT5="lastUpdatedAnnotationSetHash",bT5="lastUpdatedDefinitionHash",n_1="logicWarning",xT5="latency",ZN="message",qP="modelArn",b_1="modelArnEquals",uT5="metadataAttributes",XZ7="modelArchitecture",BT5="modelConfiguration",mT5="modelCopyJobSummaries",gT5="modelCustomizationJobSummaries",FT5="modelConfigSummary",QT5="metadataConfiguration",UT5="modelDetails",PZ7="modelDeploymentName",Q28="modelDataSource",pT5="modelDeploymentSummaries",It="modelIdentifier",dT5="modelImportJobSummaries",NE="modelId",cT5="modelIdentifiers",U28="modelKmsKeyArn",lT5="modelKmsKeyId",WZ7="modelLifecycle",r_1="marketplaceModelEndpoint",iT5="marketplaceModelEndpoints",a36="modelName",nT5="metricNames",_z="maxResults",rT5="maxResponseLengthForInference",oT5="modelSource",aT5="modelSourceConfig",sT5="modelSourceEquals",pB6="modelSourceIdentifier",x_1="modelStatus",p28="modelSummaries",tT5="messageType",eT5="maxTokens",AV5="modelTags",d28="modelUnits",qV5="managedWordLists",KV5="managedWordListsConfig",YV5="messages",UP6="models",zV5="mutation",T2="name",rZ="nameContains",c28="notEquals",wV5="notIn",ZZ7="naturalLanguage",GZ7="newName",_V5="numberOfResults",$V5="numberOfRerankedResults",mK="nextToken",OV5="noTranslations",HV5="newValue",jV5="options",dR="outputAction",JV5="ownerAccountId",fZ7="orAll",MV5="orchestrationConfiguration",bt="outputDataConfig",cR="outputEnabled",DV5="offerId",o_1="outputModalities",XV5="outputModelArn",PV5="outputModelKmsKeyArn",WV5="outputModelName",ZV5="outputModelNameContains",TZ7="outputStrength",GV5="overrideSearchType",VZ7="offerToken",i07="offerType",fV5="offers",NZ7="premises",U5="policyArn",TV5="performanceConfig",dB6="policyDefinition",VV5="policyDefinitionRule",NV5="policyDefinitionType",vV5="policyDefinitionVariable",kV5="priorElement",EV5="piiEntitiesConfig",LV5="piiEntities",vZ7="policyId",yV5="precomputedInferenceSource",RV5="precomputedInferenceSourceIdentifiers",l28="provisionedModelArn",i28="provisionedModelId",n28="provisionedModelName",SV5="provisionedModelSummaries",kZ7="providerName",cB6="promptRouterArn",CV5="policyRepairAssets",r28="promptRouterName",hV5="promptRouterSummaries",IV5="precomputedRagSourceConfig",bV5="precomputedRagSourceIdentifiers",EZ7="promptTemplate",xV5="policyVersionArn",LZ7="pattern",uV5="planning",yZ7="policies",BV5="price",a_1="queryContent",mV5="qualityReport",gV5="queryTransformationConfiguration",RZ7="rule",Hb="roleArn",FV5="retrieveAndGenerateConfig",QV5="retrieveAndGenerateSourceConfig",o28="resourceARN",UV5="regionAvailability",pV5="ruleCount",dV5="ragConfigSummary",cV5="rateCard",lV5="ragConfigs",iV5="regexesConfig",nV5="rerankingConfiguration",rV5="retrievalConfiguration",oV5="retrieveConfig",a28="routingCriteria",SZ7="ruleId",aV5="ragIdentifiers",s28="ruleIds",sV5="ratingMethod",tV5="requestMetadataFilters",eV5="resourceName",AN5="refundPolicyDescription",qN5="responseQualityDifference",KN5="ratingScale",YN5="retrieveSourceConfig",CZ7="ragSourceIdentifier",hZ7="responseStreamingSupported",zN5="regexes",IZ7="rules",Gw="status",n07="sourceAccountEquals",bZ7="sourceAccountId",sX="sortBy",xZ7="s3BucketOwner",wN5="s3Config",_N5="sourceContent",$N5="stringContains",uZ7="statusDetails",ON5="s3DataSource",HN5="scenarioExpression",jN5="s3EncryptionKeyId",PN="statusEquals",JN5="securityGroupIds",MN5="subnetIds",DN5="s3InputDataConfig",XN5="s3InputFormat",PN5="sensitiveInformationPolicy",BZ7="sensitiveInformationPolicyConfig",WN5="s3Location",mZ7="statusMessage",t28="sourceModelArn",r07="sourceModelArnEquals",ZN5="selectiveModeConfiguration",gZ7="sourceModelName",GN5="sageMaker",fN5="selectionMode",tX="sortOrder",TN5="s3OutputDataConfig",VN5="supportingRules",NN5="statusReasons",vN5="stopSequences",kN5="sourceType",o07="submitTimeAfter",a07="submitTimeBefore",FZ7="submitTime",EN5="supportTerm",Bc="s3Uri",LN5="stringValue",yN5="startsWith",RN5="satisfiable",SN5="scenario",QZ7="server",UZ7="smithy.ts.sdk.synthetic.com.amazonaws.bedrock",CN5="sources",hN5="statements",s_1="translation",IN5="translationAmbiguous",bN5="typeCount",s36="testCaseId",xN5="testCaseIds",pZ7="testCase",uN5="testCases",dZ7="tierConfig",BN5="topicsConfig",mN5="tooComplex",gN5="termDetails",e28="trainingDataConfig",FN5="textDataDeliveryEnabled",A_8="timeoutDurationInHours",QN5="trainingDetails",UN5="typeEquals",pN5="testFindings",dN5="textInferenceConfig",cN5="tagKeys",lN5="trainingLoss",cZ7="trainingMetrics",lZ7="targetModelArn",iN5="teacherModelConfig",nN5="teacherModelIdentifier",iZ7="targetModelKmsKeyArn",q_8="targetModelName",rN5="targetModelNameContains",K_8="targetModelTags",oN5="typeName",t_1="tierName",aN5="topicPolicy",nZ7="topicPolicyConfig",sN5="textPromptTemplate",tN5="topP",eN5="testResult",Av5="testRunResult",qv5="testRunStatus",Kv5="testResults",Yv5="taskType",jb="tags",Y_8="text",zv5="temperature",rZ7="threshold",oZ7="tier",wv5="topics",_v5="translations",H$="type",$v5="types",Ov5="unit",vJ="updatedAt",Hv5="usageBasedPricingTerm",jv5="untranslatedClaims",Jv5="updateFromRulesFeedback",Mv5="updateFromScenarioFeedback",Dv5="untranslatedPremises",Xv5="usePromptResponse",aZ7="updateRule",Pv5="unusedTypes",Wv5="unusedTypeValues",Zv5="updateTypeValue",sZ7="updateType",Gv5="unusedVariables",tZ7="updateVariable",fv5="url",Tv5="uri",z_8="values",Vv5="variableCount",t36="vpcConfig",Nv5="validationDetails",w_8="validationDataConfig",vv5="videoDataDeliveryEnabled",kv5="validationLoss",eZ7="validationMetrics",Ev5="valueName",Lv5="vectorSearchConfiguration",yv5="validityTerm",e36="value",Rv5="validators",Sv5="valid",AG7="variable",qG7="variables",qg="version",Cv5="vpc",hv5="words",Iv5="workflowContent",bv5="wordsConfig",xv5="wordPolicy",KG7="wordPolicyConfig",uv5="x-amz-client-token",N6="com.amazonaws.bedrock",Bv5=[0,N6,d$5,8,0],YG7=[0,N6,l$5,8,0],zG7=[0,N6,n$5,8,0],mv5=[0,N6,r$5,8,0],gv5=[0,N6,e$5,8,0],Fv5=[0,N6,wO5,8,21],wG7=[0,N6,_O5,8,0],_G7=[0,N6,$O5,8,0],Qv5=[0,N6,RO5,8,0],__8=[0,N6,SO5,8,0],$_8=[0,N6,BO5,8,0],tm=[0,N6,FO5,8,0],O_8=[0,N6,pO5,8,0],H_8=[0,N6,oO5,8,0],o36=[0,N6,tO5,8,0],pP6=[0,N6,vO5,8,0],xt=[0,N6,_H5,8,0],Uv5=[0,N6,HH5,8,0],$G7=[0,N6,jH5,8,0],e_1=[0,N6,PH5,8,0],A$1=[0,N6,ZH5,8,0],pv5=[0,N6,hH5,8,21],dv5=[0,N6,qM5,8,0],OG7=[0,N6,zM5,8,0],lB6=[0,N6,wM5,8,0],cv5=[0,N6,JM5,8,0],HG7=[0,N6,DM5,8,0],lv5=[0,N6,MM5,8,0],mP6=[0,N6,YD5,8,0],u_1=[0,N6,_D5,8,0],jG7=[0,N6,JD5,8,0],JG7=[0,N6,DD5,8,0],iB6=[0,N6,hD5,8,0],iv5=[0,N6,UD5,8,0],nv5=[0,N6,tD5,8,0],q$1=[0,N6,NX5,8,0],rv5=[0,N6,QX5,8,0],B_1=[0,N6,cX5,8,0],MG7=[0,N6,nX5,8,0],ov5=[0,N6,rX5,8,0],DG7=[0,N6,aX5,8,0],XG7=[0,N6,qP5,8,0],St=[0,N6,$P5,8,0],av5=[0,N6,WP5,8,0],sv5=[0,N6,GP5,8,0],j_8=[0,N6,kP5,8,0],PG7=[0,N6,c05,8,0],tv5=[0,N6,jW5,8,0],J_8=[0,N6,VW5,8,0],ev5=[0,N6,IZ5,8,0],Ak5=[-3,N6,Z$5,{[em]:Ct,[Ag]:403},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(Ak5,qW7);var qk5=[3,N6,W$5,0,[Gw,vf5],[0,0]],Kk5=[3,N6,G$5,0,[uW7,pW7,dG5],[[()=>mG7,0],()=>YI5,[()=>Yk5,0]]],Yk5=[3,N6,T$5,0,[NW7,pW7],[[()=>xC5,0],()=>oE5]],zk5=[3,N6,E$5,0,[s_1,LW7,n_1],[[()=>nB6,0],()=>Z_8,[()=>K$1,0]]],wk5=[3,N6,y$5,0,[Y_8],[[()=>YG7,0]]],_k5=[3,N6,L$5,0,[s_1,LW7,n_1],[[()=>nB6,0],()=>Z_8,[()=>K$1,0]]],K$1=[3,N6,S$5,0,[H$,NZ7,hW7],[0,[()=>mB6,0],[()=>mB6,0]]],$k5=[3,N6,C$5,0,[],[]],Ok5=[3,N6,h$5,0,[l_1,xV5],[0,0]],Hk5=[3,N6,x$5,0,[s_1,CW7,QG5,n_1],[[()=>nB6,0],[()=>m_1,0],[()=>m_1,0],[()=>K$1,0]]],m_1=[3,N6,b$5,0,[hN5],[[()=>mB6,0]]],jk5=[3,N6,m$5,0,[],[]],nB6=[3,N6,u$5,0,[NZ7,hW7,Dv5,jv5,Kf5],[[()=>mB6,0],[()=>mB6,0],[()=>s07,0],[()=>s07,0],1]],Jk5=[3,N6,B$5,0,[jV5,Mf5],[[()=>gC5,0],[()=>uC5,0]]],Mk5=[3,N6,F$5,0,[_v5],[[()=>mC5,0]]],Dk5=[3,N6,U$5,0,[s_1,CW7,VN5,n_1],[[()=>nB6,0],[()=>m_1,0],()=>Z_8,[()=>K$1,0]]],Xk5=[3,N6,p$5,0,[ET5,ZZ7],[[()=>Bv5,0],[()=>YG7,0]]],Pk5=[3,N6,a$5,0,[d_1],[[()=>__8,0]]],Wk5=[3,N6,s$5,0,[ZZ7],[[()=>gv5,0]]],Zk5=[3,N6,t$5,0,[RZ7],[[()=>Y$1,0]]],Gk5=[3,N6,AO5,0,[T2,Sz,z_8],[[()=>tm,0],[()=>$_8,0],[()=>uG7,0]]],fk5=[3,N6,qO5,0,[H$],[[()=>z$1,0]]],Tk5=[3,N6,KO5,0,[e36,Sz],[0,[()=>O_8,0]]],Vk5=[3,N6,YO5,0,[T2,H$,Sz],[[()=>o36,0],[()=>tm,0],[()=>H_8,0]]],Nk5=[3,N6,zO5,0,[AG7],[[()=>w$1,0]]],vk5=[3,N6,OO5,0,[If5],[[()=>FC5,0]]],kk5=[3,N6,HO5,0,[PG5,Gw,mG5],[[()=>UG7,0],0,[()=>QC5,0]]],Ek5=[3,N6,MO5,0,[zf5,kV5,YV5],[[()=>oh5,0],[()=>ah5,0],()=>UC5]],Lk5=[3,N6,PO5,0,[ZN,tT5],[0,0]],yk5=[3,N6,ZO5,0,[Zf5,IW7,mW7,bW7],[[()=>Fv5,0],0,[()=>_G7,0],[()=>wG7,0]]],Rk5=[3,N6,fO5,0,[T28],[[()=>G_8,0]]],Sk5=[3,N6,TO5,0,[dB6,Iv5],[[()=>rB6,0],[()=>eh5,0]]],Ck5=[3,N6,VO5,0,[U5,oZ,Gw,v28,eX,vJ],[0,0,0,0,5,5]],rB6=[3,N6,AH5,0,[qg,$v5,IZ7,qG7],[0,[()=>lC5,0],[()=>cC5,0],[()=>rC5,0]]],hk5=[3,N6,EO5,0,[bN5,Vv5,pV5,Pv5,Wv5,Gv5,eG5,Jf5],[1,1,1,[()=>iC5,0],[()=>nC5,0],[()=>BG7,0],64,[()=>oC5,0]]],Y$1=[3,N6,LO5,0,[l_1,d_1,MW7],[0,[()=>__8,0],[()=>Qv5,0]]],z$1=[3,N6,xO5,0,[T2,Sz,z_8],[[()=>tm,0],[()=>$_8,0],[()=>uG7,0]]],Ik5=[3,N6,UO5,0,[e36,Sz],[0,[()=>O_8,0]]],bk5=[3,N6,cO5,0,[oN5,Ev5],[[()=>tm,0],0]],w$1=[3,N6,nO5,0,[T2,H$,Sz],[[()=>o36,0],[()=>tm,0],[()=>H_8,0]]],xk5=[3,N6,yO5,0,[SZ7],[0]],uk5=[3,N6,hO5,0,[l_1],[0]],Bk5=[3,N6,uO5,0,[T2],[[()=>tm,0]]],mk5=[3,N6,gO5,0,[T2],[[()=>tm,0]]],gk5=[3,N6,iO5,0,[e36],[0]],Fk5=[3,N6,rO5,0,[T2],[[()=>o36,0]]],Qk5=[3,N6,sO5,0,[T2],[[()=>o36,0]]],Uk5=[3,N6,IO5,0,[qG7,IZ7],[[()=>BG7,0],64]],pk5=[3,N6,qH5,0,[a_1,c_1,p_1],[[()=>A$1,0],[()=>e_1,0],0]],dk5=[3,N6,YH5,0,[tW7],[[()=>aC5,0]]],ck5=[3,N6,zH5,0,[wf5],[[()=>mv5,0]]],lk5=[3,N6,$H5,0,[],[]],ik5=[3,N6,OH5,0,[d_1,MW7,s28,Lf5],[[()=>$G7,0],[()=>Uv5,0],64,0]],nk5=[3,N6,JH5,0,[U5,T2,Sz,qg,vZ7,eX,vJ],[0,[()=>xt,0],[()=>pP6,0],0,0,5,5]],M_8=[3,N6,DH5,0,[s36,c_1,a_1,p_1,eX,vJ,gB6],[0,[()=>e_1,0],[()=>A$1,0],0,5,5,1]],WG7=[3,N6,GH5,0,[pZ7,U5,qv5,pN5,Av5,kG5,vJ],[[()=>M_8,0],0,0,[()=>BC5,0],0,0,5]],rk5=[3,N6,VH5,0,[s28,lW7],[64,[()=>zG7,0]]],ok5=[3,N6,NH5,0,[s28,HN5,lW7],[64,[()=>$G7,0],[()=>zG7,0]]],ak5=[3,N6,vH5,0,[SZ7,d_1],[0,[()=>__8,0]]],sk5=[3,N6,kH5,0,[RZ7],[[()=>Y$1,0]]],tk5=[3,N6,EH5,0,[T2,GZ7,Sz,z_8],[[()=>tm,0],[()=>tm,0],[()=>$_8,0],[()=>Ah5,0]]],ek5=[3,N6,LH5,0,[H$],[[()=>z$1,0]]],AE5=[3,N6,yH5,0,[e36,HV5,Sz],[0,0,[()=>O_8,0]]],qE5=[3,N6,RH5,0,[T2,GZ7,Sz],[[()=>o36,0],[()=>o36,0],[()=>H_8,0]]],KE5=[3,N6,SH5,0,[AG7],[[()=>w$1,0]]],YE5=[3,N6,xH5,0,[uc,Yf5,ZN],[[()=>lB6,0],0,0]],zE5=[3,N6,BH5,0,[uc,GT5],[[()=>lB6,0],0]],wE5=[3,N6,gH5,0,[ZT5],[[()=>$h5,0]]],_E5=[3,N6,FH5,0,[bf5,Nf5],[[()=>qh5,0],[()=>Kh5,0]]],$E5=[3,N6,QH5,0,[It],[0]],OE5=[3,N6,IH5,0,[DT5,Af5,Xf5],[[()=>sv5,0],0,[()=>pv5,0]]],HE5=[3,N6,cH5,0,[U5,oZ],[[0,1],[0,1]]],jE5=[3,N6,lH5,0,[],[]],JE5=[3,N6,ej5,0,[RT5,Hb,yT5],[0,0,()=>IG7]],ME5=[-3,N6,$j5,{[em]:Ct,[Ag]:400},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(ME5,_W7);var DE5=[3,N6,iH5,0,[T2,Sz,FH,dB6,F28,jb],[[()=>xt,0],[()=>pP6,0],[0,4],[()=>rB6,0],0,()=>yM]],XE5=[3,N6,nH5,0,[U5,qg,T2,Sz,U_1,eX,vJ],[0,0,[()=>xt,0],[()=>pP6,0],0,5,5]],PE5=[3,N6,oH5,0,[U5,c_1,a_1,p_1,FH,gB6],[[0,1],[()=>e_1,0],[()=>A$1,0],0,[0,4],1]],WE5=[3,N6,aH5,0,[U5,s36],[0,0]],ZE5=[3,N6,tH5,0,[U5,FH,bT5,jb],[[0,1],[0,4],0,()=>yM]],GE5=[3,N6,eH5,0,[U5,qg,T2,Sz,U_1,eX],[0,0,[()=>xt,0],[()=>pP6,0],0,5]],fE5=[3,N6,Yj5,0,[PZ7,qP,Sz,jb,FH],[0,0,0,()=>yM,[0,4]]],TE5=[3,N6,zj5,0,[L28],[0]],VE5=[3,N6,wj5,0,[a36,aT5,U28,Hb,AV5,FH],[0,()=>O$1,0,0,()=>yM,[0,4]]],NE5=[3,N6,_j5,0,[qP],[0]],vE5=[3,N6,Hj5,0,[WN,$Z7,FH,Hb,fW7,m28,f28,UW7,eW7,bt],[0,[()=>OG7,0],[0,4],0,0,()=>yM,0,[()=>pG7,0],[()=>dG7,0],()=>ZG7]],kE5=[3,N6,jj5,0,[AP],[0]],EE5=[3,N6,Mj5,0,[VZ7,NE],[0,0]],LE5=[3,N6,Dj5,0,[NE],[0]],yE5=[3,N6,Pj5,0,[T2,Sz,nZ7,EW7,KG7,BZ7,VW7,XW7,yW7,V28,N28,F28,jb,FH],[[()=>q$1,0],[()=>iB6,0],[()=>LG7,0],[()=>VG7,0],[()=>yG7,0],()=>EG7,[()=>NG7,0],()=>fG7,()=>vG7,[()=>mP6,0],[()=>mP6,0],0,()=>yM,[0,4]]],RE5=[3,N6,Wj5,0,[QB6,h28,qg,eX],[0,0,0,5]],SE5=[3,N6,Gj5,0,[BP6,Sz,FH],[[0,1],[()=>iB6,0],[0,4]]],CE5=[3,N6,fj5,0,[QB6,qg],[0,0]],hE5=[3,N6,Vj5,0,[B28,Sz,FH,oT5,jb],[0,[()=>j_8,0],[0,4],()=>zI5,()=>yM]],IE5=[3,N6,Nj5,0,[u28,Gw],[0,0]],bE5=[3,N6,pj5,0,[pB6,R28,GG5,Ef5,FH,jb],[0,()=>V_8,2,0,[0,4],()=>yM]],xE5=[3,N6,dj5,0,[r_1],[()=>_$1]],uE5=[3,N6,Lj5,0,[t28,q_8,lT5,K_8,FH],[0,0,0,()=>yM,[0,4]]],BE5=[3,N6,yj5,0,[AP],[0]],mE5=[3,N6,Rj5,0,[WN,kW7,Hb,FH,IG5,FB6,nG5,m28,rG5,e28,w_8,bt,I28,t36,k28],[0,0,0,[0,4],0,0,0,()=>yM,()=>yM,[()=>P_8,0],()=>W_8,()=>D_8,128,()=>ut,()=>T_8]],gE5=[3,N6,Sj5,0,[AP],[0]],FE5=[3,N6,Bj5,0,[WN,x28,Hb,Q28,m28,$T5,FH,t36,_T5],[0,0,0,()=>O$1,()=>yM,()=>yM,0,()=>ut,0]],QE5=[3,N6,mj5,0,[AP],[0]],UE5=[3,N6,gj5,0,[WN,Hb,FH,NE,b28,bt,t36,A_8,jb],[0,0,[0,4],0,()=>N_8,()=>v_8,()=>ut,1,()=>yM]],pE5=[3,N6,Fj5,0,[AP],[0]],dE5=[3,N6,sj5,0,[FH,r28,UP6,Sz,a28,C28,jb],[[0,4],0,()=>f_8,[()=>J_8,0],()=>X_8,()=>$$1,()=>yM]],cE5=[3,N6,tj5,0,[cB6],[0]],lE5=[3,N6,rj5,0,[FH,d28,n28,NE,E28,jb],[[0,4],1,0,0,0,()=>yM]],iE5=[3,N6,oj5,0,[l28],[0]],nE5=[3,N6,vj5,0,[It],[0]],rE5=[3,N6,hj5,8,[T2,_Z7,KN5],[[()=>tv5,0],0,()=>ch5]],oE5=[3,N6,xj5,0,[GW7],[()=>zh5]],aE5=[3,N6,Ij5,0,[L28,lG5,qP,eX,Gw,UB6,ht],[0,0,0,5,0,5,0]],sE5=[3,N6,cj5,0,[qP,a36,u0,Q_1,xG5,FB6,JV5,x_1],[0,0,5,0,0,0,0,0]],tE5=[3,N6,ij5,0,[aG5,sG5],[1,0]],eE5=[3,N6,mJ5,0,[Gw,u0,pR],[0,5,5]],AL5=[3,N6,KJ5,0,[U5,oZ,UB6],[[0,1],[0,1],[5,{[hA]:vJ}]]],qL5=[3,N6,YJ5,0,[],[]],KL5=[3,N6,zJ5,0,[U5,c07],[[0,1],[2,{[hA]:c07}]]],YL5=[3,N6,wJ5,0,[],[]],zL5=[3,N6,$J5,0,[U5,s36,UB6],[[0,1],[0,1],[5,{[hA]:vJ}]]],wL5=[3,N6,OJ5,0,[],[]],_L5=[3,N6,MJ5,0,[vW7],[[0,1]]],$L5=[3,N6,DJ5,0,[],[]],OL5=[3,N6,XJ5,0,[It],[[0,1]]],HL5=[3,N6,PJ5,0,[],[]],jL5=[3,N6,ZJ5,0,[NE],[0]],JL5=[3,N6,GJ5,0,[],[]],ML5=[3,N6,TJ5,0,[BP6,BB6],[[0,1],[0,{[hA]:BB6}]]],DL5=[3,N6,VJ5,0,[],[]],XL5=[3,N6,vJ5,0,[It],[[0,1]]],PL5=[3,N6,kJ5,0,[],[]],WL5=[3,N6,LJ5,0,[qZ7],[[0,1]]],ZL5=[3,N6,yJ5,0,[],[]],GL5=[3,N6,IJ5,0,[FP6],[[0,1]]],fL5=[3,N6,bJ5,0,[],[]],TL5=[3,N6,SJ5,0,[],[]],VL5=[3,N6,CJ5,0,[],[]],NL5=[3,N6,pJ5,0,[cB6],[[0,1]]],vL5=[3,N6,dJ5,0,[],[]],kL5=[3,N6,FJ5,0,[i28],[[0,1]]],EL5=[3,N6,QJ5,0,[],[]],LL5=[3,N6,xJ5,0,[FP6],[[0,1]]],yL5=[3,N6,uJ5,0,[],[]],RL5=[3,N6,UJ5,0,[Wf5,BV5,Sz,Ov5],[0,0,0,0]],SL5=[3,N6,HJ5,0,[iN5],[()=>wC5]],CL5=[3,N6,rJ5,0,[It,OT5,TV5],[0,[()=>lv5,0],()=>vS5]],hL5=[3,N6,sJ5,0,[T2,$f5],[[()=>dv5,0],()=>AI5]],IL5=[3,N6,eJ5,0,[Yv5,Pf5,nT5],[0,[()=>hL5,0],[()=>Oh5,0]]],bL5=[3,N6,YM5,0,[FT5,dV5],[()=>xL5,()=>gL5]],xL5=[3,N6,OM5,0,[bG5,RV5],[64,64]],ZG7=[3,N6,PM5,0,[Bc],[0]],uL5=[3,N6,WM5,0,[jT5],[0]],BL5=[3,N6,ZM5,0,[CZ7],[0]],mL5=[3,N6,GM5,0,[CZ7],[0]],gL5=[3,N6,TM5,0,[SG5,bV5],[64,64]],FL5=[3,N6,VM5,0,[AP,WN,Gw,u0,HZ7,hf5,cT5,aV5,kf5,iG5,sf5,f28],[0,0,0,5,0,64,64,64,64,64,()=>bL5,0]],QL5=[3,N6,iJ5,0,[U5],[[0,1]]],UL5=[3,N6,nJ5,0,[dB6],[[()=>rB6,16]]],pL5=[3,N6,EM5,0,[kN5,WN5,RG5],[0,()=>US5,[()=>OE5,0]]],dL5=[3,N6,NM5,0,[EZ7,sW7,JZ7,G28],[[()=>hG7,0],()=>TG7,()=>RG7,143]],cL5=[3,N6,vM5,0,[qP,CN5,aW7],[0,[()=>Jh5,0],[()=>dL5,0]]],lL5=[3,N6,RM5,0,[Bf5],[0]],Ob=[3,N6,yM5,0,[g28,e36],[0,15]],iL5=[3,N6,CM5,0,[qP,NE,a36,kZ7,i_1,o_1,hZ7,SW7,wZ7,WZ7],[0,0,0,0,64,64,2,64,64,()=>GG7]],GG7=[3,N6,hM5,0,[Gw],[0]],nL5=[3,N6,IM5,0,[qP,NE,a36,kZ7,i_1,o_1,hZ7,SW7,wZ7,WZ7],[0,0,0,0,64,64,2,64,64,()=>GG7]],rL5=[3,N6,zD5,0,[EZ7,sW7,JZ7,G28],[[()=>hG7,0],()=>TG7,()=>RG7,143]],oL5=[3,N6,BM5,0,[U5,oZ],[[0,1],[0,1]]],aL5=[3,N6,mM5,0,[U5,T2,oZ,T28,PW7,vJ],[0,[()=>xt,0],0,[()=>G_8,0],0,5]],sL5=[3,N6,FM5,0,[U5,oZ],[[0,1],[0,1]]],tL5=[3,N6,dM5,0,[U5,oZ,Gw,v28,mW7,IW7,bW7,eX,vJ],[0,0,0,0,[()=>_G7,0],0,[()=>wG7,0],5,5]],eL5=[3,N6,UM5,0,[U5,oZ,u07],[[0,1],[0,1],[0,{[hA]:u07}]]],Ay5=[3,N6,pM5,0,[U5,oZ,gG5],[0,0,[()=>rh5,0]]],qy5=[3,N6,iM5,0,[U5,oZ],[[0,1],[0,1]]],Ky5=[3,N6,nM5,0,[U5,SN5],[0,[()=>ik5,0]]],Yy5=[3,N6,rM5,0,[U5],[[0,1]]],zy5=[3,N6,oM5,0,[U5,T2,qg,vZ7,Sz,U_1,MZ7,eX,vJ],[0,[()=>xt,0],0,0,[()=>pP6,0],0,0,5,5]],wy5=[3,N6,sM5,0,[U5,s36],[[0,1],[0,1]]],_y5=[3,N6,tM5,0,[U5,pZ7],[0,[()=>M_8,0]]],$y5=[3,N6,AD5,0,[U5,oZ,s36],[[0,1],[0,1],[0,1]]],Oy5=[3,N6,qD5,0,[eN5],[[()=>WG7,0]]],Hy5=[3,N6,ND5,0,[vW7],[[0,1]]],jy5=[3,N6,vD5,0,[L28,PZ7,qP,eX,Gw,Sz,ht,UB6],[0,0,0,5,0,0,0,5]],Jy5=[3,N6,kD5,0,[It],[[0,1]]],My5=[3,N6,ED5,0,[qP,a36,WN,AP,Q_1,FB6,U28,I28,e28,w_8,bt,cZ7,eZ7,u0,k28,x_1,ht],[0,0,0,0,0,0,0,128,[()=>P_8,0],()=>W_8,()=>D_8,()=>xG7,()=>QG7,5,()=>T_8,0,0]],Dy5=[3,N6,bD5,0,[uc],[[()=>lB6,1]]],Xy5=[3,N6,xD5,0,[WN,Gw,AP,$Z7,Hb,fW7,HZ7,f28,UW7,eW7,bt,u0,pR,uf5],[0,0,0,[()=>OG7,0],0,0,0,0,[()=>pG7,0],[()=>dG7,0],()=>ZG7,5,5,64]],Py5=[3,N6,mD5,0,[NE],[[0,1]]],Wy5=[3,N6,gD5,0,[NE,WG5,vG5,ff5,UV5],[0,()=>qk5,0,0,0]],Zy5=[3,N6,FD5,0,[It],[[0,1]]],Gy5=[3,N6,QD5,0,[UT5],[()=>iL5]],fy5=[3,N6,cD5,0,[BP6,BB6],[[0,1],[0,{[hA]:BB6}]]],Ty5=[3,N6,lD5,0,[T2,Sz,QB6,h28,qg,Gw,aN5,tG5,xv5,PN5,UG5,TG5,RW7,eX,vJ,NN5,mf5,V28,N28,MZ7],[[()=>q$1,0],[()=>iB6,0],0,0,0,0,[()=>OR5,0],[()=>ry5,0],[()=>DR5,0],()=>zR5,[()=>sy5,0],()=>dy5,()=>kG7,5,5,[()=>kh5,0],[()=>Zh5,0],[()=>mP6,0],[()=>mP6,0],0]],Vy5=[3,N6,nD5,0,[It],[[0,1]]],Ny5=[3,N6,rD5,0,[qP,a36,WN,AP,Q28,u0,XZ7,U28,YZ7,oG5],[0,0,0,0,()=>O$1,5,0,0,2,()=>tE5]],vy5=[3,N6,aD5,0,[qZ7],[[0,1]]],ky5=[3,N6,sD5,0,[B28,Sz,eX,vJ,u28,UP6,KZ7,Gw,H$],[0,[()=>j_8,0],5,5,0,()=>FG7,0,0,0]],Ey5=[3,N6,PX5,0,[FP6],[[0,1]]],Ly5=[3,N6,WX5,0,[r_1],[()=>_$1]],yy5=[3,N6,AX5,0,[AP],[[0,1]]],Ry5=[3,N6,qX5,0,[AP,Gw,u0,lZ7,q_8,bZ7,t28,iZ7,K_8,ht,gZ7],[0,0,5,0,0,0,0,0,()=>yM,0,0]],Sy5=[3,N6,KX5,0,[uc],[[0,1]]],Cy5=[3,N6,YX5,0,[AP,WN,WV5,XV5,FH,Hb,Gw,uZ7,ht,u0,pR,QP6,Q_1,I28,e28,w_8,bt,FB6,PV5,cZ7,eZ7,t36,k28],[0,0,0,0,0,0,0,()=>bG7,0,5,5,5,0,128,[()=>P_8,0],()=>W_8,()=>D_8,0,0,()=>xG7,()=>QG7,()=>ut,()=>T_8]],hy5=[3,N6,_X5,0,[uc],[[0,1]]],Iy5=[3,N6,$X5,0,[AP,WN,x28,AZ7,Hb,Q28,Gw,ht,u0,pR,QP6,t36,wT5],[0,0,0,0,0,()=>O$1,0,0,5,5,5,()=>ut,0]],by5=[3,N6,OX5,0,[uc],[[0,1]]],xy5=[3,N6,HX5,0,[AP,WN,NE,FH,Hb,Gw,ZN,FZ7,pR,QP6,b28,bt,t36,A_8,OZ7],[0,0,0,0,0,0,[()=>PG7,0],5,5,5,()=>N_8,()=>v_8,()=>ut,1,5]],uy5=[3,N6,MX5,0,[],[]],By5=[3,N6,DX5,0,[DZ7],[()=>CG7]],my5=[3,N6,hX5,0,[cB6],[[0,1]]],gy5=[3,N6,IX5,0,[r28,a28,Sz,eX,vJ,cB6,UP6,C28,Gw,H$],[0,()=>X_8,[()=>J_8,0],5,5,0,()=>f_8,()=>$$1,0,0]],Fy5=[3,N6,RX5,0,[i28],[[0,1]]],Qy5=[3,N6,SX5,0,[d28,BW7,n28,l28,qP,xW7,rW7,Gw,u0,pR,ht,E28,TW7],[1,1,0,0,0,0,0,0,5,5,0,0,5]],Uy5=[3,N6,zP5,0,[],[]],py5=[3,N6,wP5,0,[nW7],[21]],dy5=[3,N6,xM5,0,[yZ7,gB6],[64,1]],fG7=[3,N6,cM5,0,[yZ7,gB6],[64,1]],TG7=[3,N6,CD5,0,[QB6,BB6],[0,0]],cy5=[3,N6,wD5,0,[H$,zZ7,TZ7,i_1,o_1,QR,dR,UR,cR],[0,0,0,[()=>g_1,0],[()=>g_1,0],[()=>u_1,0],[()=>u_1,0],2,2]],ly5=[3,N6,$D5,0,[H$,zZ7,TZ7,i_1,o_1,QR,dR,UR,cR],[0,0,0,[()=>g_1,0],[()=>g_1,0],[()=>u_1,0],[()=>u_1,0],2,2]],iy5=[3,N6,HD5,0,[t_1],[[()=>jG7,0]]],ny5=[3,N6,jD5,0,[t_1],[[()=>jG7,0]]],ry5=[3,N6,LD5,0,[oW7,oZ7],[[()=>Dh5,0],[()=>iy5,0]]],VG7=[3,N6,yD5,0,[iW7,dZ7],[[()=>Xh5,0],[()=>ny5,0]]],oy5=[3,N6,XD5,0,[H$,rZ7,gP6,dW7],[0,1,[()=>JG7,0],2]],ay5=[3,N6,PD5,0,[H$,rZ7,gP6,dW7],[0,1,[()=>JG7,0],2]],sy5=[3,N6,GD5,0,[oW7],[[()=>Ph5,0]]],NG7=[3,N6,fD5,0,[iW7],[[()=>Wh5,0]]],vG7=[3,N6,RD5,0,[cf5],[0]],kG7=[3,N6,SD5,0,[lf5,df5],[0,0]],ty5=[3,N6,ZX5,0,[H$,QR,dR,UR,cR],[0,[()=>St,0],[()=>St,0],2,2]],ey5=[3,N6,GX5,0,[H$,QR,dR,UR,cR],[0,[()=>St,0],[()=>St,0],2,2]],AR5=[3,N6,vX5,0,[H$,gP6,QR,dR,UR,cR],[0,0,0,0,2,2]],qR5=[3,N6,kX5,0,[H$,gP6,QR,dR,UR,cR],[0,0,0,0,2,2]],KR5=[3,N6,bX5,0,[T2,Sz,LZ7,gP6,QR,dR,UR,cR],[0,0,0,0,0,0,2,2]],YR5=[3,N6,xX5,0,[T2,Sz,LZ7,gP6,QR,dR,UR,cR],[0,0,0,0,0,0,2,2]],zR5=[3,N6,gX5,0,[LV5,zN5],[()=>Th5,()=>Nh5]],EG7=[3,N6,FX5,0,[EV5,iV5],[()=>Vh5,()=>vh5]],wR5=[3,N6,mX5,0,[l_1,LG5,Gw,T2,Sz,qg,eX,vJ,RW7],[0,0,0,[()=>q$1,0],[()=>iB6,0],0,5,5,()=>kG7]],_R5=[3,N6,dX5,0,[T2,y28,cW7,H$,QR,dR,UR,cR],[[()=>DG7,0],[()=>MG7,0],[()=>gG7,0],0,[()=>B_1,0],[()=>B_1,0],2,2]],$R5=[3,N6,lX5,0,[T2,y28,cW7,H$,QR,dR,UR,cR],[[()=>DG7,0],[()=>MG7,0],[()=>gG7,0],0,[()=>B_1,0],[()=>B_1,0],2,2]],OR5=[3,N6,sX5,0,[wv5,oZ7],[[()=>Lh5,0],[()=>HR5,0]]],LG7=[3,N6,tX5,0,[BN5,dZ7],[[()=>yh5,0],[()=>jR5,0]]],HR5=[3,N6,eX5,0,[t_1],[[()=>XG7,0]]],jR5=[3,N6,AP5,0,[t_1],[[()=>XG7,0]]],JR5=[3,N6,_P5,0,[Y_8,QR,dR,UR,cR],[0,[()=>St,0],[()=>St,0],2,2]],MR5=[3,N6,OP5,0,[Y_8,QR,dR,UR,cR],[0,[()=>St,0],[()=>St,0],2,2]],DR5=[3,N6,jP5,0,[hv5,qV5],[[()=>Rh5,0],[()=>Gh5,0]]],yG7=[3,N6,JP5,0,[bv5,KV5],[[()=>Sh5,0],[()=>fh5,0]]],XR5=[3,N6,DP5,0,[af5,NW7,uW7],[[()=>WR5,0],[()=>Ch5,0],[()=>mG7,0]]],PR5=[3,N6,XP5,0,[T2,Sz,sV5],[[()=>HG7,0],[()=>cv5,0],0]],WR5=[3,N6,ZP5,0,[xf5,_Z7],[0,[()=>av5,0]]],ZR5=[3,N6,fP5,0,[uT5,qP],[[()=>xh5,0],0]],GR5=[3,N6,NP5,0,[qP,a36,u0,YZ7,XZ7],[0,0,5,2,0]],fR5=[3,N6,EP5,0,[qP],[0]],TR5=[3,N6,RP5,0,[B28,Sz,eX,vJ,u28,UP6,KZ7,Gw,H$],[0,[()=>j_8,0],5,5,0,()=>FG7,0,0,0]],VR5=[-3,N6,CP5,{[em]:QZ7,[Ag]:500},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(VR5,KW7);var NR5=[3,N6,TP5,0,[Xv5,zT5,tV5],[2,()=>wI5,[()=>HI5,0]]],RG7=[3,N6,uP5,0,[dN5],[()=>$C5]],SG7=[3,N6,bP5,0,[Lv5],[[()=>kR5,0]]],vR5=[3,N6,IP5,0,[jZ7,qP,rV5,aW7,MV5],[0,0,[()=>SG7,0],[()=>rL5,0],()=>NS5]],kR5=[3,N6,xP5,0,[_V5,GV5,Uf5,AT5,nV5],[1,0,[()=>cG7,0],[()=>ZR5,0],[()=>IC5,0]]],ER5=[3,N6,Q05,0,[fv5],[0]],LR5=[3,N6,QP5,0,[U5,mK,_z],[[0,{[hA]:U5}],[0,{[hA]:mK}],[1,{[hA]:_z}]]],yR5=[3,N6,UP5,0,[NG5,mK],[[()=>sC5,0],0]],RR5=[3,N6,gP5,0,[U5,mK,_z],[[0,1],[0,{[hA]:mK}],[1,{[hA]:_z}]]],SR5=[3,N6,FP5,0,[VG5,mK],[()=>dC5,0]],CR5=[3,N6,dP5,0,[U5,mK,_z],[[0,1],[0,{[hA]:mK}],[1,{[hA]:_z}]]],hR5=[3,N6,cP5,0,[uN5,mK],[[()=>tC5,0],0]],IR5=[3,N6,iP5,0,[U5,oZ,mK,_z],[[0,1],[0,1],[0,{[hA]:mK}],[1,{[hA]:_z}]]],bR5=[3,N6,nP5,0,[Kv5,mK],[[()=>eC5,0],0]],xR5=[3,N6,sP5,0,[p07,U07,rZ,_z,mK,sX,tX,PN,b_1],[[5,{[hA]:p07}],[5,{[hA]:U07}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}],[0,{[hA]:PN}],[0,{[hA]:b_1}]]],uR5=[3,N6,tP5,0,[mK,pT5],[0,()=>wh5]],BR5=[3,N6,eP5,0,[XN,DN,rZ,g07,d07,_z,mK,sX,tX,l07,x_1],[[5,{[hA]:XN}],[5,{[hA]:DN}],[0,{[hA]:rZ}],[0,{[hA]:g07}],[0,{[hA]:d07}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}],[2,{[hA]:l07}],[0,{[hA]:x_1}]]],mR5=[3,N6,A05,0,[mK,p28],[0,()=>_h5]],gR5=[3,N6,K05,0,[DN,XN,PN,x07,rZ,_z,mK,sX,tX],[[5,{[hA]:DN}],[5,{[hA]:XN}],[0,{[hA]:PN}],[0,{[hA]:x07}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],FR5=[3,N6,Y05,0,[mK,fT5],[0,()=>jh5]],QR5=[3,N6,_05,0,[NE,i07],[[0,1],[0,{[hA]:i07}]]],UR5=[3,N6,$05,0,[NE,fV5],[0,()=>Fh5]],pR5=[3,N6,O05,0,[Q07,B07,F07,m07],[[0,{[hA]:Q07}],[0,{[hA]:B07}],[0,{[hA]:F07}],[0,{[hA]:m07}]]],dR5=[3,N6,H05,0,[p28],[()=>Mh5]],cR5=[3,N6,J05,0,[BP6,_z,mK],[[0,{[hA]:BP6}],[1,{[hA]:_z}],[0,{[hA]:mK}]]],lR5=[3,N6,M05,0,[pf5,mK],[[()=>Eh5,0],0]],iR5=[3,N6,X05,0,[XN,DN,rZ,_z,mK,sX,tX],[[5,{[hA]:XN}],[5,{[hA]:DN}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],nR5=[3,N6,P05,0,[mK,p28],[0,()=>hh5]],rR5=[3,N6,Z05,0,[_z,mK,UN5],[[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:H$}]]],oR5=[3,N6,G05,0,[HT5,mK],[[()=>Ih5,0],0]],aR5=[3,N6,I05,0,[_z,mK,sT5],[[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:pB6}]]],sR5=[3,N6,b05,0,[iT5,mK],[()=>bh5,0]],tR5=[3,N6,T05,0,[DN,XN,PN,n07,r07,rN5,_z,mK,sX,tX],[[5,{[hA]:DN}],[5,{[hA]:XN}],[0,{[hA]:PN}],[0,{[hA]:n07}],[0,{[hA]:r07}],[0,{[hA]:ZV5}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],eR5=[3,N6,V05,0,[mK,mT5],[0,()=>uh5]],AS5=[3,N6,N05,0,[DN,XN,PN,rZ,_z,mK,sX,tX],[[5,{[hA]:DN}],[5,{[hA]:XN}],[0,{[hA]:PN}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],qS5=[3,N6,v05,0,[mK,gT5],[0,()=>Bh5]],KS5=[3,N6,L05,0,[DN,XN,PN,rZ,_z,mK,sX,tX],[[5,{[hA]:DN}],[5,{[hA]:XN}],[0,{[hA]:PN}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],YS5=[3,N6,y05,0,[mK,dT5],[0,()=>mh5]],zS5=[3,N6,R05,0,[o07,a07,PN,rZ,_z,mK,sX,tX],[[5,{[hA]:o07}],[5,{[hA]:a07}],[0,{[hA]:PN}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],wS5=[3,N6,S05,0,[mK,KT5],[0,[()=>gh5,0]]],_S5=[3,N6,g05,0,[_z,mK,H$],[[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:H$}]]],$S5=[3,N6,F05,0,[hV5,mK],[[()=>Qh5,0],0]],OS5=[3,N6,u05,0,[DN,XN,PN,b_1,rZ,_z,mK,sX,tX],[[5,{[hA]:DN}],[5,{[hA]:XN}],[0,{[hA]:PN}],[0,{[hA]:b_1}],[0,{[hA]:rZ}],[1,{[hA]:_z}],[0,{[hA]:mK}],[0,{[hA]:sX}],[0,{[hA]:tX}]]],HS5=[3,N6,B05,0,[mK,SV5],[0,()=>Uh5]],jS5=[3,N6,p05,0,[o28],[0]],JS5=[3,N6,d05,0,[jb],[()=>yM]],CG7=[3,N6,rP5,0,[qf5,wN5,FN5,ef5,Tf5,vv5],[()=>JE5,()=>IG7,2,2,2,2]],_$1=[3,N6,$W5,0,[FP6,pB6,Gw,mZ7,eX,vJ,R28,Rf5,Cf5],[0,0,0,0,5,5,()=>V_8,0,0]],MS5=[3,N6,OW5,0,[FP6,pB6,Gw,mZ7,eX,vJ],[0,0,0,0,5,5]],DS5=[3,N6,l05,8,[g28,H$,Sz],[0,0,0]],XS5=[3,N6,n05,0,[fN5,ZN5],[0,[()=>jI5,0]]],PS5=[3,N6,r05,0,[AP,Gw,u0,lZ7,q_8,bZ7,t28,iZ7,K_8,ht,gZ7],[0,0,5,0,0,0,0,0,()=>yM,0,0]],WS5=[3,N6,o05,0,[AP,Q_1,WN,Gw,uZ7,pR,u0,QP6,pG5,kW7,FB6],[0,0,0,0,()=>bG7,5,5,5,0,0,0]],ZS5=[3,N6,qW5,0,[AP,WN,Gw,pR,u0,QP6,AZ7,x28],[0,0,0,5,5,5,0,0]],GS5=[3,N6,KW5,0,[XN5,Bc,xZ7],[0,0,0]],fS5=[3,N6,YW5,0,[Bc,jN5,xZ7],[0,0,0]],TS5=[3,N6,zW5,0,[AP,WN,NE,FH,Hb,Gw,ZN,FZ7,pR,QP6,b28,bt,t36,A_8,OZ7],[0,0,0,0,0,0,[()=>PG7,0],5,5,5,()=>N_8,()=>v_8,()=>ut,1,5]],VS5=[3,N6,JW5,0,[DV5,VZ7,gN5],[0,0,()=>_C5]],NS5=[3,N6,MW5,0,[gV5],[()=>hS5]],D_8=[3,N6,DW5,0,[Bc],[0]],vS5=[3,N6,PW5,0,[xT5],[0]],kS5=[3,N6,LW5,0,[cV5],[()=>dh5]],ES5=[3,N6,NW5,0,[r28,a28,Sz,eX,vJ,cB6,UP6,C28,Gw,H$],[0,()=>X_8,[()=>J_8,0],5,5,0,()=>f_8,()=>$$1,0,0]],$$1=[3,N6,kW5,0,[qP],[0]],hG7=[3,N6,yW5,0,[sN5],[[()=>ev5,0]]],LS5=[3,N6,fW5,0,[n28,l28,qP,xW7,rW7,d28,BW7,Gw,E28,TW7,u0,pR],[0,0,0,0,0,1,1,0,0,5,5,5]],yS5=[3,N6,ZW5,0,[DZ7],[()=>CG7]],RS5=[3,N6,GW5,0,[],[]],SS5=[3,N6,SW5,0,[nW7],[21]],CS5=[3,N6,CW5,0,[],[]],hS5=[3,N6,hW5,0,[H$],[0]],IS5=[3,N6,sW5,0,[y28,e36],[0,()=>OI5]],bS5=[3,N6,iW5,0,[Vf5,pB6],[[0,1],0]],xS5=[3,N6,nW5,0,[r_1],[()=>_$1]],uS5=[3,N6,UW5,0,[S28,c28],[[()=>F_1,0],[()=>F_1,0]]],BS5=[-3,N6,QW5,{[em]:Ct,[Ag]:400},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(BS5,HW7);var mS5=[-3,N6,oW5,{[em]:Ct,[Ag]:404},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(mS5,YW7);var gS5=[3,N6,IW5,0,[H$,TT5,Sf5],[0,[()=>vR5,0],[()=>cL5,0]]],FS5=[3,N6,xW5,0,[jZ7,NT5],[0,[()=>SG7,0]]],X_8=[3,N6,mW5,0,[qN5],[1]],IG7=[3,N6,wZ5,0,[uG5,kT5],[0,0]],QS5=[3,N6,$Z5,0,[Bc],[0]],US5=[3,N6,GZ5,0,[Tv5],[0]],pS5=[3,N6,XZ5,0,[qT5,JT5,yf5,vT5,Cv5],[1,0,0,0,()=>ut]],dS5=[-3,N6,fZ5,{[em]:Ct,[Ag]:400},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(dS5,$W7);var cS5=[-3,N6,VZ5,{[em]:QZ7,[Ag]:503},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(cS5,jW7);var lS5=[3,N6,AZ5,0,[U5,v28,FH,_N5],[[0,1],[0,1],[0,{[of5]:uv5,[MT5]:1}],[()=>Sk5,16]]],iS5=[3,N6,qZ5,0,[U5,oZ],[0,0]],nS5=[3,N6,YZ5,0,[U5,oZ,xN5,FH],[[0,1],[0,1],64,[0,4]]],rS5=[3,N6,zZ5,0,[U5],[0]],bG7=[3,N6,_Z5,0,[Nv5,Hf5,QN5],[()=>EC5,()=>eE5,()=>jC5]],oS5=[3,N6,HZ5,0,[uc],[[()=>lB6,1]]],aS5=[3,N6,jZ5,0,[],[]],sS5=[3,N6,MZ5,0,[uc],[[0,1]]],tS5=[3,N6,DZ5,0,[],[]],eS5=[3,N6,WZ5,0,[uc],[[0,1]]],AC5=[3,N6,ZZ5,0,[],[]],qC5=[3,N6,TZ5,0,[AN5],[0]],KC5=[3,N6,NZ5,0,[g28,e36],[0,0]],YC5=[3,N6,xZ5,0,[o28,jb],[0,()=>yM]],zC5=[3,N6,uZ5,0,[],[]],wC5=[3,N6,CZ5,0,[nN5,rT5],[0,1]],_C5=[3,N6,vZ5,0,[Hv5,ST5,EN5,yv5],[()=>kS5,()=>ER5,()=>qC5,()=>SC5]],$C5=[3,N6,yZ5,0,[zv5,tN5,eT5,vN5],[1,1,1,64]],OC5=[-3,N6,LZ5,{[em]:Ct,[Ag]:429},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(OC5,zW7);var HC5=[-3,N6,hZ5,{[em]:Ct,[Ag]:400},[ZN,eV5],[0,0]];gR.TypeRegistry.for(N6).registerError(HC5,OW7);var P_8=[3,N6,kZ5,0,[Bc,YT5],[0,[()=>NR5,0]]],jC5=[3,N6,EZ5,0,[Gw,u0,pR],[0,5,5]],xG7=[3,N6,SZ5,0,[lN5],[1]],JC5=[3,N6,qG5,0,[o28,cN5],[0,64]],MC5=[3,N6,KG5,0,[],[]],DC5=[3,N6,gZ5,0,[U5,oZ,T28,IT5],[[0,1],[0,1],[()=>G_8,0],0]],XC5=[3,N6,FZ5,0,[U5,oZ,PW7,vJ],[0,0,0,5]],PC5=[3,N6,QZ5,0,[U5,dB6,T2,Sz],[[0,1],[()=>rB6,0],[()=>xt,0],[()=>pP6,0]]],WC5=[3,N6,UZ5,0,[U5,T2,U_1,vJ],[0,[()=>xt,0],0,5]],ZC5=[3,N6,dZ5,0,[U5,s36,c_1,a_1,UB6,p_1,gB6,FH],[[0,1],[0,1],[()=>e_1,0],[()=>A$1,0],5,0,1,[0,4]]],GC5=[3,N6,cZ5,0,[U5,s36],[0,0]],fC5=[3,N6,iZ5,0,[BP6,T2,Sz,nZ7,EW7,KG7,BZ7,VW7,XW7,yW7,V28,N28,F28],[[0,1],[()=>q$1,0],[()=>iB6,0],[()=>LG7,0],[()=>VG7,0],[()=>yG7,0],()=>EG7,[()=>NG7,0],()=>fG7,()=>vG7,[()=>mP6,0],[()=>mP6,0],0]],TC5=[3,N6,nZ5,0,[QB6,h28,qg,vJ],[0,0,0,5]],VC5=[3,N6,oZ5,0,[FP6,R28,FH],[[0,1],()=>V_8,[0,4]]],NC5=[3,N6,aZ5,0,[r_1],[()=>_$1]],vC5=[3,N6,tZ5,0,[i28,jf5,Of5],[[0,1],0,0]],kC5=[3,N6,eZ5,0,[],[]],W_8=[3,N6,_G5,0,[Rv5],[()=>lh5]],EC5=[3,N6,wG5,0,[Gw,u0,pR],[0,5,5]],LC5=[-3,N6,$G5,{[em]:Ct,[Ag]:400},[ZN],[0]];gR.TypeRegistry.for(N6).registerError(LC5,wW7);var yC5=[3,N6,YG5,0,[Bc],[0]],RC5=[3,N6,OG5,0,[kv5],[1]],SC5=[3,N6,DG5,0,[ZG5],[0]],CC5=[3,N6,jG5,0,[BT5,$V5,QT5],[()=>hC5,1,[()=>XS5,0]]],hC5=[3,N6,JG5,0,[qP,G28],[0,143]],IC5=[3,N6,MG5,0,[H$,BG5],[0,[()=>CC5,0]]],ut=[3,N6,zG5,0,[MN5,JN5],[64,64]],bC5=[-3,UZ7,"BedrockServiceException",0,[],[]];gR.TypeRegistry.for(UZ7).registerError(bC5,FR);var xC5=[1,N6,f$5,0,[()=>ih5,0]],uC5=[1,N6,N$5,0,[()=>m_1,0]],BC5=[1,N6,k$5,0,[()=>nh5,0]],s07=[1,N6,R$5,0,[()=>wk5,0]],Z_8=[1,N6,I$5,0,()=>Ok5],mC5=[1,N6,g$5,0,[()=>nB6,0]],gC5=[1,N6,Q$5,0,[()=>Mk5,0]],mB6=[1,N6,c$5,0,[()=>Xk5,0]],G_8=[1,N6,o$5,0,[()=>UG7,0]],FC5=[1,N6,jO5,0,[()=>kk5,0]],QC5=[1,N6,XO5,0,[()=>Ek5,0]],UC5=[1,N6,WO5,0,()=>Lk5],pC5=[1,N6,GO5,0,[()=>yk5,0]],dC5=[1,N6,NO5,0,()=>Ck5],cC5=[1,N6,CO5,0,[()=>Y$1,0]],lC5=[1,N6,mO5,0,[()=>z$1,0]],iC5=[1,N6,QO5,0,[()=>tm,0]],uG7=[1,N6,dO5,0,[()=>Ik5,0]],nC5=[1,N6,lO5,0,[()=>bk5,0]],rC5=[1,N6,aO5,0,[()=>w$1,0]],BG7=[1,N6,eO5,0,[()=>o36,0]],oC5=[1,N6,bO5,0,[()=>Uk5,0]],aC5=[1,N6,KH5,0,[()=>pk5,0]],sC5=[1,N6,MH5,0,[()=>nk5,0]],tC5=[1,N6,XH5,0,[()=>M_8,0]],eC5=[1,N6,WH5,0,[()=>WG7,0]],Ah5=[1,N6,TH5,0,[()=>th5,0]],qh5=[1,N6,uH5,0,[()=>YE5,0]],Kh5=[1,N6,mH5,0,[()=>zE5,0]],Yh5=[1,N6,UH5,0,()=>$E5],zh5=[1,N6,kj5,0,()=>nE5],wh5=[1,N6,bj5,0,()=>aE5],_h5=[1,N6,lj5,0,()=>sE5],mG7=[1,N6,AM5,0,[()=>IL5,0]],$h5=[1,N6,_M5,0,[()=>lB6,0]],Oh5=[1,N6,XM5,0,[()=>HG7,0]],Hh5=[1,N6,$M5,0,[()=>qI5,0]],jh5=[1,N6,kM5,0,()=>FL5],Jh5=[1,N6,LM5,0,[()=>pL5,0]],t07=[1,N6,SM5,8,()=>lL5],Mh5=[1,N6,bM5,0,()=>nL5],Dh5=[1,N6,MD5,0,[()=>cy5,0]],Xh5=[1,N6,OD5,0,[()=>ly5,0]],Ph5=[1,N6,ZD5,0,[()=>oy5,0]],Wh5=[1,N6,WD5,0,[()=>ay5,0]],Zh5=[1,N6,pD5,0,[()=>iv5,0]],Gh5=[1,N6,fX5,0,[()=>ty5,0]],fh5=[1,N6,TX5,0,[()=>ey5,0]],g_1=[1,N6,VX5,0,[()=>nv5,0]],Th5=[1,N6,LX5,0,()=>AR5],Vh5=[1,N6,EX5,0,()=>qR5],Nh5=[1,N6,BX5,0,()=>KR5],vh5=[1,N6,uX5,0,()=>YR5],kh5=[1,N6,UX5,0,[()=>rv5,0]],Eh5=[1,N6,pX5,0,[()=>wR5,0]],gG7=[1,N6,oX5,0,[()=>ov5,0]],Lh5=[1,N6,KP5,0,[()=>_R5,0]],yh5=[1,N6,iX5,0,[()=>$R5,0]],Rh5=[1,N6,MP5,0,[()=>JR5,0]],Sh5=[1,N6,HP5,0,[()=>MR5,0]],Ch5=[1,N6,PP5,0,[()=>PR5,0]],hh5=[1,N6,vP5,0,()=>GR5],FG7=[1,N6,yP5,0,()=>fR5],Ih5=[1,N6,SP5,0,[()=>TR5,0]],bh5=[1,N6,HW5,0,()=>MS5],xh5=[1,N6,i05,0,[()=>DS5,0]],uh5=[1,N6,a05,0,()=>PS5],Bh5=[1,N6,s05,0,()=>WS5],mh5=[1,N6,wW5,0,()=>ZS5],gh5=[1,N6,_W5,0,[()=>TS5,0]],Fh5=[1,N6,XW5,0,()=>VS5],Qh5=[1,N6,vW5,0,[()=>ES5,0]],f_8=[1,N6,EW5,0,()=>$$1],Uh5=[1,N6,TW5,0,()=>LS5],ph5=[1,N6,uW5,0,[()=>$I5,0]],dh5=[1,N6,BW5,0,()=>RL5],ch5=[1,N6,aW5,0,()=>IS5],e07=[1,N6,dW5,0,[()=>uS5,0]],AW7=[1,N6,FW5,0,[()=>cG7,0]],yM=[1,N6,RZ5,0,()=>KC5],QG7=[1,N6,HG5,0,()=>RC5],lh5=[1,N6,XG5,0,()=>yC5],F_1=[2,N6,cW5,8,0,0],ih5=[3,N6,V$5,0,[cG5],[[()=>rE5,0]]],nh5=[3,N6,v$5,0,[Sv5,WT5,RN5,XT5,IN5,mN5,OV5],[[()=>Dk5,0],[()=>_k5,0],[()=>Hk5,0],[()=>zk5,0],[()=>Jk5,0],()=>jk5,()=>$k5]],UG7=[3,N6,i$5,0,[WW7,sZ7,FW7,ZW7,tZ7,QW7,DW7,aZ7,gW7,fG5,Jv5,Mv5,tf5],[[()=>Gk5,0],[()=>tk5,0],[()=>Bk5,0],[()=>Vk5,0],[()=>qE5,0],[()=>Fk5,0],[()=>Pk5,0],[()=>ak5,0],()=>xk5,[()=>Wk5,0],[()=>rk5,0],[()=>ok5,0],[()=>ck5,0]]],rh5=[3,N6,JO5,0,[dB6,mV5,CG5,tW7],[[()=>rB6,0],[()=>hk5,0],[()=>vk5,0],[()=>dk5,0]]],oh5=[3,N6,DO5,0,[uV5,zV5],[()=>lk5,[()=>sh5,0]]],ah5=[3,N6,kO5,0,[vV5,NV5,VV5],[[()=>w$1,0],[()=>z$1,0],[()=>Y$1,0]]],sh5=[3,N6,wH5,0,[WW7,sZ7,FW7,ZW7,tZ7,QW7,DW7,aZ7,gW7],[[()=>fk5,0],[()=>ek5,0],[()=>mk5,0],[()=>Nk5,0],[()=>KE5,0],[()=>Qk5,0],[()=>Zk5,0],[()=>sk5,0],()=>uk5]],th5=[3,N6,fH5,0,[EG5,Zv5,Df5],[[()=>Tk5,0],[()=>AE5,0],()=>gk5]],eh5=[3,N6,CH5,0,[Gf5,CV5],[[()=>pC5,0],[()=>Rk5,0]]],T_8=[3,N6,Aj5,0,[_f5],[()=>SL5]],V_8=[3,N6,oJ5,0,[GN5],[()=>pS5]],pG7=[3,N6,aJ5,0,[yG5,rf5],[[()=>Kk5,0],[()=>XR5,0]]],AI5=[3,N6,tJ5,0,[Bc],[0]],dG7=[3,N6,KM5,0,[UP6,lV5],[[()=>Hh5,0],[()=>ph5,0]]],qI5=[3,N6,HM5,0,[hG5,yV5],[[()=>CL5,0],()=>uL5]],KI5=[3,N6,fM5,0,[YN5,QV5],[()=>mL5,()=>BL5]],YI5=[3,N6,jM5,0,[GW7],[()=>Yh5]],zI5=[3,N6,LP5,0,[FG5],[0]],wI5=[3,N6,VP5,0,[Bc],[0]],_I5=[3,N6,hP5,0,[oV5,FV5],[[()=>FS5,0],[()=>gS5,0]]],O$1=[3,N6,t05,0,[ON5],[()=>QS5]],N_8=[3,N6,e05,0,[DN5],[()=>GS5]],v_8=[3,N6,AW5,0,[TN5],[()=>fS5]],$I5=[3,N6,bW5,0,[VT5,IV5],[[()=>_I5,0],()=>KI5]],OI5=[3,N6,tW5,0,[LN5,Qf5],[0,1]],HI5=[3,N6,pW5,0,[S28,c28,JW7,fZ7],[[()=>F_1,0],[()=>F_1,0],[()=>e07,0],[()=>e07,0]]],jI5=[3,N6,rW5,0,[Ff5,gf5],[[()=>t07,0],[()=>t07,0]]],cG7=[3,N6,gW5,8,[S28,c28,if5,nf5,hT5,CT5,PT5,wV5,yN5,LT5,$N5,JW7,fZ7],[()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,()=>Ob,[()=>AW7,0],[()=>AW7,0]]],JI5=[9,N6,bH5,{[O7]:["POST","/evaluation-jobs/batch-delete",202]},()=>wE5,()=>_E5],MI5=[9,N6,dH5,{[O7]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/cancel",202]},()=>HE5,()=>jE5],DI5=[9,N6,pH5,{[O7]:["POST","/automated-reasoning-policies",200]},()=>DE5,()=>XE5],XI5=[9,N6,rH5,{[O7]:["POST","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>PE5,()=>WE5],PI5=[9,N6,sH5,{[O7]:["POST","/automated-reasoning-policies/{policyArn}/versions",200]},()=>ZE5,()=>GE5],WI5=[9,N6,qj5,{[O7]:["POST","/custom-models/create-custom-model",202]},()=>VE5,()=>NE5],ZI5=[9,N6,Kj5,{[O7]:["POST","/model-customization/custom-model-deployments",202]},()=>fE5,()=>TE5],GI5=[9,N6,Oj5,{[O7]:["POST","/evaluation-jobs",202]},()=>vE5,()=>kE5],fI5=[9,N6,Jj5,{[O7]:["POST","/create-foundation-model-agreement",202]},()=>EE5,()=>LE5],TI5=[9,N6,Xj5,{[O7]:["POST","/guardrails",202]},()=>yE5,()=>RE5],VI5=[9,N6,Zj5,{[O7]:["POST","/guardrails/{guardrailIdentifier}",202]},()=>SE5,()=>CE5],NI5=[9,N6,Tj5,{[O7]:["POST","/inference-profiles",201]},()=>hE5,()=>IE5],vI5=[9,N6,Uj5,{[O7]:["POST","/marketplace-model/endpoints",200]},()=>bE5,()=>xE5],kI5=[9,N6,Ej5,{[O7]:["POST","/model-copy-jobs",201]},()=>uE5,()=>BE5],EI5=[9,N6,Cj5,{[O7]:["POST","/model-customization-jobs",201]},()=>mE5,()=>gE5],LI5=[9,N6,uj5,{[O7]:["POST","/model-import-jobs",201]},()=>FE5,()=>QE5],yI5=[9,N6,Qj5,{[O7]:["POST","/model-invocation-job",200]},()=>UE5,()=>pE5],RI5=[9,N6,aj5,{[O7]:["POST","/prompt-routers",200]},()=>dE5,()=>cE5],SI5=[9,N6,nj5,{[O7]:["POST","/provisioned-model-throughput",201]},()=>lE5,()=>iE5],CI5=[9,N6,AJ5,{[O7]:["DELETE","/automated-reasoning-policies/{policyArn}",202]},()=>KL5,()=>YL5],hI5=[9,N6,qJ5,{[O7]:["DELETE","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}",202]},()=>AL5,()=>qL5],II5=[9,N6,_J5,{[O7]:["DELETE","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",202]},()=>zL5,()=>wL5],bI5=[9,N6,jJ5,{[O7]:["DELETE","/custom-models/{modelIdentifier}",200]},()=>OL5,()=>HL5],xI5=[9,N6,JJ5,{[O7]:["DELETE","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>_L5,()=>$L5],uI5=[9,N6,WJ5,{[O7]:["POST","/delete-foundation-model-agreement",202]},()=>jL5,()=>JL5],BI5=[9,N6,fJ5,{[O7]:["DELETE","/guardrails/{guardrailIdentifier}",202]},()=>ML5,()=>DL5],mI5=[9,N6,NJ5,{[O7]:["DELETE","/imported-models/{modelIdentifier}",200]},()=>XL5,()=>PL5],gI5=[9,N6,EJ5,{[O7]:["DELETE","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>WL5,()=>ZL5],FI5=[9,N6,hJ5,{[O7]:["DELETE","/marketplace-model/endpoints/{endpointArn}",200]},()=>GL5,()=>fL5],QI5=[9,N6,RJ5,{[O7]:["DELETE","/logging/modelinvocations",200]},()=>TL5,()=>VL5],UI5=[9,N6,cJ5,{[O7]:["DELETE","/prompt-routers/{promptRouterArn}",200]},()=>NL5,()=>vL5],pI5=[9,N6,gJ5,{[O7]:["DELETE","/provisioned-model-throughput/{provisionedModelId}",200]},()=>kL5,()=>EL5],dI5=[9,N6,BJ5,{[O7]:["DELETE","/marketplace-model/endpoints/{endpointArn}/registration",200]},()=>LL5,()=>yL5],cI5=[9,N6,lJ5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/export",200]},()=>QL5,()=>UL5],lI5=[9,N6,KD5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}",200]},()=>Yy5,()=>zy5],iI5=[9,N6,uM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations",200]},()=>oL5,()=>aL5],nI5=[9,N6,gM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}",200]},()=>sL5,()=>tL5],rI5=[9,N6,QM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/result-assets",200]},()=>eL5,()=>Ay5],oI5=[9,N6,lM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/scenarios",200]},()=>qy5,()=>Ky5],aI5=[9,N6,aM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>wy5,()=>_y5],sI5=[9,N6,eM5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-cases/{testCaseId}/test-results",200]},()=>$y5,()=>Oy5],tI5=[9,N6,TD5,{[O7]:["GET","/custom-models/{modelIdentifier}",200]},()=>Jy5,()=>My5],eI5=[9,N6,VD5,{[O7]:["GET","/model-customization/custom-model-deployments/{customModelDeploymentIdentifier}",200]},()=>Hy5,()=>jy5],Ab5=[9,N6,ID5,{[O7]:["GET","/evaluation-jobs/{jobIdentifier}",200]},()=>Dy5,()=>Xy5],qb5=[9,N6,uD5,{[O7]:["GET","/foundation-models/{modelIdentifier}",200]},()=>Zy5,()=>Gy5],Kb5=[9,N6,BD5,{[O7]:["GET","/foundation-model-availability/{modelId}",200]},()=>Py5,()=>Wy5],Yb5=[9,N6,dD5,{[O7]:["GET","/guardrails/{guardrailIdentifier}",200]},()=>fy5,()=>Ty5],zb5=[9,N6,iD5,{[O7]:["GET","/imported-models/{modelIdentifier}",200]},()=>Vy5,()=>Ny5],wb5=[9,N6,oD5,{[O7]:["GET","/inference-profiles/{inferenceProfileIdentifier}",200]},()=>vy5,()=>ky5],_b5=[9,N6,XX5,{[O7]:["GET","/marketplace-model/endpoints/{endpointArn}",200]},()=>Ey5,()=>Ly5],$b5=[9,N6,eD5,{[O7]:["GET","/model-copy-jobs/{jobArn}",200]},()=>yy5,()=>Ry5],Ob5=[9,N6,zX5,{[O7]:["GET","/model-customization-jobs/{jobIdentifier}",200]},()=>Sy5,()=>Cy5],Hb5=[9,N6,wX5,{[O7]:["GET","/model-import-jobs/{jobIdentifier}",200]},()=>hy5,()=>Iy5],jb5=[9,N6,jX5,{[O7]:["GET","/model-invocation-job/{jobIdentifier}",200]},()=>by5,()=>xy5],Jb5=[9,N6,JX5,{[O7]:["GET","/logging/modelinvocations",200]},()=>uy5,()=>By5],Mb5=[9,N6,CX5,{[O7]:["GET","/prompt-routers/{promptRouterArn}",200]},()=>my5,()=>gy5],Db5=[9,N6,yX5,{[O7]:["GET","/provisioned-model-throughput/{provisionedModelId}",200]},()=>Fy5,()=>Qy5],Xb5=[9,N6,YP5,{[O7]:["GET","/use-case-for-model-access",200]},()=>Uy5,()=>py5],Pb5=[9,N6,BP5,{[O7]:["GET","/automated-reasoning-policies",200]},()=>LR5,()=>yR5],Wb5=[9,N6,mP5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows",200]},()=>RR5,()=>SR5],Zb5=[9,N6,pP5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/test-cases",200]},()=>CR5,()=>hR5],Gb5=[9,N6,lP5,{[O7]:["GET","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-results",200]},()=>IR5,()=>bR5],fb5=[9,N6,aP5,{[O7]:["GET","/model-customization/custom-model-deployments",200]},()=>xR5,()=>uR5],Tb5=[9,N6,oP5,{[O7]:["GET","/custom-models",200]},()=>BR5,()=>mR5],Vb5=[9,N6,q05,{[O7]:["GET","/evaluation-jobs",200]},()=>gR5,()=>FR5],Nb5=[9,N6,w05,{[O7]:["GET","/list-foundation-model-agreement-offers/{modelId}",200]},()=>QR5,()=>UR5],vb5=[9,N6,z05,{[O7]:["GET","/foundation-models",200]},()=>pR5,()=>dR5],kb5=[9,N6,j05,{[O7]:["GET","/guardrails",200]},()=>cR5,()=>lR5],Eb5=[9,N6,D05,{[O7]:["GET","/imported-models",200]},()=>iR5,()=>nR5],Lb5=[9,N6,W05,{[O7]:["GET","/inference-profiles",200]},()=>rR5,()=>oR5],yb5=[9,N6,h05,{[O7]:["GET","/marketplace-model/endpoints",200]},()=>aR5,()=>sR5],Rb5=[9,N6,f05,{[O7]:["GET","/model-copy-jobs",200]},()=>tR5,()=>eR5],Sb5=[9,N6,k05,{[O7]:["GET","/model-customization-jobs",200]},()=>AS5,()=>qS5],Cb5=[9,N6,E05,{[O7]:["GET","/model-import-jobs",200]},()=>KS5,()=>YS5],hb5=[9,N6,C05,{[O7]:["GET","/model-invocation-jobs",200]},()=>zS5,()=>wS5],Ib5=[9,N6,m05,{[O7]:["GET","/prompt-routers",200]},()=>_S5,()=>$S5],bb5=[9,N6,x05,{[O7]:["GET","/provisioned-model-throughputs",200]},()=>OS5,()=>HS5],xb5=[9,N6,U05,{[O7]:["POST","/listTagsForResource",200]},()=>jS5,()=>JS5],ub5=[9,N6,WW5,{[O7]:["PUT","/logging/modelinvocations",200]},()=>yS5,()=>RS5],Bb5=[9,N6,RW5,{[O7]:["POST","/use-case-for-model-access",201]},()=>SS5,()=>CS5],mb5=[9,N6,lW5,{[O7]:["POST","/marketplace-model/endpoints/{endpointIdentifier}/registration",200]},()=>bS5,()=>xS5],gb5=[9,N6,eW5,{[O7]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowType}/start",200]},()=>lS5,()=>iS5],Fb5=[9,N6,KZ5,{[O7]:["POST","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/test-workflows",200]},()=>nS5,()=>rS5],Qb5=[9,N6,OZ5,{[O7]:["POST","/evaluation-job/{jobIdentifier}/stop",200]},()=>oS5,()=>aS5],Ub5=[9,N6,JZ5,{[O7]:["POST","/model-customization-jobs/{jobIdentifier}/stop",200]},()=>sS5,()=>tS5],pb5=[9,N6,PZ5,{[O7]:["POST","/model-invocation-job/{jobIdentifier}/stop",200]},()=>eS5,()=>AC5],db5=[9,N6,bZ5,{[O7]:["POST","/tagResource",200]},()=>YC5,()=>zC5],cb5=[9,N6,AG5,{[O7]:["POST","/untagResource",200]},()=>JC5,()=>MC5],lb5=[9,N6,BZ5,{[O7]:["PATCH","/automated-reasoning-policies/{policyArn}",200]},()=>PC5,()=>WC5],ib5=[9,N6,mZ5,{[O7]:["PATCH","/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations",200]},()=>DC5,()=>XC5],nb5=[9,N6,pZ5,{[O7]:["PATCH","/automated-reasoning-policies/{policyArn}/test-cases/{testCaseId}",200]},()=>ZC5,()=>GC5],rb5=[9,N6,lZ5,{[O7]:["PUT","/guardrails/{guardrailIdentifier}",202]},()=>fC5,()=>TC5],ob5=[9,N6,rZ5,{[O7]:["PATCH","/marketplace-model/endpoints/{endpointArn}",200]},()=>VC5,()=>NC5],ab5=[9,N6,sZ5,{[O7]:["PATCH","/provisioned-model-throughput/{provisionedModelId}",200]},()=>vC5,()=>kC5];class k_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","BatchDeleteEvaluationJob",{}).n("BedrockClient","BatchDeleteEvaluationJobCommand").sc(JI5).build(){}class E_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CancelAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","CancelAutomatedReasoningPolicyBuildWorkflowCommand").sc(MI5).build(){}class L_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicy",{}).n("BedrockClient","CreateAutomatedReasoningPolicyCommand").sc(DI5).build(){}class y_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","CreateAutomatedReasoningPolicyTestCaseCommand").sc(XI5).build(){}class R_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateAutomatedReasoningPolicyVersion",{}).n("BedrockClient","CreateAutomatedReasoningPolicyVersionCommand").sc(PI5).build(){}class S_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateCustomModel",{}).n("BedrockClient","CreateCustomModelCommand").sc(WI5).build(){}class C_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateCustomModelDeployment",{}).n("BedrockClient","CreateCustomModelDeploymentCommand").sc(ZI5).build(){}class h_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateEvaluationJob",{}).n("BedrockClient","CreateEvaluationJobCommand").sc(GI5).build(){}class I_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateFoundationModelAgreement",{}).n("BedrockClient","CreateFoundationModelAgreementCommand").sc(fI5).build(){}class b_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateGuardrail",{}).n("BedrockClient","CreateGuardrailCommand").sc(TI5).build(){}class x_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateGuardrailVersion",{}).n("BedrockClient","CreateGuardrailVersionCommand").sc(VI5).build(){}class u_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateInferenceProfile",{}).n("BedrockClient","CreateInferenceProfileCommand").sc(NI5).build(){}class B_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateMarketplaceModelEndpoint",{}).n("BedrockClient","CreateMarketplaceModelEndpointCommand").sc(vI5).build(){}class m_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCopyJob",{}).n("BedrockClient","CreateModelCopyJobCommand").sc(kI5).build(){}class g_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCustomizationJob",{}).n("BedrockClient","CreateModelCustomizationJobCommand").sc(EI5).build(){}class F_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelImportJob",{}).n("BedrockClient","CreateModelImportJobCommand").sc(LI5).build(){}class Q_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelInvocationJob",{}).n("BedrockClient","CreateModelInvocationJobCommand").sc(yI5).build(){}class U_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreatePromptRouter",{}).n("BedrockClient","CreatePromptRouterCommand").sc(RI5).build(){}class p_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateProvisionedModelThroughput",{}).n("BedrockClient","CreateProvisionedModelThroughputCommand").sc(SI5).build(){}class d_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyBuildWorkflowCommand").sc(hI5).build(){}class c_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicy",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyCommand").sc(CI5).build(){}class l_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","DeleteAutomatedReasoningPolicyTestCaseCommand").sc(II5).build(){}class i_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteCustomModel",{}).n("BedrockClient","DeleteCustomModelCommand").sc(bI5).build(){}class n_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteCustomModelDeployment",{}).n("BedrockClient","DeleteCustomModelDeploymentCommand").sc(xI5).build(){}class r_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteFoundationModelAgreement",{}).n("BedrockClient","DeleteFoundationModelAgreementCommand").sc(uI5).build(){}class o_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteGuardrail",{}).n("BedrockClient","DeleteGuardrailCommand").sc(BI5).build(){}class a_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteImportedModel",{}).n("BedrockClient","DeleteImportedModelCommand").sc(mI5).build(){}class s_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteInferenceProfile",{}).n("BedrockClient","DeleteInferenceProfileCommand").sc(gI5).build(){}class t_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteMarketplaceModelEndpoint",{}).n("BedrockClient","DeleteMarketplaceModelEndpointCommand").sc(FI5).build(){}class e_8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteModelInvocationLoggingConfiguration",{}).n("BedrockClient","DeleteModelInvocationLoggingConfigurationCommand").sc(QI5).build(){}class A$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeletePromptRouter",{}).n("BedrockClient","DeletePromptRouterCommand").sc(UI5).build(){}class q$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeleteProvisionedModelThroughput",{}).n("BedrockClient","DeleteProvisionedModelThroughputCommand").sc(pI5).build(){}class K$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","DeregisterMarketplaceModelEndpoint",{}).n("BedrockClient","DeregisterMarketplaceModelEndpointCommand").sc(dI5).build(){}class Y$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ExportAutomatedReasoningPolicyVersion",{}).n("BedrockClient","ExportAutomatedReasoningPolicyVersionCommand").sc(cI5).build(){}class z$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyAnnotations",{}).n("BedrockClient","GetAutomatedReasoningPolicyAnnotationsCommand").sc(iI5).build(){}class w$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","GetAutomatedReasoningPolicyBuildWorkflowCommand").sc(nI5).build(){}class _$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyBuildWorkflowResultAssets",{}).n("BedrockClient","GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand").sc(rI5).build(){}class $$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicy",{}).n("BedrockClient","GetAutomatedReasoningPolicyCommand").sc(lI5).build(){}class O$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyNextScenario",{}).n("BedrockClient","GetAutomatedReasoningPolicyNextScenarioCommand").sc(oI5).build(){}class H$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","GetAutomatedReasoningPolicyTestCaseCommand").sc(aI5).build(){}class j$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetAutomatedReasoningPolicyTestResult",{}).n("BedrockClient","GetAutomatedReasoningPolicyTestResultCommand").sc(sI5).build(){}class J$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetCustomModel",{}).n("BedrockClient","GetCustomModelCommand").sc(tI5).build(){}class M$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetCustomModelDeployment",{}).n("BedrockClient","GetCustomModelDeploymentCommand").sc(eI5).build(){}class D$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetEvaluationJob",{}).n("BedrockClient","GetEvaluationJobCommand").sc(Ab5).build(){}class X$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetFoundationModelAvailability",{}).n("BedrockClient","GetFoundationModelAvailabilityCommand").sc(Kb5).build(){}class P$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetFoundationModel",{}).n("BedrockClient","GetFoundationModelCommand").sc(qb5).build(){}class W$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetGuardrail",{}).n("BedrockClient","GetGuardrailCommand").sc(Yb5).build(){}class Z$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetImportedModel",{}).n("BedrockClient","GetImportedModelCommand").sc(zb5).build(){}class G$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetInferenceProfile",{}).n("BedrockClient","GetInferenceProfileCommand").sc(wb5).build(){}class f$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetMarketplaceModelEndpoint",{}).n("BedrockClient","GetMarketplaceModelEndpointCommand").sc(_b5).build(){}class T$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCopyJob",{}).n("BedrockClient","GetModelCopyJobCommand").sc($b5).build(){}class V$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCustomizationJob",{}).n("BedrockClient","GetModelCustomizationJobCommand").sc(Ob5).build(){}class N$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelImportJob",{}).n("BedrockClient","GetModelImportJobCommand").sc(Hb5).build(){}class v$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelInvocationJob",{}).n("BedrockClient","GetModelInvocationJobCommand").sc(jb5).build(){}class k$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelInvocationLoggingConfiguration",{}).n("BedrockClient","GetModelInvocationLoggingConfigurationCommand").sc(Jb5).build(){}class E$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetPromptRouter",{}).n("BedrockClient","GetPromptRouterCommand").sc(Mb5).build(){}class L$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetProvisionedModelThroughput",{}).n("BedrockClient","GetProvisionedModelThroughputCommand").sc(Db5).build(){}class y$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetUseCaseForModelAccess",{}).n("BedrockClient","GetUseCaseForModelAccessCommand").sc(Xb5).build(){}class H$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicies",{}).n("BedrockClient","ListAutomatedReasoningPoliciesCommand").sc(Pb5).build(){}class j$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyBuildWorkflows",{}).n("BedrockClient","ListAutomatedReasoningPolicyBuildWorkflowsCommand").sc(Wb5).build(){}class J$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyTestCases",{}).n("BedrockClient","ListAutomatedReasoningPolicyTestCasesCommand").sc(Zb5).build(){}class M$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListAutomatedReasoningPolicyTestResults",{}).n("BedrockClient","ListAutomatedReasoningPolicyTestResultsCommand").sc(Gb5).build(){}class D$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListCustomModelDeployments",{}).n("BedrockClient","ListCustomModelDeploymentsCommand").sc(fb5).build(){}class X$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListCustomModels",{}).n("BedrockClient","ListCustomModelsCommand").sc(Tb5).build(){}class P$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListEvaluationJobs",{}).n("BedrockClient","ListEvaluationJobsCommand").sc(Vb5).build(){}class R$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModelAgreementOffers",{}).n("BedrockClient","ListFoundationModelAgreementOffersCommand").sc(Nb5).build(){}class S$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModels",{}).n("BedrockClient","ListFoundationModelsCommand").sc(vb5).build(){}class W$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListGuardrails",{}).n("BedrockClient","ListGuardrailsCommand").sc(kb5).build(){}class Z$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListImportedModels",{}).n("BedrockClient","ListImportedModelsCommand").sc(Eb5).build(){}class G$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListInferenceProfiles",{}).n("BedrockClient","ListInferenceProfilesCommand").sc(Lb5).build(){}class f$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListMarketplaceModelEndpoints",{}).n("BedrockClient","ListMarketplaceModelEndpointsCommand").sc(yb5).build(){}class T$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelCopyJobs",{}).n("BedrockClient","ListModelCopyJobsCommand").sc(Rb5).build(){}class V$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelCustomizationJobs",{}).n("BedrockClient","ListModelCustomizationJobsCommand").sc(Sb5).build(){}class N$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelImportJobs",{}).n("BedrockClient","ListModelImportJobsCommand").sc(Cb5).build(){}class v$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListModelInvocationJobs",{}).n("BedrockClient","ListModelInvocationJobsCommand").sc(hb5).build(){}class k$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListPromptRouters",{}).n("BedrockClient","ListPromptRoutersCommand").sc(Ib5).build(){}class E$1 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListProvisionedModelThroughputs",{}).n("BedrockClient","ListProvisionedModelThroughputsCommand").sc(bb5).build(){}class C$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListTagsForResource",{}).n("BedrockClient","ListTagsForResourceCommand").sc(xb5).build(){}class h$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","PutModelInvocationLoggingConfiguration",{}).n("BedrockClient","PutModelInvocationLoggingConfigurationCommand").sc(ub5).build(){}class I$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","PutUseCaseForModelAccess",{}).n("BedrockClient","PutUseCaseForModelAccessCommand").sc(Bb5).build(){}class b$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","RegisterMarketplaceModelEndpoint",{}).n("BedrockClient","RegisterMarketplaceModelEndpointCommand").sc(mb5).build(){}class x$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StartAutomatedReasoningPolicyBuildWorkflow",{}).n("BedrockClient","StartAutomatedReasoningPolicyBuildWorkflowCommand").sc(gb5).build(){}class u$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StartAutomatedReasoningPolicyTestWorkflow",{}).n("BedrockClient","StartAutomatedReasoningPolicyTestWorkflowCommand").sc(Fb5).build(){}class B$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopEvaluationJob",{}).n("BedrockClient","StopEvaluationJobCommand").sc(Qb5).build(){}class m$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopModelCustomizationJob",{}).n("BedrockClient","StopModelCustomizationJobCommand").sc(Ub5).build(){}class g$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","StopModelInvocationJob",{}).n("BedrockClient","StopModelInvocationJobCommand").sc(pb5).build(){}class F$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","TagResource",{}).n("BedrockClient","TagResourceCommand").sc(db5).build(){}class Q$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UntagResource",{}).n("BedrockClient","UntagResourceCommand").sc(cb5).build(){}class U$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicyAnnotations",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyAnnotationsCommand").sc(ib5).build(){}class p$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicy",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyCommand").sc(lb5).build(){}class d$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateAutomatedReasoningPolicyTestCase",{}).n("BedrockClient","UpdateAutomatedReasoningPolicyTestCaseCommand").sc(nb5).build(){}class c$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateGuardrail",{}).n("BedrockClient","UpdateGuardrailCommand").sc(rb5).build(){}class l$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateMarketplaceModelEndpoint",{}).n("BedrockClient","UpdateMarketplaceModelEndpointCommand").sc(ob5).build(){}class i$8 extends lA.Command.classBuilder().ep($7).m(function(A,q,K,Y){return[w7.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","UpdateProvisionedModelThroughput",{}).n("BedrockClient","UpdateProvisionedModelThroughputCommand").sc(ab5).build(){}var sb5={BatchDeleteEvaluationJobCommand:k_8,CancelAutomatedReasoningPolicyBuildWorkflowCommand:E_8,CreateAutomatedReasoningPolicyCommand:L_8,CreateAutomatedReasoningPolicyTestCaseCommand:y_8,CreateAutomatedReasoningPolicyVersionCommand:R_8,CreateCustomModelCommand:S_8,CreateCustomModelDeploymentCommand:C_8,CreateEvaluationJobCommand:h_8,CreateFoundationModelAgreementCommand:I_8,CreateGuardrailCommand:b_8,CreateGuardrailVersionCommand:x_8,CreateInferenceProfileCommand:u_8,CreateMarketplaceModelEndpointCommand:B_8,CreateModelCopyJobCommand:m_8,CreateModelCustomizationJobCommand:g_8,CreateModelImportJobCommand:F_8,CreateModelInvocationJobCommand:Q_8,CreatePromptRouterCommand:U_8,CreateProvisionedModelThroughputCommand:p_8,DeleteAutomatedReasoningPolicyCommand:c_8,DeleteAutomatedReasoningPolicyBuildWorkflowCommand:d_8,DeleteAutomatedReasoningPolicyTestCaseCommand:l_8,DeleteCustomModelCommand:i_8,DeleteCustomModelDeploymentCommand:n_8,DeleteFoundationModelAgreementCommand:r_8,DeleteGuardrailCommand:o_8,DeleteImportedModelCommand:a_8,DeleteInferenceProfileCommand:s_8,DeleteMarketplaceModelEndpointCommand:t_8,DeleteModelInvocationLoggingConfigurationCommand:e_8,DeletePromptRouterCommand:A$8,DeleteProvisionedModelThroughputCommand:q$8,DeregisterMarketplaceModelEndpointCommand:K$8,ExportAutomatedReasoningPolicyVersionCommand:Y$8,GetAutomatedReasoningPolicyCommand:$$8,GetAutomatedReasoningPolicyAnnotationsCommand:z$8,GetAutomatedReasoningPolicyBuildWorkflowCommand:w$8,GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand:_$8,GetAutomatedReasoningPolicyNextScenarioCommand:O$8,GetAutomatedReasoningPolicyTestCaseCommand:H$8,GetAutomatedReasoningPolicyTestResultCommand:j$8,GetCustomModelCommand:J$8,GetCustomModelDeploymentCommand:M$8,GetEvaluationJobCommand:D$8,GetFoundationModelCommand:P$8,GetFoundationModelAvailabilityCommand:X$8,GetGuardrailCommand:W$8,GetImportedModelCommand:Z$8,GetInferenceProfileCommand:G$8,GetMarketplaceModelEndpointCommand:f$8,GetModelCopyJobCommand:T$8,GetModelCustomizationJobCommand:V$8,GetModelImportJobCommand:N$8,GetModelInvocationJobCommand:v$8,GetModelInvocationLoggingConfigurationCommand:k$8,GetPromptRouterCommand:E$8,GetProvisionedModelThroughputCommand:L$8,GetUseCaseForModelAccessCommand:y$8,ListAutomatedReasoningPoliciesCommand:H$1,ListAutomatedReasoningPolicyBuildWorkflowsCommand:j$1,ListAutomatedReasoningPolicyTestCasesCommand:J$1,ListAutomatedReasoningPolicyTestResultsCommand:M$1,ListCustomModelDeploymentsCommand:D$1,ListCustomModelsCommand:X$1,ListEvaluationJobsCommand:P$1,ListFoundationModelAgreementOffersCommand:R$8,ListFoundationModelsCommand:S$8,ListGuardrailsCommand:W$1,ListImportedModelsCommand:Z$1,ListInferenceProfilesCommand:G$1,ListMarketplaceModelEndpointsCommand:f$1,ListModelCopyJobsCommand:T$1,ListModelCustomizationJobsCommand:V$1,ListModelImportJobsCommand:N$1,ListModelInvocationJobsCommand:v$1,ListPromptRoutersCommand:k$1,ListProvisionedModelThroughputsCommand:E$1,ListTagsForResourceCommand:C$8,PutModelInvocationLoggingConfigurationCommand:h$8,PutUseCaseForModelAccessCommand:I$8,RegisterMarketplaceModelEndpointCommand:b$8,StartAutomatedReasoningPolicyBuildWorkflowCommand:x$8,StartAutomatedReasoningPolicyTestWorkflowCommand:u$8,StopEvaluationJobCommand:B$8,StopModelCustomizationJobCommand:m$8,StopModelInvocationJobCommand:g$8,TagResourceCommand:F$8,UntagResourceCommand:Q$8,UpdateAutomatedReasoningPolicyCommand:p$8,UpdateAutomatedReasoningPolicyAnnotationsCommand:U$8,UpdateAutomatedReasoningPolicyTestCaseCommand:d$8,UpdateGuardrailCommand:c$8,UpdateMarketplaceModelEndpointCommand:l$8,UpdateProvisionedModelThroughputCommand:i$8};class n$8 extends RM{}lA.createAggregatedClient(sb5,n$8);var tb5=LM.createPaginator(RM,H$1,"nextToken","nextToken","maxResults"),eb5=LM.createPaginator(RM,j$1,"nextToken","nextToken","maxResults"),Ax5=LM.createPaginator(RM,J$1,"nextToken","nextToken","maxResults"),qx5=LM.createPaginator(RM,M$1,"nextToken","nextToken","maxResults"),Kx5=LM.createPaginator(RM,D$1,"nextToken","nextToken","maxResults"),Yx5=LM.createPaginator(RM,X$1,"nextToken","nextToken","maxResults"),zx5=LM.createPaginator(RM,P$1,"nextToken","nextToken","maxResults"),wx5=LM.createPaginator(RM,W$1,"nextToken","nextToken","maxResults"),_x5=LM.createPaginator(RM,Z$1,"nextToken","nextToken","maxResults"),$x5=LM.createPaginator(RM,G$1,"nextToken","nextToken","maxResults"),Ox5=LM.createPaginator(RM,f$1,"nextToken","nextToken","maxResults"),Hx5=LM.createPaginator(RM,T$1,"nextToken","nextToken","maxResults"),jx5=LM.createPaginator(RM,V$1,"nextToken","nextToken","maxResults"),Jx5=LM.createPaginator(RM,N$1,"nextToken","nextToken","maxResults"),Mx5=LM.createPaginator(RM,v$1,"nextToken","nextToken","maxResults"),Dx5=LM.createPaginator(RM,k$1,"nextToken","nextToken","maxResults"),Xx5=LM.createPaginator(RM,E$1,"nextToken","nextToken","maxResults"),Px5={AVAILABLE:"AVAILABLE",ERROR:"ERROR",NOT_AVAILABLE:"NOT_AVAILABLE",PENDING:"PENDING"},Wx5={IMPOSSIBLE:"IMPOSSIBLE",INVALID:"INVALID",NO_TRANSLATION:"NO_TRANSLATION",SATISFIABLE:"SATISFIABLE",TOO_COMPLEX:"TOO_COMPLEX",TRANSLATION_AMBIGUOUS:"TRANSLATION_AMBIGUOUS",VALID:"VALID"},Zx5={IMPORT_POLICY:"IMPORT_POLICY",INGEST_CONTENT:"INGEST_CONTENT",REFINE_POLICY:"REFINE_POLICY"},Gx5={PDF:"pdf",TEXT:"txt"},fx5={BUILDING:"BUILDING",CANCELLED:"CANCELLED",CANCEL_REQUESTED:"CANCEL_REQUESTED",COMPLETED:"COMPLETED",FAILED:"FAILED",PREPROCESSING:"PREPROCESSING",SCHEDULED:"SCHEDULED",TESTING:"TESTING"},Tx5={BUILD_LOG:"BUILD_LOG",GENERATED_TEST_CASES:"GENERATED_TEST_CASES",POLICY_DEFINITION:"POLICY_DEFINITION",QUALITY_REPORT:"QUALITY_REPORT"},Vx5={ERROR:"ERROR",INFO:"INFO",WARNING:"WARNING"},Nx5={APPLIED:"APPLIED",FAILED:"FAILED"},vx5={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},kx5={FAILED:"FAILED",PASSED:"PASSED"},Ex5={COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS",NOT_STARTED:"NOT_STARTED",SCHEDULED:"SCHEDULED"},Lx5={INCOMPATIBLE_ENDPOINT:"INCOMPATIBLE_ENDPOINT",REGISTERED:"REGISTERED"},yx5={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},Rx5={CREATION_TIME:"CreationTime"},Sx5={ASCENDING:"Ascending",DESCENDING:"Descending"},Cx5={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING",IMPORTED:"IMPORTED"},hx5={ACTIVE:"Active",CREATING:"Creating",FAILED:"Failed"},Ix5={COMPLETED:"Completed",DELETING:"Deleting",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},bx5={MODEL_EVALUATION:"ModelEvaluation",RAG_EVALUATION:"RagEvaluation"},xx5={CLASSIFICATION:"Classification",CUSTOM:"Custom",GENERATION:"Generation",QUESTION_AND_ANSWER:"QuestionAndAnswer",SUMMARIZATION:"Summarization"},ux5={OPTIMIZED:"optimized",STANDARD:"standard"},Bx5={BYTE_CONTENT:"BYTE_CONTENT",S3:"S3"},mx5={QUERY_DECOMPOSITION:"QUERY_DECOMPOSITION"},gx5={BOOLEAN:"BOOLEAN",NUMBER:"NUMBER",STRING:"STRING",STRING_LIST:"STRING_LIST"},Fx5={HYBRID:"HYBRID",SEMANTIC:"SEMANTIC"},Qx5={ALL:"ALL",SELECTIVE:"SELECTIVE"},Ux5={BEDROCK_RERANKING_MODEL:"BEDROCK_RERANKING_MODEL"},px5={EXTERNAL_SOURCES:"EXTERNAL_SOURCES",KNOWLEDGE_BASE:"KNOWLEDGE_BASE"},dx5={AUTOMATED:"Automated",HUMAN:"Human"},cx5={CREATION_TIME:"CreationTime"},lx5={BLOCK:"BLOCK",NONE:"NONE"},ix5={IMAGE:"IMAGE",TEXT:"TEXT"},nx5={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},rx5={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},ox5={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},ax5={BLOCK:"BLOCK",NONE:"NONE"},sx5={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},tx5={ANONYMIZE:"ANONYMIZE",BLOCK:"BLOCK",NONE:"NONE"},ex5={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},Au5={CLASSIC:"CLASSIC",STANDARD:"STANDARD"},qu5={BLOCK:"BLOCK",NONE:"NONE"},Ku5={DENY:"DENY"},Yu5={BLOCK:"BLOCK",NONE:"NONE"},zu5={PROFANITY:"PROFANITY"},wu5={CREATING:"CREATING",DELETING:"DELETING",FAILED:"FAILED",READY:"READY",UPDATING:"UPDATING",VERSIONING:"VERSIONING"},_u5={ACTIVE:"ACTIVE"},$u5={APPLICATION:"APPLICATION",SYSTEM_DEFINED:"SYSTEM_DEFINED"},Ou5={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},Hu5={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},ju5={JSONL:"JSONL"},Ju5={COMPLETED:"Completed",EXPIRED:"Expired",FAILED:"Failed",IN_PROGRESS:"InProgress",PARTIALLY_COMPLETED:"PartiallyCompleted",SCHEDULED:"Scheduled",STOPPED:"Stopped",STOPPING:"Stopping",SUBMITTED:"Submitted",VALIDATING:"Validating"},Mu5={CONTINUED_PRE_TRAINING:"CONTINUED_PRE_TRAINING",DISTILLATION:"DISTILLATION",FINE_TUNING:"FINE_TUNING"},Du5={ON_DEMAND:"ON_DEMAND",PROVISIONED:"PROVISIONED"},Xu5={EMBEDDING:"EMBEDDING",IMAGE:"IMAGE",TEXT:"TEXT"},Pu5={ACTIVE:"ACTIVE",LEGACY:"LEGACY"},Wu5={AVAILABLE:"AVAILABLE"},Zu5={CUSTOM:"custom",DEFAULT:"default"},Gu5={ONE_MONTH:"OneMonth",SIX_MONTHS:"SixMonths"},fu5={CREATING:"Creating",FAILED:"Failed",IN_SERVICE:"InService",UPDATING:"Updating"},Tu5={CREATION_TIME:"CreationTime"},Vu5={AUTHORIZED:"AUTHORIZED",NOT_AUTHORIZED:"NOT_AUTHORIZED"},Nu5={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},vu5={AVAILABLE:"AVAILABLE",NOT_AVAILABLE:"NOT_AVAILABLE"},ku5={ALL:"ALL",PUBLIC:"PUBLIC"},Eu5={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"},Lu5={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",NOT_STARTED:"NotStarted",STOPPED:"Stopped",STOPPING:"Stopping"},yu5={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress",STOPPED:"Stopped",STOPPING:"Stopping"};Object.defineProperty(r$8,"$Command",{enumerable:!0,get:function(){return lA.Command}});Object.defineProperty(r$8,"__Client",{enumerable:!0,get:function(){return lA.Client}});r$8.AccessDeniedException=qW7;r$8.AgreementStatus=Px5;r$8.ApplicationType=bx5;r$8.AttributeType=gx5;r$8.AuthorizationStatus=Vu5;r$8.AutomatedReasoningCheckLogicWarningType=vx5;r$8.AutomatedReasoningCheckResult=Wx5;r$8.AutomatedReasoningPolicyAnnotationStatus=Nx5;r$8.AutomatedReasoningPolicyBuildDocumentContentType=Gx5;r$8.AutomatedReasoningPolicyBuildMessageType=Vx5;r$8.AutomatedReasoningPolicyBuildResultAssetType=Tx5;r$8.AutomatedReasoningPolicyBuildWorkflowStatus=fx5;r$8.AutomatedReasoningPolicyBuildWorkflowType=Zx5;r$8.AutomatedReasoningPolicyTestRunResult=kx5;r$8.AutomatedReasoningPolicyTestRunStatus=Ex5;r$8.BatchDeleteEvaluationJobCommand=k_8;r$8.Bedrock=n$8;r$8.BedrockClient=RM;r$8.BedrockServiceException=FR;r$8.CancelAutomatedReasoningPolicyBuildWorkflowCommand=E_8;r$8.CommitmentDuration=Gu5;r$8.ConflictException=_W7;r$8.CreateAutomatedReasoningPolicyCommand=L_8;r$8.CreateAutomatedReasoningPolicyTestCaseCommand=y_8;r$8.CreateAutomatedReasoningPolicyVersionCommand=R_8;r$8.CreateCustomModelCommand=S_8;r$8.CreateCustomModelDeploymentCommand=C_8;r$8.CreateEvaluationJobCommand=h_8;r$8.CreateFoundationModelAgreementCommand=I_8;r$8.CreateGuardrailCommand=b_8;r$8.CreateGuardrailVersionCommand=x_8;r$8.CreateInferenceProfileCommand=u_8;r$8.CreateMarketplaceModelEndpointCommand=B_8;r$8.CreateModelCopyJobCommand=m_8;r$8.CreateModelCustomizationJobCommand=g_8;r$8.CreateModelImportJobCommand=F_8;r$8.CreateModelInvocationJobCommand=Q_8;r$8.CreatePromptRouterCommand=U_8;r$8.CreateProvisionedModelThroughputCommand=p_8;r$8.CustomModelDeploymentStatus=yx5;r$8.CustomizationType=Cx5;r$8.DeleteAutomatedReasoningPolicyBuildWorkflowCommand=d_8;r$8.DeleteAutomatedReasoningPolicyCommand=c_8;r$8.DeleteAutomatedReasoningPolicyTestCaseCommand=l_8;r$8.DeleteCustomModelCommand=i_8;r$8.DeleteCustomModelDeploymentCommand=n_8;r$8.DeleteFoundationModelAgreementCommand=r_8;r$8.DeleteGuardrailCommand=o_8;r$8.DeleteImportedModelCommand=a_8;r$8.DeleteInferenceProfileCommand=s_8;r$8.DeleteMarketplaceModelEndpointCommand=t_8;r$8.DeleteModelInvocationLoggingConfigurationCommand=e_8;r$8.DeletePromptRouterCommand=A$8;r$8.DeleteProvisionedModelThroughputCommand=q$8;r$8.DeregisterMarketplaceModelEndpointCommand=K$8;r$8.EntitlementAvailability=Nu5;r$8.EvaluationJobStatus=Ix5;r$8.EvaluationJobType=dx5;r$8.EvaluationTaskType=xx5;r$8.ExportAutomatedReasoningPolicyVersionCommand=Y$8;r$8.ExternalSourceType=Bx5;r$8.FineTuningJobStatus=yu5;r$8.FoundationModelLifecycleStatus=Pu5;r$8.GetAutomatedReasoningPolicyAnnotationsCommand=z$8;r$8.GetAutomatedReasoningPolicyBuildWorkflowCommand=w$8;r$8.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand=_$8;r$8.GetAutomatedReasoningPolicyCommand=$$8;r$8.GetAutomatedReasoningPolicyNextScenarioCommand=O$8;r$8.GetAutomatedReasoningPolicyTestCaseCommand=H$8;r$8.GetAutomatedReasoningPolicyTestResultCommand=j$8;r$8.GetCustomModelCommand=J$8;r$8.GetCustomModelDeploymentCommand=M$8;r$8.GetEvaluationJobCommand=D$8;r$8.GetFoundationModelAvailabilityCommand=X$8;r$8.GetFoundationModelCommand=P$8;r$8.GetGuardrailCommand=W$8;r$8.GetImportedModelCommand=Z$8;r$8.GetInferenceProfileCommand=G$8;r$8.GetMarketplaceModelEndpointCommand=f$8;r$8.GetModelCopyJobCommand=T$8;r$8.GetModelCustomizationJobCommand=V$8;r$8.GetModelImportJobCommand=N$8;r$8.GetModelInvocationJobCommand=v$8;r$8.GetModelInvocationLoggingConfigurationCommand=k$8;r$8.GetPromptRouterCommand=E$8;r$8.GetProvisionedModelThroughputCommand=L$8;r$8.GetUseCaseForModelAccessCommand=y$8;r$8.GuardrailContentFilterAction=lx5;r$8.GuardrailContentFilterType=rx5;r$8.GuardrailContentFiltersTierName=ox5;r$8.GuardrailContextualGroundingAction=ax5;r$8.GuardrailContextualGroundingFilterType=sx5;r$8.GuardrailFilterStrength=nx5;r$8.GuardrailManagedWordsType=zu5;r$8.GuardrailModality=ix5;r$8.GuardrailPiiEntityType=ex5;r$8.GuardrailSensitiveInformationAction=tx5;r$8.GuardrailStatus=wu5;r$8.GuardrailTopicAction=qu5;r$8.GuardrailTopicType=Ku5;r$8.GuardrailTopicsTierName=Au5;r$8.GuardrailWordAction=Yu5;r$8.InferenceProfileStatus=_u5;r$8.InferenceProfileType=$u5;r$8.InferenceType=Du5;r$8.InternalServerException=KW7;r$8.JobStatusDetails=Lu5;r$8.ListAutomatedReasoningPoliciesCommand=H$1;r$8.ListAutomatedReasoningPolicyBuildWorkflowsCommand=j$1;r$8.ListAutomatedReasoningPolicyTestCasesCommand=J$1;r$8.ListAutomatedReasoningPolicyTestResultsCommand=M$1;r$8.ListCustomModelDeploymentsCommand=D$1;r$8.ListCustomModelsCommand=X$1;r$8.ListEvaluationJobsCommand=P$1;r$8.ListFoundationModelAgreementOffersCommand=R$8;r$8.ListFoundationModelsCommand=S$8;r$8.ListGuardrailsCommand=W$1;r$8.ListImportedModelsCommand=Z$1;r$8.ListInferenceProfilesCommand=G$1;r$8.ListMarketplaceModelEndpointsCommand=f$1;r$8.ListModelCopyJobsCommand=T$1;r$8.ListModelCustomizationJobsCommand=V$1;r$8.ListModelImportJobsCommand=N$1;r$8.ListModelInvocationJobsCommand=v$1;r$8.ListPromptRoutersCommand=k$1;r$8.ListProvisionedModelThroughputsCommand=E$1;r$8.ListTagsForResourceCommand=C$8;r$8.ModelCopyJobStatus=Ou5;r$8.ModelCustomization=Mu5;r$8.ModelCustomizationJobStatus=Eu5;r$8.ModelImportJobStatus=Hu5;r$8.ModelInvocationJobStatus=Ju5;r$8.ModelModality=Xu5;r$8.ModelStatus=hx5;r$8.OfferType=ku5;r$8.PerformanceConfigLatency=ux5;r$8.PromptRouterStatus=Wu5;r$8.PromptRouterType=Zu5;r$8.ProvisionedModelStatus=fu5;r$8.PutModelInvocationLoggingConfigurationCommand=h$8;r$8.PutUseCaseForModelAccessCommand=I$8;r$8.QueryTransformationType=mx5;r$8.RegionAvailability=vu5;r$8.RegisterMarketplaceModelEndpointCommand=b$8;r$8.RerankingMetadataSelectionMode=Qx5;r$8.ResourceInUseException=HW7;r$8.ResourceNotFoundException=YW7;r$8.RetrieveAndGenerateType=px5;r$8.S3InputFormat=ju5;r$8.SearchType=Fx5;r$8.ServiceQuotaExceededException=$W7;r$8.ServiceUnavailableException=jW7;r$8.SortByProvisionedModels=Tu5;r$8.SortJobsBy=cx5;r$8.SortModelsBy=Rx5;r$8.SortOrder=Sx5;r$8.StartAutomatedReasoningPolicyBuildWorkflowCommand=x$8;r$8.StartAutomatedReasoningPolicyTestWorkflowCommand=u$8;r$8.Status=Lx5;r$8.StopEvaluationJobCommand=B$8;r$8.StopModelCustomizationJobCommand=m$8;r$8.StopModelInvocationJobCommand=g$8;r$8.TagResourceCommand=F$8;r$8.ThrottlingException=zW7;r$8.TooManyTagsException=OW7;r$8.UntagResourceCommand=Q$8;r$8.UpdateAutomatedReasoningPolicyAnnotationsCommand=U$8;r$8.UpdateAutomatedReasoningPolicyCommand=p$8;r$8.UpdateAutomatedReasoningPolicyTestCaseCommand=d$8;r$8.UpdateGuardrailCommand=c$8;r$8.UpdateMarketplaceModelEndpointCommand=l$8;r$8.UpdateProvisionedModelThroughputCommand=i$8;r$8.ValidationException=wW7;r$8.VectorSearchRerankingConfigurationType=Ux5;r$8.paginateListAutomatedReasoningPolicies=tb5;r$8.paginateListAutomatedReasoningPolicyBuildWorkflows=eb5;r$8.paginateListAutomatedReasoningPolicyTestCases=Ax5;r$8.paginateListAutomatedReasoningPolicyTestResults=qx5;r$8.paginateListCustomModelDeployments=Kx5;r$8.paginateListCustomModels=Yx5;r$8.paginateListEvaluationJobs=zx5;r$8.paginateListGuardrails=wx5;r$8.paginateListImportedModels=_x5;r$8.paginateListInferenceProfiles=$x5;r$8.paginateListMarketplaceModelEndpoints=Ox5;r$8.paginateListModelCopyJobs=Hx5;r$8.paginateListModelCustomizationJobs=jx5;r$8.paginateListModelImportJobs=Jx5;r$8.paginateListModelInvocationJobs=Mx5;r$8.paginateListPromptRouters=Dx5;r$8.paginateListProvisionedModelThroughputs=Xx5});var lG7=C((OF5)=>{OF5.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(OF5.HttpAuthLocation||(OF5.HttpAuthLocation={}));OF5.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(OF5.HttpApiKeyAuthLocation||(OF5.HttpApiKeyAuthLocation={}));OF5.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(OF5.EndpointURLScheme||(OF5.EndpointURLScheme={}));OF5.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(OF5.AlgorithmId||(OF5.AlgorithmId={}));var YF5=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>OF5.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>OF5.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},zF5=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},wF5=(A)=>{return YF5(A)},_F5=(A)=>{return zF5(A)};OF5.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(OF5.FieldPosition||(OF5.FieldPosition={}));var $F5="__smithy_context";OF5.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(OF5.IniSectionType||(OF5.IniSectionType={}));OF5.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(OF5.RequestHandlerProtocol||(OF5.RequestHandlerProtocol={}));OF5.SMITHY_CONTEXT_KEY=$F5;OF5.getDefaultClientConfiguration=wF5;OF5.resolveDefaultRuntimeConfig=_F5});var oG7=C((ZF5)=>{var MF5=lG7(),DF5=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},XF5=(A)=>{return{httpHandler:A.httpHandler()}};class iG7{name;kind;values;constructor({name:A,kind:q=MF5.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class nG7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class y$1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new y$1({...A,headers:{...A.headers}});if(q.query)q.query=PF5(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return y$1.clone(this)}}function PF5(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class rG7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function WF5(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}ZF5.Field=iG7;ZF5.Fields=nG7;ZF5.HttpRequest=y$1;ZF5.HttpResponse=rG7;ZF5.getHttpHandlerExtensionConfiguration=DF5;ZF5.isValidHostname=WF5;ZF5.resolveHttpHandlerRuntimeConfig=XF5});var qf7=C((yF5)=>{var aG7=oG7();function EF5(A){let{signer:q,signer:K}=A,Y=Object.assign(A,{eventSigner:q,messageSigner:K}),z=Y.eventStreamPayloadHandlerProvider(Y);return Object.assign(Y,{eventStreamPayloadHandler:z})}var sG7=(A)=>(q,K)=>async(Y)=>{let{request:z}=Y;if(!aG7.HttpRequest.isInstance(z))return q(Y);return A.eventStreamPayloadHandler.handle(q,Y,K)},tG7={tags:["EVENT_STREAM","SIGNATURE","HANDLE"],name:"eventStreamHandlingMiddleware",relation:"after",toMiddleware:"awsAuthMiddleware",override:!0},eG7=(A)=>async(q)=>{let{request:K}=q;if(!aG7.HttpRequest.isInstance(K))return A(q);return K.headers={...K.headers,"content-type":"application/vnd.amazon.eventstream","x-amz-content-sha256":"STREAMING-AWS4-HMAC-SHA256-EVENTS"},A({...q,request:K})},Af7={step:"build",tags:["EVENT_STREAM","HEADER","CONTENT_TYPE","CONTENT_SHA256"],name:"eventStreamHeaderMiddleware",override:!0},LF5=(A)=>({applyToStack:(q)=>{q.addRelativeTo(sG7(A),tG7),q.add(eG7,Af7)}});yF5.eventStreamHandlingMiddleware=sG7;yF5.eventStreamHandlingMiddlewareOptions=tG7;yF5.eventStreamHeaderMiddleware=eG7;yF5.eventStreamHeaderMiddlewareOptions=Af7;yF5.getEventStreamPlugin=LF5;yF5.resolveEventStreamConfig=EF5});var zf7=C((WX2,Yf7)=>{var{defineProperty:R$1,getOwnPropertyDescriptor:xF5,getOwnPropertyNames:uF5}=Object,BF5=Object.prototype.hasOwnProperty,mF5=(A,q)=>R$1(A,"name",{value:q,configurable:!0}),gF5=(A,q)=>{for(var K in q)R$1(A,K,{get:q[K],enumerable:!0})},FF5=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of uF5(q))if(!BF5.call(A,z)&&z!==K)R$1(A,z,{get:()=>q[z],enumerable:!(Y=xF5(q,z))||Y.enumerable})}return A},QF5=(A)=>FF5(R$1({},"__esModule",{value:!0}),A),Kf7={};gF5(Kf7,{isArrayBuffer:()=>UF5});Yf7.exports=QF5(Kf7);var UF5=mF5((A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]","isArrayBuffer")});var A56=C((ZX2,$f7)=>{var{defineProperty:S$1,getOwnPropertyDescriptor:pF5,getOwnPropertyNames:dF5}=Object,cF5=Object.prototype.hasOwnProperty,wf7=(A,q)=>S$1(A,"name",{value:q,configurable:!0}),lF5=(A,q)=>{for(var K in q)S$1(A,K,{get:q[K],enumerable:!0})},iF5=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of dF5(q))if(!cF5.call(A,z)&&z!==K)S$1(A,z,{get:()=>q[z],enumerable:!(Y=pF5(q,z))||Y.enumerable})}return A},nF5=(A)=>iF5(S$1({},"__esModule",{value:!0}),A),_f7={};lF5(_f7,{fromArrayBuffer:()=>oF5,fromString:()=>aF5});$f7.exports=nF5(_f7);var rF5=zf7(),qO8=g6("buffer"),oF5=wf7((A,q=0,K=A.byteLength-q)=>{if(!(0,rF5.isArrayBuffer)(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return qO8.Buffer.from(A,q,K)},"fromArrayBuffer"),aF5=wf7((A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?qO8.Buffer.from(A,q):qO8.Buffer.from(A)},"fromString")});var Mf7=C((GX2,Jf7)=>{var{defineProperty:C$1,getOwnPropertyDescriptor:sF5,getOwnPropertyNames:tF5}=Object,eF5=Object.prototype.hasOwnProperty,KO8=(A,q)=>C$1(A,"name",{value:q,configurable:!0}),AQ5=(A,q)=>{for(var K in q)C$1(A,K,{get:q[K],enumerable:!0})},qQ5=(A,q,K,Y)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let z of tF5(q))if(!eF5.call(A,z)&&z!==K)C$1(A,z,{get:()=>q[z],enumerable:!(Y=sF5(q,z))||Y.enumerable})}return A},KQ5=(A)=>qQ5(C$1({},"__esModule",{value:!0}),A),Of7={};AQ5(Of7,{fromUtf8:()=>jf7,toUint8Array:()=>YQ5,toUtf8:()=>zQ5});Jf7.exports=KQ5(Of7);var Hf7=A56(),jf7=KO8((A)=>{let q=(0,Hf7.fromString)(A,"utf8");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),YQ5=KO8((A)=>{if(typeof A==="string")return jf7(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)},"toUint8Array"),zQ5=KO8((A)=>{if(typeof A==="string")return A;if(typeof A!=="object"||typeof A.byteOffset!=="number"||typeof A.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,Hf7.fromArrayBuffer)(A.buffer,A.byteOffset,A.byteLength).toString("utf8")},"toUtf8")});var Pf7=C((Df7)=>{Object.defineProperty(Df7,"__esModule",{value:!0});Df7.convertToBuffer=void 0;var wQ5=Mf7(),_Q5=typeof Buffer<"u"&&Buffer.from?function(A){return Buffer.from(A,"utf8")}:wQ5.fromUtf8;function $Q5(A){if(A instanceof Uint8Array)return A;if(typeof A==="string")return _Q5(A);if(ArrayBuffer.isView(A))return new Uint8Array(A.buffer,A.byteOffset,A.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(A)}Df7.convertToBuffer=$Q5});var Gf7=C((Wf7)=>{Object.defineProperty(Wf7,"__esModule",{value:!0});Wf7.isEmptyData=void 0;function OQ5(A){if(typeof A==="string")return A.length===0;return A.byteLength===0}Wf7.isEmptyData=OQ5});var Vf7=C((ff7)=>{Object.defineProperty(ff7,"__esModule",{value:!0});ff7.numToUint8=void 0;function HQ5(A){return new Uint8Array([(A&4278190080)>>24,(A&16711680)>>16,(A&65280)>>8,A&255])}ff7.numToUint8=HQ5});var kf7=C((Nf7)=>{Object.defineProperty(Nf7,"__esModule",{value:!0});Nf7.uint32ArrayFrom=void 0;function jQ5(A){if(!Uint32Array.from){var q=new Uint32Array(A.length),K=0;while(K<A.length)q[K]=A[K],K+=1;return q}return Uint32Array.from(A)}Nf7.uint32ArrayFrom=jQ5});var YO8=C((dP6)=>{Object.defineProperty(dP6,"__esModule",{value:!0});dP6.uint32ArrayFrom=dP6.numToUint8=dP6.isEmptyData=dP6.convertToBuffer=void 0;var JQ5=Pf7();Object.defineProperty(dP6,"convertToBuffer",{enumerable:!0,get:function(){return JQ5.convertToBuffer}});var MQ5=Gf7();Object.defineProperty(dP6,"isEmptyData",{enumerable:!0,get:function(){return MQ5.isEmptyData}});var DQ5=Vf7();Object.defineProperty(dP6,"numToUint8",{enumerable:!0,get:function(){return DQ5.numToUint8}});var XQ5=kf7();Object.defineProperty(dP6,"uint32ArrayFrom",{enumerable:!0,get:function(){return XQ5.uint32ArrayFrom}})});var Sf7=C((yf7)=>{Object.defineProperty(yf7,"__esModule",{value:!0});yf7.AwsCrc32=void 0;var Ef7=d2(),zO8=YO8(),Lf7=wO8(),WQ5=function(){function A(){this.crc32=new Lf7.Crc32}return A.prototype.update=function(q){if((0,zO8.isEmptyData)(q))return;this.crc32.update((0,zO8.convertToBuffer)(q))},A.prototype.digest=function(){return Ef7.__awaiter(this,void 0,void 0,function(){return Ef7.__generator(this,function(q){return[2,(0,zO8.numToUint8)(this.crc32.digest())]})})},A.prototype.reset=function(){this.crc32=new Lf7.Crc32},A}();yf7.AwsCrc32=WQ5});var wO8=C((_O8)=>{Object.defineProperty(_O8,"__esModule",{value:!0});_O8.AwsCrc32=_O8.Crc32=_O8.crc32=void 0;var ZQ5=d2(),GQ5=YO8();function fQ5(A){return new Cf7().update(A).digest()}_O8.crc32=fQ5;var Cf7=function(){function A(){this.checksum=4294967295}return A.prototype.update=function(q){var K,Y;try{for(var z=ZQ5.__values(q),w=z.next();!w.done;w=z.next()){var _=w.value;this.checksum=this.checksum>>>8^VQ5[(this.checksum^_)&255]}}catch($){K={error:$}}finally{try{if(w&&!w.done&&(Y=z.return))Y.call(z)}finally{if(K)throw K.error}}return this},A.prototype.digest=function(){return(this.checksum^4294967295)>>>0},A}();_O8.Crc32=Cf7;var TQ5=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],VQ5=(0,GQ5.uint32ArrayFrom)(TQ5),NQ5=Sf7();Object.defineProperty(_O8,"AwsCrc32",{enumerable:!0,get:function(){return NQ5.AwsCrc32}})});var If7=C((RQ5)=>{var hf7={},$O8={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;hf7[A]=q,$O8[q]=A}function LQ5(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K<A.length;K+=2){let Y=A.slice(K,K+2).toLowerCase();if(Y in $O8)q[K/2]=$O8[Y];else throw Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return q}function yQ5(A){let q="";for(let K=0;K<A.byteLength;K++)q+=hf7[A[K]];return q}RQ5.fromHex=LQ5;RQ5.toHex=yQ5});var aB6=C((pQ5)=>{var uf7=wO8(),q56=If7();class cP6{bytes;constructor(A){if(this.bytes=A,A.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(A){if(A>9223372036854776000||A<-9223372036854776000)throw Error(`${A} is too large (or, if negative, too small) to represent as an Int64`);let q=new Uint8Array(8);for(let K=7,Y=Math.abs(Math.round(A));K>-1&&Y>0;K--,Y/=256)q[K]=Y;if(A<0)bf7(q);return new cP6(q)}valueOf(){let A=this.bytes.slice(0),q=A[0]&128;if(q)bf7(A);return parseInt(q56.toHex(A),16)*(q?-1:1)}toString(){return String(this.valueOf())}}function bf7(A){for(let q=0;q<8;q++)A[q]^=255;for(let q=7;q>-1;q--)if(A[q]++,A[q]!==0)break}class OO8{toUtf8;fromUtf8;constructor(A,q){this.toUtf8=A,this.fromUtf8=q}format(A){let q=[];for(let z of Object.keys(A)){let w=this.fromUtf8(z);q.push(Uint8Array.from([w.byteLength]),w,this.formatHeaderValue(A[z]))}let K=new Uint8Array(q.reduce((z,w)=>z+w.byteLength,0)),Y=0;for(let z of q)K.set(z,Y),Y+=z.byteLength;return K}formatHeaderValue(A){switch(A.type){case"boolean":return Uint8Array.from([A.value?0:1]);case"byte":return Uint8Array.from([2,A.value]);case"short":let q=new DataView(new ArrayBuffer(3));return q.setUint8(0,3),q.setInt16(1,A.value,!1),new Uint8Array(q.buffer);case"integer":let K=new DataView(new ArrayBuffer(5));return K.setUint8(0,4),K.setInt32(1,A.value,!1),new Uint8Array(K.buffer);case"long":let Y=new Uint8Array(9);return Y[0]=5,Y.set(A.value.bytes,1),Y;case"binary":let z=new DataView(new ArrayBuffer(3+A.value.byteLength));z.setUint8(0,6),z.setUint16(1,A.value.byteLength,!1);let w=new Uint8Array(z.buffer);return w.set(A.value,3),w;case"string":let _=this.fromUtf8(A.value),$=new DataView(new ArrayBuffer(3+_.byteLength));$.setUint8(0,7),$.setUint16(1,_.byteLength,!1);let O=new Uint8Array($.buffer);return O.set(_,3),O;case"timestamp":let H=new Uint8Array(9);return H[0]=8,H.set(cP6.fromNumber(A.value.valueOf()).bytes,1),H;case"uuid":if(!FQ5.test(A.value))throw Error(`Invalid UUID received: ${A.value}`);let j=new Uint8Array(17);return j[0]=9,j.set(q56.fromHex(A.value.replace(/\-/g,"")),1),j}}parse(A){let q={},K=0;while(K<A.byteLength){let Y=A.getUint8(K++),z=this.toUtf8(new Uint8Array(A.buffer,A.byteOffset+K,Y));switch(K+=Y,A.getUint8(K++)){case 0:q[z]={type:xf7,value:!0};break;case 1:q[z]={type:xf7,value:!1};break;case 2:q[z]={type:hQ5,value:A.getInt8(K++)};break;case 3:q[z]={type:IQ5,value:A.getInt16(K,!1)},K+=2;break;case 4:q[z]={type:bQ5,value:A.getInt32(K,!1)},K+=4;break;case 5:q[z]={type:xQ5,value:new cP6(new Uint8Array(A.buffer,A.byteOffset+K,8))},K+=8;break;case 6:let w=A.getUint16(K,!1);K+=2,q[z]={type:uQ5,value:new Uint8Array(A.buffer,A.byteOffset+K,w)},K+=w;break;case 7:let _=A.getUint16(K,!1);K+=2,q[z]={type:BQ5,value:this.toUtf8(new Uint8Array(A.buffer,A.byteOffset+K,_))},K+=_;break;case 8:q[z]={type:mQ5,value:new Date(new cP6(new Uint8Array(A.buffer,A.byteOffset+K,8)).valueOf())},K+=8;break;case 9:let $=new Uint8Array(A.buffer,A.byteOffset+K,16);K+=16,q[z]={type:gQ5,value:`${q56.toHex($.subarray(0,4))}-${q56.toHex($.subarray(4,6))}-${q56.toHex($.subarray(6,8))}-${q56.toHex($.subarray(8,10))}-${q56.toHex($.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return q}}var xf7="boolean",hQ5="byte",IQ5="short",bQ5="integer",xQ5="long",uQ5="binary",BQ5="string",mQ5="timestamp",gQ5="uuid",FQ5=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Bf7=4,Bt=Bf7*2,K56=4,QQ5=Bt+K56*2;function UQ5({byteLength:A,byteOffset:q,buffer:K}){if(A<QQ5)throw Error("Provided message too short to accommodate event stream message overhead");let Y=new DataView(K,q,A),z=Y.getUint32(0,!1);if(A!==z)throw Error("Reported message length does not match received message length");let w=Y.getUint32(Bf7,!1),_=Y.getUint32(Bt,!1),$=Y.getUint32(A-K56,!1),O=new uf7.Crc32().update(new Uint8Array(K,q,Bt));if(_!==O.digest())throw Error(`The prelude checksum specified in the message (${_}) does not match the calculated CRC32 checksum (${O.digest()})`);if(O.update(new Uint8Array(K,q+Bt,A-(Bt+K56))),$!==O.digest())throw Error(`The message checksum (${O.digest()}) did not match the expected value of ${$}`);return{headers:new DataView(K,q+Bt+K56,w),body:new Uint8Array(K,q+Bt+K56+w,z-w-(Bt+K56+K56))}}class mf7{headerMarshaller;messageBuffer;isEndOfStream;constructor(A,q){this.headerMarshaller=new OO8(A,q),this.messageBuffer=[],this.isEndOfStream=!1}feed(A){this.messageBuffer.push(this.decode(A))}endOfStream(){this.isEndOfStream=!0}getMessage(){let A=this.messageBuffer.pop(),q=this.isEndOfStream;return{getMessage(){return A},isEndOfStream(){return q}}}getAvailableMessages(){let A=this.messageBuffer;this.messageBuffer=[];let q=this.isEndOfStream;return{getMessages(){return A},isEndOfStream(){return q}}}encode({headers:A,body:q}){let K=this.headerMarshaller.format(A),Y=K.byteLength+q.byteLength+16,z=new Uint8Array(Y),w=new DataView(z.buffer,z.byteOffset,z.byteLength),_=new uf7.Crc32;return w.setUint32(0,Y,!1),w.setUint32(4,K.byteLength,!1),w.setUint32(8,_.update(z.subarray(0,8)).digest(),!1),z.set(K,12),z.set(q,K.byteLength+12),w.setUint32(Y-4,_.update(z.subarray(8,Y-4)).digest(),!1),z}decode(A){let{headers:q,body:K}=UQ5(A);return{headers:this.headerMarshaller.parse(q),body:K}}formatHeaders(A){return this.headerMarshaller.format(A)}}class gf7{options;constructor(A){this.options=A}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let A of this.options.inputStream)yield this.options.decoder.decode(A)}}class Ff7{options;constructor(A){this.options=A}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let A of this.options.messageStream)yield this.options.encoder.encode(A);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class Qf7{options;constructor(A){this.options=A}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let A of this.options.messageStream){let q=await this.options.deserializer(A);if(q===void 0)continue;yield q}}}class Uf7{options;constructor(A){this.options=A}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let A of this.options.inputStream)yield this.options.serializer(A)}}pQ5.EventStreamCodec=mf7;pQ5.HeaderMarshaller=OO8;pQ5.Int64=cP6;pQ5.MessageDecoderStream=gf7;pQ5.MessageEncoderStream=Ff7;pQ5.SmithyMessageDecoderStream=Qf7;pQ5.SmithyMessageEncoderStream=Uf7});var df7=C((tQ5)=>{var pf7={},HO8={};for(let A=0;A<256;A++){let q=A.toString(16).toLowerCase();if(q.length===1)q=`0${q}`;pf7[A]=q,HO8[q]=A}function aQ5(A){if(A.length%2!==0)throw Error("Hex encoded strings must have an even number length");let q=new Uint8Array(A.length/2);for(let K=0;K<A.length;K+=2){let Y=A.slice(K,K+2).toLowerCase();if(Y in HO8)q[K/2]=HO8[Y];else throw Error(`Cannot decode unrecognized sequence ${Y} as hexadecimal`)}return q}function sQ5(A){let q="";for(let K=0;K<A.byteLength;K++)q+=pf7[A[K]];return q}tQ5.fromHex=aQ5;tQ5.toHex=sQ5});var cf7=C((_U5)=>{_U5.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(_U5.HttpAuthLocation||(_U5.HttpAuthLocation={}));_U5.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(_U5.HttpApiKeyAuthLocation||(_U5.HttpApiKeyAuthLocation={}));_U5.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(_U5.EndpointURLScheme||(_U5.EndpointURLScheme={}));_U5.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(_U5.AlgorithmId||(_U5.AlgorithmId={}));var qU5=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>_U5.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>_U5.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},KU5=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},YU5=(A)=>{return qU5(A)},zU5=(A)=>{return KU5(A)};_U5.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(_U5.FieldPosition||(_U5.FieldPosition={}));var wU5="__smithy_context";_U5.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(_U5.IniSectionType||(_U5.IniSectionType={}));_U5.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(_U5.RequestHandlerProtocol||(_U5.RequestHandlerProtocol={}));_U5.SMITHY_CONTEXT_KEY=wU5;_U5.getDefaultClientConfiguration=YU5;_U5.resolveDefaultRuntimeConfig=zU5});var WO8=C((PU5)=>{var jU5=cf7(),JU5=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},MU5=(A)=>{return{httpHandler:A.httpHandler()}};class lf7{name;kind;values;constructor({name:A,kind:q=jU5.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class if7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class h$1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new h$1({...A,headers:{...A.headers}});if(q.query)q.query=DU5(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return h$1.clone(this)}}function DU5(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class nf7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function XU5(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}PU5.Field=lf7;PU5.Fields=if7;PU5.HttpRequest=h$1;PU5.HttpResponse=nf7;PU5.getHttpHandlerExtensionConfiguration=JU5;PU5.isValidHostname=XU5;PU5.resolveHttpHandlerRuntimeConfig=MU5});var of7=C((EU5)=>{var rf7=(A)=>encodeURIComponent(A).replace(/[!'()*]/g,vU5),vU5=(A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,kU5=(A)=>A.split("/").map(rf7).join("/");EU5.escapeUri=rf7;EU5.escapeUriPath=kU5});var af7=C((SU5)=>{var ZO8=of7();function RU5(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=ZO8.escapeUri(K),Array.isArray(Y))for(let z=0,w=Y.length;z<w;z++)q.push(`${K}=${ZO8.escapeUri(Y[z])}`);else{let z=K;if(Y||typeof Y==="string")z+=`=${ZO8.escapeUri(Y)}`;q.push(z)}}return q.join("&")}SU5.buildQueryString=RU5});var sf7=C((bU5)=>{var hU5=af7();function IU5(A){let{port:q,query:K}=A,{protocol:Y,path:z,hostname:w}=A;if(Y&&Y.slice(-1)!==":")Y+=":";if(q)w+=`:${q}`;if(z&&z.charAt(0)!=="/")z=`/${z}`;let _=K?hU5.buildQueryString(K):"";if(_&&_[0]!=="?")_=`?${_}`;let $="";if(A.username!=null||A.password!=null){let H=A.username??"",j=A.password??"";$=`${H}:${j}@`}let O="";if(A.fragment)O=`#${A.fragment}`;return`${Y}//${$}${w}${z}${_}${O}`}bU5.formatUrl=IU5});var tf7=C((gU5)=>{var tB6=aB6();function uU5(A){let q=0,K=0,Y=null,z=null,w=($)=>{if(typeof $!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+$);q=$,K=4,Y=new Uint8Array($),new DataView(Y.buffer).setUint32(0,$,!1)},_=async function*(){let $=A[Symbol.asyncIterator]();while(!0){let{value:O,done:H}=await $.next();if(H){if(!q)return;else if(q===K)yield Y;else throw Error("Truncated event message received.");return}let j=O.length,J=0;while(J<j){if(!Y){let D=j-J;if(!z)z=new Uint8Array(4);let X=Math.min(4-K,D);if(z.set(O.slice(J,J+X),K),K+=X,J+=X,K<4)break;w(new DataView(z.buffer).getUint32(0,!1)),z=null}let M=Math.min(q-K,j-J);if(Y.set(O.slice(J,J+M),K),K+=M,J+=M,q&&q===K)yield Y,Y=null,q=0,K=0}}};return{[Symbol.asyncIterator]:_}}function BU5(A,q){return async function(K){let{value:Y}=K.headers[":message-type"];if(Y==="error"){let z=Error(K.headers[":error-message"].value||"UnknownError");throw z.name=K.headers[":error-code"].value,z}else if(Y==="exception"){let z=K.headers[":exception-type"].value,w={[z]:K},_=await A(w);if(_.$unknown){let $=Error(q(K.body));throw $.name=z,$}throw _[z]}else if(Y==="event"){let z={[K.headers[":event-type"].value]:K},w=await A(z);if(w.$unknown)return;return w}else throw Error(`Unrecognizable event type: ${K.headers[":event-type"].value}`)}}class GO8{eventStreamCodec;utfEncoder;constructor({utf8Encoder:A,utf8Decoder:q}){this.eventStreamCodec=new tB6.EventStreamCodec(A,q),this.utfEncoder=A}deserialize(A,q){let K=uU5(A);return new tB6.SmithyMessageDecoderStream({messageStream:new tB6.MessageDecoderStream({inputStream:K,decoder:this.eventStreamCodec}),deserializer:BU5(q,this.utfEncoder)})}serialize(A,q){return new tB6.MessageEncoderStream({messageStream:new tB6.SmithyMessageEncoderStream({inputStream:A,serializer:q}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}var mU5=(A)=>new GO8(A);gU5.EventStreamMarshaller=GO8;gU5.eventStreamSerdeProvider=mU5});var qT7=C((cU5)=>{var UU5=tf7(),ef7=(A)=>({[Symbol.asyncIterator]:async function*(){let q=A.getReader();try{while(!0){let{done:K,value:Y}=await q.read();if(K)return;yield Y}}finally{q.releaseLock()}}}),AT7=(A)=>{let q=A[Symbol.asyncIterator]();return new ReadableStream({async pull(K){let{done:Y,value:z}=await q.next();if(Y)return K.close();K.enqueue(z)}})};class fO8{universalMarshaller;constructor({utf8Encoder:A,utf8Decoder:q}){this.universalMarshaller=new UU5.EventStreamMarshaller({utf8Decoder:q,utf8Encoder:A})}deserialize(A,q){let K=pU5(A)?ef7(A):A;return this.universalMarshaller.deserialize(K,q)}serialize(A,q){let K=this.universalMarshaller.serialize(A,q);return typeof ReadableStream==="function"?AT7(K):K}}var pU5=(A)=>typeof ReadableStream==="function"&&A instanceof ReadableStream,dU5=(A)=>new fO8(A);cU5.EventStreamMarshaller=fO8;cU5.eventStreamSerdeProvider=dU5;cU5.iterableToReadableStream=AT7;cU5.readableStreamtoIterable=ef7});var YT7=C((sU5)=>{var KT7=(A)=>encodeURIComponent(A).replace(/[!'()*]/g,oU5),oU5=(A)=>`%${A.charCodeAt(0).toString(16).toUpperCase()}`,aU5=(A)=>A.split("/").map(KT7).join("/");sU5.escapeUri=KT7;sU5.escapeUriPath=aU5});var zT7=C((qp5)=>{var TO8=YT7();function Ap5(A){let q=[];for(let K of Object.keys(A).sort()){let Y=A[K];if(K=TO8.escapeUri(K),Array.isArray(Y))for(let z=0,w=Y.length;z<w;z++)q.push(`${K}=${TO8.escapeUri(Y[z])}`);else{let z=K;if(Y||typeof Y==="string")z+=`=${TO8.escapeUri(Y)}`;q.push(z)}}return q.join("&")}qp5.buildQueryString=Ap5});var wT7=C((zp5)=>{var Yp5=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";zp5.isArrayBuffer=Yp5});var NO8=C((Hp5)=>{var _p5=wT7(),VO8=g6("buffer"),$p5=(A,q=0,K=A.byteLength-q)=>{if(!_p5.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return VO8.Buffer.from(A,q,K)},Op5=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?VO8.Buffer.from(A,q):VO8.Buffer.from(A)};Hp5.fromArrayBuffer=$p5;Hp5.fromString=Op5});var OT7=C((_T7)=>{Object.defineProperty(_T7,"__esModule",{value:!0});_T7.fromBase64=void 0;var Mp5=NO8(),Dp5=/^[A-Za-z0-9+/]*={0,2}$/,Xp5=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Dp5.exec(A))throw TypeError("Invalid base64 string.");let q=(0,Mp5.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};_T7.fromBase64=Xp5});var JT7=C((HT7)=>{Object.defineProperty(HT7,"__esModule",{value:!0});HT7.toBase64=void 0;var Pp5=NO8(),Wp5=Z2(),Zp5=(A)=>{let q;if(typeof A==="string")q=(0,Wp5.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Pp5.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};HT7.toBase64=Zp5});var XT7=C((eB6)=>{var MT7=OT7(),DT7=JT7();Object.keys(MT7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(eB6,A))Object.defineProperty(eB6,A,{enumerable:!0,get:function(){return MT7[A]}})});Object.keys(DT7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(eB6,A))Object.defineProperty(eB6,A,{enumerable:!0,get:function(){return DT7[A]}})})});var ZT7=C((Ep5)=>{var PT7=WO8(),Gp5=zT7(),fp5=XT7();function WT7(A,q){return new Request(A,q)}function Tp5(A=0){return new Promise((q,K)=>{if(A)setTimeout(()=>{let Y=Error(`Request did not complete within ${A} ms`);Y.name="TimeoutError",K(Y)},A)})}var I$1={supported:void 0};class vO8{config;configProvider;static create(A){if(typeof A?.handle==="function")return A;return new vO8(A)}constructor(A){if(typeof A==="function")this.configProvider=A().then((q)=>q||{});else this.config=A??{},this.configProvider=Promise.resolve(this.config);if(I$1.supported===void 0)I$1.supported=Boolean(typeof Request<"u"&&"keepalive"in WT7("https://[::1]"))}destroy(){}async handle(A,{abortSignal:q,requestTimeout:K}={}){if(!this.config)this.config=await this.configProvider;let Y=K??this.config.requestTimeout,z=this.config.keepAlive===!0,w=this.config.credentials;if(q?.aborted){let Z=Error("Request aborted");return Z.name="AbortError",Promise.reject(Z)}let _=A.path,$=Gp5.buildQueryString(A.query||{});if($)_+=`?${$}`;if(A.fragment)_+=`#${A.fragment}`;let O="";if(A.username!=null||A.password!=null){let Z=A.username??"",G=A.password??"";O=`${Z}:${G}@`}let{port:H,method:j}=A,J=`${A.protocol}//${O}${A.hostname}${H?`:${H}`:""}${_}`,M=j==="GET"||j==="HEAD"?void 0:A.body,D={body:M,headers:new Headers(A.headers),method:j,credentials:w};if(this.config?.cache)D.cache=this.config.cache;if(M)D.duplex="half";if(typeof AbortController<"u")D.signal=q;if(I$1.supported)D.keepalive=z;if(typeof this.config.requestInit==="function")Object.assign(D,this.config.requestInit(A));let X=()=>{},P=WT7(J,D),W=[fetch(P).then((Z)=>{let G=Z.headers,f={};for(let N of G.entries())f[N[0]]=N[1];if(Z.body==null)return Z.blob().then((N)=>({response:new PT7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:N})}));return{response:new PT7.HttpResponse({headers:f,reason:Z.statusText,statusCode:Z.status,body:Z.body})}}),Tp5(Y)];if(q)W.push(new Promise((Z,G)=>{let f=()=>{let V=Error("Request aborted");V.name="AbortError",G(V)};if(typeof q.addEventListener==="function"){let V=q;V.addEventListener("abort",f,{once:!0}),X=()=>V.removeEventListener("abort",f)}else q.onabort=f}));return Promise.race(W).finally(X)}updateHttpClientConfig(A,q){this.config=void 0,this.configProvider=this.configProvider.then((K)=>{return K[A]=q,K})}httpHandlerConfigs(){return this.config??{}}}var Vp5=async(A)=>{if(typeof Blob==="function"&&A instanceof Blob||A.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await A.arrayBuffer());return Np5(A)}return vp5(A)};async function Np5(A){let q=await kp5(A),K=fp5.fromBase64(q);return new Uint8Array(K)}async function vp5(A){let q=[],K=A.getReader(),Y=!1,z=0;while(!Y){let{done:$,value:O}=await K.read();if(O)q.push(O),z+=O.length;Y=$}let w=new Uint8Array(z),_=0;for(let $ of q)w.set($,_),_+=$.length;return w}function kp5(A){return new Promise((q,K)=>{let Y=new FileReader;Y.onloadend=()=>{if(Y.readyState!==2)return K(Error("Reader aborted too early"));let z=Y.result??"",w=z.indexOf(","),_=w>-1?w+1:z.length;q(z.substring(_))},Y.onabort=()=>K(Error("Read aborted")),Y.onerror=()=>K(Y.error),Y.readAsDataURL(A)})}Ep5.FetchHttpHandler=vO8;Ep5.keepAliveSupport=I$1;Ep5.streamCollector=Vp5});var vT7=C((lp5)=>{var Sp5=aB6(),Cp5=df7(),kO8=WO8(),hp5=sf7(),fT7=qT7(),GT7=ZT7(),Ip5=(A,q,K,Y)=>{let z=A,w={start(){},async transform(_,$){try{let O=new Date(Date.now()+await Y()),H={":date":{type:"timestamp",value:O}},j=await q.sign({message:{body:_,headers:H},priorSignature:z},{signingDate:O});z=j.signature;let J=K.encode({headers:{...H,":chunk-signature":{type:"binary",value:Cp5.fromHex(j.signature)}},body:_});$.enqueue(J)}catch(O){$.error(O)}}};return new TransformStream({...w})};class TT7{messageSigner;eventStreamCodec;systemClockOffsetProvider;constructor(A){this.messageSigner=A.messageSigner,this.eventStreamCodec=new Sp5.EventStreamCodec(A.utf8Encoder,A.utf8Decoder),this.systemClockOffsetProvider=async()=>A.systemClockOffset??0}async handle(A,q,K={}){let Y=q.request,{body:z,headers:w,query:_}=Y;if(!(z instanceof ReadableStream))throw Error("Eventstream payload must be a ReadableStream.");let $=new TransformStream;Y.body=$.readable;let O;try{O=await A(q)}catch(D){throw Y.body.cancel(),D}let j=((w.authorization||"").match(/Signature=([\w]+)$/)||[])[1]||_&&_["X-Amz-Signature"]||"",J=Ip5(j,await this.messageSigner(),this.eventStreamCodec,this.systemClockOffsetProvider);return z.pipeThrough(J).pipeThrough($),O}}var bp5=(A)=>new TT7(A),xp5=()=>(A)=>async(q)=>{let K={...q.input},Y=await A(q),z=Y.output;if(K.SessionId&&z.SessionId==null)z.SessionId=K.SessionId;return Y},up5={step:"initialize",name:"injectSessionIdMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],override:!0},Bp5=(A,q)=>(K)=>(Y)=>{let{request:z}=Y;if(kO8.HttpRequest.isInstance(z)&&A.requestHandler.metadata?.handlerProtocol?.toLowerCase().includes("websocket")){z.protocol="wss:",z.method="GET",z.path=`${z.path}-websocket`;let{headers:w}=z;delete w["content-type"],delete w["x-amz-content-sha256"];for(let _ of Object.keys(w))if(_.indexOf(q.headerPrefix)===0){let $=_.replace(q.headerPrefix,"");z.query[$]=w[_]}if(w["x-amz-user-agent"])z.query["user-agent"]=w["x-amz-user-agent"];z.headers={host:w.host??z.hostname}}return K(Y)},mp5={name:"websocketEndpointMiddleware",tags:["WEBSOCKET","EVENT_STREAM"],relation:"after",toMiddleware:"eventStreamHeaderMiddleware",override:!0},gp5=(A,q)=>({applyToStack:(K)=>{K.addRelativeTo(Bp5(A,q),mp5),K.add(xp5(),up5)}}),VT7=(A)=>A.protocol==="ws:"||A.protocol==="wss:";class NT7{signer;constructor(A){this.signer=A.signer}presign(A,q={}){return this.signer.presign(A,q)}async sign(A,q){if(kO8.HttpRequest.isInstance(A)&&VT7(A))return{...await this.signer.presign({...A,body:""},{...q,expiresIn:60,unsignableHeaders:new Set(Object.keys(A.headers).filter((Y)=>Y!=="host"))}),body:A.body};else return this.signer.sign(A,q)}}var Fp5=(A)=>{let{signer:q}=A;return Object.assign(A,{signer:async(K)=>{let Y=await q(K);if(Qp5(Y))return new NT7({signer:Y});throw Error("Expected WebsocketSignatureV4 signer, please check the client constructor.")}})},Qp5=(A)=>!!A,Up5=2000;class EO8{metadata={handlerProtocol:"websocket/h1.1"};config;configPromise;httpHandler;sockets={};static create(A,q=new GT7.FetchHttpHandler){if(typeof A?.handle==="function")return A;return new EO8(A,q)}constructor(A,q=new GT7.FetchHttpHandler){if(this.httpHandler=q,typeof A==="function")this.config={},this.configPromise=A().then((K)=>this.config=K??{});else this.config=A??{},this.configPromise=Promise.resolve(this.config)}destroy(){for(let[A,q]of Object.entries(this.sockets)){for(let K of q)K.close(1000,"Socket closed through destroy() call");delete this.sockets[A]}}async handle(A){if(!VT7(A))return this.httpHandler.handle(A);let q=hp5.formatUrl(A),K=new WebSocket(q);if(!this.sockets[q])this.sockets[q]=[];this.sockets[q].push(K),K.binaryType="arraybuffer",this.config=await this.configPromise;let{connectionTimeout:Y=Up5}=this.config;await this.waitForReady(K,Y);let{body:z}=A,w=pp5(z),_=this.connect(K,w),$=dp5(_);return{response:new kO8.HttpResponse({statusCode:200,body:$})}}updateHttpClientConfig(A,q){this.configPromise=this.configPromise.then((K)=>{return K[A]=q,K})}httpHandlerConfigs(){return this.config??{}}removeNotUsableSockets(A){this.sockets[A]=(this.sockets[A]??[]).filter((q)=>![WebSocket.CLOSING,WebSocket.CLOSED].includes(q.readyState))}waitForReady(A,q){return new Promise((K,Y)=>{let z=setTimeout(()=>{this.removeNotUsableSockets(A.url),Y({$metadata:{httpStatusCode:500}})},q);A.onopen=()=>{clearTimeout(z),K()}})}connect(A,q){let K=void 0,Y=!1,z=()=>{},w=()=>{};A.onmessage=(O)=>{w({done:!1,value:new Uint8Array(O.data)})},A.onerror=(O)=>{Y=!0,A.close(),z(O)},A.onclose=()=>{if(this.removeNotUsableSockets(A.url),Y)return;if(K)z(K);else w({done:!0,value:void 0})};let _={[Symbol.asyncIterator]:()=>({next:()=>{return new Promise((O,H)=>{w=O,z=H})}})};return(async()=>{try{for await(let O of q)A.send(O)}catch(O){K=O}finally{A.close(1000)}})(),_}}var pp5=(A)=>{if(A[Symbol.asyncIterator])return A;if(cp5(A))return fT7.readableStreamtoIterable(A);return{[Symbol.asyncIterator]:async function*(){yield A}}},dp5=(A)=>typeof ReadableStream==="function"?fT7.iterableToReadableStream(A):A,cp5=(A)=>typeof ReadableStream==="function"&&A instanceof ReadableStream;lp5.WebSocketFetchHandler=EO8;lp5.eventStreamPayloadHandlerProvider=bp5;lp5.getWebSocketPlugin=gp5;lp5.resolveWebSocketConfig=Fp5});var kT7=C((sp5)=>{var ap5=(A)=>Object.assign(A,{eventStreamMarshaller:A.eventStreamSerdeProvider(A)});sp5.resolveEventStreamSerdeConfig=ap5});var IO8=C((zd5)=>{zd5.HttpAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(zd5.HttpAuthLocation||(zd5.HttpAuthLocation={}));zd5.HttpApiKeyAuthLocation=void 0;(function(A){A.HEADER="header",A.QUERY="query"})(zd5.HttpApiKeyAuthLocation||(zd5.HttpApiKeyAuthLocation={}));zd5.EndpointURLScheme=void 0;(function(A){A.HTTP="http",A.HTTPS="https"})(zd5.EndpointURLScheme||(zd5.EndpointURLScheme={}));zd5.AlgorithmId=void 0;(function(A){A.MD5="md5",A.CRC32="crc32",A.CRC32C="crc32c",A.SHA1="sha1",A.SHA256="sha256"})(zd5.AlgorithmId||(zd5.AlgorithmId={}));var ep5=(A)=>{let q=[];if(A.sha256!==void 0)q.push({algorithmId:()=>zd5.AlgorithmId.SHA256,checksumConstructor:()=>A.sha256});if(A.md5!=null)q.push({algorithmId:()=>zd5.AlgorithmId.MD5,checksumConstructor:()=>A.md5});return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Ad5=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},qd5=(A)=>{return ep5(A)},Kd5=(A)=>{return Ad5(A)};zd5.FieldPosition=void 0;(function(A){A[A.HEADER=0]="HEADER",A[A.TRAILER=1]="TRAILER"})(zd5.FieldPosition||(zd5.FieldPosition={}));var Yd5="__smithy_context";zd5.IniSectionType=void 0;(function(A){A.PROFILE="profile",A.SSO_SESSION="sso-session",A.SERVICES="services"})(zd5.IniSectionType||(zd5.IniSectionType={}));zd5.RequestHandlerProtocol=void 0;(function(A){A.HTTP_0_9="http/0.9",A.HTTP_1_0="http/1.0",A.TDS_8_0="tds/8.0"})(zd5.RequestHandlerProtocol||(zd5.RequestHandlerProtocol={}));zd5.SMITHY_CONTEXT_KEY=Yd5;zd5.getDefaultClientConfiguration=qd5;zd5.resolveDefaultRuntimeConfig=Kd5});var qm6=C((iP6)=>{var yT7=Qm(),mO8=MN(),xO8=IO8(),Od5=lO(),ET7=JN();class RT7{config;middlewareStack=yT7.constructStack();initConfig;handlers;constructor(A){this.config=A}send(A,q,K){let Y=typeof q!=="function"?q:void 0,z=typeof q==="function"?q:K,w=Y===void 0&&this.config.cacheMiddleware===!0,_;if(w){if(!this.handlers)this.handlers=new WeakMap;let $=this.handlers;if($.has(A.constructor))_=$.get(A.constructor);else _=A.resolveMiddleware(this.middlewareStack,this.config,Y),$.set(A.constructor,_)}else delete this.handlers,_=A.resolveMiddleware(this.middlewareStack,this.config,Y);if(z)_(A).then(($)=>z(null,$.output),($)=>z($)).catch(()=>{});else return _(A).then(($)=>$.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var bO8="***SensitiveInformation***";function uO8(A,q){if(q==null)return q;let K=Od5.NormalizedSchema.of(A);if(K.getMergedTraits().sensitive)return bO8;if(K.isListSchema()){if(!!K.getValueSchema().getMergedTraits().sensitive)return bO8}else if(K.isMapSchema()){if(!!K.getKeySchema().getMergedTraits().sensitive||!!K.getValueSchema().getMergedTraits().sensitive)return bO8}else if(K.isStructSchema()&&typeof q==="object"){let Y=q,z={};for(let[w,_]of K.structIterator())if(Y[w]!=null)z[w]=uO8(_,Y[w]);return z}return q}class gO8{middlewareStack=yT7.constructStack();schema;static classBuilder(){return new ST7}resolveMiddlewareWithContext(A,q,K,{middlewareFn:Y,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,smithyContext:O,additionalContext:H,CommandCtor:j}){for(let P of Y.bind(this)(j,A,q,K))this.middlewareStack.use(P);let J=A.concat(this.middlewareStack),{logger:M}=q,D={logger:M,clientName:z,commandName:w,inputFilterSensitiveLog:_,outputFilterSensitiveLog:$,[xO8.SMITHY_CONTEXT_KEY]:{commandInstance:this,...O},...H},{requestHandler:X}=q;return J.resolve((P)=>X.handle(P.request,K||{}),D)}}class ST7{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(A){this._init=A}ep(A){return this._ep=A,this}m(A){return this._middlewareFn=A,this}s(A,q,K={}){return this._smithyContext={service:A,operation:q,...K},this}c(A={}){return this._additionalContext=A,this}n(A,q){return this._clientName=A,this._commandName=q,this}f(A=(K)=>K,q=(K)=>K){return this._inputFilterSensitiveLog=A,this._outputFilterSensitiveLog=q,this}ser(A){return this._serializer=A,this}de(A){return this._deserializer=A,this}sc(A){return this._operationSchema=A,this._smithyContext.operationSchema=A,this}build(){let A=this,q;return q=class extends gO8{input;static getEndpointParameterInstructions(){return A._ep}constructor(...[K]){super();this.input=K??{},A._init(this),this.schema=A._operationSchema}resolveMiddleware(K,Y,z){let w=A._operationSchema,_=w?.[4]??w?.input,$=w?.[5]??w?.output;return this.resolveMiddlewareWithContext(K,Y,z,{CommandCtor:q,middlewareFn:A._middlewareFn,clientName:A._clientName,commandName:A._commandName,inputFilterSensitiveLog:A._inputFilterSensitiveLog??(w?uO8.bind(null,_):(O)=>O),outputFilterSensitiveLog:A._outputFilterSensitiveLog??(w?uO8.bind(null,$):(O)=>O),smithyContext:A._smithyContext,additionalContext:A._additionalContext})}serialize=A._serializer;deserialize=A._deserializer}}}var Hd5="***SensitiveInformation***",jd5=(A,q)=>{for(let K of Object.keys(A)){let Y=A[K],z=async function(_,$,O){let H=new Y(_);if(typeof $==="function")this.send(H,$);else if(typeof O==="function"){if(typeof $!=="object")throw Error(`Expected http options but got ${typeof $}`);this.send(H,$||{},O)}else return this.send(H,$)},w=(K[0].toLowerCase()+K.slice(1)).replace(/Command$/,"");q.prototype[w]=z}};class lP6 extends Error{$fault;$response;$retryable;$metadata;constructor(A){super(A.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=A.name,this.$fault=A.$fault,this.$metadata=A.$metadata}static isInstance(A){if(!A)return!1;let q=A;return lP6.prototype.isPrototypeOf(q)||Boolean(q.$fault)&&Boolean(q.$metadata)&&(q.$fault==="client"||q.$fault==="server")}static[Symbol.hasInstance](A){if(!A)return!1;let q=A;if(this===lP6)return lP6.isInstance(A);if(lP6.isInstance(A)){if(q.name&&this.name)return this.prototype.isPrototypeOf(A)||q.name===this.name;return this.prototype.isPrototypeOf(A)}return!1}}var CT7=(A,q={})=>{Object.entries(q).filter(([,Y])=>Y!==void 0).forEach(([Y,z])=>{if(A[Y]==null||A[Y]==="")A[Y]=z});let K=A.message||A.Message||"UnknownError";return A.message=K,delete A.Message,A},hT7=({output:A,parsedBody:q,exceptionCtor:K,errorCode:Y})=>{let z=Md5(A),w=z.httpStatusCode?z.httpStatusCode+"":void 0,_=new K({name:q?.code||q?.Code||Y||w||"UnknownError",$fault:"client",$metadata:z});throw CT7(_,q)},Jd5=(A)=>{return({output:q,parsedBody:K,errorCode:Y})=>{hT7({output:q,parsedBody:K,exceptionCtor:A,errorCode:Y})}},Md5=(A)=>({httpStatusCode:A.statusCode,requestId:A.headers["x-amzn-requestid"]??A.headers["x-amzn-request-id"]??A.headers["x-amz-request-id"],extendedRequestId:A.headers["x-amz-id-2"],cfId:A.headers["x-amz-cf-id"]}),Dd5=(A)=>{switch(A){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},LT7=!1,Xd5=(A)=>{if(A&&!LT7&&parseInt(A.substring(1,A.indexOf(".")))<16)LT7=!0},Pd5=(A)=>{let q=[];for(let K in xO8.AlgorithmId){let Y=xO8.AlgorithmId[K];if(A[Y]===void 0)continue;q.push({algorithmId:()=>Y,checksumConstructor:()=>A[Y]})}return{addChecksumAlgorithm(K){q.push(K)},checksumAlgorithms(){return q}}},Wd5=(A)=>{let q={};return A.checksumAlgorithms().forEach((K)=>{q[K.algorithmId()]=K.checksumConstructor()}),q},Zd5=(A)=>{return{setRetryStrategy(q){A.retryStrategy=q},retryStrategy(){return A.retryStrategy}}},Gd5=(A)=>{let q={};return q.retryStrategy=A.retryStrategy(),q},IT7=(A)=>{return Object.assign(Pd5(A),Zd5(A))},fd5=IT7,Td5=(A)=>{return Object.assign(Wd5(A),Gd5(A))},Vd5=(A)=>Array.isArray(A)?A:[A],bT7=(A)=>{for(let K in A)if(A.hasOwnProperty(K)&&A[K]["#text"]!==void 0)A[K]=A[K]["#text"];else if(typeof A[K]==="object"&&A[K]!==null)A[K]=bT7(A[K]);return A},Nd5=(A)=>{return A!=null};class xT7{trace(){}debug(){}info(){}warn(){}error(){}}function uT7(A,q,K){let Y,z,w;if(typeof q>"u"&&typeof K>"u")Y={},w=A;else if(Y=A,typeof q==="function")return z=q,w=K,Ed5(Y,z,w);else w=q;for(let _ of Object.keys(w)){if(!Array.isArray(w[_])){Y[_]=w[_];continue}BT7(Y,null,w,_)}return Y}var vd5=(A)=>{let q={};for(let[K,Y]of Object.entries(A||{}))q[K]=[,Y];return q},kd5=(A,q)=>{let K={};for(let Y in q)BT7(K,A,q,Y);return K},Ed5=(A,q,K)=>{return uT7(A,Object.entries(K).reduce((Y,[z,w])=>{if(Array.isArray(w))Y[z]=w;else if(typeof w==="function")Y[z]=[q,w()];else Y[z]=[q,w];return Y},{}))},BT7=(A,q,K,Y)=>{if(q!==null){let _=K[Y];if(typeof _==="function")_=[,_];let[$=Ld5,O=yd5,H=Y]=_;if(typeof $==="function"&&$(q[H])||typeof $!=="function"&&!!$)A[Y]=O(q[H]);return}let[z,w]=K[Y];if(typeof w==="function"){let _,$=z===void 0&&(_=w())!=null,O=typeof z==="function"&&!!z(void 0)||typeof z!=="function"&&!!z;if($)A[Y]=_;else if(O)A[Y]=w()}else{let _=z===void 0&&w!=null,$=typeof z==="function"&&!!z(w)||typeof z!=="function"&&!!z;if(_||$)A[Y]=w}},Ld5=(A)=>A!=null,yd5=(A)=>A,Rd5=(A)=>{if(A!==A)return"NaN";switch(A){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return A}},Sd5=(A)=>A.toISOString().replace(".000Z","Z"),BO8=(A)=>{if(A==null)return{};if(Array.isArray(A))return A.filter((q)=>q!=null).map(BO8);if(typeof A==="object"){let q={};for(let K of Object.keys(A)){if(A[K]==null)continue;q[K]=BO8(A[K])}return q}return A};Object.defineProperty(iP6,"collectBody",{enumerable:!0,get:function(){return mO8.collectBody}});Object.defineProperty(iP6,"extendedEncodeURIComponent",{enumerable:!0,get:function(){return mO8.extendedEncodeURIComponent}});Object.defineProperty(iP6,"resolvedPath",{enumerable:!0,get:function(){return mO8.resolvedPath}});iP6.Client=RT7;iP6.Command=gO8;iP6.NoOpLogger=xT7;iP6.SENSITIVE_STRING=Hd5;iP6.ServiceException=lP6;iP6._json=BO8;iP6.convertMap=vd5;iP6.createAggregatedClient=jd5;iP6.decorateServiceException=CT7;iP6.emitWarningIfUnsupportedVersion=Xd5;iP6.getArrayIfSingleItem=Vd5;iP6.getDefaultClientConfiguration=fd5;iP6.getDefaultExtensionConfiguration=IT7;iP6.getValueFromTextNode=bT7;iP6.isSerializableHeaderValue=Nd5;iP6.loadConfigsForDefaultMode=Dd5;iP6.map=uT7;iP6.resolveDefaultRuntimeConfig=Td5;iP6.serializeDateTime=Sd5;iP6.serializeFloat=Rd5;iP6.take=kd5;iP6.throwDefaultError=hT7;iP6.withBaseException=Jd5;Object.keys(ET7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(iP6,A))Object.defineProperty(iP6,A,{enumerable:!0,get:function(){return ET7[A]}})})});var UO8=C((mT7)=>{Object.defineProperty(mT7,"__esModule",{value:!0});mT7.resolveHttpAuthSchemeConfig=mT7.defaultBedrockRuntimeHttpAuthSchemeProvider=mT7.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=void 0;var ed5=O$(),FO8=pw(),QO8=pZ(),Ac5=async(A,q,K)=>{return{operation:(0,QO8.getSmithyContext)(q).operation,region:await(0,QO8.normalizeProvider)(A.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};mT7.defaultBedrockRuntimeHttpAuthSchemeParametersProvider=Ac5;function qc5(A){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:A.region},propertiesExtractor:(q,K)=>({signingProperties:{config:q,context:K}})}}function Kc5(A){return{schemeId:"smithy.api#httpBearerAuth",propertiesExtractor:({profile:q,filepath:K,configFilepath:Y,ignoreCache:z},w)=>({identityProperties:{profile:q,filepath:K,configFilepath:Y,ignoreCache:z}})}}var Yc5=(A)=>{let q=[];switch(A.operation){default:q.push(qc5(A)),q.push(Kc5(A))}return q};mT7.defaultBedrockRuntimeHttpAuthSchemeProvider=Yc5;var zc5=(A)=>{let q=(0,FO8.memoizeIdentityProvider)(A.token,FO8.isIdentityExpired,FO8.doesIdentityRequireRefresh),K=(0,ed5.resolveAwsSdkSigV4Config)(A);return Object.assign(K,{authSchemePreference:(0,QO8.normalizeProvider)(A.authSchemePreference??[]),token:q})};mT7.resolveHttpAuthSchemeConfig=zc5});var FT7=C((eX2,$c5)=>{$c5.exports={name:"@aws-sdk/client-bedrock-runtime",description:"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",version:"3.936.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.936.0","@aws-sdk/credential-provider-node":"3.936.0","@aws-sdk/eventstream-handler-node":"3.936.0","@aws-sdk/middleware-eventstream":"3.936.0","@aws-sdk/middleware-host-header":"3.936.0","@aws-sdk/middleware-logger":"3.936.0","@aws-sdk/middleware-recursion-detection":"3.936.0","@aws-sdk/middleware-user-agent":"3.936.0","@aws-sdk/middleware-websocket":"3.936.0","@aws-sdk/region-config-resolver":"3.936.0","@aws-sdk/token-providers":"3.936.0","@aws-sdk/types":"3.936.0","@aws-sdk/util-endpoints":"3.936.0","@aws-sdk/util-user-agent-browser":"3.936.0","@aws-sdk/util-user-agent-node":"3.936.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/eventstream-serde-browser":"^4.2.5","@smithy/eventstream-serde-config-resolver":"^4.3.5","@smithy/eventstream-serde-node":"^4.2.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-stream":"^4.5.6","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock-runtime"}}});var pT7=C((Jc5)=>{var Oc5=aB6(),b$1=g6("stream");class QT7 extends b$1.Transform{priorSignature;messageSigner;eventStreamCodec;systemClockOffsetProvider;constructor(A){super({autoDestroy:!0,readableObjectMode:!0,writableObjectMode:!0,...A});this.priorSignature=A.priorSignature,this.eventStreamCodec=A.eventStreamCodec,this.messageSigner=A.messageSigner,this.systemClockOffsetProvider=A.systemClockOffsetProvider}async _transform(A,q,K){try{let Y=new Date(Date.now()+await this.systemClockOffsetProvider()),z={":date":{type:"timestamp",value:Y}},w=await this.messageSigner.sign({message:{body:A,headers:z},priorSignature:this.priorSignature},{signingDate:Y});this.priorSignature=w.signature;let _=this.eventStreamCodec.encode({headers:{...z,":chunk-signature":{type:"binary",value:Hc5(w.signature)}},body:A});return this.push(_),K()}catch(Y){K(Y)}}}function Hc5(A){let q=Buffer.from(A,"hex");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT)}class UT7{messageSigner;eventStreamCodec;systemClockOffsetProvider;constructor(A){this.messageSigner=A.messageSigner,this.eventStreamCodec=new Oc5.EventStreamCodec(A.utf8Encoder,A.utf8Decoder),this.systemClockOffsetProvider=async()=>A.systemClockOffset??0}async handle(A,q,K={}){let Y=q.request,{body:z,query:w}=Y;if(!(z instanceof b$1.Readable))throw Error("Eventstream payload must be a Readable stream.");let _=z;Y.body=new b$1.PassThrough({objectMode:!0});let O=Y.headers?.authorization?.match(/Signature=([\w]+)$/)?.[1]??w?.["X-Amz-Signature"]??"",H=new QT7({priorSignature:O,eventStreamCodec:this.eventStreamCodec,messageSigner:await this.messageSigner(),systemClockOffsetProvider:this.systemClockOffsetProvider});b$1.pipeline(_,H,Y.body,(J)=>{if(J)throw J});let j;try{j=await A(q)}catch(J){throw Y.body.end(),J}return j}}var jc5=(A)=>new UT7(A);Jc5.eventStreamPayloadHandlerProvider=jc5});var dT7=C((Wc5)=>{var Km6=aB6();function Dc5(A){let q=0,K=0,Y=null,z=null,w=($)=>{if(typeof $!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+$);q=$,K=4,Y=new Uint8Array($),new DataView(Y.buffer).setUint32(0,$,!1)},_=async function*(){let $=A[Symbol.asyncIterator]();while(!0){let{value:O,done:H}=await $.next();if(H){if(!q)return;else if(q===K)yield Y;else throw Error("Truncated event message received.");return}let j=O.length,J=0;while(J<j){if(!Y){let D=j-J;if(!z)z=new Uint8Array(4);let X=Math.min(4-K,D);if(z.set(O.slice(J,J+X),K),K+=X,J+=X,K<4)break;w(new DataView(z.buffer).getUint32(0,!1)),z=null}let M=Math.min(q-K,j-J);if(Y.set(O.slice(J,J+M),K),K+=M,J+=M,q&&q===K)yield Y,Y=null,q=0,K=0}}};return{[Symbol.asyncIterator]:_}}function Xc5(A,q){return async function(K){let{value:Y}=K.headers[":message-type"];if(Y==="error"){let z=Error(K.headers[":error-message"].value||"UnknownError");throw z.name=K.headers[":error-code"].value,z}else if(Y==="exception"){let z=K.headers[":exception-type"].value,w={[z]:K},_=await A(w);if(_.$unknown){let $=Error(q(K.body));throw $.name=z,$}throw _[z]}else if(Y==="event"){let z={[K.headers[":event-type"].value]:K},w=await A(z);if(w.$unknown)return;return w}else throw Error(`Unrecognizable event type: ${K.headers[":event-type"].value}`)}}class pO8{eventStreamCodec;utfEncoder;constructor({utf8Encoder:A,utf8Decoder:q}){this.eventStreamCodec=new Km6.EventStreamCodec(A,q),this.utfEncoder=A}deserialize(A,q){let K=Dc5(A);return new Km6.SmithyMessageDecoderStream({messageStream:new Km6.MessageDecoderStream({inputStream:K,decoder:this.eventStreamCodec}),deserializer:Xc5(q,this.utfEncoder)})}serialize(A,q){return new Km6.MessageEncoderStream({messageStream:new Km6.SmithyMessageEncoderStream({inputStream:A,serializer:q}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}var Pc5=(A)=>new pO8(A);Wc5.EventStreamMarshaller=pO8;Wc5.eventStreamSerdeProvider=Pc5});var cT7=C((vc5)=>{var fc5=dT7(),Tc5=g6("stream");async function*Vc5(A){let q=!1,K=!1,Y=[];A.on("error",(z)=>{if(!q)q=!0;if(z)throw z}),A.on("data",(z)=>{Y.push(z)}),A.on("end",()=>{q=!0});while(!K){let z=await new Promise((w)=>setTimeout(()=>w(Y.shift()),0));if(z)yield z;K=q&&Y.length===0}}class dO8{universalMarshaller;constructor({utf8Encoder:A,utf8Decoder:q}){this.universalMarshaller=new fc5.EventStreamMarshaller({utf8Decoder:q,utf8Encoder:A})}deserialize(A,q){let K=typeof A[Symbol.asyncIterator]==="function"?A:Vc5(A);return this.universalMarshaller.deserialize(K,q)}serialize(A,q){return Tc5.Readable.from(this.universalMarshaller.serialize(A,q))}}var Nc5=(A)=>new dO8(A);vc5.EventStreamMarshaller=dO8;vc5.eventStreamSerdeProvider=Nc5});var lT7=C((yc5)=>{var Lc5=(A)=>typeof ArrayBuffer==="function"&&A instanceof ArrayBuffer||Object.prototype.toString.call(A)==="[object ArrayBuffer]";yc5.isArrayBuffer=Lc5});var lO8=C((Ic5)=>{var Sc5=lT7(),cO8=g6("buffer"),Cc5=(A,q=0,K=A.byteLength-q)=>{if(!Sc5.isArrayBuffer(A))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof A} (${A})`);return cO8.Buffer.from(A,q,K)},hc5=(A,q)=>{if(typeof A!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof A} (${A})`);return q?cO8.Buffer.from(A,q):cO8.Buffer.from(A)};Ic5.fromArrayBuffer=Cc5;Ic5.fromString=hc5});var rT7=C((iT7)=>{Object.defineProperty(iT7,"__esModule",{value:!0});iT7.fromBase64=void 0;var uc5=lO8(),Bc5=/^[A-Za-z0-9+/]*={0,2}$/,mc5=(A)=>{if(A.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!Bc5.exec(A))throw TypeError("Invalid base64 string.");let q=(0,uc5.fromString)(A,"base64");return new Uint8Array(q.buffer,q.byteOffset,q.byteLength)};iT7.fromBase64=mc5});var sT7=C((oT7)=>{Object.defineProperty(oT7,"__esModule",{value:!0});oT7.toBase64=void 0;var gc5=lO8(),Fc5=Z2(),Qc5=(A)=>{let q;if(typeof A==="string")q=(0,Fc5.fromUtf8)(A);else q=A;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,gc5.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("base64")};oT7.toBase64=Qc5});var AV7=C((Ym6)=>{var tT7=rT7(),eT7=sT7();Object.keys(tT7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(Ym6,A))Object.defineProperty(Ym6,A,{enumerable:!0,get:function(){return tT7[A]}})});Object.keys(eT7).forEach(function(A){if(A!=="default"&&!Object.prototype.hasOwnProperty.call(Ym6,A))Object.defineProperty(Ym6,A,{enumerable:!0,get:function(){return eT7[A]}})})});var WV7=C((XV7)=>{Object.defineProperty(XV7,"__esModule",{value:!0});XV7.ruleSet=void 0;var JV7="required",Yg="fn",zg="argv",rP6="ref",qV7=!0,KV7="isSet",wm6="booleanEquals",nP6="error",zm6="endpoint",nf="tree",iO8="PartitionResult",YV7={[JV7]:!1,type:"string"},zV7={[JV7]:!0,default:!1,type:"boolean"},wV7={[rP6]:"Endpoint"},MV7={[Yg]:wm6,[zg]:[{[rP6]:"UseFIPS"},!0]},DV7={[Yg]:wm6,[zg]:[{[rP6]:"UseDualStack"},!0]},Kg={},_V7={[Yg]:"getAttr",[zg]:[{[rP6]:iO8},"supportsFIPS"]},$V7={[Yg]:wm6,[zg]:[!0,{[Yg]:"getAttr",[zg]:[{[rP6]:iO8},"supportsDualStack"]}]},OV7=[MV7],HV7=[DV7],jV7=[{[rP6]:"Region"}],Uc5={version:"1.0",parameters:{Region:YV7,UseDualStack:zV7,UseFIPS:zV7,Endpoint:YV7},rules:[{conditions:[{[Yg]:KV7,[zg]:[wV7]}],rules:[{conditions:OV7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:nP6},{rules:[{conditions:HV7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:nP6},{endpoint:{url:wV7,properties:Kg,headers:Kg},type:zm6}],type:nf}],type:nf},{rules:[{conditions:[{[Yg]:KV7,[zg]:jV7}],rules:[{conditions:[{[Yg]:"aws.partition",[zg]:jV7,assign:iO8}],rules:[{conditions:[MV7,DV7],rules:[{conditions:[{[Yg]:wm6,[zg]:[qV7,_V7]},$V7],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Kg,headers:Kg},type:zm6}],type:nf}],type:nf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:nP6}],type:nf},{conditions:OV7,rules:[{conditions:[{[Yg]:wm6,[zg]:[_V7,qV7]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Kg,headers:Kg},type:zm6}],type:nf}],type:nf},{error:"FIPS is enabled but this partition does not support FIPS",type:nP6}],type:nf},{conditions:HV7,rules:[{conditions:[$V7],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Kg,headers:Kg},type:zm6}],type:nf}],type:nf},{error:"DualStack is enabled but this partition does not support DualStack",type:nP6}],type:nf},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:Kg,headers:Kg},type:zm6}],type:nf}],type:nf}],type:nf},{error:"Invalid Configuration: Missing Region",type:nP6}],type:nf}]};XV7.ruleSet=Uc5});var fV7=C((ZV7)=>{Object.defineProperty(ZV7,"__esModule",{value:!0});ZV7.defaultEndpointResolver=void 0;var pc5=pm(),nO8=Ab(),dc5=WV7(),cc5=new nO8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),lc5=(A,q={})=>{return cc5.get(A,()=>(0,nO8.resolveEndpoint)(dc5.ruleSet,{endpointParams:A,logger:q.logger}))};ZV7.defaultEndpointResolver=lc5;nO8.customEndpointFunctions.aws=pc5.awsEndpointFunctions});var kV7=C((NV7)=>{Object.defineProperty(NV7,"__esModule",{value:!0});NV7.getRuntimeConfig=void 0;var ic5=O$(),nc5=Lc(),rc5=pw(),oc5=qm6(),ac5=LR(),TV7=AV7(),VV7=Z2(),sc5=UO8(),tc5=fV7(),ec5=(A)=>{return{apiVersion:"2023-09-30",base64Decoder:A?.base64Decoder??TV7.fromBase64,base64Encoder:A?.base64Encoder??TV7.toBase64,disableHostPrefix:A?.disableHostPrefix??!1,endpointProvider:A?.endpointProvider??tc5.defaultEndpointResolver,extensions:A?.extensions??[],httpAuthSchemeProvider:A?.httpAuthSchemeProvider??sc5.defaultBedrockRuntimeHttpAuthSchemeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(q)=>q.getIdentityProvider("aws.auth#sigv4"),signer:new ic5.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:(q)=>q.getIdentityProvider("smithy.api#httpBearerAuth"),signer:new rc5.HttpBearerAuthSigner}],logger:A?.logger??new oc5.NoOpLogger,protocol:A?.protocol??new nc5.AwsRestJsonProtocol({defaultNamespace:"com.amazonaws.bedrockruntime"}),serviceId:A?.serviceId??"Bedrock Runtime",urlParser:A?.urlParser??ac5.parseUrl,utf8Decoder:A?.utf8Decoder??VV7.fromUtf8,utf8Encoder:A?.utf8Encoder??VV7.toUtf8}};NV7.getRuntimeConfig=ec5});var hV7=C((SV7)=>{Object.defineProperty(SV7,"__esModule",{value:!0});SV7.getRuntimeConfig=void 0;var Al5=d2(),ql5=Al5.__importDefault(FT7()),rO8=O$(),Kl5=i36(),Yl5=pT7(),EV7=r21(),LV7=Nc(),x$1=NJ(),zl5=pw(),wl5=cT7(),_l5=vc(),yV7=h0(),Y56=HN(),RV7=$N(),$l5=kc(),Ol5=lm(),Hl5=kV7(),jl5=qm6(),Jl5=Rc(),Ml5=qm6(),Dl5=(A)=>{(0,Ml5.emitWarningIfUnsupportedVersion)(process.version);let q=(0,Jl5.resolveDefaultsModeConfig)(A),K=()=>q().then(jl5.loadConfigsForDefaultMode),Y=(0,Hl5.getRuntimeConfig)(A);(0,rO8.emitWarningIfUnsupportedVersion)(process.version);let z={profile:A?.profile,logger:Y.logger,signingName:"bedrock"};return{...Y,...A,runtime:"node",defaultsMode:q,authSchemePreference:A?.authSchemePreference??(0,Y56.loadConfig)(rO8.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,z),bodyLengthChecker:A?.bodyLengthChecker??$l5.calculateBodyLength,credentialDefaultProvider:A?.credentialDefaultProvider??Kl5.defaultProvider,defaultUserAgentProvider:A?.defaultUserAgentProvider??(0,LV7.createDefaultUserAgentProvider)({serviceId:Y.serviceId,clientVersion:ql5.default.version}),eventStreamPayloadHandlerProvider:A?.eventStreamPayloadHandlerProvider??Yl5.eventStreamPayloadHandlerProvider,eventStreamSerdeProvider:A?.eventStreamSerdeProvider??wl5.eventStreamSerdeProvider,httpAuthSchemes:A?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new rO8.AwsSdkSigV4Signer},{schemeId:"smithy.api#httpBearerAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#httpBearerAuth")||(async(_)=>{try{return await(0,EV7.fromEnvSigningName)({signingName:"bedrock"})()}catch($){return await(0,EV7.nodeProvider)(_)(_)}}),signer:new zl5.HttpBearerAuthSigner}],maxAttempts:A?.maxAttempts??(0,Y56.loadConfig)(yV7.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,A),region:A?.region??(0,Y56.loadConfig)(x$1.NODE_REGION_CONFIG_OPTIONS,{...x$1.NODE_REGION_CONFIG_FILE_OPTIONS,...z}),requestHandler:RV7.NodeHttp2Handler.create(A?.requestHandler??(async()=>({...await K(),disableConcurrentStreams:!0}))),retryMode:A?.retryMode??(0,Y56.loadConfig)({...yV7.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await K()).retryMode||Ol5.DEFAULT_RETRY_MODE},A),sha256:A?.sha256??_l5.Hash.bind(null,"sha256"),streamCollector:A?.streamCollector??RV7.streamCollector,useDualstackEndpoint:A?.useDualstackEndpoint??(0,Y56.loadConfig)(x$1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,z),useFipsEndpoint:A?.useFipsEndpoint??(0,Y56.loadConfig)(x$1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,z),userAgentAppId:A?.userAgentAppId??(0,Y56.loadConfig)(LV7.NODE_APP_ID_CONFIG_OPTIONS,z)}};SV7.getRuntimeConfig=Dl5});var uV7=C((fl5)=>{var Xl5=IO8(),Pl5=(A)=>{return{setHttpHandler(q){A.httpHandler=q},httpHandler(){return A.httpHandler},updateHttpClientConfig(q,K){A.httpHandler?.updateHttpClientConfig(q,K)},httpHandlerConfigs(){return A.httpHandler.httpHandlerConfigs()}}},Wl5=(A)=>{return{httpHandler:A.httpHandler()}};class IV7{name;kind;values;constructor({name:A,kind:q=Xl5.FieldPosition.HEADER,values:K=[]}){this.name=A,this.kind=q,this.values=K}add(A){this.values.push(A)}set(A){this.values=A}remove(A){this.values=this.values.filter((q)=>q!==A)}toString(){return this.values.map((A)=>A.includes(",")||A.includes(" ")?`"${A}"`:A).join(", ")}get(){return this.values}}class bV7{entries={};encoding;constructor({fields:A=[],encoding:q="utf-8"}){A.forEach(this.setField.bind(this)),this.encoding=q}setField(A){this.entries[A.name.toLowerCase()]=A}getField(A){return this.entries[A.toLowerCase()]}removeField(A){delete this.entries[A.toLowerCase()]}getByType(A){return Object.values(this.entries).filter((q)=>q.kind===A)}}class u$1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(A){this.method=A.method||"GET",this.hostname=A.hostname||"localhost",this.port=A.port,this.query=A.query||{},this.headers=A.headers||{},this.body=A.body,this.protocol=A.protocol?A.protocol.slice(-1)!==":"?`${A.protocol}:`:A.protocol:"https:",this.path=A.path?A.path.charAt(0)!=="/"?`/${A.path}`:A.path:"/",this.username=A.username,this.password=A.password,this.fragment=A.fragment}static clone(A){let q=new u$1({...A,headers:{...A.headers}});if(q.query)q.query=Zl5(q.query);return q}static isInstance(A){if(!A)return!1;let q=A;return"method"in q&&"protocol"in q&&"hostname"in q&&"path"in q&&typeof q.query==="object"&&typeof q.headers==="object"}clone(){return u$1.clone(this)}}function Zl5(A){return Object.keys(A).reduce((q,K)=>{let Y=A[K];return{...q,[K]:Array.isArray(Y)?[...Y]:Y}},{})}class xV7{statusCode;reason;headers;body;constructor(A){this.statusCode=A.statusCode,this.reason=A.reason,this.headers=A.headers||{},this.body=A.body}static isInstance(A){if(!A)return!1;let q=A;return typeof q.statusCode==="number"&&typeof q.headers==="object"}}function Gl5(A){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(A)}fl5.Field=IV7;fl5.Fields=bV7;fl5.HttpRequest=u$1;fl5.HttpResponse=xV7;fl5.getHttpHandlerExtensionConfiguration=Pl5;fl5.isValidHostname=Gl5;fl5.resolveHttpHandlerRuntimeConfig=Wl5});var jO1=C((mH8)=>{var oV7=qf7(),BV7=Dc(),yl5=Xc(),Rl5=Pc(),mV7=cm(),aV7=vT7(),Sl5=NJ(),B$1=pw(),GN=lO(),Cl5=kT7(),hl5=Vc(),Jb=qb(),gV7=h0(),B0=qm6(),FV7=UO8(),Il5=hV7(),QV7=Kb(),UV7=uV7(),bl5=(A)=>{return Object.assign(A,{useDualstackEndpoint:A.useDualstackEndpoint??!1,useFipsEndpoint:A.useFipsEndpoint??!1,defaultSigningName:"bedrock"})},wg={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},xl5=(A)=>{let{httpAuthSchemes:q,httpAuthSchemeProvider:K,credentials:Y,token:z}=A;return{setHttpAuthScheme(w){let _=q.findIndex(($)=>$.schemeId===w.schemeId);if(_===-1)q.push(w);else q.splice(_,1,w)},httpAuthSchemes(){return q},setHttpAuthSchemeProvider(w){K=w},httpAuthSchemeProvider(){return K},setCredentials(w){Y=w},credentials(){return Y},setToken(w){z=w},token(){return z}}},ul5=(A)=>{return{httpAuthSchemes:A.httpAuthSchemes(),httpAuthSchemeProvider:A.httpAuthSchemeProvider(),credentials:A.credentials(),token:A.token()}},Bl5=(A,q)=>{let K=Object.assign(QV7.getAwsRegionExtensionConfiguration(A),B0.getDefaultExtensionConfiguration(A),UV7.getHttpHandlerExtensionConfiguration(A),xl5(A));return q.forEach((Y)=>Y.configure(K)),Object.assign(A,QV7.resolveAwsRegionExtensionConfiguration(K),B0.resolveDefaultRuntimeConfig(K),UV7.resolveHttpHandlerRuntimeConfig(K),ul5(K))};class g$1 extends B0.Client{config;constructor(...[A]){let q=Il5.getRuntimeConfig(A||{});super(q);this.initConfig=q;let K=bl5(q),Y=mV7.resolveUserAgentConfig(K),z=gV7.resolveRetryConfig(Y),w=Sl5.resolveRegionConfig(z),_=BV7.resolveHostHeaderConfig(w),$=Jb.resolveEndpointConfig(_),O=Cl5.resolveEventStreamSerdeConfig($),H=FV7.resolveHttpAuthSchemeConfig(O),j=oV7.resolveEventStreamConfig(H),J=aV7.resolveWebSocketConfig(j),M=Bl5(J,A?.extensions||[]);this.config=M,this.middlewareStack.use(GN.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(mV7.getUserAgentPlugin(this.config)),this.middlewareStack.use(gV7.getRetryPlugin(this.config)),this.middlewareStack.use(hl5.getContentLengthPlugin(this.config)),this.middlewareStack.use(BV7.getHostHeaderPlugin(this.config)),this.middlewareStack.use(yl5.getLoggerPlugin(this.config)),this.middlewareStack.use(Rl5.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(B$1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FV7.defaultBedrockRuntimeHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(D)=>new B$1.DefaultIdentityProviderConfig({"aws.auth#sigv4":D.credentials,"smithy.api#httpBearerAuth":D.token})})),this.middlewareStack.use(B$1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var fN=class A extends B0.ServiceException{constructor(q){super(q);Object.setPrototypeOf(this,A.prototype)}},sV7=class A extends fN{name="AccessDeniedException";$fault="client";constructor(q){super({name:"AccessDeniedException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},tV7=class A extends fN{name="InternalServerException";$fault="server";constructor(q){super({name:"InternalServerException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype)}},eV7=class A extends fN{name="ThrottlingException";$fault="client";constructor(q){super({name:"ThrottlingException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},AN7=class A extends fN{name="ValidationException";$fault="client";constructor(q){super({name:"ValidationException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},qN7=class A extends fN{name="ConflictException";$fault="client";constructor(q){super({name:"ConflictException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},KN7=class A extends fN{name="ResourceNotFoundException";$fault="client";constructor(q){super({name:"ResourceNotFoundException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},YN7=class A extends fN{name="ServiceQuotaExceededException";$fault="client";constructor(q){super({name:"ServiceQuotaExceededException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},zN7=class A extends fN{name="ServiceUnavailableException";$fault="server";constructor(q){super({name:"ServiceUnavailableException",$fault:"server",...q});Object.setPrototypeOf(this,A.prototype)}},wN7=class A extends fN{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(q){super({name:"ModelErrorException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.originalStatusCode=q.originalStatusCode,this.resourceName=q.resourceName}},_N7=class A extends fN{name="ModelNotReadyException";$fault="client";$retryable={};constructor(q){super({name:"ModelNotReadyException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},$N7=class A extends fN{name="ModelTimeoutException";$fault="client";constructor(q){super({name:"ModelTimeoutException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype)}},ON7=class A extends fN{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(q){super({name:"ModelStreamErrorException",$fault:"client",...q});Object.setPrototypeOf(this,A.prototype),this.originalStatusCode=q.originalStatusCode,this.originalMessage=q.originalMessage}},ml5="Accept",gl5="AccessDeniedException",Fl5="ApplyGuardrail",Ql5="ApplyGuardrailRequest",Ul5="ApplyGuardrailResponse",pl5="AsyncInvokeMessage",dl5="AsyncInvokeOutputDataConfig",cl5="AsyncInvokeSummary",ll5="AsyncInvokeS3OutputDataConfig",il5="AsyncInvokeSummaries",nl5="AnyToolChoice",rl5="AutoToolChoice",ol5="Body",al5="BidirectionalInputPayloadPart",sl5="BidirectionalOutputPayloadPart",tl5="Citation",el5="ContentBlocks",Ai5="ContentBlockDelta",qi5="ContentBlockDeltaEvent",Ki5="ContentBlockStart",Yi5="ContentBlockStartEvent",zi5="ContentBlockStopEvent",wi5="ContentBlock",_i5="CitationsConfig",$i5="CitationsContentBlock",Oi5="CitationsDelta",Hi5="ConflictException",ji5="CitationGeneratedContent",Ji5="CitationGeneratedContentList",Mi5="CitationLocation",Di5="ConverseMetrics",Xi5="ConverseOutput",Pi5="CachePointBlock",Wi5="ConverseRequest",Zi5="ConverseResponse",Gi5="ConverseStream",fi5="CitationSourceContent",Ti5="CitationSourceContentDelta",Vi5="CitationSourceContentList",Ni5="CitationSourceContentListDelta",vi5="ConverseStreamMetrics",ki5="ConverseStreamMetadataEvent",Ei5="ConverseStreamOutput",Li5="ConverseStreamRequest",yi5="ConverseStreamResponse",Ri5="ConverseStreamTrace",Si5="ConverseTrace",Ci5="CountTokensInput",hi5="ConverseTokensRequest",Ii5="CountTokensRequest",bi5="CountTokensResponse",aO8="Content-Type",xi5="CountTokens",ui5="Citations",Bi5="Converse",mi5="DocumentBlock",gi5="DocumentContentBlocks",Fi5="DocumentContentBlock",Qi5="DocumentCharLocation",Ui5="DocumentChunkLocation",pi5="DocumentPageLocation",di5="DocumentSource",ci5="GuardrailAssessment",li5="GetAsyncInvoke",ii5="GetAsyncInvokeRequest",ni5="GetAsyncInvokeResponse",ri5="GuardrailAssessmentList",oi5="GuardrailAssessmentListMap",ai5="GuardrailAssessmentMap",si5="GuardrailAutomatedReasoningDifferenceScenarioList",ti5="GuardrailAutomatedReasoningFinding",ei5="GuardrailAutomatedReasoningFindingList",An5="GuardrailAutomatedReasoningImpossibleFinding",qn5="GuardrailAutomatedReasoningInvalidFinding",Kn5="GuardrailAutomatedReasoningInputTextReference",Yn5="GuardrailAutomatedReasoningInputTextReferenceList",zn5="GuardrailAutomatedReasoningLogicWarning",wn5="GuardrailAutomatedReasoningNoTranslationsFinding",_n5="GuardrailAutomatedReasoningPolicyAssessment",$n5="GuardrailAutomatedReasoningRule",On5="GuardrailAutomatedReasoningRuleList",Hn5="GuardrailAutomatedReasoningScenario",jn5="GuardrailAutomatedReasoningSatisfiableFinding",Jn5="GuardrailAutomatedReasoningStatementList",Mn5="GuardrailAutomatedReasoningStatementLogicContent",Dn5="GuardrailAutomatedReasoningStatementNaturalLanguageContent",Xn5="GuardrailAutomatedReasoningStatement",Pn5="GuardrailAutomatedReasoningTranslation",Wn5="GuardrailAutomatedReasoningTranslationAmbiguousFinding",Zn5="GuardrailAutomatedReasoningTooComplexFinding",Gn5="GuardrailAutomatedReasoningTranslationList",fn5="GuardrailAutomatedReasoningTranslationOption",Tn5="GuardrailAutomatedReasoningTranslationOptionList",Vn5="GuardrailAutomatedReasoningValidFinding",Nn5="GuardrailConfiguration",vn5="GuardrailContentBlock",kn5="GuardrailContentBlockList",En5="GuardrailConverseContentBlock",Ln5="GuardrailContentFilter",yn5="GuardrailContentFilterList",Rn5="GuardrailContextualGroundingFilter",Sn5="GuardrailContextualGroundingFilters",Cn5="GuardrailContextualGroundingPolicyAssessment",hn5="GuardrailConverseImageBlock",In5="GuardrailConverseImageSource",bn5="GuardrailContentPolicyAssessment",xn5="GuardrailConverseTextBlock",un5="GuardrailCustomWord",Bn5="GuardrailCustomWordList",mn5="GuardrailCoverage",gn5="GuardrailImageBlock",Fn5="GuardrailImageCoverage",Qn5="GuardrailInvocationMetrics",Un5="GuardrailImageSource",pn5="GuardrailManagedWord",dn5="GuardrailManagedWordList",cn5="GuardrailOutputContent",ln5="GuardrailOutputContentList",in5="GuardrailPiiEntityFilter",nn5="GuardrailPiiEntityFilterList",rn5="GuardrailRegexFilter",on5="GuardrailRegexFilterList",an5="GuardrailStreamConfiguration",sn5="GuardrailSensitiveInformationPolicyAssessment",tn5="GuardrailTopic",en5="GuardrailTraceAssessment",Ar5="GuardrailTextBlock",qr5="GuardrailTextCharactersCoverage",Kr5="GuardrailTopicList",Yr5="GuardrailTopicPolicyAssessment",zr5="GuardrailUsage",wr5="GuardrailWordPolicyAssessment",_r5="ImageBlock",$r5="InferenceConfiguration",Or5="InvokeModel",Hr5="InvokeModelRequest",jr5="InvokeModelResponse",Jr5="InvokeModelTokensRequest",Mr5="InvokeModelWithBidirectionalStream",Dr5="InvokeModelWithBidirectionalStreamInput",Xr5="InvokeModelWithBidirectionalStreamOutput",Pr5="InvokeModelWithBidirectionalStreamRequest",Wr5="InvokeModelWithBidirectionalStreamResponse",Zr5="InvokeModelWithResponseStream",Gr5="InvokeModelWithResponseStreamRequest",fr5="InvokeModelWithResponseStreamResponse",Tr5="ImageSource",Vr5="InternalServerException",Nr5="ListAsyncInvokes",vr5="ListAsyncInvokesRequest",kr5="ListAsyncInvokesResponse",Er5="Message",Lr5="ModelErrorException",yr5="ModelInputPayload",Rr5="ModelNotReadyException",Sr5="MessageStartEvent",Cr5="ModelStreamErrorException",hr5="MessageStopEvent",Ir5="ModelTimeoutException",br5="Messages",xr5="PartBody",ur5="PerformanceConfiguration",Br5="PayloadPart",mr5="PromptRouterTrace",gr5="PromptVariableMap",Fr5="PromptVariableValues",Qr5="ReasoningContentBlock",Ur5="ReasoningContentBlockDelta",pr5="RequestMetadata",dr5="ResourceNotFoundException",cr5="ResponseStream",lr5="ReasoningTextBlock",ir5="StartAsyncInvoke",nr5="StartAsyncInvokeRequest",rr5="StartAsyncInvokeResponse",or5="SystemContentBlocks",ar5="SystemContentBlock",sr5="S3Location",tr5="ServiceQuotaExceededException",er5="SearchResultBlock",Ao5="SearchResultContentBlock",qo5="SearchResultContentBlocks",Ko5="SearchResultLocation",Yo5="ServiceTier",zo5="SpecificToolChoice",wo5="SystemTool",_o5="ServiceUnavailableException",$o5="Tag",Oo5="ToolConfiguration",Ho5="ToolChoice",jo5="ThrottlingException",Jo5="ToolInputSchema",Mo5="TagList",Do5="ToolResultBlock",Xo5="ToolResultBlocksDelta",Po5="ToolResultBlockDelta",Wo5="ToolResultBlockStart",Zo5="ToolResultContentBlocks",Go5="ToolResultContentBlock",fo5="ToolSpecification",To5="TokenUsage",Vo5="ToolUseBlock",No5="ToolUseBlockDelta",vo5="ToolUseBlockStart",ko5="Tools",Eo5="Tool",Lo5="VideoBlock",yo5="ValidationException",Ro5="VideoSource",So5="WebLocation",Co5="X-Amzn-Bedrock-Accept",ho5="X-Amzn-Bedrock-Content-Type",HN7="X-Amzn-Bedrock-GuardrailIdentifier",jN7="X-Amzn-Bedrock-GuardrailVersion",F$1="X-Amzn-Bedrock-PerformanceConfig-Latency",Q$1="X-Amzn-Bedrock-Service-Tier",JN7="X-Amzn-Bedrock-Trace",mt="action",Io5="asyncInvokeSummaries",sO8="additionalModelRequestFields",MN7="additionalModelResponseFieldPaths",DN7="additionalModelResponseFields",XN7="actionReason",bo5="automatedReasoningPolicy",xo5="automatedReasoningPolicyUnits",uo5="automatedReasoningPolicies",PN7="accept",Bo5="any",mo5="assessments",go5="auto",gt="bytes",WN7="bucketOwner",w56="body",_g="client",Fo5="contentBlockDelta",tO8="contentBlockIndex",Qo5="contentBlockStart",Uo5="contentBlockStop",po5="citationsContent",do5="claimsFalseScenario",co5="contextualGroundingPolicy",lo5="contextualGroundingPolicyUnits",io5="contentPolicy",no5="contentPolicyImageUnits",ro5="contentPolicyUnits",eO8="cachePoint",ZN7="contradictingRules",oo5="cacheReadInputTokens",AH8="clientRequestToken",U$1="contentType",GN7="claimsTrueScenario",ao5="customWords",so5="cacheWriteInputTokens",qH8="chunk",KH8="citations",to5="citation",fN7="claims",oP6="content",eo5="context",TN7="confidence",Aa5="converse",qa5="delta",Ka5="documentChar",Ya5="documentChunk",YH8="documentIndex",za5="documentPage",wa5="differenceScenarios",_56="detected",_a5="description",$a5="domain",VN7="document",lR="error",NN7="endTime",Oa5="enabled",p$1="end",$m6="format",vN7="failureMessage",Ha5="filterStrength",ja5="findings",kN7="filters",EN7="guardrail",LN7="guardrailCoverage",yN7="guardrailConfig",RN7="guardContent",Om6="guardrailIdentifier",Ja5="guardrailProcessingLatency",Hm6="guardrailVersion",SN7="guarded",$g="http",iR="httpError",SM="httpHeader",z56="httpQuery",zH8="input",d$1="invocationArn",Ma5="inputAssessment",CN7="inferenceConfig",Da5="invocationMetrics",Xa5="invokedModelId",Pa5="invokeModel",Wa5="inputSchema",wH8="internalServerException",hN7="inputTokens",Za5="identifier",Ga5="images",c$1="image",fa5="impossible",Ta5="invalid",IN7="json",Va5="key",Na5="kmsKeyId",bN7="location",xN7="latencyMs",uN7="lastModifiedTime",l$1="logicWarning",va5="latency",ka5="logic",vE="message",BN7="modelArn",$56="modelId",Ea5="modelInput",La5="modelOutput",pV7="maxResults",ya5="messageStart",_H8="modelStreamErrorException",Ra5="messageStop",Sa5="maxTokens",mN7="modelTimeoutException",Ca5="managedWordLists",i$1="match",$H8="messages",gN7="metrics",ha5="metadata",Ft="name",Ia5="naturalLanguage",oO8="nextToken",ba5="noTranslations",xa5="outputs",ua5="outputAssessments",OH8="outputDataConfig",Ba5="originalMessage",ma5="outputScope",FN7="originalStatusCode",ga5="outputTokens",Fa5="options",Qa5="output",QN7="premises",n$1="performanceConfig",r$1="performanceConfigLatency",Ua5="piiEntities",UN7="promptRouter",pN7="promptVariables",pa5="policyVersionArn",dN7="qualifiers",da5="regex",cN7="reasoningContent",lN7="redactedContent",iN7="requestMetadata",ca5="resourceName",la5="reasoningText",ia5="regexes",nN7="role",mc="source",dV7="sortBy",rN7="sourceContent",cV7="statusEquals",na5="sensitiveInformationPolicy",ra5="sensitiveInformationPolicyFreeUnits",oa5="sensitiveInformationPolicyUnits",HH8="s3Location",lV7="sortOrder",aa5="s3OutputDataConfig",sa5="streamProcessingMode",oN7="stopReason",ta5="searchResultIndex",ea5="searchResultLocation",aN7="searchResult",As5="supportingRules",qs5="stopSequences",sN7="submitTime",iV7="submitTimeAfter",nV7="submitTimeBefore",Qt="serviceTier",Ks5="systemTool",Ys5="s3Uri",jH8="serviceUnavailableException",zs5="satisfiable",ws5="score",tN7="server",eN7="signature",Av7="smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime",o$1="status",jm6="start",_s5="statements",$s5="stream",a$1="streaming",JH8="system",nR="type",Os5="translationAmbiguous",MH8="toolConfig",Hs5="textCharacters",js5="toolChoice",Js5="tooComplex",DH8="throttlingException",Ms5="topicPolicy",Ds5="topicPolicyUnits",Xs5="topP",XH8="toolResult",Ps5="toolSpec",Ws5="totalTokens",PH8="toolUse",s$1="toolUseId",Zs5="tags",CM="text",Gs5="temperature",fs5="threshold",WH8="title",qv7="total",Ts5="tools",Vs5="tool",Ns5="topics",aP6="trace",t$1="translation",vs5="translations",e$1="usage",ks5="untranslatedClaims",Es5="untranslatedPremises",Ls5="uri",ys5="url",Rs5="value",ZH8="validationException",Ss5="valid",Kv7="video",Cs5="web",hs5="wordPolicy",Is5="wordPolicyUnits",c1="com.amazonaws.bedrockruntime",Yv7=[0,c1,pl5,8,0],AO1=[0,c1,ol5,8,21],bs5=[0,c1,Mn5,8,0],zv7=[0,c1,Dn5,8,0],xs5=[0,c1,yr5,8,15],GH8=[0,c1,xr5,8,21],us5=[-3,c1,gl5,{[lR]:_g,[iR]:403},[vE],[0]];GN.TypeRegistry.for(c1).registerError(us5,sV7);var Bs5=[3,c1,nl5,0,[],[]],ms5=[3,c1,Ql5,0,[Om6,Hm6,mc,oP6,ma5],[[0,1],[0,1],0,[()=>ge5,0],0]],gs5=[3,c1,Ul5,0,[e$1,mt,XN7,xa5,mo5,LN7],[()=>jv7,0,0,()=>de5,[()=>Gv7,0],()=>Ov7]],Fs5=[3,c1,ll5,0,[Ys5,Na5,WN7],[0,0,0]],Qs5=[3,c1,cl5,0,[d$1,BN7,AH8,o$1,vN7,sN7,uN7,NN7,OH8],[0,0,0,0,[()=>Yv7,0],5,5,5,()=>LH8]],Us5=[3,c1,rl5,0,[],[]],ps5=[3,c1,al5,8,[gt],[[()=>GH8,0]]],ds5=[3,c1,sl5,8,[gt],[[()=>GH8,0]]],fH8=[3,c1,Pi5,0,[nR],[0]],cs5=[3,c1,tl5,0,[WH8,mc,rN7,bN7],[0,0,()=>Ce5,()=>Vv7]],wv7=[3,c1,_i5,0,[Oa5],[2]],ls5=[3,c1,$i5,0,[oP6,KH8],[()=>Re5,()=>Se5]],is5=[3,c1,Oi5,0,[WH8,mc,rN7,bN7],[0,0,()=>he5,()=>Vv7]],ns5=[3,c1,Ti5,0,[CM],[0]],rs5=[-3,c1,Hi5,{[lR]:_g,[iR]:400},[vE],[0]];GN.TypeRegistry.for(c1).registerError(rs5,qN7);var os5=[3,c1,qi5,0,[qa5,tO8],[[()=>Y69,0],1]],as5=[3,c1,Yi5,0,[jm6,tO8],[()=>z69,1]],ss5=[3,c1,zi5,0,[tO8],[1]],ts5=[3,c1,Di5,0,[xN7],[1]],es5=[3,c1,Wi5,0,[$56,$H8,JH8,CN7,MH8,yN7,sO8,pN7,MN7,iN7,n$1,Qt],[[0,1],[()=>kH8,0],[()=>EH8,0],()=>Mv7,()=>NH8,()=>yt5,15,[()=>fv7,0],64,[()=>Tv7,0],()=>zO1,()=>wO1]],At5=[3,c1,Zi5,0,[Qa5,oN7,e$1,gN7,DN7,aP6,n$1,Qt],[[()=>w69,0],0,()=>Wv7,()=>ts5,15,[()=>$t5,0],()=>zO1,()=>wO1]],qt5=[3,c1,ki5,0,[e$1,gN7,aP6,n$1,Qt],[()=>Wv7,()=>Kt5,[()=>wt5,0],()=>zO1,()=>wO1]],Kt5=[3,c1,vi5,0,[xN7],[1]],Yt5=[3,c1,Li5,0,[$56,$H8,JH8,CN7,MH8,yN7,sO8,pN7,MN7,iN7,n$1,Qt],[[0,1],[()=>kH8,0],[()=>EH8,0],()=>Mv7,()=>NH8,()=>dt5,15,[()=>fv7,0],64,[()=>Tv7,0],()=>zO1,()=>wO1]],zt5=[3,c1,yi5,0,[$s5],[[()=>_69,16]]],wt5=[3,c1,Ri5,0,[EN7,UN7],[[()=>Hv7,0],()=>Xv7]],_t5=[3,c1,hi5,0,[$H8,JH8,MH8,sO8],[[()=>kH8,0],[()=>EH8,0],()=>NH8,15]],$t5=[3,c1,Si5,0,[EN7,UN7],[[()=>Hv7,0],()=>Xv7]],Ot5=[3,c1,Ii5,0,[$56,zH8],[[0,1],[()=>$69,0]]],Ht5=[3,c1,bi5,0,[hN7],[1]],_v7=[3,c1,mi5,0,[$m6,Ft,mc,eo5,KH8],[0,0,()=>H69,0,()=>wv7]],jt5=[3,c1,Qi5,0,[YH8,jm6,p$1],[1,1,1]],Jt5=[3,c1,Ui5,0,[YH8,jm6,p$1],[1,1,1]],Mt5=[3,c1,pi5,0,[YH8,jm6,p$1],[1,1,1]],Dt5=[3,c1,ii5,0,[d$1],[[0,1]]],Xt5=[3,c1,ni5,0,[d$1,BN7,AH8,o$1,vN7,sN7,uN7,NN7,OH8],[0,0,0,0,[()=>Yv7,0],5,5,5,()=>LH8]],$v7=[3,c1,ci5,0,[Ms5,io5,hs5,na5,co5,bo5,Da5],[()=>nt5,()=>St5,()=>rt5,()=>pt5,()=>ht5,[()=>ft5,0],()=>mt5]],Pt5=[3,c1,An5,0,[t$1,ZN7,l$1],[[()=>Jm6,0],()=>vH8,[()=>qO1,0]]],Wt5=[3,c1,Kn5,0,[CM],[[()=>zv7,0]]],Zt5=[3,c1,qn5,0,[t$1,ZN7,l$1],[[()=>Jm6,0],()=>vH8,[()=>qO1,0]]],qO1=[3,c1,zn5,0,[nR,QN7,fN7],[0,[()=>_m6,0],[()=>_m6,0]]],Gt5=[3,c1,wn5,0,[],[]],ft5=[3,c1,_n5,0,[ja5],[[()=>ue5,0]]],Tt5=[3,c1,$n5,0,[Za5,pa5],[0,0]],Vt5=[3,c1,jn5,0,[t$1,GN7,do5,l$1],[[()=>Jm6,0],[()=>m$1,0],[()=>m$1,0],[()=>qO1,0]]],m$1=[3,c1,Hn5,0,[_s5],[[()=>_m6,0]]],Nt5=[3,c1,Xn5,0,[ka5,Ia5],[[()=>bs5,0],[()=>zv7,0]]],vt5=[3,c1,Zn5,0,[],[]],Jm6=[3,c1,Pn5,0,[QN7,fN7,Es5,ks5,TN7],[[()=>_m6,0],[()=>_m6,0],[()=>rV7,0],[()=>rV7,0],1]],kt5=[3,c1,Wn5,0,[Fa5,wa5],[[()=>me5,0],[()=>xe5,0]]],Et5=[3,c1,fn5,0,[vs5],[[()=>Be5,0]]],Lt5=[3,c1,Vn5,0,[t$1,GN7,As5,l$1],[[()=>Jm6,0],[()=>m$1,0],()=>vH8,[()=>qO1,0]]],yt5=[3,c1,Nn5,0,[Om6,Hm6,aP6],[0,0,0]],Rt5=[3,c1,Ln5,0,[nR,TN7,Ha5,mt,_56],[0,0,0,0,2]],St5=[3,c1,bn5,0,[kN7],[()=>Fe5]],Ct5=[3,c1,Rn5,0,[nR,fs5,ws5,mt,_56],[0,1,1,0,2]],ht5=[3,c1,Cn5,0,[kN7],[()=>Qe5]],It5=[3,c1,hn5,8,[$m6,mc],[0,[()=>M69,0]]],bt5=[3,c1,xn5,0,[CM,dN7],[0,64]],Ov7=[3,c1,mn5,0,[Hs5,Ga5],[()=>lt5,()=>Bt5]],xt5=[3,c1,un5,0,[i$1,mt,_56],[0,0,2]],ut5=[3,c1,gn5,8,[$m6,mc],[0,[()=>D69,0]]],Bt5=[3,c1,Fn5,0,[SN7,qv7],[1,1]],mt5=[3,c1,Qn5,0,[Ja5,e$1,LN7],[1,()=>jv7,()=>Ov7]],gt5=[3,c1,pn5,0,[i$1,nR,mt,_56],[0,0,0,2]],Ft5=[3,c1,cn5,0,[CM],[0]],Qt5=[3,c1,in5,0,[i$1,nR,mt,_56],[0,0,0,2]],Ut5=[3,c1,rn5,0,[Ft,i$1,da5,mt,_56],[0,0,0,0,2]],pt5=[3,c1,sn5,0,[Ua5,ia5],[()=>ce5,()=>le5]],dt5=[3,c1,an5,0,[Om6,Hm6,aP6,sa5],[0,0,0,0]],ct5=[3,c1,Ar5,0,[CM,dN7],[0,64]],lt5=[3,c1,qr5,0,[SN7,qv7],[1,1]],it5=[3,c1,tn5,0,[Ft,nR,mt,_56],[0,0,0,2]],nt5=[3,c1,Yr5,0,[Ns5],[()=>ie5]],Hv7=[3,c1,en5,0,[La5,Ma5,ua5,XN7],[64,[()=>ee5,0],[()=>te5,0],0]],jv7=[3,c1,zr5,0,[Ds5,ro5,Is5,oa5,ra5,lo5,no5,xo5,uo5],[1,1,1,1,1,1,1,1,1]],rt5=[3,c1,wr5,0,[ao5,Ca5],[()=>Ue5,()=>pe5]],Jv7=[3,c1,_r5,0,[$m6,mc],[0,()=>X69]],Mv7=[3,c1,$r5,0,[Sa5,Gs5,Xs5,qs5],[1,1,1,64]],KO1=[-3,c1,Vr5,{[lR]:tN7,[iR]:500},[vE],[0]];GN.TypeRegistry.for(c1).registerError(KO1,tV7);var ot5=[3,c1,Hr5,0,[w56,U$1,PN7,$56,aP6,Om6,Hm6,r$1,Qt],[[()=>AO1,16],[0,{[SM]:aO8}],[0,{[SM]:ml5}],[0,1],[0,{[SM]:JN7}],[0,{[SM]:HN7}],[0,{[SM]:jN7}],[0,{[SM]:F$1}],[0,{[SM]:Q$1}]]],at5=[3,c1,jr5,0,[w56,U$1,r$1,Qt],[[()=>AO1,16],[0,{[SM]:aO8}],[0,{[SM]:F$1}],[0,{[SM]:Q$1}]]],st5=[3,c1,Jr5,0,[w56],[[()=>AO1,0]]],tt5=[3,c1,Pr5,0,[$56,w56],[[0,1],[()=>P69,16]]],et5=[3,c1,Wr5,0,[w56],[[()=>W69,16]]],Ae5=[3,c1,Gr5,0,[w56,U$1,PN7,$56,aP6,Om6,Hm6,r$1,Qt],[[()=>AO1,16],[0,{[SM]:aO8}],[0,{[SM]:Co5}],[0,1],[0,{[SM]:JN7}],[0,{[SM]:HN7}],[0,{[SM]:jN7}],[0,{[SM]:F$1}],[0,{[SM]:Q$1}]]],qe5=[3,c1,fr5,0,[w56,U$1,r$1,Qt],[[()=>T69,16],[0,{[SM]:ho5}],[0,{[SM]:F$1}],[0,{[SM]:Q$1}]]],Ke5=[3,c1,vr5,0,[iV7,nV7,cV7,pV7,oO8,dV7,lV7],[[5,{[z56]:iV7}],[5,{[z56]:nV7}],[0,{[z56]:cV7}],[1,{[z56]:pV7}],[0,{[z56]:oO8}],[0,{[z56]:dV7}],[0,{[z56]:lV7}]]],Ye5=[3,c1,kr5,0,[oO8,Io5],[0,[()=>ye5,0]]],Dv7=[3,c1,Er5,0,[nN7,oP6],[0,[()=>Ie5,0]]],ze5=[3,c1,Sr5,0,[nN7],[0]],we5=[3,c1,hr5,0,[oN7,DN7],[0,15]],_e5=[-3,c1,Lr5,{[lR]:_g,[iR]:424},[vE,FN7,ca5],[0,1,0]];GN.TypeRegistry.for(c1).registerError(_e5,wN7);var $e5=[-3,c1,Rr5,{[lR]:_g,[iR]:429},[vE],[0]];GN.TypeRegistry.for(c1).registerError($e5,_N7);var YO1=[-3,c1,Cr5,{[lR]:_g,[iR]:424},[vE,FN7,Ba5],[0,1,0]];GN.TypeRegistry.for(c1).registerError(YO1,ON7);var TH8=[-3,c1,Ir5,{[lR]:_g,[iR]:408},[vE],[0]];GN.TypeRegistry.for(c1).registerError(TH8,$N7);var Oe5=[3,c1,Br5,8,[gt],[[()=>GH8,0]]],zO1=[3,c1,ur5,0,[va5],[0]],Xv7=[3,c1,mr5,0,[Xa5],[0]],He5=[3,c1,lr5,8,[CM,eN7],[0,0]],je5=[-3,c1,dr5,{[lR]:_g,[iR]:404},[vE],[0]];GN.TypeRegistry.for(c1).registerError(je5,KN7);var VH8=[3,c1,sr5,0,[Ls5,WN7],[0,0]],Pv7=[3,c1,er5,0,[mc,WH8,oP6,KH8],[0,0,()=>ne5,()=>wv7]],Je5=[3,c1,Ao5,0,[CM],[0]],Me5=[3,c1,Ko5,0,[ta5,jm6,p$1],[1,1,1]],De5=[-3,c1,tr5,{[lR]:_g,[iR]:400},[vE],[0]];GN.TypeRegistry.for(c1).registerError(De5,YN7);var wO1=[3,c1,Yo5,0,[nR],[0]],_O1=[-3,c1,_o5,{[lR]:tN7,[iR]:503},[vE],[0]];GN.TypeRegistry.for(c1).registerError(_O1,zN7);var Xe5=[3,c1,zo5,0,[Ft],[0]],Pe5=[3,c1,nr5,0,[AH8,$56,Ea5,OH8,Zs5],[[0,4],0,[()=>xs5,0],()=>LH8,()=>re5]],We5=[3,c1,rr5,0,[d$1],[0]],Ze5=[3,c1,wo5,0,[Ft],[0]],Ge5=[3,c1,$o5,0,[Va5,Rs5],[0,0]],$O1=[-3,c1,jo5,{[lR]:_g,[iR]:429},[vE],[0]];GN.TypeRegistry.for(c1).registerError($O1,eV7);var Wv7=[3,c1,To5,0,[hN7,ga5,Ws5,oo5,so5],[1,1,1,1,1]],NH8=[3,c1,Oo5,0,[Ts5,js5],[()=>se5,()=>v69]],fe5=[3,c1,Do5,0,[s$1,oP6,o$1,nR],[0,()=>ae5,0,0]],Te5=[3,c1,Wo5,0,[s$1,nR,o$1],[0,0,0]],Ve5=[3,c1,fo5,0,[Ft,_a5,Wa5],[0,0,()=>k69]],Ne5=[3,c1,Vo5,0,[s$1,Ft,zH8,nR],[0,0,15,0]],ve5=[3,c1,No5,0,[zH8],[0]],ke5=[3,c1,vo5,0,[s$1,Ft,nR],[0,0,0]],OO1=[-3,c1,yo5,{[lR]:_g,[iR]:400},[vE],[0]];GN.TypeRegistry.for(c1).registerError(OO1,AN7);var Zv7=[3,c1,Lo5,0,[$m6,mc],[0,()=>y69]],Ee5=[3,c1,So5,0,[ys5,$a5],[0,0]],Le5=[-3,Av7,"BedrockRuntimeServiceException",0,[],[]];GN.TypeRegistry.for(Av7).registerError(Le5,fN);var ye5=[1,c1,il5,0,[()=>Qs5,0]],Re5=[1,c1,Ji5,0,()=>A69],Se5=[1,c1,ui5,0,()=>cs5],Ce5=[1,c1,Vi5,0,()=>q69],he5=[1,c1,Ni5,0,()=>ns5],Ie5=[1,c1,el5,0,[()=>K69,0]],be5=[1,c1,gi5,0,()=>O69],Gv7=[1,c1,ri5,0,[()=>$v7,0]],xe5=[1,c1,si5,0,[()=>m$1,0]],ue5=[1,c1,ei5,0,[()=>j69,0]],rV7=[1,c1,Yn5,0,[()=>Wt5,0]],vH8=[1,c1,On5,0,()=>Tt5],_m6=[1,c1,Jn5,0,[()=>Nt5,0]],Be5=[1,c1,Gn5,0,[()=>Jm6,0]],me5=[1,c1,Tn5,0,[()=>Et5,0]],ge5=[1,c1,kn5,0,[()=>J69,0]],Fe5=[1,c1,yn5,0,()=>Rt5],Qe5=[1,c1,Sn5,0,()=>Ct5],Ue5=[1,c1,Bn5,0,()=>xt5],pe5=[1,c1,dn5,0,()=>gt5],de5=[1,c1,ln5,0,()=>Ft5],ce5=[1,c1,nn5,0,()=>Qt5],le5=[1,c1,on5,0,()=>Ut5],ie5=[1,c1,Kr5,0,()=>it5],kH8=[1,c1,br5,0,[()=>Dv7,0]],ne5=[1,c1,qo5,0,()=>Je5],EH8=[1,c1,or5,0,[()=>V69,0]],re5=[1,c1,Mo5,0,()=>Ge5],oe5=[1,c1,Xo5,0,()=>E69],ae5=[1,c1,Zo5,0,()=>L69],se5=[1,c1,ko5,0,()=>N69],te5=[2,c1,oi5,0,[0,0],[()=>Gv7,0]],ee5=[2,c1,ai5,0,[0,0],[()=>$v7,0]],fv7=[2,c1,gr5,8,0,()=>Z69],Tv7=[2,c1,pr5,8,0,0],LH8=[3,c1,dl5,0,[aa5],[()=>Fs5]],A69=[3,c1,ji5,0,[CM],[0]],Vv7=[3,c1,Mi5,0,[Cs5,Ka5,za5,Ya5,ea5],[()=>Ee5,()=>jt5,()=>Mt5,()=>Jt5,()=>Me5]],q69=[3,c1,fi5,0,[CM],[0]],K69=[3,c1,wi5,0,[CM,c$1,VN7,Kv7,PH8,XH8,RN7,eO8,cN7,po5,aN7],[0,()=>Jv7,()=>_v7,()=>Zv7,()=>Ne5,()=>fe5,[()=>Nv7,0],()=>fH8,[()=>G69,0],()=>ls5,()=>Pv7]],Y69=[3,c1,Ai5,0,[CM,PH8,XH8,cN7,to5],[0,()=>ve5,()=>oe5,[()=>f69,0],()=>is5]],z69=[3,c1,Ki5,0,[PH8,XH8],[()=>ke5,()=>Te5]],w69=[3,c1,Xi5,0,[vE],[[()=>Dv7,0]]],_69=[3,c1,Ei5,{[a$1]:1},[ya5,Qo5,Fo5,Uo5,Ra5,ha5,wH8,_H8,ZH8,DH8,jH8],[()=>ze5,()=>as5,[()=>os5,0],()=>ss5,()=>we5,[()=>qt5,0],[()=>KO1,0],[()=>YO1,0],[()=>OO1,0],[()=>$O1,0],[()=>_O1,0]]],$69=[3,c1,Ci5,0,[Pa5,Aa5],[[()=>st5,0],[()=>_t5,0]]],O69=[3,c1,Fi5,0,[CM],[0]],H69=[3,c1,di5,0,[gt,HH8,CM,oP6],[21,()=>VH8,0,()=>be5]],j69=[3,c1,ti5,0,[Ss5,Ta5,zs5,fa5,Os5,Js5,ba5],[[()=>Lt5,0],[()=>Zt5,0],[()=>Vt5,0],[()=>Pt5,0],[()=>kt5,0],()=>vt5,()=>Gt5]],J69=[3,c1,vn5,0,[CM,c$1],[()=>ct5,[()=>ut5,0]]],Nv7=[3,c1,En5,0,[CM,c$1],[()=>bt5,[()=>It5,0]]],M69=[3,c1,In5,8,[gt],[21]],D69=[3,c1,Un5,8,[gt],[21]],X69=[3,c1,Tr5,0,[gt,HH8],[21,()=>VH8]],P69=[3,c1,Dr5,{[a$1]:1},[qH8],[[()=>ps5,0]]],W69=[3,c1,Xr5,{[a$1]:1},[qH8,wH8,_H8,ZH8,DH8,mN7,jH8],[[()=>ds5,0],[()=>KO1,0],[()=>YO1,0],[()=>OO1,0],[()=>$O1,0],[()=>TH8,0],[()=>_O1,0]]],Z69=[3,c1,Fr5,0,[CM],[0]],G69=[3,c1,Qr5,8,[la5,lN7],[[()=>He5,0],21]],f69=[3,c1,Ur5,8,[CM,lN7,eN7],[0,21,0]],T69=[3,c1,cr5,{[a$1]:1},[qH8,wH8,_H8,ZH8,DH8,mN7,jH8],[[()=>Oe5,0],[()=>KO1,0],[()=>YO1,0],[()=>OO1,0],[()=>$O1,0],[()=>TH8,0],[()=>_O1,0]]],V69=[3,c1,ar5,0,[CM,RN7,eO8],[0,[()=>Nv7,0],()=>fH8]],N69=[3,c1,Eo5,0,[Ps5,Ks5,eO8],[()=>Ve5,()=>Ze5,()=>fH8]],v69=[3,c1,Ho5,0,[go5,Bo5,Vs5],[()=>Us5,()=>Bs5,()=>Xe5]],k69=[3,c1,Jo5,0,[IN7],[15]],E69=[3,c1,Po5,0,[CM],[0]],L69=[3,c1,Go5,0,[IN7,CM,c$1,VN7,Kv7,aN7],[15,0,()=>Jv7,()=>_v7,()=>Zv7,()=>Pv7]],y69=[3,c1,Ro5,0,[gt,HH8],[21,()=>VH8]],R69=[9,c1,Fl5,{[$g]:["POST","/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply",200]},()=>ms5,()=>gs5],S69=[9,c1,Bi5,{[$g]:["POST","/model/{modelId}/converse",200]},()=>es5,()=>At5],C69=[9,c1,Gi5,{[$g]:["POST","/model/{modelId}/converse-stream",200]},()=>Yt5,()=>zt5],h69=[9,c1,xi5,{[$g]:["POST","/model/{modelId}/count-tokens",200]},()=>Ot5,()=>Ht5],I69=[9,c1,li5,{[$g]:["GET","/async-invoke/{invocationArn}",200]},()=>Dt5,()=>Xt5],b69=[9,c1,Or5,{[$g]:["POST","/model/{modelId}/invoke",200]},()=>ot5,()=>at5],x69=[9,c1,Mr5,{[$g]:["POST","/model/{modelId}/invoke-with-bidirectional-stream",200]},()=>tt5,()=>et5],u69=[9,c1,Zr5,{[$g]:["POST","/model/{modelId}/invoke-with-response-stream",200]},()=>Ae5,()=>qe5],B69=[9,c1,Nr5,{[$g]:["GET","/async-invoke",200]},()=>Ke5,()=>Ye5],m69=[9,c1,ir5,{[$g]:["POST","/async-invoke",200]},()=>Pe5,()=>We5];class yH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ApplyGuardrail",{}).n("BedrockRuntimeClient","ApplyGuardrailCommand").sc(R69).build(){}class RH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","Converse",{}).n("BedrockRuntimeClient","ConverseCommand").sc(S69).build(){}class SH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ConverseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","ConverseStreamCommand").sc(C69).build(){}class CH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","CountTokens",{}).n("BedrockRuntimeClient","CountTokensCommand").sc(h69).build(){}class hH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","GetAsyncInvoke",{}).n("BedrockRuntimeClient","GetAsyncInvokeCommand").sc(I69).build(){}class IH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").sc(b69).build(){}class bH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions()),oV7.getEventStreamPlugin(K),aV7.getWebSocketPlugin(K,{headerPrefix:"x-amz-bedrock-"})]}).s("AmazonBedrockFrontendService","InvokeModelWithBidirectionalStream",{eventStream:{input:!0,output:!0}}).n("BedrockRuntimeClient","InvokeModelWithBidirectionalStreamCommand").sc(x69).build(){}class xH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").sc(u69).build(){}class HO1 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","ListAsyncInvokes",{}).n("BedrockRuntimeClient","ListAsyncInvokesCommand").sc(B69).build(){}class uH8 extends B0.Command.classBuilder().ep(wg).m(function(A,q,K,Y){return[Jb.getEndpointPlugin(K,A.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","StartAsyncInvoke",{}).n("BedrockRuntimeClient","StartAsyncInvokeCommand").sc(m69).build(){}var g69={ApplyGuardrailCommand:yH8,ConverseCommand:RH8,ConverseStreamCommand:SH8,CountTokensCommand:CH8,GetAsyncInvokeCommand:hH8,InvokeModelCommand:IH8,InvokeModelWithBidirectionalStreamCommand:bH8,InvokeModelWithResponseStreamCommand:xH8,ListAsyncInvokesCommand:HO1,StartAsyncInvokeCommand:uH8};class BH8 extends g$1{}B0.createAggregatedClient(g69,BH8);var F69=B$1.createPaginator(g$1,HO1,"nextToken","nextToken","maxResults"),Q69={COMPLETED:"Completed",FAILED:"Failed",IN_PROGRESS:"InProgress"},U69={SUBMISSION_TIME:"SubmissionTime"},p69={ASCENDING:"Ascending",DESCENDING:"Descending"},d69={JPEG:"jpeg",PNG:"png"},c69={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},l69={FULL:"FULL",INTERVENTIONS:"INTERVENTIONS"},i69={INPUT:"INPUT",OUTPUT:"OUTPUT"},n69={GUARDRAIL_INTERVENED:"GUARDRAIL_INTERVENED",NONE:"NONE"},r69={ALWAYS_FALSE:"ALWAYS_FALSE",ALWAYS_TRUE:"ALWAYS_TRUE"},o69={BLOCKED:"BLOCKED",NONE:"NONE"},a69={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},s69={HIGH:"HIGH",LOW:"LOW",MEDIUM:"MEDIUM",NONE:"NONE"},t69={HATE:"HATE",INSULTS:"INSULTS",MISCONDUCT:"MISCONDUCT",PROMPT_ATTACK:"PROMPT_ATTACK",SEXUAL:"SEXUAL",VIOLENCE:"VIOLENCE"},e69={BLOCKED:"BLOCKED",NONE:"NONE"},A19={GROUNDING:"GROUNDING",RELEVANCE:"RELEVANCE"},q19={ANONYMIZED:"ANONYMIZED",BLOCKED:"BLOCKED",NONE:"NONE"},K19={ADDRESS:"ADDRESS",AGE:"AGE",AWS_ACCESS_KEY:"AWS_ACCESS_KEY",AWS_SECRET_KEY:"AWS_SECRET_KEY",CA_HEALTH_NUMBER:"CA_HEALTH_NUMBER",CA_SOCIAL_INSURANCE_NUMBER:"CA_SOCIAL_INSURANCE_NUMBER",CREDIT_DEBIT_CARD_CVV:"CREDIT_DEBIT_CARD_CVV",CREDIT_DEBIT_CARD_EXPIRY:"CREDIT_DEBIT_CARD_EXPIRY",CREDIT_DEBIT_CARD_NUMBER:"CREDIT_DEBIT_CARD_NUMBER",DRIVER_ID:"DRIVER_ID",EMAIL:"EMAIL",INTERNATIONAL_BANK_ACCOUNT_NUMBER:"INTERNATIONAL_BANK_ACCOUNT_NUMBER",IP_ADDRESS:"IP_ADDRESS",LICENSE_PLATE:"LICENSE_PLATE",MAC_ADDRESS:"MAC_ADDRESS",NAME:"NAME",PASSWORD:"PASSWORD",PHONE:"PHONE",PIN:"PIN",SWIFT_CODE:"SWIFT_CODE",UK_NATIONAL_HEALTH_SERVICE_NUMBER:"UK_NATIONAL_HEALTH_SERVICE_NUMBER",UK_NATIONAL_INSURANCE_NUMBER:"UK_NATIONAL_INSURANCE_NUMBER",UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER:"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",URL:"URL",USERNAME:"USERNAME",US_BANK_ACCOUNT_NUMBER:"US_BANK_ACCOUNT_NUMBER",US_BANK_ROUTING_NUMBER:"US_BANK_ROUTING_NUMBER",US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER:"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",US_PASSPORT_NUMBER:"US_PASSPORT_NUMBER",US_SOCIAL_SECURITY_NUMBER:"US_SOCIAL_SECURITY_NUMBER",VEHICLE_IDENTIFICATION_NUMBER:"VEHICLE_IDENTIFICATION_NUMBER"},Y19={BLOCKED:"BLOCKED",NONE:"NONE"},z19={DENY:"DENY"},w19={BLOCKED:"BLOCKED",NONE:"NONE"},_19={PROFANITY:"PROFANITY"},$19={DISABLED:"disabled",ENABLED:"enabled",ENABLED_FULL:"enabled_full"},O19={DEFAULT:"default"},H19={CSV:"csv",DOC:"doc",DOCX:"docx",HTML:"html",MD:"md",PDF:"pdf",TXT:"txt",XLS:"xls",XLSX:"xlsx"},j19={JPEG:"jpeg",PNG:"png"},J19={GROUNDING_SOURCE:"grounding_source",GUARD_CONTENT:"guard_content",QUERY:"query"},M19={GIF:"gif",JPEG:"jpeg",PNG:"png",WEBP:"webp"},D19={FLV:"flv",MKV:"mkv",MOV:"mov",MP4:"mp4",MPEG:"mpeg",MPG:"mpg",THREE_GP:"three_gp",WEBM:"webm",WMV:"wmv"},X19={ERROR:"error",SUCCESS:"success"},P19={SERVER_TOOL_USE:"server_tool_use"},W19={ASSISTANT:"assistant",USER:"user"},Z19={OPTIMIZED:"optimized",STANDARD:"standard"},G19={DEFAULT:"default",FLEX:"flex",PRIORITY:"priority"},f19={CONTENT_FILTERED:"content_filtered",END_TURN:"end_turn",GUARDRAIL_INTERVENED:"guardrail_intervened",MAX_TOKENS:"max_tokens",MODEL_CONTEXT_WINDOW_EXCEEDED:"model_context_window_exceeded",STOP_SEQUENCE:"stop_sequence",TOOL_USE:"tool_use"},T19={ASYNC:"async",SYNC:"sync"},V19={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_FULL:"ENABLED_FULL"};Object.defineProperty(mH8,"$Command",{enumerable:!0,get:function(){return B0.Command}});Object.defineProperty(mH8,"__Client",{enumerable:!0,get:function(){return B0.Client}});mH8.AccessDeniedException=sV7;mH8.ApplyGuardrailCommand=yH8;mH8.AsyncInvokeStatus=Q69;mH8.BedrockRuntime=BH8;mH8.BedrockRuntimeClient=g$1;mH8.BedrockRuntimeServiceException=fN;mH8.CachePointType=O19;mH8.ConflictException=qN7;mH8.ConversationRole=W19;mH8.ConverseCommand=RH8;mH8.ConverseStreamCommand=SH8;mH8.CountTokensCommand=CH8;mH8.DocumentFormat=H19;mH8.GetAsyncInvokeCommand=hH8;mH8.GuardrailAction=n69;mH8.GuardrailAutomatedReasoningLogicWarningType=r69;mH8.GuardrailContentFilterConfidence=a69;mH8.GuardrailContentFilterStrength=s69;mH8.GuardrailContentFilterType=t69;mH8.GuardrailContentPolicyAction=o69;mH8.GuardrailContentQualifier=c69;mH8.GuardrailContentSource=i69;mH8.GuardrailContextualGroundingFilterType=A19;mH8.GuardrailContextualGroundingPolicyAction=e69;mH8.GuardrailConverseContentQualifier=J19;mH8.GuardrailConverseImageFormat=j19;mH8.GuardrailImageFormat=d69;mH8.GuardrailManagedWordType=_19;mH8.GuardrailOutputScope=l69;mH8.GuardrailPiiEntityType=K19;mH8.GuardrailSensitiveInformationPolicyAction=q19;mH8.GuardrailStreamProcessingMode=T19;mH8.GuardrailTopicPolicyAction=Y19;mH8.GuardrailTopicType=z19;mH8.GuardrailTrace=$19;mH8.GuardrailWordPolicyAction=w19;mH8.ImageFormat=M19;mH8.InternalServerException=tV7;mH8.InvokeModelCommand=IH8;mH8.InvokeModelWithBidirectionalStreamCommand=bH8;mH8.InvokeModelWithResponseStreamCommand=xH8;mH8.ListAsyncInvokesCommand=HO1;mH8.ModelErrorException=wN7;mH8.ModelNotReadyException=_N7;mH8.ModelStreamErrorException=ON7;mH8.ModelTimeoutException=$N7;mH8.PerformanceConfigLatency=Z19;mH8.ResourceNotFoundException=KN7;mH8.ServiceQuotaExceededException=YN7;mH8.ServiceTierType=G19;mH8.ServiceUnavailableException=zN7;mH8.SortAsyncInvocationBy=U69;mH8.SortOrder=p69;mH8.StartAsyncInvokeCommand=uH8;mH8.StopReason=f19;mH8.ThrottlingException=eV7;mH8.ToolResultStatus=X19;mH8.ToolUseType=P19;mH8.Trace=V19;mH8.ValidationException=AN7;mH8.VideoFormat=D19;mH8.paginateListAsyncInvokes=F69});function rR(A,q){return A.find((K)=>K.includes(q))??null}async function kv7(){let{BedrockClient:A}=await Promise.resolve().then(() => e(L$1(),1)),q=Q46(),K=$1(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Y={region:q,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await aw8(),...K&&{requestHandler:new(await Promise.resolve().then(() => e($N(),1))).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await Promise.resolve().then(() => e(pw(),1))).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!K&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let z=await Ut();if(z)Y.credentials={accessKeyId:z.accessKeyId,secretAccessKey:z.secretAccessKey,sessionToken:z.sessionToken}}return new A(Y)}async function Ev7(){let{BedrockRuntimeClient:A}=await Promise.resolve().then(() => e(jO1(),1)),q=Q46(),K=$1(process.env.CLAUDE_CODE_SKIP_BEDROCK_AUTH),Y={region:q,...process.env.ANTHROPIC_BEDROCK_BASE_URL&&{endpoint:process.env.ANTHROPIC_BEDROCK_BASE_URL},...await aw8(),...K&&{requestHandler:new(await Promise.resolve().then(() => e($N(),1))).NodeHttpHandler,httpAuthSchemes:[{schemeId:"smithy.api#noAuth",identityProvider:()=>async()=>({}),signer:new(await Promise.resolve().then(() => e(pw(),1))).NoAuthSigner}],httpAuthSchemeProvider:()=>[{schemeId:"smithy.api#noAuth"}]}};if(!K&&!process.env.AWS_BEARER_TOKEN_BEDROCK){let z=await Ut();if(z)Y.credentials={accessKeyId:z.accessKeyId,secretAccessKey:z.secretAccessKey,sessionToken:z.sessionToken}}return new A(Y)}function gH8(A){return A.startsWith("anthropic.")}function h89(A){if(!A.startsWith("arn:"))return A;let q=A.lastIndexOf("/");if(q===-1)return A;return A.substring(q+1)}function FH8(A){let q=h89(A);for(let K of C89)if(q.startsWith(`${K}.anthropic.`))return K;return}function Lv7(A,q){let K=FH8(A);if(K)return A.replace(`${K}.`,`${q}.`);if(gH8(A))return`${q}.${A}`;return A}var vv7,JO1,C89;var Mm6=k(()=>{Eq();bA();Z8();x1();VE();vv7=T8(async function(){let[A,{ListInferenceProfilesCommand:q}]=await Promise.all([kv7(),Promise.resolve().then(() => e(L$1(),1))]),K=[],Y;try{do{let z=new q({...Y&&{nextToken:Y},typeEquals:"SYSTEM_DEFINED"}),w=await A.send(z);if(w.inferenceProfileSummaries)K.push(...w.inferenceProfileSummaries);Y=w.nextToken}while(Y);return K.filter((z)=>z.inferenceProfileId?.includes("anthropic")).map((z)=>z.inferenceProfileId).filter(Boolean)}catch(z){throw $6(z),z}});JO1=T8(async function(A){try{let[q,{GetInferenceProfileCommand:K}]=await Promise.all([kv7(),Promise.resolve().then(() => e(L$1(),1))]),Y=new K({inferenceProfileIdentifier:A}),z=await q.send(Y);if(!z.models||z.models.length===0)return null;let w=z.models[0];if(!w?.modelArn)return null;let _=w.modelArn.lastIndexOf("/");return _>=0?w.modelArn.substring(_+1):w.modelArn}catch(q){return $6(q),null}});C89=["us","eu","apac","global"]});function dt(A){if(D7()==="foundry")return;let q=A.toLowerCase();if(q.includes("claude-opus-4-6[1m]"))return"Opus 4.6 (with 1M context)";if(q.includes("claude-opus-4-6"))return"Opus 4.6";if(q.includes("claude-opus-4-5"))return"Opus 4.5";if(q.includes("claude-opus-4-1"))return"Opus 4.1";if(q.includes("claude-opus-4"))return"Opus 4";if(q.includes("claude-sonnet-4-6[1m]"))return"Sonnet 4.6 (with 1M context)";if(q.includes("claude-sonnet-4-6"))return"Sonnet 4.6";if(q.includes("claude-sonnet-4-5[1m]"))return"Sonnet 4.5 (with 1M context)";if(q.includes("claude-sonnet-4-5"))return"Sonnet 4.5";if(q.includes("claude-sonnet-4[1m]"))return"Sonnet 4 (with 1M context)";if(q.includes("claude-sonnet-4"))return"Sonnet 4";if(q.includes("claude-3-7-sonnet"))return"Claude 3.7 Sonnet";if(q.includes("claude-3-5-sonnet"))return"Claude 3.5 Sonnet";if(q.includes("claude-haiku-4-5"))return"Haiku 4.5";if(q.includes("claude-3-5-haiku"))return"Claude 3.5 Haiku";return}var Dm6,Xm6,Pm6,Wm6,Zm6,Gm6,fm6,Tm6,Vm6,pt,Nm6;var sP6=k(()=>{yz();Dm6={firstParty:"claude-3-7-sonnet-20250219",bedrock:"us.anthropic.claude-3-7-sonnet-20250219-v1:0",vertex:"claude-3-7-sonnet@20250219",foundry:"claude-3-7-sonnet"},Xm6={firstParty:"claude-3-5-sonnet-20241022",bedrock:"anthropic.claude-3-5-sonnet-20241022-v2:0",vertex:"claude-3-5-sonnet-v2@20241022",foundry:"claude-3-5-sonnet"},Pm6={firstParty:"claude-3-5-haiku-20241022",bedrock:"us.anthropic.claude-3-5-haiku-20241022-v1:0",vertex:"claude-3-5-haiku@20241022",foundry:"claude-3-5-haiku"},Wm6={firstParty:"claude-haiku-4-5-20251001",bedrock:"us.anthropic.claude-haiku-4-5-20251001-v1:0",vertex:"claude-haiku-4-5@20251001",foundry:"claude-haiku-4-5"},Zm6={firstParty:"claude-sonnet-4-20250514",bedrock:"us.anthropic.claude-sonnet-4-20250514-v1:0",vertex:"claude-sonnet-4@20250514",foundry:"claude-sonnet-4"},Gm6={firstParty:"claude-sonnet-4-5-20250929",bedrock:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",vertex:"claude-sonnet-4-5@20250929",foundry:"claude-sonnet-4-5"},fm6={firstParty:"claude-opus-4-20250514",bedrock:"us.anthropic.claude-opus-4-20250514-v1:0",vertex:"claude-opus-4@20250514",foundry:"claude-opus-4"},Tm6={firstParty:"claude-opus-4-1-20250805",bedrock:"us.anthropic.claude-opus-4-1-20250805-v1:0",vertex:"claude-opus-4-1@20250805",foundry:"claude-opus-4-1"},Vm6={firstParty:"claude-opus-4-5-20251101",bedrock:"us.anthropic.claude-opus-4-5-20251101-v1:0",vertex:"claude-opus-4-5@20251101",foundry:"claude-opus-4-5"},pt={firstParty:"claude-opus-4-6",bedrock:"us.anthropic.claude-opus-4-6-v1",vertex:"claude-opus-4-6",foundry:"claude-opus-4-6"},Nm6={firstParty:"claude-sonnet-4-6",bedrock:"us.anthropic.claude-sonnet-4-6",vertex:"claude-sonnet-4-6",foundry:"claude-sonnet-4-6"}});function Og(A){let q=[],K=!1;async function Y(){if(K)return;if(q.length===0)return;K=!0;while(q.length>0){let{args:z,resolve:w,reject:_,context:$}=q.shift();try{let O=await A.apply($,z);w(O)}catch(O){_(O)}}if(K=!1,q.length>0)Y()}return function(...z){return new Promise((w,_)=>{q.push({args:z,resolve:w,reject:_,context:this}),Y()})}}function vm6(A){return{haiku35:Pm6[A],haiku45:Wm6[A],sonnet35:Xm6[A],sonnet37:Dm6[A],sonnet40:Zm6[A],sonnet45:Gm6[A],sonnet46:Nm6[A],opus40:fm6[A],opus41:Tm6[A],opus45:Vm6[A],opus46:pt[A]}}async function I89(){let A;try{A=await vv7()}catch(M){return $6(M),vm6("bedrock")}if(!A?.length)return vm6("bedrock");let q=rR(A,"claude-3-5-haiku-20241022"),K=rR(A,"claude-haiku-4-5-20251001"),Y=rR(A,"claude-3-5-sonnet-20241022"),z=rR(A,"claude-3-7-sonnet-20250219"),w=rR(A,"claude-sonnet-4-20250514"),_=rR(A,"claude-sonnet-4-5-20250929"),$=rR(A,"claude-sonnet-4-6"),O=rR(A,"claude-opus-4-20250514"),H=rR(A,"claude-opus-4-1-20250805"),j=rR(A,"claude-opus-4-5-20251101"),J=rR(A,"claude-opus-4-6");return{haiku35:q||Pm6.bedrock,haiku45:K||Wm6.bedrock,sonnet35:Y||Xm6.bedrock,sonnet37:z||Dm6.bedrock,sonnet40:w||Zm6.bedrock,sonnet45:_||Gm6.bedrock,sonnet46:$||Nm6.bedrock,opus40:O||fm6.bedrock,opus41:H||Tm6.bedrock,opus45:j||Vm6.bedrock,opus46:J||pt.bedrock}}function b89(){if(VH6()!==null)return;if(D7()!=="bedrock"){$R6(vm6(D7()));return}yv7()}function p5(){let A=VH6();if(A===null)return b89(),vm6(D7());return A}async function Rv7(){if(VH6()!==null)return;if(D7()!=="bedrock"){$R6(vm6(D7()));return}await yv7()}var yv7;var O56=k(()=>{Q1();x1();Mm6();sP6();yz();yv7=Og(async()=>{if(VH6()!==null)return;try{let A=await I89();$R6(A)}catch(A){$6(A)}})});function tP6(A,q){if(gq()&&q)return x89;return A?bv7:H56}function B89(A,q){return q.input_tokens/1e6*A.inputTokens+q.output_tokens/1e6*A.outputTokens+(q.cache_read_input_tokens??0)/1e6*A.promptCacheReadTokens+(q.cache_creation_input_tokens??0)/1e6*A.promptCacheWriteTokens+(q.server_tool_use?.web_search_requests??0)*A.webSearchRequests}function Cv7(A){return A.input_tokens+(A.cache_read_input_tokens??0)+(A.cache_creation_input_tokens??0)}function m89(A,q){let K=t$(A);if(K===t$(pt.firstParty)){let z=q.speed==="fast",w=Cv7(q)>200000;return tP6(w,z)}let Y=MO1[K];if(!Y)return hv7(A,K),MO1[t$(Hg())]??u89;if(Cv7(q)>200000){if(Y===j56)return DO1;if(Y===H56)return bv7;hv7(A,K)}return Y}function hv7(A,q){c("tengu_unknown_model_cost",{model:A,shortName:q}),e11()}function km6(A,q){let K=m89(A,q);return B89(K,q)}function XO1(A,q){let K={input_tokens:q.inputTokens,output_tokens:q.outputTokens,cache_read_input_tokens:q.cacheReadInputTokens,cache_creation_input_tokens:q.cacheCreationInputTokens};return km6(A,K)}function Iv7(A){if(Number.isInteger(A))return`$${A}`;return`$${A.toFixed(2)}`}function oR(A){return`${Iv7(A.inputTokens)}/${Iv7(A.outputTokens)} per Mtok`}var j56,Sv7,H56,bv7,x89,DO1,QH8,UH8,u89,MO1;var ct=k(()=>{kE();B1();aZ();sP6();Xq();j56={inputTokens:3,outputTokens:15,promptCacheWriteTokens:3.75,promptCacheReadTokens:0.3,webSearchRequests:0.01},Sv7={inputTokens:15,outputTokens:75,promptCacheWriteTokens:18.75,promptCacheReadTokens:1.5,webSearchRequests:0.01},H56={inputTokens:5,outputTokens:25,promptCacheWriteTokens:6.25,promptCacheReadTokens:0.5,webSearchRequests:0.01},bv7={inputTokens:10,outputTokens:37.5,promptCacheWriteTokens:12.5,promptCacheReadTokens:1,webSearchRequests:0.01},x89={inputTokens:30,outputTokens:150,promptCacheWriteTokens:37.5,promptCacheReadTokens:3,webSearchRequests:0.01},DO1={inputTokens:6,outputTokens:22.5,promptCacheWriteTokens:7.5,promptCacheReadTokens:0.6,webSearchRequests:0.01},QH8={inputTokens:0.8,outputTokens:4,promptCacheWriteTokens:1,promptCacheReadTokens:0.08,webSearchRequests:0.01},UH8={inputTokens:1,outputTokens:5,promptCacheWriteTokens:1.25,promptCacheReadTokens:0.1,webSearchRequests:0.01},u89=H56;MO1={[t$(Pm6.firstParty)]:QH8,[t$(Wm6.firstParty)]:UH8,[t$(Xm6.firstParty)]:j56,[t$(Dm6.firstParty)]:j56,[t$(Zm6.firstParty)]:j56,[t$(Gm6.firstParty)]:H56,[t$(Nm6.firstParty)]:H56,[t$(fm6.firstParty)]:Sv7,[t$(Tm6.firstParty)]:Sv7,[t$(Vm6.firstParty)]:H56,[t$(pt.firstParty)]:H56}});var B9,Em6="∙",lt="✻",it="↯",pH8="▪",xv7="↻",Lm6,PO1="·✔︎·",WO1="×";var j$=k(()=>{K9();B9=YA.platform==="darwin"?"⏺":"●",Lm6=["·|·","·/·","·—·","·\\·"]});function gc(A){return J56.includes(A)}function eP6(A){return g89.includes(A)}var J56,g89;var A06=k(()=>{J56=["sonnet","opus","haiku","best","sonnet[1m]","opus[1m]","opusplan"];g89=["sonnet","opus","haiku"]});function F89(A,q){if(A.includes(q))return!0;if(gc(A))return J5(A).toLowerCase().includes(q);return!1}function uv7(A,q){if(!A.startsWith(q))return!1;return A.length===q.length||A[q.length]==="-"}function Q89(A,q){let K=gc(A)?J5(A).toLowerCase():A;if(uv7(K,q))return!0;if(!q.startsWith("claude-")&&uv7(K,`claude-${q}`))return!0;return!1}function Bv7(A,q){for(let K of q){if(eP6(K))continue;let Y=K.indexOf(A);if(Y===-1)continue;let z=Y+A.length;if(z===K.length||K[z]==="-")return!0}return!1}function nt(A){let q=BA()||{},{availableModels:K}=q;if(!K)return!0;if(K.length===0)return!1;let Y=A.trim().toLowerCase(),z=K.map((w)=>w.trim().toLowerCase());if(z.includes(Y)){if(!eP6(Y)||!Bv7(Y,z))return!0}for(let w of z)if(eP6(w)&&!Bv7(w,z)&&F89(Y,w))return!0;if(gc(Y)){let w=J5(Y).toLowerCase();if(z.includes(w))return!0}for(let w of z)if(!eP6(w)&&gc(w)){if(J5(w).toLowerCase()===Y)return!0}for(let w of z)if(!eP6(w)&&!gc(w)){if(Q89(Y,w))return!0}return!1}var ym6=k(()=>{GA();A06();Xq()});var gv7={};m1(gv7,{renderModelSetting:()=>cH8,renderModelName:()=>KP,renderDefaultModelSetting:()=>dH8,parseUserSpecifiedModel:()=>J5,normalizeModelStringForAPI:()=>jg,modelDisplayString:()=>YP,isNonCustomOpusModel:()=>M56,isLegacyModelRemapEnabled:()=>ZO1,getUserSpecifiedModelSetting:()=>aR,getSmallFastModel:()=>Fj,getRuntimeMainLoopModel:()=>Mb,getPublicModelName:()=>lH8,getPublicModelDisplayName:()=>Rm6,getOpus46PricingSuffix:()=>D56,getMainLoopModel:()=>d5,getDefaultSonnetModel:()=>rf,getDefaultOpusModel:()=>TN,getDefaultMainLoopModelSetting:()=>Hg,getDefaultMainLoopModel:()=>m0,getDefaultHaikuModel:()=>q06,getClaudeAiUserDefaultModelDescription:()=>K06,getCanonicalName:()=>t$,getBestModel:()=>mv7});function Fj(){return process.env.ANTHROPIC_SMALL_FAST_MODEL||q06()}function M56(A){return A===p5().opus40||A===p5().opus41||A===p5().opus45||A===p5().opus46}function aR(){let A,q=th();if(q!==void 0)A=q;else{let K=BA()||{};A=process.env.ANTHROPIC_MODEL||K.model||void 0}if(A&&!nt(A))return;return A}function d5(){let A=aR();if(A!==void 0&&A!==null)return J5(A);return m0()}function mv7(){return TN()}function TN(){if(process.env.ANTHROPIC_DEFAULT_OPUS_MODEL)return process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;if(D7()==="firstParty")return p5().opus46;return p5().opus41}function rf(){if(process.env.ANTHROPIC_DEFAULT_SONNET_MODEL)return process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;if(D7()!=="firstParty")return p5().sonnet45;return p5().sonnet46}function q06(){if(process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL)return process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;return p5().haiku45}function Mb(A){let{permissionMode:q,mainLoopModel:K,exceeds200kTokens:Y=!1}=A;if(aR()==="opusplan"&&q==="plan"&&!Y)return TN();if(aR()==="haiku"&&q==="plan")return rf();return K}function Hg(){if(XR())return TN();if(rt())return TN();return rf()}function m0(){return J5(Hg())}function t$(A){if(A.includes("claude-opus-4-6"))return"claude-opus-4-6";if(A.includes("claude-opus-4-5"))return"claude-opus-4-5";if(A.includes("claude-opus-4-1"))return"claude-opus-4-1";if(A.includes("claude-opus-4"))return"claude-opus-4";if(A.includes("claude-sonnet-4-6"))return"claude-sonnet-4-6";if(A.includes("claude-sonnet-4-5"))return"claude-sonnet-4-5";if(A.includes("claude-sonnet-4"))return"claude-sonnet-4";if(A.includes("claude-haiku-4-5"))return"claude-haiku-4-5";let q=A.match(/(claude-(\d+-\d+-)?\w+)/);if(q&&q[1])return q[1];return A}function K06(A=!1){if(XR()||rt())return`Opus 4.6 · Most capable for complex work${A?D56(!1,!0):""}`;return"Sonnet 4.6 · Best for everyday tasks"}function dH8(A){if(A==="opusplan")return"Opus 4.6 in plan mode, else Sonnet 4.6";return KP(J5(A))}function D56(A,q){if(D7()!=="firstParty")return"";let K=oR(tP6(A,q));return` ·${q?` (${it})`:""} ${K}`}function cH8(A){if(A==="opusplan")return"Opus Plan";if(gc(A))return A.charAt(0).toUpperCase()+A.slice(1);return KP(A)}function Rm6(A){switch(A){case p5().opus46:return"Opus 4.6";case p5().opus46+"[1m]":return"Opus 4.6 (1M context)";case p5().opus45:return"Opus 4.5";case p5().opus41:return"Opus 4.1";case p5().opus40:return"Opus 4";case p5().sonnet46+"[1m]":return"Sonnet 4.6 (1M context)";case p5().sonnet46:return"Sonnet 4.6";case p5().sonnet45+"[1m]":return"Sonnet 4.5 (1M context)";case p5().sonnet45:return"Sonnet 4.5";case p5().sonnet40:return"Sonnet 4";case p5().sonnet40+"[1m]":return"Sonnet 4 (1M context)";case p5().sonnet37:return"Sonnet 3.7";case p5().sonnet35:return"Sonnet 3.5";case p5().haiku45:return"Haiku 4.5";case p5().haiku35:return"Haiku 3.5";default:return null}}function KP(A){let q=Rm6(A);if(q)return q;return A}function lH8(A){let q=Rm6(A);if(q)return`Claude ${q}`;return`Claude (${A})`}function J5(A){let q=A.trim(),K=q.toLowerCase(),Y=rk(K),z=Y?K.replace(/\[1m]$/i,"").trim():K;if(gc(z))switch(z){case"opusplan":return rf()+(Y?"[1m]":"");case"sonnet":return rf()+(Y?"[1m]":"");case"haiku":return q06()+(Y?"[1m]":"");case"opus":return TN()+(Y?"[1m]":"");case"best":return mv7();default:}if(D7()==="firstParty"&&p89(z)&&ZO1())return TN()+(Y?"[1m]":"");if(Y)return q.replace(/\[1m\]$/i,"").trim()+"[1m]";return q}function p89(A){return U89.includes(A)}function ZO1(){if($1(process.env.CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP))return!1;return p8("tengu_grey_wool",!0)}function YP(A){if(A===null){if(A7())return`Default (${K06()})`;return`Default (${m0()})`}let q=J5(A);return A===q?q:`${A} (${q})`}function jg(A){return A.replace(/\[(1|2)m\]/gi,"")}var U89;var Xq=k(()=>{Q1();bA();PM();Z8();O56();ct();GA();yz();j$();ym6();A06();rA();U89=["claude-opus-4-20250514","claude-opus-4-1-20250805","claude-opus-4-0","claude-opus-4-1"]});function gq(){return!$1(process.env.CLAUDE_CODE_DISABLE_FAST_MODE)}function kJ(){if(!gq())return!1;return ot()===null}function d89(A,q){switch(A){case"free":return q==="oauth"?"Fast mode requires a paid subscription":"Fast mode unavailable during evaluation. Please purchase credits.";case"preference":return"Fast mode has been disabled by your organization";case"extra_usage_disabled":return"Fast mode requires extra usage billing · /extra-usage to enable";case"network_error":return"Fast mode unavailable due to network connectivity issues";case"unknown":return"Fast mode is currently unavailable"}}function ot(){if(!gq())return"Fast mode is not available";if(!ZY()&&p8("tengu_marble_sandcastle",!0))return"Fast mode requires the native binary · Install from: https://claude.com/product/claude-code";let A=p8("tengu_penguins_off",null);if(A!==null)return L(`Fast mode unavailable: ${A}`),A;if(u7()&&JR6()){if(!HA("flagSettings")?.fastMode)return L("Fast mode unavailable: Fast mode is not available in the Agent SDK"),"Fast mode is not available in the Agent SDK"}if(D7()!=="firstParty")return L("Fast mode unavailable: Fast mode is not available on Bedrock, Vertex, or Foundry"),"Fast mode is not available on Bedrock, Vertex, or Foundry";if(VN.status==="disabled"&&p8("tengu_tangerine_ladder_boost",!0)){if(VN.reason==="network_error"||VN.reason==="unknown")return null;let q=g7()!==null?"oauth":"api-key",K=d89(VN.reason,q);return L(`Fast mode unavailable: ${K}`),K}return null}function rH8(A){if(!gq())return!1;if(!kJ())return!1;if(!nO(A))return!1;let q=h7();if(q.fastModePerSessionOptIn)return!1;return q.fastMode===!0}function nO(A){if(!gq())return!1;let q=A??Hg();return J5(q).toLowerCase().includes("opus-4-6")}function Qv7(A){return GO1.add(A),()=>{GO1.delete(A)}}function oH8(){if(Y06.status==="cooldown"&&Date.now()>=Y06.resetAt){if(gq()&&!iH8){L("Fast mode cooldown expired, re-enabling fast mode"),iH8=!0;for(let A of GO1)A.onCooldownExpired()}Y06={status:"active"}}return Y06}function Uv7(A,q){if(!gq())return;Y06={status:"cooldown",resetAt:A,reason:q},iH8=!1;let K=A-Date.now();L(`Fast mode cooldown triggered (${q}), duration ${Math.round(K/1000)}s`),c("tengu_fast_mode_fallback_triggered",{cooldown_duration_ms:K,cooldown_reason:q});for(let Y of GO1)Y.onCooldownTriggered(A,q)}function X56(){Y06={status:"active"}}function pv7(){if(VN.status==="disabled")return;VN={status:"disabled",reason:"preference"},xA("userSettings",{fastMode:void 0}),_8((A)=>({...A,penguinModeOrgEnabled:!1}));for(let A of fO1)A(!1)}function dv7(A){return nH8.add(A),()=>{nH8.delete(A)}}function c89(A){switch(A){case"out_of_credits":return"Fast mode disabled · extra usage credits exhausted";case"org_level_disabled":case"org_service_level_disabled":return"Fast mode disabled · extra usage disabled by your organization";case"org_level_disabled_until":return"Fast mode disabled · extra usage spending cap reached";case"member_level_disabled":return"Fast mode disabled · extra usage disabled for your account";case"seat_tier_level_disabled":case"seat_tier_zero_credit_limit":case"member_zero_credit_limit":return"Fast mode disabled · extra usage not available for your plan";case"overage_not_provisioned":case"no_limits_configured":return"Fast mode requires extra usage billing · /extra-usage to enable";default:return"Fast mode disabled · extra usage not available"}}function l89(A){return A==="org_level_disabled_until"||A==="out_of_credits"}function cv7(A){let q=c89(A);if(L(`Fast mode overage rejection: ${A??"unknown"} — ${q}`),c("tengu_fast_mode_overage_rejected",{overage_disabled_reason:A??"unknown"}),!l89(A))xA("userSettings",{fastMode:void 0}),_8((K)=>({...K,penguinModeOrgEnabled:!1}));for(let K of nH8)K(q)}function Jg(){return oH8().status==="cooldown"}function Mg(A,q){let K=gq()&&kJ()&&!!q&&nO(A);if(K&&Jg())return"cooldown";if(K)return"on";return"off"}function lv7(A){return fO1.add(A),()=>{fO1.delete(A)}}async function i89(A){let q=`${U7().BASE_API_URL}/api/claude_code_penguin_mode`,K="accessToken"in A?{Authorization:`Bearer ${A.accessToken}`,"anthropic-beta":G0}:{"x-api-key":A.apiKey};return(await I8.get(q,{headers:K})).data}function aH8(){if(!gq())return;if(VN.status!=="pending")return;let A=!1,q=T1().penguinModeOrgEnabled===!0;VN=A||q?{status:"enabled"}:{status:"disabled",reason:"unknown"}}async function TO1(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return;if(!gq())return;if(Sm6)return L("Fast mode prefetch in progress, returning in-flight promise"),Sm6;let A=nk();if(!(g7()?.accessToken&&Cf())&&!A){VN=T1().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"preference"};return}let K=Date.now();if(K-Fv7<n89){L("Skipping fast mode prefetch, fetched recently");return}Fv7=K;let Y=async()=>{let w=g7(),_=w?.accessToken&&Cf()?{accessToken:w.accessToken}:A?{apiKey:A}:null;if(!_)throw Error("No auth available");return i89(_)};async function z(){try{let w;try{w=await Y()}catch($){if(I8.isAxiosError($)&&($.response?.status===401||$.response?.status===403&&typeof $.response?.data==="string"&&$.response.data.includes("OAuth token has been revoked"))){let H=g7()?.accessToken;if(H)await Sf(H),w=await Y();else throw $}else throw $}let _=VN.status!=="pending"?VN.status==="enabled":T1().penguinModeOrgEnabled;if(VN=w.enabled?{status:"enabled"}:{status:"disabled",reason:w.disabled_reason??"preference"},_!==w.enabled){if(!w.enabled)xA("userSettings",{fastMode:void 0});_8(($)=>({...$,penguinModeOrgEnabled:w.enabled}));for(let $ of fO1)$(w.enabled)}L(`Org fast mode: ${w.enabled?"enabled":`disabled (${w.disabled_reason??"preference"})`}`)}catch(w){VN=T1().penguinModeOrgEnabled===!0?{status:"enabled"}:{status:"disabled",reason:"network_error"},L(`Failed to fetch org fast mode status, defaulting to ${VN.status==="enabled"?"enabled (cached)":"disabled (network_error)"}: ${w}`,{level:"error"}),c("tengu_org_penguin_mode_fetch_failed",{})}finally{Sm6=null}}return Sm6=z(),Sm6}var Cm6="opus",EE="Opus 4.6",Y06,iH8=!1,GO1,nH8,VN,fO1,n89=30000,Fv7=0,Sm6=null;var aZ=k(()=>{A3();GA();B1();G1();Q1();bA();yz();Xq();rA();L5();Q8();Z8();Y06={status:"active"},GO1=new Set;nH8=new Set;VN={status:"pending"},fO1=new Set});function sH8(A){let q=f_();if(q.lastSessionId!==A)return;let K;if(q.lastModelUsage)K=Object.fromEntries(Object.entries(q.lastModelUsage).map(([Y,z])=>[Y,{...z,contextWindow:XM(Y,kj()),maxOutputTokens:Ks(Y).default}]));return{totalCostUSD:q.lastCost??0,totalAPIDuration:q.lastAPIDuration??0,totalAPIDurationWithoutRetries:q.lastAPIDurationWithoutRetries??0,totalToolDuration:q.lastToolDuration??0,totalLinesAdded:q.lastLinesAdded??0,totalLinesRemoved:q.lastLinesRemoved??0,lastDuration:q.lastDuration,modelUsage:K}}function VO1(A){let q=sH8(A);if(!q)return!1;return _R6(q),!0}function NO1(A){T_((q)=>({...q,lastCost:bX(),lastAPIDuration:kk(),lastAPIDurationWithoutRetries:vg1(),lastToolDuration:kg1(),lastDuration:ZH6(),lastLinesAdded:E46(),lastLinesRemoved:L46(),lastTotalInputTokens:y46(),lastTotalOutputTokens:R46(),lastTotalCacheCreationInputTokens:wR6(),lastTotalCacheReadInputTokens:zR6(),lastTotalWebSearchRequests:bg1(),lastFpsAverage:A?.averageFps,lastFpsLow1Pct:A?.low1PctFps,lastModelUsage:Object.fromEntries(Object.entries(sh()).map(([K,Y])=>[K,{inputTokens:Y.inputTokens,outputTokens:Y.outputTokens,cacheReadInputTokens:Y.cacheReadInputTokens,cacheCreationInputTokens:Y.cacheCreationInputTokens,webSearchRequests:Y.webSearchRequests,costUSD:Y.costUSD}])),lastSessionId:d1()}))}function hm6(A,q=4){return`$${A>0.5?o89(A,100).toFixed(2):A.toFixed(q)}`}function r89(){let A=sh();if(Object.keys(A).length===0)return"Usage:                 0 input, 0 output, 0 cache read, 0 cache write";let q={};for(let[Y,z]of Object.entries(A)){let w=t$(Y);if(!q[w])q[w]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0,costUSD:0,contextWindow:0,maxOutputTokens:0};let _=q[w];_.inputTokens+=z.inputTokens,_.outputTokens+=z.outputTokens,_.cacheReadInputTokens+=z.cacheReadInputTokens,_.cacheCreationInputTokens+=z.cacheCreationInputTokens,_.webSearchRequests+=z.webSearchRequests,_.costUSD+=z.costUSD}let K="Usage by model:";for(let[Y,z]of Object.entries(q)){let w=`  ${f3(z.inputTokens)} input, ${f3(z.outputTokens)} output, ${f3(z.cacheReadInputTokens)} cache read, ${f3(z.cacheCreationInputTokens)} cache write`+(z.webSearchRequests>0?`, ${f3(z.webSearchRequests)} web search`:"")+` (${hm6(z.costUSD)})`;K+=`
`+`${Y}:`.padStart(21)+w}return K}function vO1(){let A=hm6(bX())+(xg1()?" (costs may be inaccurate due to usage of unknown models)":""),q=r89();return M1.dim(`Total cost:            ${A}
Total duration (API):  ${G3(kk())}
Total duration (wall): ${G3(ZH6())}
Total code changes:    ${E46()} ${E46()===1?"line":"lines"} added, ${L46()} ${L46()===1?"line":"lines"} removed
${q}`)}function o89(A,q){return Math.round(A*q)/q}function a89(A,q,K){let Y=ug1(K)??{inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0,costUSD:0,contextWindow:0,maxOutputTokens:0};return Y.inputTokens+=q.input_tokens,Y.outputTokens+=q.output_tokens,Y.cacheReadInputTokens+=q.cache_read_input_tokens??0,Y.cacheCreationInputTokens+=q.cache_creation_input_tokens??0,Y.webSearchRequests+=q.server_tool_use?.web_search_requests??0,Y.costUSD+=A,Y.contextWindow=XM(K,kj()),Y.maxOutputTokens=Ks(K).default,Y}function kO1(A,q,K){let Y=a89(A,q,K);Ng1(A,Y,K);let z=gq()&&q.speed==="fast"?{model:K,speed:"fast"}:{model:K};Ug1()?.add(A,z),NH6()?.add(q.input_tokens,{...z,type:"input"}),NH6()?.add(q.output_tokens,{...z,type:"output"}),NH6()?.add(q.cache_read_input_tokens??0,{...z,type:"cacheRead"}),NH6()?.add(q.cache_creation_input_tokens??0,{...z,type:"cacheCreation"})}var kE=k(()=>{iK();aZ();Oq();Xq();Q8();Q1();Q1();Q1();PM();Q1()});function Im6(A){return A.replaceAll("&",nv7).replaceAll("$",rv7)}function ov7(A){return A.replaceAll(nv7,"&").replaceAll(rv7,"$")}function bm6(A,q){let K=0,Y=0;if(A.length===0&&q)K=q.split(/\r?\n/).length;else K=A.reduce((z,w)=>z+w.lines.filter((_)=>_.startsWith("+")).length,0),Y=A.reduce((z,w)=>z+w.lines.filter((_)=>_.startsWith("-")).length,0);t11(K,Y),A81()?.add(K,{type:"added"}),A81()?.add(Y,{type:"removed"}),c("tengu_file_changed",{lines_added:K,lines_removed:Y})}function EO1({filePath:A,oldContent:q,newContent:K,ignoreWhitespace:Y=!1,singleHunk:z=!1}){return nD6(A,A,Im6(q),Im6(K),void 0,void 0,{ignoreWhitespace:Y,context:z?1e5:iv7}).hunks.map((w)=>({...w,lines:w.lines.map(ov7)}))}function sR({filePath:A,fileContents:q,edits:K,ignoreWhitespace:Y=!1}){let z=Im6(Fc(q));return nD6(A,A,z,K.reduce((w,_)=>{let{old_string:$,new_string:O}=_,H="replace_all"in _?_.replace_all:!1,j=Im6(Fc($)),J=Im6(Fc(O));if(H)return w.replaceAll(j,()=>J);else return w.replace(j,()=>J)},z),void 0,void 0,{context:iv7,ignoreWhitespace:Y}).hunks.map((w)=>({...w,lines:w.lines.map(ov7)}))}var iv7=3,nv7="<<:AMPERSAND_TOKEN:>>",rv7="<<:DOLLAR_TOKEN:>>";var Qc=k(()=>{rD6();kE();p7();B1();Q1()});var LO1="ZPMQVRWSNKTXJBYH",B02,m02,g02;var at=k(()=>{rA();Q1();G1();B1();B02=Array.from({length:256},(A,q)=>LO1[q>>>4]+LO1[q&15]),m02=new RegExp(`^(\\d+)#([${LO1}]{2})\\|`),g02=new RegExp(`^(\\d+)#([${LO1}]{2})$`)});function s89(){return`
- You must use your \`${u4}\` tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file. `}function av7(){return t89()}function t89(){return`Performs exact string replacements in files.

Usage:${s89()}
- When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.
- The edit will FAIL if \`old_string\` is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use \`replace_all\` to change every instance of \`old_string\`.
- Use \`replace_all\` for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.`}var sv7=k(()=>{U2();at()});function tv7(A){return A.replaceAll(tH8,"'").replaceAll(yO1,"'").replaceAll(eH8,'"').replaceAll(Aj8,'"')}function qj8(A){let q=A.split(/(\r\n|\n|\r)/),K="";for(let Y=0;Y<q.length;Y++){let z=q[Y];if(z!==void 0)if(Y%2===0)K+=z.replace(/\s+$/,"");else K+=z}return K}function P56(A,q){if(A.includes(q))return q;let K=tv7(q),z=tv7(A).indexOf(K);if(z!==-1)return A.substring(z,z+q.length);return null}function z06(A,q,K){if(A===q)return K;let Y=q.includes(eH8)||q.includes(Aj8),z=q.includes(tH8)||q.includes(yO1);if(!Y&&!z)return K;let w=K;if(Y)w=e89(w);if(z)w=AA9(w);return w}function ev7(A,q){if(q===0)return!0;let K=A[q-1];return K===" "||K==="\t"||K===`
`||K==="\r"||K==="("||K==="["||K==="{"||K==="—"||K==="–"}function e89(A){let q=[...A],K=[];for(let Y=0;Y<q.length;Y++)if(q[Y]==='"')K.push(ev7(q,Y)?eH8:Aj8);else K.push(q[Y]);return K.join("")}function AA9(A){let q=[...A],K=[];for(let Y=0;Y<q.length;Y++)if(q[Y]==="'"){let z=Y>0?q[Y-1]:void 0,w=Y<q.length-1?q[Y+1]:void 0,_=z!==void 0&&/\p{L}/u.test(z),$=w!==void 0&&/\p{L}/u.test(w);if(_&&$)K.push(yO1);else K.push(ev7(q,Y)?tH8:yO1)}else K.push(q[Y]);return K.join("")}function qA9(A,q,K,Y=!1){let z=Y?(_,$,O)=>_.replaceAll($,()=>O):(_,$,O)=>_.replace($,()=>O);if(K!=="")return z(A,q,K);return!q.endsWith(`
`)&&A.includes(q+`
`)?z(A,q+`
`,K):z(A,q,K)}function RO1({filePath:A,fileContents:q,oldString:K,newString:Y,replaceAll:z=!1}){return xm6({filePath:A,fileContents:q,edits:[{old_string:K,new_string:Y,replace_all:z}]})}function xm6({filePath:A,fileContents:q,edits:K}){let Y=q,z=[];if(!q&&K.length===1&&K[0]&&K[0].old_string===""&&K[0].new_string==="")return{patch:sR({filePath:A,fileContents:q,edits:[{old_string:q,new_string:Y,replace_all:!1}]}),updatedFile:""};for(let _ of K){let $=_.old_string.replace(/\n+$/,"");for(let H of z)if($!==""&&H.includes($))throw Error("Cannot edit file: old_string is a substring of a new_string from a previous edit.");let O=Y;if(Y=_.old_string===""?_.new_string:qA9(Y,_.old_string,_.new_string,_.replace_all),Y===O)throw Error("String not found in file. Failed to apply edit.");z.push(_.new_string)}if(Y===q)throw Error("Original and edited file match exactly. Failed to apply edit.");return{patch:EO1({filePath:A,oldContent:Fc(q),newContent:Fc(Y)}),updatedFile:Y}}function Ak7(A,q){return nD6("file.txt","file.txt",A,q,void 0,void 0,{context:8}).hunks.map((Y)=>({startLine:Y.oldStart,content:Y.lines.filter((z)=>!z.startsWith("-")&&!z.startsWith("\\")).map((z)=>z.slice(1)).join(`
`)})).map(SO1).join(`
...
`)}function qk7(A){return A.map((q)=>{let K=[],Y=[],z=[];for(let w of q.lines)if(w.startsWith(" "))K.push(w.slice(1)),Y.push(w.slice(1)),z.push(w.slice(1));else if(w.startsWith("-"))Y.push(w.slice(1));else if(w.startsWith("+"))z.push(w.slice(1));return{old_string:Y.join(`
`),new_string:z.join(`
`),replace_all:!1}})}function YA9(A){let q=A,K=[];for(let[Y,z]of Object.entries(KA9)){let w=q;if(q=q.replaceAll(Y,z),w!==q)K.push({from:Y,to:z})}return{result:q,appliedReplacements:K}}function Kk7({file_path:A,edits:q}){if(q.length===0)return{file_path:A,edits:q};try{let K=t4(A);if(!P1().existsSync(K))return{file_path:A,edits:q};let Y=Kj8(K);return{file_path:A,edits:q.map(({old_string:z,new_string:w,replace_all:_})=>{let $=qj8(w),O=z;if(Y.includes(O))return{old_string:O,new_string:$,replace_all:_};let{result:H,appliedReplacements:j}=YA9(O);if(Y.includes(H)){let J=$;for(let{from:M,to:D}of j)J=J.replaceAll(M,D);return{old_string:H,new_string:J,replace_all:_}}return{old_string:O,new_string:$,replace_all:_}})}}catch(K){$6(K)}return{file_path:A,edits:q}}function zA9(A,q,K){if(A.length===q.length&&A.every(($,O)=>{let H=q[O];return H!==void 0&&$.old_string===H.old_string&&$.new_string===H.new_string&&$.replace_all===H.replace_all}))return!0;let Y=null,z=null,w=null,_=null;try{Y=xm6({filePath:"temp",fileContents:K,edits:A})}catch($){z=D1($)}try{w=xm6({filePath:"temp",fileContents:K,edits:q})}catch($){_=D1($)}if(z!==null&&_!==null)return z===_;if(z!==null||_!==null)return!1;return Y.updatedFile===w.updatedFile}function Yk7(A,q){if(A.file_path!==q.file_path)return!1;if(A.edits.length===q.edits.length&&A.edits.every((z,w)=>{let _=q.edits[w];return _!==void 0&&z.old_string===_.old_string&&z.new_string===_.new_string&&z.replace_all===_.replace_all}))return!0;let Y=P1().existsSync(A.file_path)?Kj8(A.file_path):"";return zA9(A.edits,q.edits,Y)}var tH8="‘",yO1="’",eH8="“",Aj8="”",KA9;var W56=k(()=>{rD6();p7();Qc();Kz();Y7();x1();at();MA();KA9={"<fnr>":"<function_results>","<n>":"<name>","</n>":"</name>","<o>":"<output>","</o>":"</output>","<e>":"<error>","</e>":"</error>","<s>":"<system>","</s>":"</system>","<r>":"<result>","</r>":"</result>","< META_START >":"<META_START>","< META_END >":"<META_END>","< EOT >":"<EOT>","< META >":"<META>","< SOS >":"<SOS>","\n\nH:":`

Human:`,"\n\nA:":`

Assistant:`}});async function um6(A,q,{concurrency:K=Number.POSITIVE_INFINITY,stopOnError:Y=!0,signal:z}={}){return new Promise((w,_)=>{if(A[Symbol.iterator]===void 0&&A[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof A})`);if(typeof q!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(K)&&K>=1||K===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${K}\` (${typeof K})`);let $=[],O=[],H=new Map,j=!1,J=!1,M=!1,D=0,X=0,P=A[Symbol.iterator]===void 0?A[Symbol.asyncIterator]():A[Symbol.iterator](),W=()=>{f(z.reason)},Z=()=>{z?.removeEventListener("abort",W)},G=(N)=>{w(N),Z()},f=(N)=>{j=!0,J=!0,_(N),Z()};if(z){if(z.aborted)f(z.reason);z.addEventListener("abort",W,{once:!0})}let V=async()=>{if(J)return;let N=await P.next(),v=X;if(X++,N.done){if(M=!0,D===0&&!J){if(!Y&&O.length>0){f(AggregateError(O));return}if(J=!0,H.size===0){G($);return}let y=[];for(let[R,h]of $.entries()){if(H.get(R)===zk7)continue;y.push(h)}G(y)}return}D++,(async()=>{try{let y=await N.value;if(J)return;let R=await q(y,v);if(R===zk7)H.set(v,R);$[v]=R,D--,await V()}catch(y){if(Y)f(y);else{O.push(y),D--;try{await V()}catch(R){f(R)}}}})()};(async()=>{for(let N=0;N<K;N++){try{await V()}catch(v){f(v);break}if(M||j)break}})()})}var zk7;var Yj8=k(()=>{zk7=Symbol("skip")});class zj8{constructor(A){this._client=A}async*callToolStream(A,q=gB,K){let Y=this._client,z={...K,task:K?.task??(Y.isToolTask(A.name)?{}:void 0)},w=Y.requestStream({method:"tools/call",params:A},q,z),_=Y.getToolOutputValidator(A.name);for await(let $ of w){if($.type==="result"&&_){let O=$.result;if(!O.structuredContent&&!O.isError){yield{type:"error",error:new fq(YK.InvalidRequest,`Tool ${A.name} has an output schema but did not return structured content`)};return}if(O.structuredContent)try{let H=_(O.structuredContent);if(!H.valid){yield{type:"error",error:new fq(YK.InvalidParams,`Structured content does not match the tool's output schema: ${H.errorMessage}`)};return}}catch(H){if(H instanceof fq){yield{type:"error",error:H};return}yield{type:"error",error:new fq(YK.InvalidParams,`Failed to validate structured content: ${H instanceof Error?H.message:String(H)}`)};return}}yield $}}async getTask(A,q){return this._client.getTask({taskId:A},q)}async getTaskResult(A,q,K){return this._client.getTaskResult({taskId:A},q,K)}async listTasks(A,q){return this._client.listTasks(A?{cursor:A}:void 0,q)}async cancelTask(A,q){return this._client.cancelTask({taskId:A},q)}requestStream(A,q,K){return this._client.requestStream(A,q,K)}}var wk7=k(()=>{uX()});function CO1(A,q){if(!A||q===null||typeof q!=="object")return;if(A.type==="object"&&A.properties&&typeof A.properties==="object"){let K=q,Y=A.properties;for(let z of Object.keys(Y)){let w=Y[z];if(K[z]===void 0&&Object.prototype.hasOwnProperty.call(w,"default"))K[z]=w.default;if(K[z]!==void 0)CO1(w,K[z])}}if(Array.isArray(A.anyOf)){for(let K of A.anyOf)if(typeof K!=="boolean")CO1(K,q)}if(Array.isArray(A.oneOf)){for(let K of A.oneOf)if(typeof K!=="boolean")CO1(K,q)}}function wA9(A){if(!A)return{supportsFormMode:!1,supportsUrlMode:!1};let q=A.form!==void 0,K=A.url!==void 0;return{supportsFormMode:q||!q&&!K,supportsUrlMode:K}}var hO1;var _k7=k(()=>{Il1();uX();xi1();qC6();wk7();hO1=class hO1 extends YC6{constructor(A,q){super(q);if(this._clientInfo=A,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=q?.capabilities??{},this._jsonSchemaValidator=q?.jsonSchemaValidator??new yC6,q?.listChanged)this._pendingListChangedConfig=q.listChanged}_setupListChangedHandlers(A){if(A.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools",IS6,A.tools,async()=>{return(await this.listTools()).tools});if(A.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts",SS6,A.prompts,async()=>{return(await this.listPrompts()).prompts});if(A.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources",yS6,A.resources,async()=>{return(await this.listResources()).resources})}get experimental(){if(!this._experimental)this._experimental={tasks:new zj8(this)};return this._experimental}registerCapabilities(A){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=T71(this._capabilities,A)}setRequestHandler(A,q){let Y=vj6(A)?.method;if(!Y)throw Error("Schema is missing a method literal");let z;if(Ka(Y)){let _=Y;z=_._zod?.def?.value??_.value}else{let _=Y;z=_._def?.value??_.value}if(typeof z!=="string")throw Error("Schema method literal must be a string");let w=z;if(w==="elicitation/create"){let _=async($,O)=>{let H=Nf(pp,$);if(!H.success){let Z=H.error instanceof Error?H.error.message:String(H.error);throw new fq(YK.InvalidParams,`Invalid elicitation request: ${Z}`)}let{params:j}=H.data;j.mode=j.mode??"form";let{supportsFormMode:J,supportsUrlMode:M}=wA9(this._capabilities.elicitation);if(j.mode==="form"&&!J)throw new fq(YK.InvalidParams,"Client does not support form-mode elicitation requests");if(j.mode==="url"&&!M)throw new fq(YK.InvalidParams,"Client does not support URL-mode elicitation requests");let D=await Promise.resolve(q($,O));if(j.task){let Z=Nf(Up,D);if(!Z.success){let G=Z.error instanceof Error?Z.error.message:String(Z.error);throw new fq(YK.InvalidParams,`Invalid task creation result: ${G}`)}return Z.data}let X=Nf(io,D);if(!X.success){let Z=X.error instanceof Error?X.error.message:String(X.error);throw new fq(YK.InvalidParams,`Invalid elicitation result: ${Z}`)}let P=X.data,W=j.mode==="form"?j.requestedSchema:void 0;if(j.mode==="form"&&P.action==="accept"&&P.content&&W){if(this._capabilities.elicitation?.form?.applyDefaults)try{CO1(W,P.content)}catch{}}return P};return super.setRequestHandler(A,_)}if(w==="sampling/createMessage"){let _=async($,O)=>{let H=Nf(Ic1,$);if(!H.success){let P=H.error instanceof Error?H.error.message:String(H.error);throw new fq(YK.InvalidParams,`Invalid sampling request: ${P}`)}let{params:j}=H.data,J=await Promise.resolve(q($,O));if(j.task){let P=Nf(Up,J);if(!P.success){let W=P.error instanceof Error?P.error.message:String(P.error);throw new fq(YK.InvalidParams,`Invalid task creation result: ${W}`)}return P.data}let D=j.tools||j.toolChoice?xS6:t46,X=Nf(D,J);if(!X.success){let P=X.error instanceof Error?X.error.message:String(X.error);throw new fq(YK.InvalidParams,`Invalid sampling result: ${P}`)}return X.data};return super.setRequestHandler(A,_)}return super.setRequestHandler(A,q)}assertCapability(A,q){if(!this._serverCapabilities?.[A])throw Error(`Server does not support ${A} (required for ${q})`)}async connect(A,q){if(await super.connect(A),A.sessionId!==void 0)return;try{let K=await this.request({method:"initialize",params:{protocolVersion:co,capabilities:this._capabilities,clientInfo:this._clientInfo}},Nc1,q);if(K===void 0)throw Error(`Server sent invalid initialize result: ${K}`);if(!IA1.includes(K.protocolVersion))throw Error(`Server's protocol version is not supported: ${K.protocolVersion}`);if(this._serverCapabilities=K.capabilities,this._serverVersion=K.serverInfo,A.setProtocolVersion)A.setProtocolVersion(K.protocolVersion);if(this._instructions=K.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig)this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0}catch(K){throw this.close(),K}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(A){switch(A){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${A})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${A})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${A})`);if(A==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${A})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${A})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${A})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(A){switch(A){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${A})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(A){if(!this._capabilities)return;switch(A){case"sampling/createMessage":if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${A})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${A})`);break;case"roots/list":if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${A})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${A})`);break;case"ping":break}}assertTaskCapability(A){w41(this._serverCapabilities?.tasks?.requests,A,"Server")}assertTaskHandlerCapability(A){if(!this._capabilities)return;_41(this._capabilities.tasks?.requests,A,"Client")}async ping(A){return this.request({method:"ping"},Qp,A)}async complete(A,q){return this.request({method:"completion/complete",params:A},bc1,q)}async setLoggingLevel(A,q){return this.request({method:"logging/setLevel",params:{level:A}},Qp,q)}async getPrompt(A,q){return this.request({method:"prompts/get",params:A},Cc1,q)}async listPrompts(A,q){return this.request({method:"prompts/list",params:A},RS6,q)}async listResources(A,q){return this.request({method:"resources/list",params:A},ES6,q)}async listResourceTemplates(A,q){return this.request({method:"resources/templates/list",params:A},kc1,q)}async readResource(A,q){return this.request({method:"resources/read",params:A},LS6,q)}async subscribeResource(A,q){return this.request({method:"resources/subscribe",params:A},Qp,q)}async unsubscribeResource(A,q){return this.request({method:"resources/unsubscribe",params:A},Qp,q)}async callTool(A,q=gB,K){if(this.isToolTaskRequired(A.name))throw new fq(YK.InvalidRequest,`Tool "${A.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let Y=await this.request({method:"tools/call",params:A},q,K),z=this.getToolOutputValidator(A.name);if(z){if(!Y.structuredContent&&!Y.isError)throw new fq(YK.InvalidRequest,`Tool ${A.name} has an output schema but did not return structured content`);if(Y.structuredContent)try{let w=z(Y.structuredContent);if(!w.valid)throw new fq(YK.InvalidParams,`Structured content does not match the tool's output schema: ${w.errorMessage}`)}catch(w){if(w instanceof fq)throw w;throw new fq(YK.InvalidParams,`Failed to validate structured content: ${w instanceof Error?w.message:String(w)}`)}}return Y}isToolTask(A){if(!this._serverCapabilities?.tasks?.requests?.tools?.call)return!1;return this._cachedKnownTaskTools.has(A)}isToolTaskRequired(A){return this._cachedRequiredTaskTools.has(A)}cacheToolMetadata(A){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let q of A){if(q.outputSchema){let Y=this._jsonSchemaValidator.getValidator(q.outputSchema);this._cachedToolOutputValidators.set(q.name,Y)}let K=q.execution?.taskSupport;if(K==="required"||K==="optional")this._cachedKnownTaskTools.add(q.name);if(K==="required")this._cachedRequiredTaskTools.add(q.name)}}getToolOutputValidator(A){return this._cachedToolOutputValidators.get(A)}async listTools(A,q){let K=await this.request({method:"tools/list",params:A},hS6,q);return this.cacheToolMetadata(K.tools),K}_setupListChangedHandler(A,q,K,Y){let z=N9A.safeParse(K);if(!z.success)throw Error(`Invalid ${A} listChanged options: ${z.error.message}`);if(typeof K.onChanged!=="function")throw Error(`Invalid ${A} listChanged options: onChanged must be a function`);let{autoRefresh:w,debounceMs:_}=z.data,{onChanged:$}=K,O=async()=>{if(!w){$(null,null);return}try{let j=await Y();$(null,j)}catch(j){let J=j instanceof Error?j:Error(String(j));$(J,null)}},H=()=>{if(_){let j=this._listChangedDebounceTimers.get(A);if(j)clearTimeout(j);let J=setTimeout(O,_);this._listChangedDebounceTimers.set(A,J)}else O()};this.setNotificationHandler(q,H)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});import IO1 from"node:process";import{PassThrough as _A9}from"node:stream";function OA9(){let A={};for(let q of $A9){let K=IO1.env[q];if(K===void 0)continue;if(K.startsWith("()"))continue;A[q]=K}return A}class wj8{constructor(A){if(this._readBuffer=new BS6,this._stderrStream=null,this._serverParams=A,A.stderr==="pipe"||A.stderr==="overlapped")this._stderrStream=new _A9}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((A,q)=>{if(this._process=$k7.default(this._serverParams.command,this._serverParams.args??[],{env:{...OA9(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:IO1.platform==="win32"&&HA9(),cwd:this._serverParams.cwd}),this._process.on("error",(K)=>{q(K),this.onerror?.(K)}),this._process.on("spawn",()=>{A()}),this._process.on("close",(K)=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",(K)=>{this.onerror?.(K)}),this._process.stdout?.on("data",(K)=>{this._readBuffer.append(K),this.processReadBuffer()}),this._process.stdout?.on("error",(K)=>{this.onerror?.(K)}),this._stderrStream&&this._process.stderr)this._process.stderr.pipe(this._stderrStream)})}get stderr(){if(this._stderrStream)return this._stderrStream;return this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){while(!0)try{let A=this._readBuffer.readMessage();if(A===null)break;this.onmessage?.(A)}catch(A){this.onerror?.(A)}}async close(){if(this._process){let A=this._process;this._process=void 0;let q=new Promise((K)=>{A.once("close",()=>{K()})});try{A.stdin?.end()}catch{}if(await Promise.race([q,new Promise((K)=>setTimeout(K,2000).unref())]),A.exitCode===null){try{A.kill("SIGTERM")}catch{}await Promise.race([q,new Promise((K)=>setTimeout(K,2000).unref())])}if(A.exitCode===null)try{A.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(A){return new Promise((q)=>{if(!this._process?.stdin)throw Error("Not connected");let K=lA1(A);if(this._process.stdin.write(K))q();else this._process.stdin.once("drain",q)})}}function HA9(){return"type"in IO1}var $k7,$A9;var Ok7=k(()=>{Bc1();$k7=e(Ro1(),1),$A9=IO1.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"]});function _j8(A){}function bO1(A){if(typeof A=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:q=_j8,onError:K=_j8,onRetry:Y=_j8,onComment:z}=A,w="",_=!0,$,O="",H="";function j(P){let W=_?P.replace(/^\xEF\xBB\xBF/,""):P,[Z,G]=jA9(`${w}${W}`);for(let f of Z)J(f);w=G,_=!1}function J(P){if(P===""){D();return}if(P.startsWith(":")){z&&z(P.slice(P.startsWith(": ")?2:1));return}let W=P.indexOf(":");if(W!==-1){let Z=P.slice(0,W),G=P[W+1]===" "?2:1,f=P.slice(W+G);M(Z,f,P);return}M(P,"",P)}function M(P,W,Z){switch(P){case"event":H=W;break;case"data":O=`${O}${W}
`;break;case"id":$=W.includes("\x00")?void 0:W;break;case"retry":/^\d+$/.test(W)?Y(parseInt(W,10)):K(new $j8(`Invalid \`retry\` value: "${W}"`,{type:"invalid-retry",value:W,line:Z}));break;default:K(new $j8(`Unknown field "${P.length>20?`${P.slice(0,20)}…`:P}"`,{type:"unknown-field",field:P,value:W,line:Z}));break}}function D(){O.length>0&&q({id:$,event:H||void 0,data:O.endsWith(`
`)?O.slice(0,-1):O}),$=void 0,O="",H=""}function X(P={}){w&&P.consume&&J(w),_=!0,$=void 0,O="",H="",w=""}return{feed:j,reset:X}}function jA9(A){let q=[],K="",Y=0;for(;Y<A.length;){let z=A.indexOf("\r",Y),w=A.indexOf(`
`,Y),_=-1;if(z!==-1&&w!==-1?_=Math.min(z,w):z!==-1?_=z:w!==-1&&(_=w),_===-1){K=A.slice(Y);break}else{let $=A.slice(Y,_);q.push($),Y=_+1,A[Y-1]==="\r"&&A[Y]===`
`&&Y++}}return[q,K]}var $j8;var Oj8=k(()=>{$j8=class $j8 extends Error{constructor(A,q){super(A),this.name="ParseError",this.type=q.type,this.field=q.field,this.value=q.value,this.line=q.line}}});function JA9(A){let q=globalThis.DOMException;return typeof q=="function"?new q(A,"SyntaxError"):SyntaxError(A)}function jj8(A){return A instanceof Error?"errors"in A&&Array.isArray(A.errors)?A.errors.map(jj8).join(", "):("cause"in A)&&A.cause instanceof Error?`${A}: ${jj8(A.cause)}`:A.message:`${A}`}function Hk7(A){return{type:A.type,message:A.message,code:A.code,defaultPrevented:A.defaultPrevented,cancelable:A.cancelable,timeStamp:A.timeStamp}}function MA9(){let A="document"in globalThis?globalThis.document:void 0;return A&&typeof A=="object"&&"baseURI"in A&&typeof A.baseURI=="string"?A.baseURI:void 0}var Hj8,Jk7=(A)=>{throw TypeError(A)},Gj8=(A,q,K)=>q.has(A)||Jk7("Cannot "+K),e9=(A,q,K)=>(Gj8(A,q,"read from private field"),K?K.call(A):q.get(A)),pD=(A,q,K)=>q.has(A)?Jk7("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(A):q.set(A,K),rO=(A,q,K,Y)=>(Gj8(A,q,"write to private field"),q.set(A,K),K),Uc=(A,q,K)=>(Gj8(A,q,"access private method"),K),NN,Z56,w06,xO1,uO1,gm6,O06,Fm6,st,_06,H06,$06,Bm6,Db,Jj8,Mj8,Dj8,jk7,Xj8,Pj8,mm6,Wj8,Zj8,j06;var Mk7=k(()=>{Oj8();Hj8=class Hj8 extends Event{constructor(A,q){var K,Y;super(A),this.code=(K=q==null?void 0:q.code)!=null?K:void 0,this.message=(Y=q==null?void 0:q.message)!=null?Y:void 0}[Symbol.for("nodejs.util.inspect.custom")](A,q,K){return K(Hk7(this),q)}[Symbol.for("Deno.customInspect")](A,q){return A(Hk7(this),q)}};j06=class j06 extends EventTarget{constructor(A,q){var K,Y;super(),pD(this,Db),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,pD(this,NN),pD(this,Z56),pD(this,w06),pD(this,xO1),pD(this,uO1),pD(this,gm6),pD(this,O06),pD(this,Fm6,null),pD(this,st),pD(this,_06),pD(this,H06,null),pD(this,$06,null),pD(this,Bm6,null),pD(this,Mj8,async(z)=>{var w;e9(this,_06).reset();let{body:_,redirected:$,status:O,headers:H}=z;if(O===204){Uc(this,Db,mm6).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if($?rO(this,w06,new URL(z.url)):rO(this,w06,void 0),O!==200){Uc(this,Db,mm6).call(this,`Non-200 status code (${O})`,O);return}if(!(H.get("content-type")||"").startsWith("text/event-stream")){Uc(this,Db,mm6).call(this,'Invalid content type, expected "text/event-stream"',O);return}if(e9(this,NN)===this.CLOSED)return;rO(this,NN,this.OPEN);let j=new Event("open");if((w=e9(this,Bm6))==null||w.call(this,j),this.dispatchEvent(j),typeof _!="object"||!_||!("getReader"in _)){Uc(this,Db,mm6).call(this,"Invalid response body, expected a web ReadableStream",O),this.close();return}let J=new TextDecoder,M=_.getReader(),D=!0;do{let{done:X,value:P}=await M.read();P&&e9(this,_06).feed(J.decode(P,{stream:!X})),X&&(D=!1,e9(this,_06).reset(),Uc(this,Db,Wj8).call(this))}while(D)}),pD(this,Dj8,(z)=>{rO(this,st,void 0),!(z.name==="AbortError"||z.type==="aborted")&&Uc(this,Db,Wj8).call(this,jj8(z))}),pD(this,Xj8,(z)=>{typeof z.id=="string"&&rO(this,Fm6,z.id);let w=new MessageEvent(z.event||"message",{data:z.data,origin:e9(this,w06)?e9(this,w06).origin:e9(this,Z56).origin,lastEventId:z.id||""});e9(this,$06)&&(!z.event||z.event==="message")&&e9(this,$06).call(this,w),this.dispatchEvent(w)}),pD(this,Pj8,(z)=>{rO(this,gm6,z)}),pD(this,Zj8,()=>{rO(this,O06,void 0),e9(this,NN)===this.CONNECTING&&Uc(this,Db,Jj8).call(this)});try{if(A instanceof URL)rO(this,Z56,A);else if(typeof A=="string")rO(this,Z56,new URL(A,MA9()));else throw Error("Invalid URL")}catch{throw JA9("An invalid or illegal string was specified")}rO(this,_06,bO1({onEvent:e9(this,Xj8),onRetry:e9(this,Pj8)})),rO(this,NN,this.CONNECTING),rO(this,gm6,3000),rO(this,uO1,(K=q==null?void 0:q.fetch)!=null?K:globalThis.fetch),rO(this,xO1,(Y=q==null?void 0:q.withCredentials)!=null?Y:!1),Uc(this,Db,Jj8).call(this)}get readyState(){return e9(this,NN)}get url(){return e9(this,Z56).href}get withCredentials(){return e9(this,xO1)}get onerror(){return e9(this,H06)}set onerror(A){rO(this,H06,A)}get onmessage(){return e9(this,$06)}set onmessage(A){rO(this,$06,A)}get onopen(){return e9(this,Bm6)}set onopen(A){rO(this,Bm6,A)}addEventListener(A,q,K){let Y=q;super.addEventListener(A,Y,K)}removeEventListener(A,q,K){let Y=q;super.removeEventListener(A,Y,K)}close(){e9(this,O06)&&clearTimeout(e9(this,O06)),e9(this,NN)!==this.CLOSED&&(e9(this,st)&&e9(this,st).abort(),rO(this,NN,this.CLOSED),rO(this,st,void 0))}};NN=new WeakMap,Z56=new WeakMap,w06=new WeakMap,xO1=new WeakMap,uO1=new WeakMap,gm6=new WeakMap,O06=new WeakMap,Fm6=new WeakMap,st=new WeakMap,_06=new WeakMap,H06=new WeakMap,$06=new WeakMap,Bm6=new WeakMap,Db=new WeakSet,Jj8=function(){rO(this,NN,this.CONNECTING),rO(this,st,new AbortController),e9(this,uO1)(e9(this,Z56),Uc(this,Db,jk7).call(this)).then(e9(this,Mj8)).catch(e9(this,Dj8))},Mj8=new WeakMap,Dj8=new WeakMap,jk7=function(){var A;let q={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...e9(this,Fm6)?{"Last-Event-ID":e9(this,Fm6)}:void 0},cache:"no-store",signal:(A=e9(this,st))==null?void 0:A.signal};return"window"in globalThis&&(q.credentials=this.withCredentials?"include":"same-origin"),q},Xj8=new WeakMap,Pj8=new WeakMap,mm6=function(A,q){var K;e9(this,NN)!==this.CLOSED&&rO(this,NN,this.CLOSED);let Y=new Hj8("error",{code:q,message:A});(K=e9(this,H06))==null||K.call(this,Y),this.dispatchEvent(Y)},Wj8=function(A,q){var K;if(e9(this,NN)===this.CLOSED)return;rO(this,NN,this.CONNECTING);let Y=new Hj8("error",{code:q,message:A});(K=e9(this,H06))==null||K.call(this,Y),this.dispatchEvent(Y),rO(this,O06,setTimeout(e9(this,Zj8),e9(this,gm6)))},Zj8=new WeakMap,j06.CONNECTING=0,j06.OPEN=1,j06.CLOSED=2});function J06(A){if(!A)return{};if(A instanceof Headers)return Object.fromEntries(A.entries());if(Array.isArray(A))return Object.fromEntries(A);return{...A}}function G56(A=fetch,q){if(!q)return A;return async(K,Y)=>{let z={...q,...Y,headers:Y?.headers?{...J06(q.headers),...J06(Y.headers)}:q.headers};return A(K,z)}}async function DA9(A){return(await fj8).getRandomValues(new Uint8Array(A))}async function XA9(A){let K="",Y=await DA9(A);for(let z=0;z<A;z++){let w=Y[z]%66;K+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[w]}return K}async function PA9(A){return await XA9(A)}async function WA9(A){let q=await(await fj8).subtle.digest("SHA-256",new TextEncoder().encode(A));return btoa(String.fromCharCode(...new Uint8Array(q))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Tj8(A){if(!A)A=43;if(A<43||A>128)throw`Expected a length between 43 and 128. Received ${A}.`;let q=await PA9(A),K=await WA9(q);return{code_verifier:q,code_challenge:K}}var fj8;var Dk7=k(()=>{fj8=globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then((A)=>A.webcrypto)});var g0,Pk7,Qm6,ZA9,Wk7,Zk7,BO1,Xk7,GA9,fA9,Gk7,kW2,EW2;var mO1=k(()=>{B7();g0=dd1().superRefine((A,q)=>{if(!URL.canParse(A))return q.addIssue({code:Pc1.custom,message:"URL must be parseable",fatal:!0}),RR6}).refine((A)=>{let q=new URL(A);return q.protocol!=="javascript:"&&q.protocol!=="data:"&&q.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Pk7=JM({resource:n1().url(),authorization_servers:r7(g0).optional(),jwks_uri:n1().url().optional(),scopes_supported:r7(n1()).optional(),bearer_methods_supported:r7(n1()).optional(),resource_signing_alg_values_supported:r7(n1()).optional(),resource_name:n1().optional(),resource_documentation:n1().optional(),resource_policy_uri:n1().url().optional(),resource_tos_uri:n1().url().optional(),tls_client_certificate_bound_access_tokens:O2().optional(),authorization_details_types_supported:r7(n1()).optional(),dpop_signing_alg_values_supported:r7(n1()).optional(),dpop_bound_access_tokens_required:O2().optional()}),Qm6=JM({issuer:n1(),authorization_endpoint:g0,token_endpoint:g0,registration_endpoint:g0.optional(),scopes_supported:r7(n1()).optional(),response_types_supported:r7(n1()),response_modes_supported:r7(n1()).optional(),grant_types_supported:r7(n1()).optional(),token_endpoint_auth_methods_supported:r7(n1()).optional(),token_endpoint_auth_signing_alg_values_supported:r7(n1()).optional(),service_documentation:g0.optional(),revocation_endpoint:g0.optional(),revocation_endpoint_auth_methods_supported:r7(n1()).optional(),revocation_endpoint_auth_signing_alg_values_supported:r7(n1()).optional(),introspection_endpoint:n1().optional(),introspection_endpoint_auth_methods_supported:r7(n1()).optional(),introspection_endpoint_auth_signing_alg_values_supported:r7(n1()).optional(),code_challenge_methods_supported:r7(n1()).optional(),client_id_metadata_document_supported:O2().optional()}),ZA9=JM({issuer:n1(),authorization_endpoint:g0,token_endpoint:g0,userinfo_endpoint:g0.optional(),jwks_uri:g0,registration_endpoint:g0.optional(),scopes_supported:r7(n1()).optional(),response_types_supported:r7(n1()),response_modes_supported:r7(n1()).optional(),grant_types_supported:r7(n1()).optional(),acr_values_supported:r7(n1()).optional(),subject_types_supported:r7(n1()),id_token_signing_alg_values_supported:r7(n1()),id_token_encryption_alg_values_supported:r7(n1()).optional(),id_token_encryption_enc_values_supported:r7(n1()).optional(),userinfo_signing_alg_values_supported:r7(n1()).optional(),userinfo_encryption_alg_values_supported:r7(n1()).optional(),userinfo_encryption_enc_values_supported:r7(n1()).optional(),request_object_signing_alg_values_supported:r7(n1()).optional(),request_object_encryption_alg_values_supported:r7(n1()).optional(),request_object_encryption_enc_values_supported:r7(n1()).optional(),token_endpoint_auth_methods_supported:r7(n1()).optional(),token_endpoint_auth_signing_alg_values_supported:r7(n1()).optional(),display_values_supported:r7(n1()).optional(),claim_types_supported:r7(n1()).optional(),claims_supported:r7(n1()).optional(),service_documentation:n1().optional(),claims_locales_supported:r7(n1()).optional(),ui_locales_supported:r7(n1()).optional(),claims_parameter_supported:O2().optional(),request_parameter_supported:O2().optional(),request_uri_parameter_supported:O2().optional(),require_request_uri_registration:O2().optional(),op_policy_uri:g0.optional(),op_tos_uri:g0.optional(),client_id_metadata_document_supported:O2().optional()}),Wk7=Y4({...ZA9.shape,...Qm6.pick({code_challenge_methods_supported:!0}).shape}),Zk7=Y4({access_token:n1(),id_token:n1().optional(),token_type:n1(),expires_in:WS6.number().optional(),scope:n1().optional(),refresh_token:n1().optional()}).strip(),BO1=Y4({error:n1(),error_description:n1().optional(),error_uri:n1().optional()}),Xk7=g0.optional().or(Gq("").transform(()=>{return})),GA9=Y4({redirect_uris:r7(g0),token_endpoint_auth_method:n1().optional(),grant_types:r7(n1()).optional(),response_types:r7(n1()).optional(),client_name:n1().optional(),client_uri:g0.optional(),logo_uri:Xk7,scope:n1().optional(),contacts:r7(n1()).optional(),tos_uri:Xk7,policy_uri:n1().optional(),jwks_uri:g0.optional(),jwks:_c1().optional(),software_id:n1().optional(),software_version:n1().optional(),software_statement:n1().optional()}).strip(),fA9=Y4({client_id:n1(),client_secret:n1().optional(),client_id_issued_at:tY().optional(),client_secret_expires_at:tY().optional()}).strip(),Gk7=GA9.merge(fA9),kW2=Y4({error:n1(),error_description:n1().optional()}).strip(),EW2=Y4({token:n1(),token_type_hint:n1().optional()}).strip()});function fk7(A){let q=typeof A==="string"?new URL(A):new URL(A.href);return q.hash="",q}function Tk7({requestedResource:A,configuredResource:q}){let K=typeof A==="string"?new URL(A):new URL(A.href),Y=typeof q==="string"?new URL(q):new URL(q.href);if(K.origin!==Y.origin)return!1;if(K.pathname.length<Y.pathname.length)return!1;let z=K.pathname.endsWith("/")?K.pathname:K.pathname+"/",w=Y.pathname.endsWith("/")?Y.pathname:Y.pathname+"/";return z.startsWith(w)}var hM,gO1,M06,tt,D06,FO1,QO1,UO1,Dg,X06,pO1,dO1,cO1,lO1,P06,W06,iO1,nO1,Vk7;var Vj8=k(()=>{hM=class hM extends Error{constructor(A,q){super(A);this.errorUri=q,this.name=this.constructor.name}toResponseObject(){let A={error:this.errorCode,error_description:this.message};if(this.errorUri)A.error_uri=this.errorUri;return A}get errorCode(){return this.constructor.errorCode}};gO1=class gO1 extends hM{};gO1.errorCode="invalid_request";M06=class M06 extends hM{};M06.errorCode="invalid_client";tt=class tt extends hM{};tt.errorCode="invalid_grant";D06=class D06 extends hM{};D06.errorCode="unauthorized_client";FO1=class FO1 extends hM{};FO1.errorCode="unsupported_grant_type";QO1=class QO1 extends hM{};QO1.errorCode="invalid_scope";UO1=class UO1 extends hM{};UO1.errorCode="access_denied";Dg=class Dg extends hM{};Dg.errorCode="server_error";X06=class X06 extends hM{};X06.errorCode="temporarily_unavailable";pO1=class pO1 extends hM{};pO1.errorCode="unsupported_response_type";dO1=class dO1 extends hM{};dO1.errorCode="unsupported_token_type";cO1=class cO1 extends hM{};cO1.errorCode="invalid_token";lO1=class lO1 extends hM{};lO1.errorCode="method_not_allowed";P06=class P06 extends hM{};P06.errorCode="too_many_requests";W06=class W06 extends hM{};W06.errorCode="invalid_client_metadata";iO1=class iO1 extends hM{};iO1.errorCode="insufficient_scope";nO1=class nO1 extends hM{};nO1.errorCode="invalid_target";Vk7={[gO1.errorCode]:gO1,[M06.errorCode]:M06,[tt.errorCode]:tt,[D06.errorCode]:D06,[FO1.errorCode]:FO1,[QO1.errorCode]:QO1,[UO1.errorCode]:UO1,[Dg.errorCode]:Dg,[X06.errorCode]:X06,[pO1.errorCode]:pO1,[dO1.errorCode]:dO1,[cO1.errorCode]:cO1,[lO1.errorCode]:lO1,[P06.errorCode]:P06,[W06.errorCode]:W06,[iO1.errorCode]:iO1,[nO1.errorCode]:nO1}});function TA9(A){return["client_secret_basic","client_secret_post","none"].includes(A)}function VA9(A,q){let K=A.client_secret!==void 0;if(q.length===0)return K?"client_secret_post":"none";if("token_endpoint_auth_method"in A&&A.token_endpoint_auth_method&&TA9(A.token_endpoint_auth_method)&&q.includes(A.token_endpoint_auth_method))return A.token_endpoint_auth_method;if(K&&q.includes("client_secret_basic"))return"client_secret_basic";if(K&&q.includes("client_secret_post"))return"client_secret_post";if(q.includes("none"))return"none";return K?"client_secret_post":"none"}function NA9(A,q,K,Y){let{client_id:z,client_secret:w}=q;switch(A){case"client_secret_basic":vA9(z,w,K);return;case"client_secret_post":kA9(z,w,Y);return;case"none":EA9(z,Y);return;default:throw Error(`Unsupported client authentication method: ${A}`)}}function vA9(A,q,K){if(!q)throw Error("client_secret_basic authentication requires a client_secret");let Y=btoa(`${A}:${q}`);K.set("Authorization",`Basic ${Y}`)}function kA9(A,q,K){if(K.set("client_id",A),q)K.set("client_secret",q)}function EA9(A,q){q.set("client_id",A)}async function vk7(A){let q=A instanceof Response?A.status:void 0,K=A instanceof Response?await A.text():A;try{let Y=BO1.parse(JSON.parse(K)),{error:z,error_description:w,error_uri:_}=Y;return new(Vk7[z]||Dg)(w||"",_)}catch(Y){let z=`${q?`HTTP ${q}: `:""}Invalid OAuth error response: ${Y}. Raw body: ${K}`;return new Dg(z)}}async function tR(A,q){try{return await kj8(A,q)}catch(K){if(K instanceof M06||K instanceof D06)return await A.invalidateCredentials?.("all"),await kj8(A,q);else if(K instanceof tt)return await A.invalidateCredentials?.("tokens"),await kj8(A,q);throw K}}async function kj8(A,{serverUrl:q,authorizationCode:K,scope:Y,resourceMetadataUrl:z,fetchFn:w}){let _=await A.discoveryState?.(),$,O,H,j=z;if(!j&&_?.resourceMetadataUrl)j=new URL(_.resourceMetadataUrl);if(_?.authorizationServerUrl){if(O=_.authorizationServerUrl,$=_.resourceMetadata,H=_.authorizationServerMetadata??await Um6(O,{fetchFn:w}),!$)try{$=await kk7(q,{resourceMetadataUrl:j},w)}catch{}if(H!==_.authorizationServerMetadata||$!==_.resourceMetadata)await A.saveDiscoveryState?.({authorizationServerUrl:String(O),resourceMetadataUrl:j?.toString(),resourceMetadata:$,authorizationServerMetadata:H})}else{let G=await IA9(q,{resourceMetadataUrl:j,fetchFn:w});O=G.authorizationServerUrl,H=G.authorizationServerMetadata,$=G.resourceMetadata,await A.saveDiscoveryState?.({authorizationServerUrl:String(O),resourceMetadataUrl:j?.toString(),resourceMetadata:$,authorizationServerMetadata:H})}let J=await yA9(q,A,$),M=await Promise.resolve(A.clientInformation());if(!M){if(K!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let G=H?.client_id_metadata_document_supported===!0,f=A.clientMetadataUrl;if(f&&!LA9(f))throw new W06(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${f}`);if(G&&f)M={client_id:f},await A.saveClientInformation?.(M);else{if(!A.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let N=await BA9(O,{metadata:H,clientMetadata:A.clientMetadata,fetchFn:w});await A.saveClientInformation(N),M=N}}let D=!A.redirectUrl;if(K!==void 0||D){let G=await uA9(A,O,{metadata:H,resource:J,authorizationCode:K,fetchFn:w});return await A.saveTokens(G),"AUTHORIZED"}let X=await A.tokens();if(X?.refresh_token)try{let G=await yj8(O,{metadata:H,clientInformation:M,refreshToken:X.refresh_token,resource:J,addClientAuthentication:A.addClientAuthentication,fetchFn:w});return await A.saveTokens(G),"AUTHORIZED"}catch(G){if(!(G instanceof hM)||G instanceof Dg);else throw G}let P=A.state?await A.state():void 0,{authorizationUrl:W,codeVerifier:Z}=await bA9(O,{metadata:H,clientInformation:M,state:P,redirectUrl:A.redirectUrl,scope:Y||$?.scopes_supported?.join(" ")||A.clientMetadata.scope,resource:J});return await A.saveCodeVerifier(Z),await A.redirectToAuthorization(W),"REDIRECT"}function LA9(A){if(!A)return!1;try{let q=new URL(A);return q.protocol==="https:"&&q.pathname!=="/"}catch{return!1}}async function yA9(A,q,K){let Y=fk7(A);if(q.validateResourceURL)return await q.validateResourceURL(Y,K?.resource);if(!K)return;if(!Tk7({requestedResource:Y,configuredResource:K.resource}))throw Error(`Protected resource ${K.resource} does not match expected ${Y} (or origin)`);return new URL(K.resource)}function Z06(A){let q=A.headers.get("WWW-Authenticate");if(!q)return{};let[K,Y]=q.split(" ");if(K.toLowerCase()!=="bearer"||!Y)return{};let z=Ej8(A,"resource_metadata")||void 0,w;if(z)try{w=new URL(z)}catch{}let _=Ej8(A,"scope")||void 0,$=Ej8(A,"error")||void 0;return{resourceMetadataUrl:w,scope:_,error:$}}function Ej8(A,q){let K=A.headers.get("WWW-Authenticate");if(!K)return null;let Y=new RegExp(`${q}=(?:"([^"]+)"|([^\\s,]+))`),z=K.match(Y);if(z)return z[1]||z[2];return null}async function kk7(A,q,K=fetch){let Y=await CA9(A,"oauth-protected-resource",K,{protocolVersion:q?.protocolVersion,metadataUrl:q?.resourceMetadataUrl});if(!Y||Y.status===404)throw await Y?.body?.cancel(),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!Y.ok)throw await Y.body?.cancel(),Error(`HTTP ${Y.status} trying to load well-known OAuth protected resource metadata.`);return Pk7.parse(await Y.json())}async function Lj8(A,q,K=fetch){try{return await K(A,{headers:q})}catch(Y){if(Y instanceof TypeError)if(q)return Lj8(A,void 0,K);else return;throw Y}}function RA9(A,q="",K={}){if(q.endsWith("/"))q=q.slice(0,-1);return K.prependPathname?`${q}/.well-known/${A}`:`/.well-known/${A}${q}`}async function Nk7(A,q,K=fetch){return await Lj8(A,{"MCP-Protocol-Version":q},K)}function SA9(A,q){return!A||A.status>=400&&A.status<500&&q!=="/"}async function CA9(A,q,K,Y){let z=new URL(A),w=Y?.protocolVersion??co,_;if(Y?.metadataUrl)_=new URL(Y.metadataUrl);else{let O=RA9(q,z.pathname);_=new URL(O,Y?.metadataServerUrl??z),_.search=z.search}let $=await Nk7(_,w,K);if(!Y?.metadataUrl&&SA9($,z.pathname)){let O=new URL(`/.well-known/${q}`,z);$=await Nk7(O,w,K)}return $}function hA9(A){let q=typeof A==="string"?new URL(A):A,K=q.pathname!=="/",Y=[];if(!K)return Y.push({url:new URL("/.well-known/oauth-authorization-server",q.origin),type:"oauth"}),Y.push({url:new URL("/.well-known/openid-configuration",q.origin),type:"oidc"}),Y;let z=q.pathname;if(z.endsWith("/"))z=z.slice(0,-1);return Y.push({url:new URL(`/.well-known/oauth-authorization-server${z}`,q.origin),type:"oauth"}),Y.push({url:new URL(`/.well-known/openid-configuration${z}`,q.origin),type:"oidc"}),Y.push({url:new URL(`${z}/.well-known/openid-configuration`,q.origin),type:"oidc"}),Y}async function Um6(A,{fetchFn:q=fetch,protocolVersion:K=co}={}){let Y={"MCP-Protocol-Version":K,Accept:"application/json"},z=hA9(A);for(let{url:w,type:_}of z){let $=await Lj8(w,Y,q);if(!$)continue;if(!$.ok){if(await $.body?.cancel(),$.status>=400&&$.status<500)continue;throw Error(`HTTP ${$.status} trying to load ${_==="oauth"?"OAuth":"OpenID provider"} metadata from ${w}`)}if(_==="oauth")return Qm6.parse(await $.json());else return Wk7.parse(await $.json())}return}async function IA9(A,q){let K,Y;try{if(K=await kk7(A,{resourceMetadataUrl:q?.resourceMetadataUrl},q?.fetchFn),K.authorization_servers&&K.authorization_servers.length>0)Y=K.authorization_servers[0]}catch{}if(!Y)Y=String(new URL("/",A));let z=await Um6(Y,{fetchFn:q?.fetchFn});return{authorizationServerUrl:Y,authorizationServerMetadata:z,resourceMetadata:K}}async function bA9(A,{metadata:q,clientInformation:K,redirectUrl:Y,scope:z,state:w,resource:_}){let $;if(q){if($=new URL(q.authorization_endpoint),!q.response_types_supported.includes(Nj8))throw Error(`Incompatible auth server: does not support response type ${Nj8}`);if(q.code_challenge_methods_supported&&!q.code_challenge_methods_supported.includes(vj8))throw Error(`Incompatible auth server: does not support code challenge method ${vj8}`)}else $=new URL("/authorize",A);let O=await Tj8(),H=O.code_verifier,j=O.code_challenge;if($.searchParams.set("response_type",Nj8),$.searchParams.set("client_id",K.client_id),$.searchParams.set("code_challenge",j),$.searchParams.set("code_challenge_method",vj8),$.searchParams.set("redirect_uri",String(Y)),w)$.searchParams.set("state",w);if(z)$.searchParams.set("scope",z);if(z?.includes("offline_access"))$.searchParams.append("prompt","consent");if(_)$.searchParams.set("resource",_.href);return{authorizationUrl:$,codeVerifier:H}}function xA9(A,q,K){return new URLSearchParams({grant_type:"authorization_code",code:A,code_verifier:q,redirect_uri:String(K)})}async function Ek7(A,{metadata:q,tokenRequestParams:K,clientInformation:Y,addClientAuthentication:z,resource:w,fetchFn:_}){let $=q?.token_endpoint?new URL(q.token_endpoint):new URL("/token",A),O=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(w)K.set("resource",w.href);if(z)await z(O,K,$,q);else if(Y){let j=q?.token_endpoint_auth_methods_supported??[],J=VA9(Y,j);NA9(J,Y,O,K)}let H=await(_??fetch)($,{method:"POST",headers:O,body:K});if(!H.ok)throw await vk7(H);return Zk7.parse(await H.json())}async function yj8(A,{metadata:q,clientInformation:K,refreshToken:Y,resource:z,addClientAuthentication:w,fetchFn:_}){let $=new URLSearchParams({grant_type:"refresh_token",refresh_token:Y}),O=await Ek7(A,{metadata:q,tokenRequestParams:$,clientInformation:K,addClientAuthentication:w,resource:z,fetchFn:_});return{refresh_token:Y,...O}}async function uA9(A,q,{metadata:K,resource:Y,authorizationCode:z,fetchFn:w}={}){let _=A.clientMetadata.scope,$;if(A.prepareTokenRequest)$=await A.prepareTokenRequest(_);if(!$){if(!z)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!A.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");let H=await A.codeVerifier();$=xA9(z,H,A.redirectUrl)}let O=await A.clientInformation();return Ek7(q,{metadata:K,tokenRequestParams:$,clientInformation:O??void 0,addClientAuthentication:A.addClientAuthentication,resource:Y,fetchFn:w})}async function BA9(A,{metadata:q,clientMetadata:K,fetchFn:Y}){let z;if(q){if(!q.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");z=new URL(q.registration_endpoint)}else z=new URL("/register",A);let w=await(Y??fetch)(z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)});if(!w.ok)throw await vk7(w);return Gk7.parse(await w.json())}var zP,Nj8="code",vj8="S256";var pm6=k(()=>{Dk7();uX();mO1();mO1();Vj8();zP=class zP extends Error{constructor(A){super(A??"Unauthorized")}}});class rO1{constructor(A,q){this._url=A,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=q?.eventSourceInit,this._requestInit=q?.requestInit,this._authProvider=q?.authProvider,this._fetch=q?.fetch,this._fetchWithInit=G56(q?.fetch,q?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new zP("No auth provider");let A;try{A=await tR(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(q){throw this.onerror?.(q),q}if(A!=="AUTHORIZED")throw new zP;return await this._startOrAuth()}async _commonHeaders(){let A={};if(this._authProvider){let K=await this._authProvider.tokens();if(K)A.Authorization=`Bearer ${K.access_token}`}if(this._protocolVersion)A["mcp-protocol-version"]=this._protocolVersion;let q=J06(this._requestInit?.headers);return new Headers({...A,...q})}_startOrAuth(){let A=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((q,K)=>{this._eventSource=new j06(this._url.href,{...this._eventSourceInit,fetch:async(Y,z)=>{let w=await this._commonHeaders();w.set("Accept","text/event-stream");let _=await A(Y,{...z,headers:w});if(_.status===401&&_.headers.has("www-authenticate")){let{resourceMetadataUrl:$,scope:O}=Z06(_);this._resourceMetadataUrl=$,this._scope=O}return _}}),this._abortController=new AbortController,this._eventSource.onerror=(Y)=>{if(Y.code===401&&this._authProvider){this._authThenStart().then(q,K);return}let z=new Lk7(Y.code,Y.message,Y);K(z),this.onerror?.(z)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",(Y)=>{let z=Y;try{if(this._endpoint=new URL(z.data,this._url),this._endpoint.origin!==this._url.origin)throw Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(w){K(w),this.onerror?.(w),this.close();return}q()}),this._eventSource.onmessage=(Y)=>{let z=Y,w;try{w=qI.parse(JSON.parse(z.data))}catch(_){this.onerror?.(_);return}this.onmessage?.(w)}})}async start(){if(this._eventSource)throw Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(A){if(!this._authProvider)throw new zP("No auth provider");if(await tR(this._authProvider,{serverUrl:this._url,authorizationCode:A,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zP("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(A){if(!this._endpoint)throw Error("Not connected");try{let q=await this._commonHeaders();q.set("content-type","application/json");let K={...this._requestInit,method:"POST",headers:q,body:JSON.stringify(A),signal:this._abortController?.signal},Y=await(this._fetch??fetch)(this._endpoint,K);if(!Y.ok){let z=await Y.text().catch(()=>null);if(Y.status===401&&this._authProvider){let{resourceMetadataUrl:w,scope:_}=Z06(Y);if(this._resourceMetadataUrl=w,this._scope=_,await tR(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zP;return this.send(A)}throw Error(`Error POSTing to endpoint (HTTP ${Y.status}): ${z}`)}await Y.body?.cancel()}catch(q){throw this.onerror?.(q),q}}setProtocolVersion(A){this._protocolVersion=A}}var Lk7;var yk7=k(()=>{Mk7();uX();pm6();Lk7=class Lk7 extends Error{constructor(A,q,K){super(`SSE error: ${q}`);this.code=A,this.event=K}}});var Rj8;var Rk7=k(()=>{Oj8();Rj8=class Rj8 extends TransformStream{constructor({onError:A,onRetry:q,onComment:K}={}){let Y;super({start(z){Y=bO1({onEvent:(w)=>{z.enqueue(w)},onError(w){A==="terminate"?z.error(w):typeof A=="function"&&A(w)},onRetry:q,onComment:K})},transform(z){Y.feed(z)}})}}});class oO1{constructor(A,q){this._hasCompletedAuthFlow=!1,this._url=A,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=q?.requestInit,this._authProvider=q?.authProvider,this._fetch=q?.fetch,this._fetchWithInit=G56(q?.fetch,q?.requestInit),this._sessionId=q?.sessionId,this._reconnectionOptions=q?.reconnectionOptions??mA9}async _authThenStart(){if(!this._authProvider)throw new zP("No auth provider");let A;try{A=await tR(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(q){throw this.onerror?.(q),q}if(A!=="AUTHORIZED")throw new zP;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let A={};if(this._authProvider){let K=await this._authProvider.tokens();if(K)A.Authorization=`Bearer ${K.access_token}`}if(this._sessionId)A["mcp-session-id"]=this._sessionId;if(this._protocolVersion)A["mcp-protocol-version"]=this._protocolVersion;let q=J06(this._requestInit?.headers);return new Headers({...A,...q})}async _startOrAuthSse(A){let{resumptionToken:q}=A;try{let K=await this._commonHeaders();if(K.set("Accept","text/event-stream"),q)K.set("last-event-id",q);let Y=await(this._fetch??fetch)(this._url,{method:"GET",headers:K,signal:this._abortController?.signal});if(!Y.ok){if(await Y.body?.cancel(),Y.status===401&&this._authProvider)return await this._authThenStart();if(Y.status===405)return;throw new f56(Y.status,`Failed to open SSE stream: ${Y.statusText}`)}this._handleSseStream(Y.body,A,!0)}catch(K){throw this.onerror?.(K),K}}_getNextReconnectionDelay(A){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let q=this._reconnectionOptions.initialReconnectionDelay,K=this._reconnectionOptions.reconnectionDelayGrowFactor,Y=this._reconnectionOptions.maxReconnectionDelay;return Math.min(q*Math.pow(K,A),Y)}_scheduleReconnection(A,q=0){let K=this._reconnectionOptions.maxRetries;if(q>=K){this.onerror?.(Error(`Maximum reconnection attempts (${K}) exceeded.`));return}let Y=this._getNextReconnectionDelay(q);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(A).catch((z)=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${z instanceof Error?z.message:String(z)}`)),this._scheduleReconnection(A,q+1)})},Y)}_handleSseStream(A,q,K){if(!A)return;let{onresumptiontoken:Y,replayMessageId:z}=q,w,_=!1,$=!1;(async()=>{try{let H=A.pipeThrough(new TextDecoderStream).pipeThrough(new Rj8({onRetry:(M)=>{this._serverRetryMs=M}})).getReader();while(!0){let{value:M,done:D}=await H.read();if(D)break;if(M.id)w=M.id,_=!0,Y?.(M.id);if(!M.data)continue;if(!M.event||M.event==="message")try{let X=qI.parse(JSON.parse(M.data));if(a46(X)){if($=!0,z!==void 0)X.id=z}this.onmessage?.(X)}catch(X){this.onerror?.(X)}}if((K||_)&&!$&&this._abortController&&!this._abortController.signal.aborted)this._scheduleReconnection({resumptionToken:w,onresumptiontoken:Y,replayMessageId:z},0)}catch(H){if(this.onerror?.(Error(`SSE stream disconnected: ${H}`)),(K||_)&&!$&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:w,onresumptiontoken:Y,replayMessageId:z},0)}catch(M){this.onerror?.(Error(`Failed to reconnect: ${M instanceof Error?M.message:String(M)}`))}}})()}async start(){if(this._abortController)throw Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(A){if(!this._authProvider)throw new zP("No auth provider");if(await tR(this._authProvider,{serverUrl:this._url,authorizationCode:A,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zP("Failed to authorize")}async close(){if(this._reconnectionTimeout)clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0;this._abortController?.abort(),this.onclose?.()}async send(A,q){try{let{resumptionToken:K,onresumptiontoken:Y}=q||{};if(K){this._startOrAuthSse({resumptionToken:K,replayMessageId:GS6(A)?A.id:void 0}).catch((J)=>this.onerror?.(J));return}let z=await this._commonHeaders();z.set("content-type","application/json"),z.set("accept","application/json, text/event-stream");let w={...this._requestInit,method:"POST",headers:z,body:JSON.stringify(A),signal:this._abortController?.signal},_=await(this._fetch??fetch)(this._url,w),$=_.headers.get("mcp-session-id");if($)this._sessionId=$;if(!_.ok){let J=await _.text().catch(()=>null);if(_.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new f56(401,"Server returned 401 after successful authentication");let{resourceMetadataUrl:M,scope:D}=Z06(_);if(this._resourceMetadataUrl=M,this._scope=D,await tR(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zP;return this._hasCompletedAuthFlow=!0,this.send(A)}if(_.status===403&&this._authProvider){let{resourceMetadataUrl:M,scope:D,error:X}=Z06(_);if(X==="insufficient_scope"){let P=_.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===P)throw new f56(403,"Server returned 403 after trying upscoping");if(D)this._scope=D;if(M)this._resourceMetadataUrl=M;if(this._lastUpscopingHeader=P??void 0,await tR(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new zP;return this.send(A)}}throw new f56(_.status,`Error POSTing to endpoint: ${J}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,_.status===202){if(await _.body?.cancel(),P9A(A))this._startOrAuthSse({resumptionToken:void 0}).catch((J)=>this.onerror?.(J));return}let H=(Array.isArray(A)?A:[A]).filter((J)=>("method"in J)&&("id"in J)&&J.id!==void 0).length>0,j=_.headers.get("content-type");if(H)if(j?.includes("text/event-stream"))this._handleSseStream(_.body,{onresumptiontoken:Y},!1);else if(j?.includes("application/json")){let J=await _.json(),M=Array.isArray(J)?J.map((D)=>qI.parse(D)):[qI.parse(J)];for(let D of M)this.onmessage?.(D)}else throw await _.body?.cancel(),new f56(-1,`Unexpected content type: ${j}`);else await _.body?.cancel()}catch(K){throw this.onerror?.(K),K}}get sessionId(){return this._sessionId}async terminateSession(){if(!this._sessionId)return;try{let A=await this._commonHeaders(),q={...this._requestInit,method:"DELETE",headers:A,signal:this._abortController?.signal},K=await(this._fetch??fetch)(this._url,q);if(await K.body?.cancel(),!K.ok&&K.status!==405)throw new f56(K.status,`Failed to terminate session: ${K.statusText}`);this._sessionId=void 0}catch(A){throw this.onerror?.(A),A}}setProtocolVersion(A){this._protocolVersion=A}get protocolVersion(){return this._protocolVersion}async resumeStream(A,q){await this._startOrAuthSse({resumptionToken:A,onresumptiontoken:q?.onresumptiontoken})}}var mA9,f56;var Sk7=k(()=>{uX();pm6();Rk7();mA9={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2};f56=class f56 extends Error{constructor(A,q){super(`Streamable HTTP error: ${q}`);this.code=A}}});function gA9(A,q,K){var Y=-1,z=A.length,w=q.length,_={};while(++Y<z){var $=Y<w?q[Y]:void 0;K(_,A[Y],$)}return _}var Ck7;var hk7=k(()=>{Ck7=gA9});function FA9(A,q){return Ck7(A||[],q||[],Fo)}var Ik7;var bk7=k(()=>{vR6();hk7();Ik7=FA9});function T56(){return p8("tengu_mcp_elicitation",!1)}var aO1=k(()=>{rA()});function QA9(A){return A.mode==="url"?"url":"form"}function UA9(A,q,K){return A.findIndex((Y)=>Y.serverName===q&&Y.params.mode==="url"&&("elicitationId"in Y.params)&&Y.params.elicitationId===K)}function xk7(A,q,K){try{A.setRequestHandler(pp,async(Y,z)=>{w8(q,`Received elicitation request: ${U6(Y)}`);let w=QA9(Y.params);c("tengu_mcp_elicitation_shown",{mode:w});try{let _=await dm6(q,Y.params,z.signal);if(_)return w8(q,`Elicitation resolved by hook: ${U6(_)}`),c("tengu_mcp_elicitation_response",{mode:w,action:_.action}),_;let $=w==="url"&&"elicitationId"in Y.params?Y.params.elicitationId:void 0,H=await new Promise((J)=>{let M=()=>{J({action:"cancel"})};if(z.signal.aborted){M();return}let D=$?{actionLabel:"Skip confirmation"}:void 0;K((X)=>({...X,elicitation:{queue:[...X.elicitation.queue,{serverName:q,requestId:z.requestId,params:Y.params,signal:z.signal,waitingState:D,respond:(P)=>{z.signal.removeEventListener("abort",M),c("tengu_mcp_elicitation_response",{mode:w,action:P.action}),J(P)}}]}})),z.signal.addEventListener("abort",M)});return w8(q,`Elicitation response: ${U6(H)}`),await cm6(q,H,z.signal,w,$)}catch(_){return qz(q,`Elicitation error: ${_}`),{action:"cancel"}}}),A.setNotificationHandler(uS6,(Y)=>{let{elicitationId:z}=Y.params;w8(q,`Received elicitation completion notification: ${z}`),Xg({message:`MCP server "${q}" confirmed elicitation ${z} complete`,notificationType:"elicitation_complete"});let w=!1;if(K((_)=>{let $=UA9(_.elicitation.queue,q,z);if($===-1)return _;w=!0;let O=[..._.elicitation.queue];return O[$]={...O[$],completed:!0},{..._,elicitation:{queue:O}}}),!w)w8(q,`Ignoring completion notification for unknown elicitation: ${z}`)})}catch{return}}async function dm6(A,q,K){try{let Y=q.mode==="url"?"url":"form",z="url"in q?q.url:void 0,w="elicitationId"in q?q.elicitationId:void 0,{elicitationResponse:_,blockingError:$}=await Sj8({serverName:A,message:q.message,requestedSchema:"requestedSchema"in q?q.requestedSchema:void 0,signal:K,mode:Y,url:z,elicitationId:w});if($)return{action:"decline"};if(_)return{action:_.action,content:_.content};return}catch(Y){qz(A,`Elicitation hook error: ${Y}`);return}}async function cm6(A,q,K,Y,z){try{let{elicitationResultResponse:w,blockingError:_}=await Cj8({serverName:A,action:q.action,content:q.content,signal:K,mode:Y,elicitationId:z});if(_)return Xg({message:`Elicitation response for server "${A}": decline`,notificationType:"elicitation_response"}),{action:"decline"};let $=w?{action:w.action,content:w.content??q.content}:q;return Xg({message:`Elicitation response for server "${A}": ${$.action}`,notificationType:"elicitation_response"}),$}catch(w){return qz(A,`ElicitationResult hook error: ${w}`),Xg({message:`Elicitation response for server "${A}": ${q.action}`,notificationType:"elicitation_response"}),q}}var sO1=k(()=>{uX();B1();x1();a1();J$()});var lm6=C((_Z2,uk7)=>{var pA9=Number.MAX_SAFE_INTEGER||9007199254740991,dA9=["major","premajor","minor","preminor","patch","prepatch","prerelease"];uk7.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:pA9,RELEASE_TYPES:dA9,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var im6=C(($Z2,Bk7)=>{var cA9=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...A)=>console.error("SEMVER",...A):()=>{};Bk7.exports=cA9});var G06=C((Pg,mk7)=>{var{MAX_SAFE_COMPONENT_LENGTH:hj8,MAX_SAFE_BUILD_LENGTH:lA9,MAX_LENGTH:iA9}=lm6(),nA9=im6();Pg=mk7.exports={};var rA9=Pg.re=[],oA9=Pg.safeRe=[],U4=Pg.src=[],aA9=Pg.safeSrc=[],p4=Pg.t={},sA9=0,Ij8="[a-zA-Z0-9-]",tA9=[["\\s",1],["\\d",iA9],[Ij8,lA9]],eA9=(A)=>{for(let[q,K]of tA9)A=A.split(`${q}*`).join(`${q}{0,${K}}`).split(`${q}+`).join(`${q}{1,${K}}`);return A},M5=(A,q,K)=>{let Y=eA9(q),z=sA9++;nA9(A,z,q),p4[A]=z,U4[z]=q,aA9[z]=Y,rA9[z]=new RegExp(q,K?"g":void 0),oA9[z]=new RegExp(Y,K?"g":void 0)};M5("NUMERICIDENTIFIER","0|[1-9]\\d*");M5("NUMERICIDENTIFIERLOOSE","\\d+");M5("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Ij8}*`);M5("MAINVERSION",`(${U4[p4.NUMERICIDENTIFIER]})\\.(${U4[p4.NUMERICIDENTIFIER]})\\.(${U4[p4.NUMERICIDENTIFIER]})`);M5("MAINVERSIONLOOSE",`(${U4[p4.NUMERICIDENTIFIERLOOSE]})\\.(${U4[p4.NUMERICIDENTIFIERLOOSE]})\\.(${U4[p4.NUMERICIDENTIFIERLOOSE]})`);M5("PRERELEASEIDENTIFIER",`(?:${U4[p4.NONNUMERICIDENTIFIER]}|${U4[p4.NUMERICIDENTIFIER]})`);M5("PRERELEASEIDENTIFIERLOOSE",`(?:${U4[p4.NONNUMERICIDENTIFIER]}|${U4[p4.NUMERICIDENTIFIERLOOSE]})`);M5("PRERELEASE",`(?:-(${U4[p4.PRERELEASEIDENTIFIER]}(?:\\.${U4[p4.PRERELEASEIDENTIFIER]})*))`);M5("PRERELEASELOOSE",`(?:-?(${U4[p4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${U4[p4.PRERELEASEIDENTIFIERLOOSE]})*))`);M5("BUILDIDENTIFIER",`${Ij8}+`);M5("BUILD",`(?:\\+(${U4[p4.BUILDIDENTIFIER]}(?:\\.${U4[p4.BUILDIDENTIFIER]})*))`);M5("FULLPLAIN",`v?${U4[p4.MAINVERSION]}${U4[p4.PRERELEASE]}?${U4[p4.BUILD]}?`);M5("FULL",`^${U4[p4.FULLPLAIN]}$`);M5("LOOSEPLAIN",`[v=\\s]*${U4[p4.MAINVERSIONLOOSE]}${U4[p4.PRERELEASELOOSE]}?${U4[p4.BUILD]}?`);M5("LOOSE",`^${U4[p4.LOOSEPLAIN]}$`);M5("GTLT","((?:<|>)?=?)");M5("XRANGEIDENTIFIERLOOSE",`${U4[p4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);M5("XRANGEIDENTIFIER",`${U4[p4.NUMERICIDENTIFIER]}|x|X|\\*`);M5("XRANGEPLAIN",`[v=\\s]*(${U4[p4.XRANGEIDENTIFIER]})(?:\\.(${U4[p4.XRANGEIDENTIFIER]})(?:\\.(${U4[p4.XRANGEIDENTIFIER]})(?:${U4[p4.PRERELEASE]})?${U4[p4.BUILD]}?)?)?`);M5("XRANGEPLAINLOOSE",`[v=\\s]*(${U4[p4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${U4[p4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${U4[p4.XRANGEIDENTIFIERLOOSE]})(?:${U4[p4.PRERELEASELOOSE]})?${U4[p4.BUILD]}?)?)?`);M5("XRANGE",`^${U4[p4.GTLT]}\\s*${U4[p4.XRANGEPLAIN]}$`);M5("XRANGELOOSE",`^${U4[p4.GTLT]}\\s*${U4[p4.XRANGEPLAINLOOSE]}$`);M5("COERCEPLAIN",`(^|[^\\d])(\\d{1,${hj8}})(?:\\.(\\d{1,${hj8}}))?(?:\\.(\\d{1,${hj8}}))?`);M5("COERCE",`${U4[p4.COERCEPLAIN]}(?:$|[^\\d])`);M5("COERCEFULL",U4[p4.COERCEPLAIN]+`(?:${U4[p4.PRERELEASE]})?(?:${U4[p4.BUILD]})?(?:$|[^\\d])`);M5("COERCERTL",U4[p4.COERCE],!0);M5("COERCERTLFULL",U4[p4.COERCEFULL],!0);M5("LONETILDE","(?:~>?)");M5("TILDETRIM",`(\\s*)${U4[p4.LONETILDE]}\\s+`,!0);Pg.tildeTrimReplace="$1~";M5("TILDE",`^${U4[p4.LONETILDE]}${U4[p4.XRANGEPLAIN]}$`);M5("TILDELOOSE",`^${U4[p4.LONETILDE]}${U4[p4.XRANGEPLAINLOOSE]}$`);M5("LONECARET","(?:\\^)");M5("CARETTRIM",`(\\s*)${U4[p4.LONECARET]}\\s+`,!0);Pg.caretTrimReplace="$1^";M5("CARET",`^${U4[p4.LONECARET]}${U4[p4.XRANGEPLAIN]}$`);M5("CARETLOOSE",`^${U4[p4.LONECARET]}${U4[p4.XRANGEPLAINLOOSE]}$`);M5("COMPARATORLOOSE",`^${U4[p4.GTLT]}\\s*(${U4[p4.LOOSEPLAIN]})$|^$`);M5("COMPARATOR",`^${U4[p4.GTLT]}\\s*(${U4[p4.FULLPLAIN]})$|^$`);M5("COMPARATORTRIM",`(\\s*)${U4[p4.GTLT]}\\s*(${U4[p4.LOOSEPLAIN]}|${U4[p4.XRANGEPLAIN]})`,!0);Pg.comparatorTrimReplace="$1$2$3";M5("HYPHENRANGE",`^\\s*(${U4[p4.XRANGEPLAIN]})\\s+-\\s+(${U4[p4.XRANGEPLAIN]})\\s*$`);M5("HYPHENRANGELOOSE",`^\\s*(${U4[p4.XRANGEPLAINLOOSE]})\\s+-\\s+(${U4[p4.XRANGEPLAINLOOSE]})\\s*$`);M5("STAR","(<|>)?=?\\s*\\*");M5("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");M5("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var tO1=C((OZ2,gk7)=>{var A79=Object.freeze({loose:!0}),q79=Object.freeze({}),K79=(A)=>{if(!A)return q79;if(typeof A!=="object")return A79;return A};gk7.exports=K79});var bj8=C((HZ2,Uk7)=>{var Fk7=/^[0-9]+$/,Qk7=(A,q)=>{let K=Fk7.test(A),Y=Fk7.test(q);if(K&&Y)A=+A,q=+q;return A===q?0:K&&!Y?-1:Y&&!K?1:A<q?-1:1},Y79=(A,q)=>Qk7(q,A);Uk7.exports={compareIdentifiers:Qk7,rcompareIdentifiers:Y79}});var sZ=C((jZ2,dk7)=>{var eO1=im6(),{MAX_LENGTH:pk7,MAX_SAFE_INTEGER:AH1}=lm6(),{safeRe:qH1,t:KH1}=G06(),z79=tO1(),{compareIdentifiers:f06}=bj8();class Xb{constructor(A,q){if(q=z79(q),A instanceof Xb)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else A=A.version;else if(typeof A!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof A}".`);if(A.length>pk7)throw TypeError(`version is longer than ${pk7} characters`);eO1("SemVer",A,q),this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease;let K=A.trim().match(q.loose?qH1[KH1.LOOSE]:qH1[KH1.FULL]);if(!K)throw TypeError(`Invalid Version: ${A}`);if(this.raw=A,this.major=+K[1],this.minor=+K[2],this.patch=+K[3],this.major>AH1||this.major<0)throw TypeError("Invalid major version");if(this.minor>AH1||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>AH1||this.patch<0)throw TypeError("Invalid patch version");if(!K[4])this.prerelease=[];else this.prerelease=K[4].split(".").map((Y)=>{if(/^[0-9]+$/.test(Y)){let z=+Y;if(z>=0&&z<AH1)return z}return Y});this.build=K[5]?K[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(A){if(eO1("SemVer.compare",this.version,this.options,A),!(A instanceof Xb)){if(typeof A==="string"&&A===this.version)return 0;A=new Xb(A,this.options)}if(A.version===this.version)return 0;return this.compareMain(A)||this.comparePre(A)}compareMain(A){if(!(A instanceof Xb))A=new Xb(A,this.options);return f06(this.major,A.major)||f06(this.minor,A.minor)||f06(this.patch,A.patch)}comparePre(A){if(!(A instanceof Xb))A=new Xb(A,this.options);if(this.prerelease.length&&!A.prerelease.length)return-1;else if(!this.prerelease.length&&A.prerelease.length)return 1;else if(!this.prerelease.length&&!A.prerelease.length)return 0;let q=0;do{let K=this.prerelease[q],Y=A.prerelease[q];if(eO1("prerelease compare",q,K,Y),K===void 0&&Y===void 0)return 0;else if(Y===void 0)return 1;else if(K===void 0)return-1;else if(K===Y)continue;else return f06(K,Y)}while(++q)}compareBuild(A){if(!(A instanceof Xb))A=new Xb(A,this.options);let q=0;do{let K=this.build[q],Y=A.build[q];if(eO1("build compare",q,K,Y),K===void 0&&Y===void 0)return 0;else if(Y===void 0)return 1;else if(K===void 0)return-1;else if(K===Y)continue;else return f06(K,Y)}while(++q)}inc(A,q,K){if(A.startsWith("pre")){if(!q&&K===!1)throw Error("invalid increment argument: identifier is empty");if(q){let Y=`-${q}`.match(this.options.loose?qH1[KH1.PRERELEASELOOSE]:qH1[KH1.PRERELEASE]);if(!Y||Y[1]!==q)throw Error(`invalid identifier: ${q}`)}}switch(A){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",q,K);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",q,K);break;case"prepatch":this.prerelease.length=0,this.inc("patch",q,K),this.inc("pre",q,K);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",q,K);this.inc("pre",q,K);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let Y=Number(K)?1:0;if(this.prerelease.length===0)this.prerelease=[Y];else{let z=this.prerelease.length;while(--z>=0)if(typeof this.prerelease[z]==="number")this.prerelease[z]++,z=-2;if(z===-1){if(q===this.prerelease.join(".")&&K===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(Y)}}if(q){let z=[q,Y];if(K===!1)z=[q];if(f06(this.prerelease[0],q)===0){if(isNaN(this.prerelease[1]))this.prerelease=z}else this.prerelease=z}break}default:throw Error(`invalid increment argument: ${A}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}dk7.exports=Xb});var V56=C((JZ2,lk7)=>{var ck7=sZ(),w79=(A,q,K=!1)=>{if(A instanceof ck7)return A;try{return new ck7(A,q)}catch(Y){if(!K)return null;throw Y}};lk7.exports=w79});var nk7=C((MZ2,ik7)=>{var _79=V56(),$79=(A,q)=>{let K=_79(A,q);return K?K.version:null};ik7.exports=$79});var ok7=C((DZ2,rk7)=>{var O79=V56(),H79=(A,q)=>{let K=O79(A.trim().replace(/^[=v]+/,""),q);return K?K.version:null};rk7.exports=H79});var tk7=C((XZ2,sk7)=>{var ak7=sZ(),j79=(A,q,K,Y,z)=>{if(typeof K==="string")z=Y,Y=K,K=void 0;try{return new ak7(A instanceof ak7?A.version:A,K).inc(q,Y,z).version}catch(w){return null}};sk7.exports=j79});var qE7=C((PZ2,AE7)=>{var ek7=V56(),J79=(A,q)=>{let K=ek7(A,null,!0),Y=ek7(q,null,!0),z=K.compare(Y);if(z===0)return null;let w=z>0,_=w?K:Y,$=w?Y:K,O=!!_.prerelease.length;if(!!$.prerelease.length&&!O){if(!$.patch&&!$.minor)return"major";if($.compareMain(_)===0){if($.minor&&!$.patch)return"minor";return"patch"}}let j=O?"pre":"";if(K.major!==Y.major)return j+"major";if(K.minor!==Y.minor)return j+"minor";if(K.patch!==Y.patch)return j+"patch";return"prerelease"};AE7.exports=J79});var YE7=C((WZ2,KE7)=>{var M79=sZ(),D79=(A,q)=>new M79(A,q).major;KE7.exports=D79});var wE7=C((ZZ2,zE7)=>{var X79=sZ(),P79=(A,q)=>new X79(A,q).minor;zE7.exports=P79});var $E7=C((GZ2,_E7)=>{var W79=sZ(),Z79=(A,q)=>new W79(A,q).patch;_E7.exports=Z79});var HE7=C((fZ2,OE7)=>{var G79=V56(),f79=(A,q)=>{let K=G79(A,q);return K&&K.prerelease.length?K.prerelease:null};OE7.exports=f79});var eR=C((TZ2,JE7)=>{var jE7=sZ(),T79=(A,q,K)=>new jE7(A,K).compare(new jE7(q,K));JE7.exports=T79});var DE7=C((VZ2,ME7)=>{var V79=eR(),N79=(A,q,K)=>V79(q,A,K);ME7.exports=N79});var PE7=C((NZ2,XE7)=>{var v79=eR(),k79=(A,q)=>v79(A,q,!0);XE7.exports=k79});var YH1=C((vZ2,ZE7)=>{var WE7=sZ(),E79=(A,q,K)=>{let Y=new WE7(A,K),z=new WE7(q,K);return Y.compare(z)||Y.compareBuild(z)};ZE7.exports=E79});var fE7=C((kZ2,GE7)=>{var L79=YH1(),y79=(A,q)=>A.sort((K,Y)=>L79(K,Y,q));GE7.exports=y79});var VE7=C((EZ2,TE7)=>{var R79=YH1(),S79=(A,q)=>A.sort((K,Y)=>R79(Y,K,q));TE7.exports=S79});var nm6=C((LZ2,NE7)=>{var C79=eR(),h79=(A,q,K)=>C79(A,q,K)>0;NE7.exports=h79});var zH1=C((yZ2,vE7)=>{var I79=eR(),b79=(A,q,K)=>I79(A,q,K)<0;vE7.exports=b79});var xj8=C((RZ2,kE7)=>{var x79=eR(),u79=(A,q,K)=>x79(A,q,K)===0;kE7.exports=u79});var uj8=C((SZ2,EE7)=>{var B79=eR(),m79=(A,q,K)=>B79(A,q,K)!==0;EE7.exports=m79});var wH1=C((CZ2,LE7)=>{var g79=eR(),F79=(A,q,K)=>g79(A,q,K)>=0;LE7.exports=F79});var _H1=C((hZ2,yE7)=>{var Q79=eR(),U79=(A,q,K)=>Q79(A,q,K)<=0;yE7.exports=U79});var Bj8=C((IZ2,RE7)=>{var p79=xj8(),d79=uj8(),c79=nm6(),l79=wH1(),i79=zH1(),n79=_H1(),r79=(A,q,K,Y)=>{switch(q){case"===":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A===K;case"!==":if(typeof A==="object")A=A.version;if(typeof K==="object")K=K.version;return A!==K;case"":case"=":case"==":return p79(A,K,Y);case"!=":return d79(A,K,Y);case">":return c79(A,K,Y);case">=":return l79(A,K,Y);case"<":return i79(A,K,Y);case"<=":return n79(A,K,Y);default:throw TypeError(`Invalid operator: ${q}`)}};RE7.exports=r79});var CE7=C((bZ2,SE7)=>{var o79=sZ(),a79=V56(),{safeRe:$H1,t:OH1}=G06(),s79=(A,q)=>{if(A instanceof o79)return A;if(typeof A==="number")A=String(A);if(typeof A!=="string")return null;q=q||{};let K=null;if(!q.rtl)K=A.match(q.includePrerelease?$H1[OH1.COERCEFULL]:$H1[OH1.COERCE]);else{let O=q.includePrerelease?$H1[OH1.COERCERTLFULL]:$H1[OH1.COERCERTL],H;while((H=O.exec(A))&&(!K||K.index+K[0].length!==A.length)){if(!K||H.index+H[0].length!==K.index+K[0].length)K=H;O.lastIndex=H.index+H[1].length+H[2].length}O.lastIndex=-1}if(K===null)return null;let Y=K[2],z=K[3]||"0",w=K[4]||"0",_=q.includePrerelease&&K[5]?`-${K[5]}`:"",$=q.includePrerelease&&K[6]?`+${K[6]}`:"";return a79(`${Y}.${z}.${w}${_}${$}`,q)};SE7.exports=s79});var bE7=C((xZ2,IE7)=>{class hE7{constructor(){this.max=1000,this.map=new Map}get(A){let q=this.map.get(A);if(q===void 0)return;else return this.map.delete(A),this.map.set(A,q),q}delete(A){return this.map.delete(A)}set(A,q){if(!this.delete(A)&&q!==void 0){if(this.map.size>=this.max){let Y=this.map.keys().next().value;this.delete(Y)}this.map.set(A,q)}return this}}IE7.exports=hE7});var AS=C((uZ2,mE7)=>{var t79=/\s+/g;class rm6{constructor(A,q){if(q=A49(q),A instanceof rm6)if(A.loose===!!q.loose&&A.includePrerelease===!!q.includePrerelease)return A;else return new rm6(A.raw,q);if(A instanceof mj8)return this.raw=A.value,this.set=[[A]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=A.trim().replace(t79," "),this.set=this.raw.split("||").map((K)=>this.parseRange(K.trim())).filter((K)=>K.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let K=this.set[0];if(this.set=this.set.filter((Y)=>!uE7(Y[0])),this.set.length===0)this.set=[K];else if(this.set.length>1){for(let Y of this.set)if(Y.length===1&&$49(Y[0])){this.set=[Y];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let A=0;A<this.set.length;A++){if(A>0)this.formatted+="||";let q=this.set[A];for(let K=0;K<q.length;K++){if(K>0)this.formatted+=" ";this.formatted+=q[K].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(A){let K=((this.options.includePrerelease&&w49)|(this.options.loose&&_49))+":"+A,Y=xE7.get(K);if(Y)return Y;let z=this.options.loose,w=z?vN[of.HYPHENRANGELOOSE]:vN[of.HYPHENRANGE];A=A.replace(w,Z49(this.options.includePrerelease)),e$("hyphen replace",A),A=A.replace(vN[of.COMPARATORTRIM],K49),e$("comparator trim",A),A=A.replace(vN[of.TILDETRIM],Y49),e$("tilde trim",A),A=A.replace(vN[of.CARETTRIM],z49),e$("caret trim",A);let _=A.split(" ").map((j)=>O49(j,this.options)).join(" ").split(/\s+/).map((j)=>W49(j,this.options));if(z)_=_.filter((j)=>{return e$("loose invalid filter",j,this.options),!!j.match(vN[of.COMPARATORLOOSE])});e$("range list",_);let $=new Map,O=_.map((j)=>new mj8(j,this.options));for(let j of O){if(uE7(j))return[j];$.set(j.value,j)}if($.size>1&&$.has(""))$.delete("");let H=[...$.values()];return xE7.set(K,H),H}intersects(A,q){if(!(A instanceof rm6))throw TypeError("a Range is required");return this.set.some((K)=>{return BE7(K,q)&&A.set.some((Y)=>{return BE7(Y,q)&&K.every((z)=>{return Y.every((w)=>{return z.intersects(w,q)})})})})}test(A){if(!A)return!1;if(typeof A==="string")try{A=new q49(A,this.options)}catch(q){return!1}for(let q=0;q<this.set.length;q++)if(G49(this.set[q],A,this.options))return!0;return!1}}mE7.exports=rm6;var e79=bE7(),xE7=new e79,A49=tO1(),mj8=om6(),e$=im6(),q49=sZ(),{safeRe:vN,t:of,comparatorTrimReplace:K49,tildeTrimReplace:Y49,caretTrimReplace:z49}=G06(),{FLAG_INCLUDE_PRERELEASE:w49,FLAG_LOOSE:_49}=lm6(),uE7=(A)=>A.value==="<0.0.0-0",$49=(A)=>A.value==="",BE7=(A,q)=>{let K=!0,Y=A.slice(),z=Y.pop();while(K&&Y.length)K=Y.every((w)=>{return z.intersects(w,q)}),z=Y.pop();return K},O49=(A,q)=>{return e$("comp",A,q),A=J49(A,q),e$("caret",A),A=H49(A,q),e$("tildes",A),A=D49(A,q),e$("xrange",A),A=P49(A,q),e$("stars",A),A},af=(A)=>!A||A.toLowerCase()==="x"||A==="*",H49=(A,q)=>{return A.trim().split(/\s+/).map((K)=>j49(K,q)).join(" ")},j49=(A,q)=>{let K=q.loose?vN[of.TILDELOOSE]:vN[of.TILDE];return A.replace(K,(Y,z,w,_,$)=>{e$("tilde",A,Y,z,w,_,$);let O;if(af(z))O="";else if(af(w))O=`>=${z}.0.0 <${+z+1}.0.0-0`;else if(af(_))O=`>=${z}.${w}.0 <${z}.${+w+1}.0-0`;else if($)e$("replaceTilde pr",$),O=`>=${z}.${w}.${_}-${$} <${z}.${+w+1}.0-0`;else O=`>=${z}.${w}.${_} <${z}.${+w+1}.0-0`;return e$("tilde return",O),O})},J49=(A,q)=>{return A.trim().split(/\s+/).map((K)=>M49(K,q)).join(" ")},M49=(A,q)=>{e$("caret",A,q);let K=q.loose?vN[of.CARETLOOSE]:vN[of.CARET],Y=q.includePrerelease?"-0":"";return A.replace(K,(z,w,_,$,O)=>{e$("caret",A,z,w,_,$,O);let H;if(af(w))H="";else if(af(_))H=`>=${w}.0.0${Y} <${+w+1}.0.0-0`;else if(af($))if(w==="0")H=`>=${w}.${_}.0${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.0${Y} <${+w+1}.0.0-0`;else if(O)if(e$("replaceCaret pr",O),w==="0")if(_==="0")H=`>=${w}.${_}.${$}-${O} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}-${O} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$}-${O} <${+w+1}.0.0-0`;else if(e$("no pr"),w==="0")if(_==="0")H=`>=${w}.${_}.${$}${Y} <${w}.${_}.${+$+1}-0`;else H=`>=${w}.${_}.${$}${Y} <${w}.${+_+1}.0-0`;else H=`>=${w}.${_}.${$} <${+w+1}.0.0-0`;return e$("caret return",H),H})},D49=(A,q)=>{return e$("replaceXRanges",A,q),A.split(/\s+/).map((K)=>X49(K,q)).join(" ")},X49=(A,q)=>{A=A.trim();let K=q.loose?vN[of.XRANGELOOSE]:vN[of.XRANGE];return A.replace(K,(Y,z,w,_,$,O)=>{e$("xRange",A,Y,z,w,_,$,O);let H=af(w),j=H||af(_),J=j||af($),M=J;if(z==="="&&M)z="";if(O=q.includePrerelease?"-0":"",H)if(z===">"||z==="<")Y="<0.0.0-0";else Y="*";else if(z&&M){if(j)_=0;if($=0,z===">")if(z=">=",j)w=+w+1,_=0,$=0;else _=+_+1,$=0;else if(z==="<=")if(z="<",j)w=+w+1;else _=+_+1;if(z==="<")O="-0";Y=`${z+w}.${_}.${$}${O}`}else if(j)Y=`>=${w}.0.0${O} <${+w+1}.0.0-0`;else if(J)Y=`>=${w}.${_}.0${O} <${w}.${+_+1}.0-0`;return e$("xRange return",Y),Y})},P49=(A,q)=>{return e$("replaceStars",A,q),A.trim().replace(vN[of.STAR],"")},W49=(A,q)=>{return e$("replaceGTE0",A,q),A.trim().replace(vN[q.includePrerelease?of.GTE0PRE:of.GTE0],"")},Z49=(A)=>(q,K,Y,z,w,_,$,O,H,j,J,M)=>{if(af(Y))K="";else if(af(z))K=`>=${Y}.0.0${A?"-0":""}`;else if(af(w))K=`>=${Y}.${z}.0${A?"-0":""}`;else if(_)K=`>=${K}`;else K=`>=${K}${A?"-0":""}`;if(af(H))O="";else if(af(j))O=`<${+H+1}.0.0-0`;else if(af(J))O=`<${H}.${+j+1}.0-0`;else if(M)O=`<=${H}.${j}.${J}-${M}`;else if(A)O=`<${H}.${j}.${+J+1}-0`;else O=`<=${O}`;return`${K} ${O}`.trim()},G49=(A,q,K)=>{for(let Y=0;Y<A.length;Y++)if(!A[Y].test(q))return!1;if(q.prerelease.length&&!K.includePrerelease){for(let Y=0;Y<A.length;Y++){if(e$(A[Y].semver),A[Y].semver===mj8.ANY)continue;if(A[Y].semver.prerelease.length>0){let z=A[Y].semver;if(z.major===q.major&&z.minor===q.minor&&z.patch===q.patch)return!0}}return!1}return!0}});var om6=C((BZ2,dE7)=>{var am6=Symbol("SemVer ANY");class HH1{static get ANY(){return am6}constructor(A,q){if(q=gE7(q),A instanceof HH1)if(A.loose===!!q.loose)return A;else A=A.value;if(A=A.trim().split(/\s+/).join(" "),Fj8("comparator",A,q),this.options=q,this.loose=!!q.loose,this.parse(A),this.semver===am6)this.value="";else this.value=this.operator+this.semver.version;Fj8("comp",this)}parse(A){let q=this.options.loose?FE7[QE7.COMPARATORLOOSE]:FE7[QE7.COMPARATOR],K=A.match(q);if(!K)throw TypeError(`Invalid comparator: ${A}`);if(this.operator=K[1]!==void 0?K[1]:"",this.operator==="=")this.operator="";if(!K[2])this.semver=am6;else this.semver=new UE7(K[2],this.options.loose)}toString(){return this.value}test(A){if(Fj8("Comparator.test",A,this.options.loose),this.semver===am6||A===am6)return!0;if(typeof A==="string")try{A=new UE7(A,this.options)}catch(q){return!1}return gj8(A,this.operator,this.semver,this.options)}intersects(A,q){if(!(A instanceof HH1))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new pE7(A.value,q).test(this.value)}else if(A.operator===""){if(A.value==="")return!0;return new pE7(this.value,q).test(A.semver)}if(q=gE7(q),q.includePrerelease&&(this.value==="<0.0.0-0"||A.value==="<0.0.0-0"))return!1;if(!q.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&A.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&A.operator.startsWith("<"))return!0;if(this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("="))return!0;if(gj8(this.semver,"<",A.semver,q)&&this.operator.startsWith(">")&&A.operator.startsWith("<"))return!0;if(gj8(this.semver,">",A.semver,q)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))return!0;return!1}}dE7.exports=HH1;var gE7=tO1(),{safeRe:FE7,t:QE7}=G06(),gj8=Bj8(),Fj8=im6(),UE7=sZ(),pE7=AS()});var sm6=C((mZ2,cE7)=>{var f49=AS(),T49=(A,q,K)=>{try{q=new f49(q,K)}catch(Y){return!1}return q.test(A)};cE7.exports=T49});var iE7=C((gZ2,lE7)=>{var V49=AS(),N49=(A,q)=>new V49(A,q).set.map((K)=>K.map((Y)=>Y.value).join(" ").trim().split(" "));lE7.exports=N49});var rE7=C((FZ2,nE7)=>{var v49=sZ(),k49=AS(),E49=(A,q,K)=>{let Y=null,z=null,w=null;try{w=new k49(q,K)}catch(_){return null}return A.forEach((_)=>{if(w.test(_)){if(!Y||z.compare(_)===-1)Y=_,z=new v49(Y,K)}}),Y};nE7.exports=E49});var aE7=C((QZ2,oE7)=>{var L49=sZ(),y49=AS(),R49=(A,q,K)=>{let Y=null,z=null,w=null;try{w=new y49(q,K)}catch(_){return null}return A.forEach((_)=>{if(w.test(_)){if(!Y||z.compare(_)===1)Y=_,z=new L49(Y,K)}}),Y};oE7.exports=R49});var eE7=C((UZ2,tE7)=>{var Qj8=sZ(),S49=AS(),sE7=nm6(),C49=(A,q)=>{A=new S49(A,q);let K=new Qj8("0.0.0");if(A.test(K))return K;if(K=new Qj8("0.0.0-0"),A.test(K))return K;K=null;for(let Y=0;Y<A.set.length;++Y){let z=A.set[Y],w=null;if(z.forEach((_)=>{let $=new Qj8(_.semver.version);switch(_.operator){case">":if($.prerelease.length===0)$.patch++;else $.prerelease.push(0);$.raw=$.format();case"":case">=":if(!w||sE7($,w))w=$;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${_.operator}`)}}),w&&(!K||sE7(K,w)))K=w}if(K&&A.test(K))return K;return null};tE7.exports=C49});var qL7=C((pZ2,AL7)=>{var h49=AS(),I49=(A,q)=>{try{return new h49(A,q).range||"*"}catch(K){return null}};AL7.exports=I49});var jH1=C((dZ2,wL7)=>{var b49=sZ(),zL7=om6(),{ANY:x49}=zL7,u49=AS(),B49=sm6(),KL7=nm6(),YL7=zH1(),m49=_H1(),g49=wH1(),F49=(A,q,K,Y)=>{A=new b49(A,Y),q=new u49(q,Y);let z,w,_,$,O;switch(K){case">":z=KL7,w=m49,_=YL7,$=">",O=">=";break;case"<":z=YL7,w=g49,_=KL7,$="<",O="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(B49(A,q,Y))return!1;for(let H=0;H<q.set.length;++H){let j=q.set[H],J=null,M=null;if(j.forEach((D)=>{if(D.semver===x49)D=new zL7(">=0.0.0");if(J=J||D,M=M||D,z(D.semver,J.semver,Y))J=D;else if(_(D.semver,M.semver,Y))M=D}),J.operator===$||J.operator===O)return!1;if((!M.operator||M.operator===$)&&w(A,M.semver))return!1;else if(M.operator===O&&_(A,M.semver))return!1}return!0};wL7.exports=F49});var $L7=C((cZ2,_L7)=>{var Q49=jH1(),U49=(A,q,K)=>Q49(A,q,">",K);_L7.exports=U49});var HL7=C((lZ2,OL7)=>{var p49=jH1(),d49=(A,q,K)=>p49(A,q,"<",K);OL7.exports=d49});var ML7=C((iZ2,JL7)=>{var jL7=AS(),c49=(A,q,K)=>{return A=new jL7(A,K),q=new jL7(q,K),A.intersects(q,K)};JL7.exports=c49});var XL7=C((nZ2,DL7)=>{var l49=sm6(),i49=eR();DL7.exports=(A,q,K)=>{let Y=[],z=null,w=null,_=A.sort((j,J)=>i49(j,J,K));for(let j of _)if(l49(j,q,K)){if(w=j,!z)z=j}else{if(w)Y.push([z,w]);w=null,z=null}if(z)Y.push([z,null]);let $=[];for(let[j,J]of Y)if(j===J)$.push(j);else if(!J&&j===_[0])$.push("*");else if(!J)$.push(`>=${j}`);else if(j===_[0])$.push(`<=${J}`);else $.push(`${j} - ${J}`);let O=$.join(" || "),H=typeof q.raw==="string"?q.raw:String(q);return O.length<H.length?O:q}});var TL7=C((rZ2,fL7)=>{var PL7=AS(),pj8=om6(),{ANY:Uj8}=pj8,tm6=sm6(),dj8=eR(),n49=(A,q,K={})=>{if(A===q)return!0;A=new PL7(A,K),q=new PL7(q,K);let Y=!1;A:for(let z of A.set){for(let w of q.set){let _=o49(z,w,K);if(Y=Y||_!==null,_)continue A}if(Y)return!1}return!0},r49=[new pj8(">=0.0.0-0")],WL7=[new pj8(">=0.0.0")],o49=(A,q,K)=>{if(A===q)return!0;if(A.length===1&&A[0].semver===Uj8)if(q.length===1&&q[0].semver===Uj8)return!0;else if(K.includePrerelease)A=r49;else A=WL7;if(q.length===1&&q[0].semver===Uj8)if(K.includePrerelease)return!0;else q=WL7;let Y=new Set,z,w;for(let D of A)if(D.operator===">"||D.operator===">=")z=ZL7(z,D,K);else if(D.operator==="<"||D.operator==="<=")w=GL7(w,D,K);else Y.add(D.semver);if(Y.size>1)return null;let _;if(z&&w){if(_=dj8(z.semver,w.semver,K),_>0)return null;else if(_===0&&(z.operator!==">="||w.operator!=="<="))return null}for(let D of Y){if(z&&!tm6(D,String(z),K))return null;if(w&&!tm6(D,String(w),K))return null;for(let X of q)if(!tm6(D,String(X),K))return!1;return!0}let $,O,H,j,J=w&&!K.includePrerelease&&w.semver.prerelease.length?w.semver:!1,M=z&&!K.includePrerelease&&z.semver.prerelease.length?z.semver:!1;if(J&&J.prerelease.length===1&&w.operator==="<"&&J.prerelease[0]===0)J=!1;for(let D of q){if(j=j||D.operator===">"||D.operator===">=",H=H||D.operator==="<"||D.operator==="<=",z){if(M){if(D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===M.major&&D.semver.minor===M.minor&&D.semver.patch===M.patch)M=!1}if(D.operator===">"||D.operator===">="){if($=ZL7(z,D,K),$===D&&$!==z)return!1}else if(z.operator===">="&&!tm6(z.semver,String(D),K))return!1}if(w){if(J){if(D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===J.major&&D.semver.minor===J.minor&&D.semver.patch===J.patch)J=!1}if(D.operator==="<"||D.operator==="<="){if(O=GL7(w,D,K),O===D&&O!==w)return!1}else if(w.operator==="<="&&!tm6(w.semver,String(D),K))return!1}if(!D.operator&&(w||z)&&_!==0)return!1}if(z&&H&&!w&&_!==0)return!1;if(w&&j&&!z&&_!==0)return!1;if(M||J)return!1;return!0},ZL7=(A,q,K)=>{if(!A)return q;let Y=dj8(A.semver,q.semver,K);return Y>0?A:Y<0?q:q.operator===">"&&A.operator===">="?q:A},GL7=(A,q,K)=>{if(!A)return q;let Y=dj8(A.semver,q.semver,K);return Y<0?A:Y>0?q:q.operator==="<"&&A.operator==="<="?q:A};fL7.exports=n49});var T06=C((oZ2,vL7)=>{var cj8=G06(),VL7=lm6(),a49=sZ(),NL7=bj8(),s49=V56(),t49=nk7(),e49=ok7(),Aq9=tk7(),qq9=qE7(),Kq9=YE7(),Yq9=wE7(),zq9=$E7(),wq9=HE7(),_q9=eR(),$q9=DE7(),Oq9=PE7(),Hq9=YH1(),jq9=fE7(),Jq9=VE7(),Mq9=nm6(),Dq9=zH1(),Xq9=xj8(),Pq9=uj8(),Wq9=wH1(),Zq9=_H1(),Gq9=Bj8(),fq9=CE7(),Tq9=om6(),Vq9=AS(),Nq9=sm6(),vq9=iE7(),kq9=rE7(),Eq9=aE7(),Lq9=eE7(),yq9=qL7(),Rq9=jH1(),Sq9=$L7(),Cq9=HL7(),hq9=ML7(),Iq9=XL7(),bq9=TL7();vL7.exports={parse:s49,valid:t49,clean:e49,inc:Aq9,diff:qq9,major:Kq9,minor:Yq9,patch:zq9,prerelease:wq9,compare:_q9,rcompare:$q9,compareLoose:Oq9,compareBuild:Hq9,sort:jq9,rsort:Jq9,gt:Mq9,lt:Dq9,eq:Xq9,neq:Pq9,gte:Wq9,lte:Zq9,cmp:Gq9,coerce:fq9,Comparator:Tq9,Range:Vq9,satisfies:Nq9,toComparators:vq9,maxSatisfying:kq9,minSatisfying:Eq9,minVersion:Lq9,validRange:yq9,outside:Rq9,gtr:Sq9,ltr:Cq9,intersects:hq9,simplifyRange:Iq9,subset:bq9,SemVer:a49,re:cj8.re,src:cj8.src,tokens:cj8.t,SEMVER_SPEC_VERSION:VL7.SEMVER_SPEC_VERSION,RELEASE_TYPES:VL7.RELEASE_TYPES,compareIdentifiers:NL7.compareIdentifiers,rcompareIdentifiers:NL7.rcompareIdentifiers}});function JH1(){if(!lj8)lj8=T06();return lj8}function sf(A,q){if(typeof Bun<"u")return Bun.semver.order(A,q)===1;return JH1().gt(A,q,{loose:!0})}function dD(A,q){if(typeof Bun<"u")return Bun.semver.order(A,q)>=0;return JH1().gte(A,q,{loose:!0})}function V06(A,q){if(typeof Bun<"u")return Bun.semver.order(A,q)===-1;return JH1().lt(A,q,{loose:!0})}function ij8(A,q){if(typeof Bun<"u")return Bun.semver.satisfies(A,q);return JH1().satisfies(A,q,{loose:!0})}var lj8;function xq9(A,q,K){var Y=-1,z=A.length;if(q<0)q=-q>z?0:z+q;if(K=K>z?z:K,K<0)K+=z;z=q>K?0:K-q>>>0,q>>>=0;var w=Array(z);while(++Y<z)w[Y]=A[Y+q];return w}var MH1;var nj8=k(()=>{MH1=xq9});function uq9(A,q,K){var Y=A.length;return K=K===void 0?Y:K,!q&&K>=Y?A:MH1(A,q,K)}var kL7;var EL7=k(()=>{nj8();kL7=uq9});function cq9(A){return dq9.test(A)}var Bq9="\\ud800-\\udfff",mq9="\\u0300-\\u036f",gq9="\\ufe20-\\ufe2f",Fq9="\\u20d0-\\u20ff",Qq9,Uq9="\\ufe0e\\ufe0f",pq9="\\u200d",dq9,DH1;var rj8=k(()=>{Qq9=mq9+gq9+Fq9,dq9=RegExp("["+pq9+Bq9+Qq9+Uq9+"]");DH1=cq9});function lq9(A){return A.split("")}var LL7;var yL7=k(()=>{LL7=lq9});function zK9(A){return A.match(YK9)||[]}var RL7="\\ud800-\\udfff",iq9="\\u0300-\\u036f",nq9="\\ufe20-\\ufe2f",rq9="\\u20d0-\\u20ff",oq9,aq9="\\ufe0e\\ufe0f",sq9,oj8,aj8="\\ud83c[\\udffb-\\udfff]",tq9,SL7,CL7="(?:\\ud83c[\\udde6-\\uddff]){2}",hL7="[\\ud800-\\udbff][\\udc00-\\udfff]",eq9="\\u200d",IL7,bL7,AK9,qK9,KK9,YK9,xL7;var uL7=k(()=>{oq9=iq9+nq9+rq9,sq9="["+RL7+"]",oj8="["+oq9+"]",tq9="(?:"+oj8+"|"+aj8+")",SL7="[^"+RL7+"]",IL7=tq9+"?",bL7="["+aq9+"]?",AK9="(?:"+eq9+"(?:"+[SL7,CL7,hL7].join("|")+")"+bL7+IL7+")*",qK9=bL7+IL7+AK9,KK9="(?:"+[SL7+oj8+"?",oj8,CL7,hL7,sq9].join("|")+")",YK9=RegExp(aj8+"(?="+aj8+")|"+KK9+qK9,"g");xL7=zK9});function wK9(A){return DH1(A)?xL7(A):LL7(A)}var BL7;var mL7=k(()=>{yL7();rj8();uL7();BL7=wK9});function _K9(A){return function(q){q=JH6(q);var K=DH1(q)?BL7(q):void 0,Y=K?K[0]:q.charAt(0),z=K?kL7(K,1).join(""):q.slice(1);return Y[A]()+z}}var gL7;var FL7=k(()=>{EL7();rj8();mL7();i11();gL7=_K9});var $K9,QL7;var UL7=k(()=>{FL7();$K9=gL7("toUpperCase"),QL7=$K9});function OK9(A){return QL7(JH6(A).toLowerCase())}var Pb;var N06=k(()=>{i11();UL7();Pb=OK9});import*as F0 from"path";import*as em6 from"os";function jK9(A){let q=em6.homedir(),K=[],Y=pL7[A.toLowerCase()];if(!Y)return K;let z=process.env.APPDATA||F0.join(q,"AppData","Roaming"),w=process.env.LOCALAPPDATA||F0.join(q,"AppData","Local");switch(em6.platform()){case"darwin":if(K.push(F0.join(q,"Library","Application Support","JetBrains"),F0.join(q,"Library","Application Support")),A.toLowerCase()==="androidstudio")K.push(F0.join(q,"Library","Application Support","Google"));break;case"win32":if(K.push(F0.join(z,"JetBrains"),F0.join(w,"JetBrains"),F0.join(z)),A.toLowerCase()==="androidstudio")K.push(F0.join(w,"Google"));break;case"linux":K.push(F0.join(q,".config","JetBrains"),F0.join(q,".local","share","JetBrains"));for(let _ of Y)K.push(F0.join(q,"."+_));if(A.toLowerCase()==="androidstudio")K.push(F0.join(q,".config","Google"));break;default:break}return K}async function JK9(A){let q=[],K=P1(),Y=jK9(A),z=pL7[A.toLowerCase()];if(!z)return q;for(let w of Y)try{let _=await K.readdir(w);for(let $ of z){let O=new RegExp("^"+$+".*$"),H=[];for(let j of _){if(!O.test(j.name))continue;try{let J=F0.join(w,j.name);if((await K.stat(J)).isDirectory())H.push(J)}catch{}}for(let j of H){let J=em6.platform()==="linux"?j:F0.join(j,"plugins");try{await K.stat(J),q.push(J)}catch{}}}}catch{continue}return q.filter((w,_)=>q.indexOf(w)===_)}async function MK9(A){let q=await JK9(A);for(let K of q){let Y=F0.join(K,HK9);try{return await P1().stat(Y),!0}catch{}}return!1}async function DK9(A,q=!1){if(!q){let Y=sj8.get(A);if(Y)return Y}let K=MK9(A).then((Y)=>{return tj8.set(A,Y),Y});return sj8.set(A,K),K}async function dL7(A,q=!1){if(q)tj8.delete(A),sj8.delete(A);return DK9(A,q)}function cL7(A){return tj8.get(A)??!1}var HK9="claude-code-jetbrains-plugin",pL7,tj8,sj8;var ej8=k(()=>{Y7();pL7={pycharm:["PyCharm"],intellij:["IntelliJIdea","IdeaIC"],webstorm:["WebStorm"],phpstorm:["PhpStorm"],rubymine:["RubyMine"],clion:["CLion"],goland:["GoLand"],rider:["Rider"],datagrip:["DataGrip"],appcode:["AppCode"],dataspell:["DataSpell"],aqua:["Aqua"],gateway:["Gateway"],fleet:["Fleet"],androidstudio:["AndroidStudio"]};tj8=new Map,sj8=new Map});import{execFileSync as lL7}from"node:child_process";class v06{wslDistroName;constructor(A){this.wslDistroName=A}toLocalPath(A){if(!A)return A;if(this.wslDistroName){let q=A.match(/^\\\\wsl(?:\.localhost|\$)\\([^\\]+)(.*)$/);if(q&&q[1]!==this.wslDistroName)return A}try{return lL7("wslpath",["-u",A],{encoding:"utf8",stdio:["pipe","pipe","ignore"]}).trim()}catch{return A.replace(/\\/g,"/").replace(/^([A-Z]):/i,(q,K)=>`/mnt/${K.toLowerCase()}`)}}toIDEPath(A){if(!A)return A;try{return lL7("wslpath",["-w",A],{encoding:"utf8",stdio:["pipe","pipe","ignore"]}).trim()}catch{return A}}}function iL7(A,q){let K=A.match(/^\\\\wsl(?:\.localhost|\$)\\([^\\]+)(.*)$/);if(K)return K[1]===q;return!0}var AJ8=()=>{};import{setMaxListeners as XK9}from"events";function g3(A=PK9){let q=new AbortController;return XK9(A,q.signal),q}function WK9(A){let q=this.deref();A.deref()?.abort(q?.signal.reason)}function ZK9(A){let q=this.deref(),K=A.deref();if(q&&K)q.signal.removeEventListener("abort",K)}function N56(A,q){let K=g3(q);if(A.signal.aborted)return K.abort(A.signal.reason),K;let Y=new WeakRef(K),z=new WeakRef(A),w=WK9.bind(z,Y);return A.signal.addEventListener("abort",w,{once:!0}),K.signal.addEventListener("abort",ZK9.bind(z,new WeakRef(w)),{once:!0}),K}var PK9=50;var Qj=()=>{};var nL7,GK9,Y6=function(A){return GK9.H.useMemoCache(A)};var K1=k(()=>{nL7=e(W6(),1),GK9=nL7.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE});var fK9=function(){return vj.Date.now()},XH1;var rL7=k(()=>{yy();XH1=fK9});function VK9(A){var q=A.length;while(q--&&TK9.test(A.charAt(q)));return q}var TK9,oL7;var aL7=k(()=>{TK9=/\s/;oL7=VK9});function vK9(A){return A?A.slice(0,oL7(A)+1).replace(NK9,""):A}var NK9,sL7;var tL7=k(()=>{aL7();NK9=/^\s+/;sL7=vK9});function RK9(A){if(typeof A=="number")return A;if(uo(A))return eL7;if(Bw(A)){var q=typeof A.valueOf=="function"?A.valueOf():A;A=Bw(q)?q+"":q}if(typeof A!="string")return A===0?A:+A;A=sL7(A);var K=EK9.test(A);return K||LK9.test(A)?yK9(A.slice(2),K?2:8):kK9.test(A)?eL7:+A}var eL7=NaN,kK9,EK9,LK9,yK9,qJ8;var Ay7=k(()=>{tL7();Pf();YR6();kK9=/^[-+]0x[0-9a-f]+$/i,EK9=/^0b[01]+$/i,LK9=/^0o[0-7]+$/i,yK9=parseInt;qJ8=RK9});function IK9(A,q,K){var Y,z,w,_,$,O,H=0,j=!1,J=!1,M=!0;if(typeof A!="function")throw TypeError(SK9);if(q=qJ8(q)||0,Bw(K))j=!!K.leading,J="maxWait"in K,w=J?CK9(qJ8(K.maxWait)||0,q):w,M="trailing"in K?!!K.trailing:M;function D(v){var y=Y,R=z;return Y=z=void 0,H=v,_=A.apply(R,y),_}function X(v){return H=v,$=setTimeout(Z,q),j?D(v):_}function P(v){var y=v-O,R=v-H,h=q-y;return J?hK9(h,w-R):h}function W(v){var y=v-O,R=v-H;return O===void 0||y>=q||y<0||J&&R>=w}function Z(){var v=XH1();if(W(v))return G(v);$=setTimeout(Z,P(v))}function G(v){if($=void 0,M&&Y)return D(v);return Y=z=void 0,_}function f(){if($!==void 0)clearTimeout($);H=0,Y=O=z=$=void 0}function V(){return $===void 0?_:G(XH1())}function N(){var v=XH1(),y=W(v);if(Y=arguments,z=this,O=v,y){if($===void 0)return X(O);if(J)return clearTimeout($),$=setTimeout(Z,q),D(O)}if($===void 0)$=setTimeout(Z,q);return _}return N.cancel=f,N.flush=V,N}var SK9="Expected a function",CK9,hK9,qy7;var Ky7=k(()=>{Pf();rL7();Ay7();CK9=Math.max,hK9=Math.min;qy7=IK9});function xK9(A,q,K){var Y=!0,z=!0;if(typeof A!="function")throw TypeError(bK9);if(Bw(K))Y="leading"in K?!!K.leading:Y,z="trailing"in K?!!K.trailing:z;return qy7(A,q,{leading:Y,maxWait:q,trailing:z})}var bK9="Expected a function",Yy7;var zy7=k(()=>{Ky7();Pf();Yy7=xK9});function KJ8(A,{include:q,exclude:K}={}){let Y=(z)=>{let w=(_)=>typeof _==="string"?z===_:_.test(z);if(q)return q.some(w);if(K)return!K.some(w);return!0};for(let[z,w]of uK9(A.constructor.prototype)){if(w==="constructor"||!Y(w))continue;let _=Reflect.getOwnPropertyDescriptor(z,w);if(_&&typeof _.value==="function")A[w]=A[w].bind(A)}return A}var uK9=(A)=>{let q=new Set;do for(let K of Reflect.ownKeys(A))q.add([A,K]);while((A=Reflect.getPrototypeOf(A))&&A!==Object.prototype);return q};import{PassThrough as wy7}from"node:stream";var _y7,YJ8,BK9=(A)=>{let q=new wy7,K=new wy7;q.write=(z)=>{A("stdout",z)},K.write=(z)=>{A("stderr",z)};let Y=new console.Console(q,K);for(let z of _y7)YJ8[z]=console[z],console[z]=Y[z];return()=>{for(let z of _y7)console[z]=YJ8[z];YJ8={}}},$y7;var Oy7=k(()=>{_y7=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],YJ8={},$y7=BK9});function _J8(A,q){var K=A.length;A.push(q);A:for(;0<K;){var Y=K-1>>>1,z=A[Y];if(0<PH1(z,q))A[Y]=q,A[K]=z,K=Y;else break A}}function Wg(A){return A.length===0?null:A[0]}function fH1(A){if(A.length===0)return null;var q=A[0],K=A.pop();if(K!==q){A[0]=K;A:for(var Y=0,z=A.length,w=z>>>1;Y<w;){var _=2*(Y+1)-1,$=A[_],O=_+1,H=A[O];if(0>PH1($,K))O<z&&0>PH1(H,$)?(A[Y]=H,A[O]=K,Y=O):(A[Y]=$,A[_]=K,Y=_);else if(O<z&&0>PH1(H,K))A[Y]=H,A[O]=K,Y=O;else break A}}return q}function PH1(A,q){var K=A.sortIndex-q.sortIndex;return K!==0?K:A.id-q.id}function ZH1(A){for(var q=Wg(et);q!==null;){if(q.callback===null)fH1(et);else if(q.startTime<=A)fH1(et),q.sortIndex=q.expirationTime,_J8(pc,q);else break;q=Wg(et)}}function MJ8(A){if(qg6=!1,ZH1(A),!Ag6)if(Wg(pc)!==null)Ag6=!0,E06||(E06=!0,k06());else{var q=Wg(et);q!==null&&DJ8(MJ8,q.startTime-A)}}function Dy7(){return JJ8?!0:Zg()-My7<gK9?!1:!0}function wJ8(){if(JJ8=!1,E06){var A=Zg();My7=A;var q=!0;try{A:{Ag6=!1,qg6&&(qg6=!1,Jy7(Kg6),Kg6=-1),HJ8=!0;var K=zJ8;try{q:{ZH1(A);for(qS=Wg(pc);qS!==null&&!(qS.expirationTime>A&&Dy7());){var Y=qS.callback;if(typeof Y==="function"){qS.callback=null,zJ8=qS.priorityLevel;var z=Y(qS.expirationTime<=A);if(A=Zg(),typeof z==="function"){qS.callback=z,ZH1(A),q=!0;break q}qS===Wg(pc)&&fH1(pc),ZH1(A)}else fH1(pc);qS=Wg(pc)}if(qS!==null)q=!0;else{var w=Wg(et);w!==null&&DJ8(MJ8,w.startTime-A),q=!1}}break A}finally{qS=null,zJ8=K,HJ8=!1}q=void 0}}finally{q?k06():E06=!1}}}function DJ8(A,q){Kg6=jy7(function(){A(Zg())},q)}var Zg=void 0,$J8,WH1,OJ8,pc,et,mK9=1,qS=null,zJ8=3,HJ8=!1,Ag6=!1,qg6=!1,JJ8=!1,jy7,Jy7,Hy7,E06=!1,Kg6=-1,gK9=5,My7=-1,k06,GH1,jJ8,XJ8=5,PJ8=1,TH1=3,WJ8=2,ZJ8=function(A){A.callback=null},GJ8=function(){JJ8=!0},VH1=function(A,q,K){var Y=Zg();switch(typeof K==="object"&&K!==null?(K=K.delay,K=typeof K==="number"&&0<K?Y+K:Y):K=Y,A){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5000}return z=K+z,A={id:mK9++,callback:q,priorityLevel:A,startTime:K,expirationTime:z,sortIndex:-1},K>Y?(A.sortIndex=K,_J8(et,A),Wg(pc)===null&&A===Wg(et)&&(qg6?(Jy7(Kg6),Kg6=-1):qg6=!0,DJ8(MJ8,K-Y))):(A.sortIndex=z,_J8(pc,A),Ag6||HJ8||(Ag6=!0,E06||(E06=!0,k06()))),A},fJ8;var Py7=k(()=>{if(typeof performance==="object"&&typeof performance.now==="function")$J8=performance,Zg=function(){return $J8.now()};else WH1=Date,OJ8=WH1.now(),Zg=function(){return WH1.now()-OJ8};pc=[],et=[],jy7=typeof setTimeout==="function"?setTimeout:null,Jy7=typeof clearTimeout==="function"?clearTimeout:null,Hy7=typeof setImmediate<"u"?setImmediate:null;if(typeof Hy7==="function")k06=function(){Hy7(wJ8)};else if(typeof MessageChannel<"u")GH1=new MessageChannel,jJ8=GH1.port2,GH1.port1.onmessage=wJ8,k06=function(){jJ8.postMessage(null)};else k06=function(){jy7(wJ8,0)};fJ8=Dy7});var Wy7=C((dG2,Yg6)=>{Py7();var TJ8=e(W6());Yg6.exports=function(A){function q(E,S,p,n){return new Am1(E,S,p,n)}function K(){}function Y(E){var S="https://react.dev/errors/"+E;if(1<arguments.length){S+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)S+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+E+"; visit "+S+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function z(E){var S=E,p=E;if(E.alternate)for(;S.return;)S=S.return;else{E=S;do S=E,(S.flags&4098)!==0&&(p=S.return),E=S.return;while(E)}return S.tag===3?p:null}function w(E){if(z(E)!==E)throw Error(Y(188))}function _(E){var S=E.alternate;if(!S){if(S=z(E),S===null)throw Error(Y(188));return S!==E?null:E}for(var p=E,n=S;;){var J6=p.return;if(J6===null)break;var E6=J6.alternate;if(E6===null){if(n=J6.return,n!==null){p=n;continue}break}if(J6.child===E6.child){for(E6=J6.child;E6;){if(E6===p)return w(J6),E;if(E6===n)return w(J6),S;E6=E6.sibling}throw Error(Y(188))}if(p.return!==n.return)p=J6,n=E6;else{for(var O1=!1,p1=J6.child;p1;){if(p1===p){O1=!0,p=J6,n=E6;break}if(p1===n){O1=!0,n=J6,p=E6;break}p1=p1.sibling}if(!O1){for(p1=E6.child;p1;){if(p1===p){O1=!0,p=E6,n=J6;break}if(p1===n){O1=!0,n=E6,p=J6;break}p1=p1.sibling}if(!O1)throw Error(Y(189))}}if(p.alternate!==n)throw Error(Y(190))}if(p.tag!==3)throw Error(Y(188));return p.stateNode.current===p?E:S}function $(E){var S=E.tag;if(S===5||S===26||S===27||S===6)return E;for(E=E.child;E!==null;){if(S=$(E),S!==null)return S;E=E.sibling}return null}function O(E){var S=E.tag;if(S===5||S===26||S===27||S===6)return E;for(E=E.child;E!==null;){if(E.tag!==4&&(S=O(E),S!==null))return S;E=E.sibling}return null}function H(E){if(E===null||typeof E!=="object")return null;return E=wy6&&E[wy6]||E["@@iterator"],typeof E==="function"?E:null}function j(E){if(E==null)return null;if(typeof E==="function")return E.$$typeof===Km1?null:E.displayName||E.name||null;if(typeof E==="string")return E;switch(E){case Oo:return"Fragment";case Yy6:return"Profiler";case Ky6:return"StrictMode";case fZ:return"Suspense";case zy6:return"SuspenseList";case Yp:return"Activity"}if(typeof E==="object")switch(E.$$typeof){case mh:return"Portal";case Gy:return E.displayName||"Context";case Zy:return(E._context.displayName||"Context")+".Consumer";case gh:var S=E.render;return E=E.displayName,E||(E=S.displayName||S.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case $O6:return S=E.displayName||null,S!==null?S:j(E.type)||"Memo";case Fh:S=E._payload,E=E._init;try{return j(E(S))}catch(p){}}return null}function J(E){return{current:E}}function M(E){0>TB||(E.current=Do[TB],Do[TB]=null,TB--)}function D(E,S){TB++,Do[TB]=E.current,E.current=S}function X(E){return E>>>=0,E===0?32:31-(Vy6(E)/t61|0)|0}function P(E){var S=E&42;if(S!==0)return S;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return E&261888;case 262144:case 524288:case 1048576:case 2097152:return E&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return E&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return E}}function W(E,S,p){var n=E.pendingLanes;if(n===0)return 0;var J6=0,E6=E.suspendedLanes,O1=E.pingedLanes;E=E.warmLanes;var p1=n&134217727;return p1!==0?(n=p1&~E6,n!==0?J6=P(n):(O1&=p1,O1!==0?J6=P(O1):p||(p=p1&~E,p!==0&&(J6=P(p))))):(p1=n&~E6,p1!==0?J6=P(p1):O1!==0?J6=P(O1):p||(p=n&~E,p!==0&&(J6=P(p)))),J6===0?0:S!==0&&S!==J6&&(S&E6)===0&&(E6=J6&-J6,p=S&-S,E6>=p||E6===32&&(p&4194048)!==0)?S:J6}function Z(E,S){return(E.pendingLanes&~(E.suspendedLanes&~E.pingedLanes)&S)===0}function G(E,S){switch(E){case 1:case 2:case 4:case 8:case 64:return S+250;case 16:case 32: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 S+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function f(){var E=kO6;return kO6<<=1,(kO6&62914560)===0&&(kO6=4194304),E}function V(E){for(var S=[],p=0;31>p;p++)S.push(E);return S}function N(E,S){E.pendingLanes|=S,S!==268435456&&(E.suspendedLanes=0,E.pingedLanes=0,E.warmLanes=0)}function v(E,S,p,n,J6,E6){var O1=E.pendingLanes;E.pendingLanes=p,E.suspendedLanes=0,E.pingedLanes=0,E.warmLanes=0,E.expiredLanes&=p,E.entangledLanes&=p,E.errorRecoveryDisabledLanes&=p,E.shellSuspendCounter=0;var{entanglements:p1,expirationTimes:a8,hiddenUpdates:gA}=E;for(p=O1&~p;0<p;){var i7=31-Hf(p),N7=1<<i7;p1[i7]=0,a8[i7]=-1;var h4=gA[i7];if(h4!==null)for(gA[i7]=null,i7=0;i7<h4.length;i7++){var F3=h4[i7];F3!==null&&(F3.lane&=-536870913)}p&=~N7}n!==0&&y(E,n,0),E6!==0&&J6===0&&E.tag!==0&&(E.suspendedLanes|=E6&~(O1&~S))}function y(E,S,p){E.pendingLanes|=S,E.suspendedLanes&=~S;var n=31-Hf(S);E.entangledLanes|=S,E.entanglements[n]=E.entanglements[n]|1073741824|p&261930}function R(E,S){var p=E.entangledLanes|=S;for(E=E.entanglements;p;){var n=31-Hf(p),J6=1<<n;J6&S|E[n]&S&&(E[n]|=S),p&=~J6}}function h(E,S){var p=S&-S;return p=(p&42)!==0?1:B(p),(p&(E.suspendedLanes|S))!==0?0:p}function B(E){switch(E){case 2:E=1;break;case 8:E=4;break;case 32:E=16;break;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:E=128;break;case 268435456:E=134217728;break;default:E=0}return E}function x(E){return E&=-E,2<E?8<E?(E&134217727)!==0?32:268435456:8:2}function F(E){if(typeof Sm1==="function"&&ky6(E),jf&&typeof jf.setStrictMode==="function")try{jf.setStrictMode(O46,E)}catch(S){}}function g(E,S){return E===S&&(E!==0||1/E===1/S)||E!==E&&S!==S}function b(E){if(Ly6===void 0)try{throw Error()}catch(p){var S=p.stack.trim().match(/\n( *(at )?)/);Ly6=S&&S[1]||"",K11=-1<p.stack.indexOf(`
    at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ly6+E+K11}function U(E,S){if(!E||yy6)return"";yy6=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(S){var N7=function(){throw Error()};if(Object.defineProperty(N7.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(N7,[])}catch(F3){var h4=F3}Reflect.construct(E,[],N7)}else{try{N7.call()}catch(F3){h4=F3}E.call(N7.prototype)}}else{try{throw Error()}catch(F3){h4=F3}(N7=E())&&typeof N7.catch==="function"&&N7.catch(function(){})}}catch(F3){if(F3&&h4&&typeof F3.stack==="string")return[F3.stack,h4.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var J6=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");J6&&J6.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E6=n.DetermineComponentFrameRoot(),O1=E6[0],p1=E6[1];if(O1&&p1){var a8=O1.split(`
`),gA=p1.split(`
`);for(J6=n=0;n<a8.length&&!a8[n].includes("DetermineComponentFrameRoot");)n++;for(;J6<gA.length&&!gA[J6].includes("DetermineComponentFrameRoot");)J6++;if(n===a8.length||J6===gA.length)for(n=a8.length-1,J6=gA.length-1;1<=n&&0<=J6&&a8[n]!==gA[J6];)J6--;for(;1<=n&&0<=J6;n--,J6--)if(a8[n]!==gA[J6]){if(n!==1||J6!==1)do if(n--,J6--,0>J6||a8[n]!==gA[J6]){var i7=`
`+a8[n].replace(" at new "," at ");return E.displayName&&i7.includes("<anonymous>")&&(i7=i7.replace("<anonymous>",E.displayName)),i7}while(1<=n&&0<=J6);break}}}finally{yy6=!1,Error.prepareStackTrace=p}return(p=E?E.displayName||E.name:"")?b(p):""}function d(E,S){switch(E.tag){case 26:case 27:case 5:return b(E.type);case 16:return b("Lazy");case 13:return E.child!==S&&S!==null?b("Suspense Fallback"):b("Suspense");case 19:return b("SuspenseList");case 0:case 15:return U(E.type,!1);case 11:return U(E.type.render,!1);case 1:return U(E.type,!0);case 31:return b("Activity");default:return""}}function l(E){try{var S="",p=null;do S+=d(E,p),p=E,E=E.return;while(E);return S}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function t(E,S){if(typeof E==="object"&&E!==null){var p=Y11.get(E);if(p!==void 0)return p;return S={value:E,source:S,stack:l(S)},Y11.set(E,S),S}return{value:E,source:S,stack:l(S)}}function s(E,S){Hp[jp++]=Jp,Hp[jp++]=EO6,EO6=E,Jp=S}function H6(E,S,p){Jf[CX++]=Xk,Jf[CX++]=Pk,Jf[CX++]=ky,ky=E;var n=Xk;E=Pk;var J6=32-Hf(n)-1;n&=~(1<<J6),p+=1;var E6=32-Hf(S)+J6;if(30<E6){var O1=J6-J6%5;E6=(n&(1<<O1)-1).toString(32),n>>=O1,J6-=O1,Xk=1<<32-Hf(S)+J6|p<<J6|n,Pk=E6+E}else Xk=1<<E6|p<<J6|n,Pk=E}function Z6(E){E.return!==null&&(s(E,1),H6(E,1,0))}function G6(E){for(;E===EO6;)EO6=Hp[--jp],Hp[jp]=null,Jp=Hp[--jp],Hp[jp]=null;for(;E===ky;)ky=Jf[--CX],Jf[CX]=null,Pk=Jf[--CX],Jf[CX]=null,Xk=Jf[--CX],Jf[CX]=null}function q6(E,S){Jf[CX++]=Xk,Jf[CX++]=Pk,Jf[CX++]=ky,Xk=S.id,Pk=S.overflow,ky=E}function w6(E,S){D(yD,S),D(Xo,E),D(Gj,null),E=fy(S),M(Gj),D(Gj,E)}function j6(){M(Gj),M(Xo),M(yD)}function _6(E){E.memoizedState!==null&&D(Ey,E);var S=Gj.current,p=_y6(S,E.type);S!==p&&(D(Xo,E),D(Gj,p))}function k6(E){Xo.current===E&&(M(Gj),M(Xo)),Ey.current===E&&(M(Ey),$f?Vy._currentValue=$p:Vy._currentValue2=$p)}function P6(E){var S=Error(Y(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw X6(t(S,E)),Ry6}function A6(E,S){if(!SX)throw Error(Y(175));Vm1(E.stateNode,E.type,E.memoizedProps,S,E)||P6(E,!0)}function K6(E){for(RD=E.return;RD;)switch(RD.tag){case 5:case 31:case 13:fV=!1;return;case 27:case 3:fV=!0;return;default:RD=RD.return}}function z6(E){if(!SX||E!==RD)return!1;if(!r9)return K6(E),r9=!0,!1;var S=E.tag;if(EH?S!==3&&S!==27&&(S!==5||GO6(E.type)&&!JO6(E.type,E.memoizedProps))&&q$&&P6(E):S!==3&&(S!==5||GO6(E.type)&&!JO6(E.type,E.memoizedProps))&&q$&&P6(E),K6(E),S===13){if(!SX)throw Error(Y(316));if(E=E.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(Y(317));q$=c61(E)}else if(S===31){if(E=E.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(Y(317));q$=d61(E)}else q$=EH&&S===27?Zm1(E.type,q$):RD?XO6(E.stateNode):null;return!0}function a(){SX&&(q$=RD=null,r9=!1)}function r(){var E=VB;return E!==null&&(EZ===null?EZ=E:EZ.push.apply(EZ,E),VB=null),E}function X6(E){VB===null?VB=[E]:VB.push(E)}function O6(E,S,p){$f?(D(LO6,S._currentValue),S._currentValue=p):(D(LO6,S._currentValue2),S._currentValue2=p)}function D6(E){var S=LO6.current;$f?E._currentValue=S:E._currentValue2=S,M(LO6)}function y6(E,S,p){for(;E!==null;){var n=E.alternate;if((E.childLanes&S)!==S?(E.childLanes|=S,n!==null&&(n.childLanes|=S)):n!==null&&(n.childLanes&S)!==S&&(n.childLanes|=S),E===p)break;E=E.return}}function C6(E,S,p,n){var J6=E.child;J6!==null&&(J6.return=E);for(;J6!==null;){var E6=J6.dependencies;if(E6!==null){var O1=J6.child;E6=E6.firstContext;A:for(;E6!==null;){var p1=E6;E6=J6;for(var a8=0;a8<S.length;a8++)if(p1.context===S[a8]){E6.lanes|=p,p1=E6.alternate,p1!==null&&(p1.lanes|=p),y6(E6.return,p,E),n||(O1=null);break A}E6=p1.next}}else if(J6.tag===18){if(O1=J6.return,O1===null)throw Error(Y(341));O1.lanes|=p,E6=O1.alternate,E6!==null&&(E6.lanes|=p),y6(O1,p,E),O1=null}else O1=J6.child;if(O1!==null)O1.return=J6;else for(O1=J6;O1!==null;){if(O1===E){O1=null;break}if(J6=O1.sibling,J6!==null){J6.return=O1.return,O1=J6;break}O1=O1.return}J6=O1}}function h6(E,S,p,n){E=null;for(var J6=S,E6=!1;J6!==null;){if(!E6){if((J6.flags&524288)!==0)E6=!0;else if((J6.flags&262144)!==0)break}if(J6.tag===10){var O1=J6.alternate;if(O1===null)throw Error(Y(387));if(O1=O1.memoizedProps,O1!==null){var p1=J6.type;LD(J6.pendingProps.value,O1.value)||(E!==null?E.push(p1):E=[p1])}}else if(J6===Ey.current){if(O1=J6.alternate,O1===null)throw Error(Y(387));O1.memoizedState.memoizedState!==J6.memoizedState.memoizedState&&(E!==null?E.push(Vy):E=[Vy])}J6=J6.return}E!==null&&C6(S,E,p,n),S.flags|=262144}function f6(E){for(E=E.firstContext;E!==null;){var S=E.context;if(!LD($f?S._currentValue:S._currentValue2,E.memoizedValue))return!0;E=E.next}return!1}function M6(E){Mp=E,dh=null,E=E.dependencies,E!==null&&(E.firstContext=null)}function V6(E){return b6(Mp,E)}function p6(E,S){return Mp===null&&M6(E),b6(E,S)}function b6(E,S){var p=$f?S._currentValue:S._currentValue2;if(S={context:S,memoizedValue:p,next:null},dh===null){if(E===null)throw Error(Y(308));dh=S,E.dependencies={lanes:0,firstContext:S},E.flags|=524288}else dh=dh.next=S;return p}function R6(){return{controller:new Cm1,data:new Map,refCount:0}}function x6(E){E.refCount--,E.refCount===0&&hm1(Im1,function(){E.controller.abort()})}function d6(){}function t6(E){E!==Dp&&E.next===null&&(Dp===null?H46=Dp=E:Dp=Dp.next=E),RO6=!0,yO6||(yO6=!0,T6())}function L6(E,S){if(!Sy6&&RO6){Sy6=!0;do{var p=!1;for(var n=H46;n!==null;){if(!S)if(E!==0){var J6=n.pendingLanes;if(J6===0)var E6=0;else{var{suspendedLanes:O1,pingedLanes:p1}=n;E6=(1<<31-Hf(42|E)+1)-1,E6&=J6&~(O1&~p1),E6=E6&201326741?E6&201326741|1:E6?E6|2:0}E6!==0&&(p=!0,v1(n,E6))}else E6=I9,E6=W(n,n===_2?E6:0,n.cancelPendingCommit!==null||n.timeoutHandle!==_p),(E6&3)===0||Z(n,E6)||(p=!0,v1(n,E6));n=n.next}}while(p);Sy6=!1}}function u6(){e6()}function e6(){RO6=yO6=!1;var E=0;Xp!==0&&wm1()&&(E=Xp);for(var S=VZ(),p=null,n=H46;n!==null;){var J6=n.next,E6=H1(n,S);if(E6===0)n.next=null,p===null?H46=J6:p.next=J6,J6===null&&(Dp=p);else if(p=n,E!==0||(E6&3)!==0)RO6=!0;n=J6}DJ!==0&&DJ!==5||L6(E,!1),Xp!==0&&(Xp=0)}function H1(E,S){for(var{suspendedLanes:p,pingedLanes:n,expirationTimes:J6}=E,E6=E.pendingLanes&-62914561;0<E6;){var O1=31-Hf(E6),p1=1<<O1,a8=J6[O1];if(a8===-1){if((p1&p)===0||(p1&n)!==0)J6[O1]=G(p1,S)}else a8<=S&&(E.expiredLanes|=p1);E6&=~p1}if(S=_2,p=I9,p=W(E,E===S?p:0,E.cancelPendingCommit!==null||E.timeoutHandle!==_p),n=E.callbackNode,p===0||E===S&&(Mw===2||Mw===9)||E.cancelPendingCommit!==null)return n!==null&&n!==null&&Ny6(n),E.callbackNode=null,E.callbackPriority=0;if((p&3)===0||Z(E,p)){if(S=p&-p,S===E.callbackPriority)return S;switch(n!==null&&Ny6(n),x(p)){case 2:case 8:p=ph;break;case 32:p=ED;break;case 268435456:p=vy6;break;default:p=ED}return n=Z1.bind(null,E),p=$46(p,n),E.callbackPriority=S,E.callbackNode=p,S}return n!==null&&n!==null&&Ny6(n),E.callbackPriority=2,E.callbackNode=null,2}function Z1(E,S){if(DJ!==0&&DJ!==5)return E.callbackNode=null,E.callbackPriority=0,null;var p=E.callbackNode;if(Py()&&E.callbackNode!==p)return null;var n=I9;if(n=W(E,E===_2?n:0,E.cancelPendingCommit!==null||E.timeoutHandle!==_p),n===0)return null;return xh(E,n,S),H1(E,VZ()),E.callbackNode!=null&&E.callbackNode===p?Z1.bind(null,E):null}function v1(E,S){if(Py())return null;xh(E,S,!0)}function T6(){C61?h61(function(){(D9&6)!==0?$46(A11,u6):e6()}):$46(A11,u6)}function v6(){if(Xp===0){var E=Wo;E===0&&(E=MJ,MJ<<=1,(MJ&261888)===0&&(MJ=256)),Xp=E}return Xp}function A1(E,S){if(Po===null){var p=Po=[];Cy6=0,Wo=v6(),Zo={status:"pending",value:void 0,then:function(n){p.push(n)}}}return Cy6++,S.then(F6,F6),S}function F6(){if(--Cy6===0&&Po!==null){Zo!==null&&(Zo.status="fulfilled");var E=Po;Po=null,Wo=0,Zo=null;for(var S=0;S<E.length;S++)(0,E[S])()}}function m6(E,S){var p=[],n={status:"pending",value:null,reason:null,then:function(J6){p.push(J6)}};return E.then(function(){n.status="fulfilled",n.value=S;for(var J6=0;J6<p.length;J6++)(0,p[J6])(S)},function(J6){n.status="rejected",n.reason=J6;for(J6=0;J6<p.length;J6++)(0,p[J6])(void 0)}),n}function l6(){var E=Pp.current;return E!==null?E:_2.pooledCache}function N1(E,S){S===null?D(Pp,Pp.current):D(Pp,S.pool)}function X1(){var E=l6();return E===null?null:{parent:$f?F$._currentValue:F$._currentValue2,pool:E}}function k1(E,S){if(LD(E,S))return!0;if(typeof E!=="object"||E===null||typeof S!=="object"||S===null)return!1;var p=Object.keys(E),n=Object.keys(S);if(p.length!==n.length)return!1;for(n=0;n<p.length;n++){var J6=p[n];if(!q11.call(S,J6)||!LD(E[J6],S[J6]))return!1}return!0}function i1(E){return E=E.status,E==="fulfilled"||E==="rejected"}function t8(E,S,p){switch(p=E[p],p===void 0?E.push(S):p!==S&&(S.then(d6,d6),S=p),S.status){case"fulfilled":return S.value;case"rejected":throw E=S.reason,X7(E),E;default:if(typeof S.status==="string")S.then(d6,d6);else{if(E=_2,E!==null&&100<E.shellSuspendCounter)throw Error(Y(482));E=S,E.status="pending",E.then(function(n){if(S.status==="pending"){var J6=S;J6.status="fulfilled",J6.value=n}},function(n){if(S.status==="pending"){var J6=S;J6.status="rejected",J6.reason=n}})}switch(S.status){case"fulfilled":return S.value;case"rejected":throw E=S.reason,X7(E),E}throw Wp=S,Go}}function s8(E){try{var S=E._init;return S(E._payload)}catch(p){if(p!==null&&typeof p==="object"&&typeof p.then==="function")throw Wp=p,Go;throw p}}function _7(){if(Wp===null)throw Error(Y(459));var E=Wp;return Wp=null,E}function X7(E){if(E===Go||E===SO6)throw Error(Y(483))}function RA(E){var S=j46;return j46+=1,Zp===null&&(Zp=[]),t8(Zp,E,S)}function M7(E,S){S=S.props.ref,E.ref=S!==void 0?S:null}function Fq(E,S){if(S.$$typeof===qy6)throw Error(Y(525));throw E=Object.prototype.toString.call(S),Error(Y(31,E==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":E))}function aA(E){function S(m8,X8){if(E){var r8=m8.deletions;r8===null?(m8.deletions=[X8],m8.flags|=16):r8.push(X8)}}function p(m8,X8){if(!E)return null;for(;X8!==null;)S(m8,X8),X8=X8.sibling;return null}function n(m8){for(var X8=new Map;m8!==null;)m8.key!==null?X8.set(m8.key,m8):X8.set(m8.index,m8),m8=m8.sibling;return X8}function J6(m8,X8){return m8=Bh(m8,X8),m8.index=0,m8.sibling=null,m8}function E6(m8,X8,r8){if(m8.index=r8,!E)return m8.flags|=1048576,X8;if(r8=m8.alternate,r8!==null)return r8=r8.index,r8<X8?(m8.flags|=67108866,X8):r8;return m8.flags|=67108866,X8}function O1(m8){return E&&m8.alternate===null&&(m8.flags|=67108866),m8}function p1(m8,X8,r8,dA){if(X8===null||X8.tag!==6)return X8=tL6(r8,m8.mode,dA),X8.return=m8,X8;return X8=J6(X8,r8),X8.return=m8,X8}function a8(m8,X8,r8,dA){var NK=r8.type;if(NK===Oo)return i7(m8,X8,r8.props.children,dA,r8.key);if(X8!==null&&(X8.elementType===NK||typeof NK==="object"&&NK!==null&&NK.$$typeof===Fh&&s8(NK)===X8.type))return X8=J6(X8,r8.props),M7(X8,r8),X8.return=m8,X8;return X8=wO6(r8.type,r8.key,r8.props,null,m8.mode,dA),M7(X8,r8),X8.return=m8,X8}function gA(m8,X8,r8,dA){if(X8===null||X8.tag!==4||X8.stateNode.containerInfo!==r8.containerInfo||X8.stateNode.implementation!==r8.implementation)return X8=_f(r8,m8.mode,dA),X8.return=m8,X8;return X8=J6(X8,r8.children||[]),X8.return=m8,X8}function i7(m8,X8,r8,dA,NK){if(X8===null||X8.tag!==7)return X8=wf(r8,m8.mode,dA,NK),X8.return=m8,X8;return X8=J6(X8,r8),X8.return=m8,X8}function N7(m8,X8,r8){if(typeof X8==="string"&&X8!==""||typeof X8==="number"||typeof X8==="bigint")return X8=tL6(""+X8,m8.mode,r8),X8.return=m8,X8;if(typeof X8==="object"&&X8!==null){switch(X8.$$typeof){case WB:return r8=wO6(X8.type,X8.key,X8.props,null,m8.mode,r8),M7(r8,X8),r8.return=m8,r8;case mh:return X8=_f(X8,m8.mode,r8),X8.return=m8,X8;case Fh:return X8=s8(X8),N7(m8,X8,r8)}if(zp(X8)||H(X8))return X8=wf(X8,m8.mode,r8,null),X8.return=m8,X8;if(typeof X8.then==="function")return N7(m8,RA(X8),r8);if(X8.$$typeof===Gy)return N7(m8,p6(m8,X8),r8);Fq(m8,X8)}return null}function h4(m8,X8,r8,dA){var NK=X8!==null?X8.key:null;if(typeof r8==="string"&&r8!==""||typeof r8==="number"||typeof r8==="bigint")return NK!==null?null:p1(m8,X8,""+r8,dA);if(typeof r8==="object"&&r8!==null){switch(r8.$$typeof){case WB:return r8.key===NK?a8(m8,X8,r8,dA):null;case mh:return r8.key===NK?gA(m8,X8,r8,dA):null;case Fh:return r8=s8(r8),h4(m8,X8,r8,dA)}if(zp(r8)||H(r8))return NK!==null?null:i7(m8,X8,r8,dA,null);if(typeof r8.then==="function")return h4(m8,X8,RA(r8),dA);if(r8.$$typeof===Gy)return h4(m8,X8,p6(m8,r8),dA);Fq(m8,r8)}return null}function F3(m8,X8,r8,dA,NK){if(typeof dA==="string"&&dA!==""||typeof dA==="number"||typeof dA==="bigint")return m8=m8.get(r8)||null,p1(X8,m8,""+dA,NK);if(typeof dA==="object"&&dA!==null){switch(dA.$$typeof){case WB:return m8=m8.get(dA.key===null?r8:dA.key)||null,a8(X8,m8,dA,NK);case mh:return m8=m8.get(dA.key===null?r8:dA.key)||null,gA(X8,m8,dA,NK);case Fh:return dA=s8(dA),F3(m8,X8,r8,dA,NK)}if(zp(dA)||H(dA))return m8=m8.get(r8)||null,i7(X8,m8,dA,NK,null);if(typeof dA.then==="function")return F3(m8,X8,r8,RA(dA),NK);if(dA.$$typeof===Gy)return F3(m8,X8,r8,p6(X8,dA),NK);Fq(X8,dA)}return null}function SD(m8,X8,r8,dA){for(var NK=null,U$=null,oq=X8,H4=X8=0,OM=null;oq!==null&&H4<r8.length;H4++){oq.index>H4?(OM=oq,oq=null):OM=oq.sibling;var k3=h4(m8,oq,r8[H4],dA);if(k3===null){oq===null&&(oq=OM);break}E&&oq&&k3.alternate===null&&S(m8,oq),X8=E6(k3,X8,H4),U$===null?NK=k3:U$.sibling=k3,U$=k3,oq=OM}if(H4===r8.length)return p(m8,oq),r9&&s(m8,H4),NK;if(oq===null){for(;H4<r8.length;H4++)oq=N7(m8,r8[H4],dA),oq!==null&&(X8=E6(oq,X8,H4),U$===null?NK=oq:U$.sibling=oq,U$=oq);return r9&&s(m8,H4),NK}for(oq=n(oq);H4<r8.length;H4++)OM=F3(oq,m8,H4,r8[H4],dA),OM!==null&&(E&&OM.alternate!==null&&oq.delete(OM.key===null?H4:OM.key),X8=E6(OM,X8,H4),U$===null?NK=OM:U$.sibling=OM,U$=OM);return E&&oq.forEach(function(xw){return S(m8,xw)}),r9&&s(m8,H4),NK}function W46(m8,X8,r8,dA){if(r8==null)throw Error(Y(151));for(var NK=null,U$=null,oq=X8,H4=X8=0,OM=null,k3=r8.next();oq!==null&&!k3.done;H4++,k3=r8.next()){oq.index>H4?(OM=oq,oq=null):OM=oq.sibling;var xw=h4(m8,oq,k3.value,dA);if(xw===null){oq===null&&(oq=OM);break}E&&oq&&xw.alternate===null&&S(m8,oq),X8=E6(xw,X8,H4),U$===null?NK=xw:U$.sibling=xw,U$=xw,oq=OM}if(k3.done)return p(m8,oq),r9&&s(m8,H4),NK;if(oq===null){for(;!k3.done;H4++,k3=r8.next())k3=N7(m8,k3.value,dA),k3!==null&&(X8=E6(k3,X8,H4),U$===null?NK=k3:U$.sibling=k3,U$=k3);return r9&&s(m8,H4),NK}for(oq=n(oq);!k3.done;H4++,k3=r8.next())k3=F3(oq,m8,H4,k3.value,dA),k3!==null&&(E&&k3.alternate!==null&&oq.delete(k3.key===null?H4:k3.key),X8=E6(k3,X8,H4),U$===null?NK=k3:U$.sibling=k3,U$=k3);return E&&oq.forEach(function(Bm1){return S(m8,Bm1)}),r9&&s(m8,H4),NK}function Np(m8,X8,r8,dA){if(typeof r8==="object"&&r8!==null&&r8.type===Oo&&r8.key===null&&(r8=r8.props.children),typeof r8==="object"&&r8!==null){switch(r8.$$typeof){case WB:A:{for(var NK=r8.key;X8!==null;){if(X8.key===NK){if(NK=r8.type,NK===Oo){if(X8.tag===7){p(m8,X8.sibling),dA=J6(X8,r8.props.children),dA.return=m8,m8=dA;break A}}else if(X8.elementType===NK||typeof NK==="object"&&NK!==null&&NK.$$typeof===Fh&&s8(NK)===X8.type){p(m8,X8.sibling),dA=J6(X8,r8.props),M7(dA,r8),dA.return=m8,m8=dA;break A}p(m8,X8);break}else S(m8,X8);X8=X8.sibling}r8.type===Oo?(dA=wf(r8.props.children,m8.mode,dA,r8.key),dA.return=m8,m8=dA):(dA=wO6(r8.type,r8.key,r8.props,null,m8.mode,dA),M7(dA,r8),dA.return=m8,m8=dA)}return O1(m8);case mh:A:{for(NK=r8.key;X8!==null;){if(X8.key===NK)if(X8.tag===4&&X8.stateNode.containerInfo===r8.containerInfo&&X8.stateNode.implementation===r8.implementation){p(m8,X8.sibling),dA=J6(X8,r8.children||[]),dA.return=m8,m8=dA;break A}else{p(m8,X8);break}else S(m8,X8);X8=X8.sibling}dA=_f(r8,m8.mode,dA),dA.return=m8,m8=dA}return O1(m8);case Fh:return r8=s8(r8),Np(m8,X8,r8,dA)}if(zp(r8))return SD(m8,X8,r8,dA);if(H(r8)){if(NK=H(r8),typeof NK!=="function")throw Error(Y(150));return r8=NK.call(r8),W46(m8,X8,r8,dA)}if(typeof r8.then==="function")return Np(m8,X8,RA(r8),dA);if(r8.$$typeof===Gy)return Np(m8,X8,p6(m8,r8),dA);Fq(m8,r8)}return typeof r8==="string"&&r8!==""||typeof r8==="number"||typeof r8==="bigint"?(r8=""+r8,X8!==null&&X8.tag===6?(p(m8,X8.sibling),dA=J6(X8,r8),dA.return=m8,m8=dA):(p(m8,X8),dA=tL6(r8,m8.mode,dA),dA.return=m8,m8=dA),O1(m8)):p(m8,X8)}return function(m8,X8,r8,dA){try{j46=0;var NK=Np(m8,X8,r8,dA);return Zp=null,NK}catch(oq){if(oq===Go||oq===SO6)throw oq;var U$=q(29,oq,null,m8.mode);return U$.lanes=dA,U$.return=m8,U$}finally{}}}function a7(){for(var E=NB,S=hy6=NB=0;S<E;){var p=TV[S];TV[S++]=null;var n=TV[S];TV[S++]=null;var J6=TV[S];TV[S++]=null;var E6=TV[S];if(TV[S++]=null,n!==null&&J6!==null){var O1=n.pending;O1===null?J6.next=J6:(J6.next=O1.next,O1.next=J6),n.pending=J6}E6!==0&&nY(p,J6,E6)}}function P7(E,S,p,n){TV[NB++]=E,TV[NB++]=S,TV[NB++]=p,TV[NB++]=n,hy6|=n,E.lanes|=n,E=E.alternate,E!==null&&(E.lanes|=n)}function g4(E,S,p,n){return P7(E,S,p,n),HK(E)}function Mq(E,S){return P7(E,null,null,S),HK(E)}function nY(E,S,p){E.lanes|=p;var n=E.alternate;n!==null&&(n.lanes|=p);for(var J6=!1,E6=E.return;E6!==null;)E6.childLanes|=p,n=E6.alternate,n!==null&&(n.childLanes|=p),E6.tag===22&&(E=E6.stateNode,E===null||E._visibility&1||(J6=!0)),E=E6,E6=E6.return;return E.tag===3?(E6=E.stateNode,J6&&S!==null&&(J6=31-Hf(p),E=E6.hiddenUpdates,n=E[J6],n===null?E[J6]=[S]:n.push(S),S.lane=p|536870912),E6):null}function HK(E){if(50<Eo)throw Eo=0,py6=null,Error(Y(185));for(var S=E.return;S!==null;)E=S,S=E.return;return E.tag===3?E.stateNode:null}function Gz(E){E.updateQueue={baseState:E.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function CY(E,S){E=E.updateQueue,S.updateQueue===E&&(S.updateQueue={baseState:E.baseState,firstBaseUpdate:E.firstBaseUpdate,lastBaseUpdate:E.lastBaseUpdate,shared:E.shared,callbacks:null})}function l9(E){return{lane:E,tag:0,payload:null,callback:null,next:null}}function fz(E,S,p){var n=E.updateQueue;if(n===null)return null;if(n=n.shared,(D9&2)!==0){var J6=n.pending;return J6===null?S.next=S:(S.next=J6.next,J6.next=S),n.pending=S,S=HK(E),nY(E,null,p),S}return P7(E,n,S,p),HK(E)}function a_(E,S,p){if(S=S.updateQueue,S!==null&&(S=S.shared,(p&4194048)!==0)){var n=S.lanes;n&=E.pendingLanes,p|=n,S.lanes=p,R(E,p)}}function VH(E,S){var{updateQueue:p,alternate:n}=E;if(n!==null&&(n=n.updateQueue,p===n)){var J6=null,E6=null;if(p=p.firstBaseUpdate,p!==null){do{var O1={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};E6===null?J6=E6=O1:E6=E6.next=O1,p=p.next}while(p!==null);E6===null?J6=E6=S:E6=E6.next=S}else J6=E6=S;p={baseState:n.baseState,firstBaseUpdate:J6,lastBaseUpdate:E6,shared:n.shared,callbacks:n.callbacks},E.updateQueue=p;return}E=p.lastBaseUpdate,E===null?p.firstBaseUpdate=S:E.next=S,p.lastBaseUpdate=S}function R9(){if(Iy6){var E=Zo;if(E!==null)throw E}}function DY(E,S,p,n){Iy6=!1;var J6=E.updateQueue;vB=!1;var{firstBaseUpdate:E6,lastBaseUpdate:O1}=J6,p1=J6.shared.pending;if(p1!==null){J6.shared.pending=null;var a8=p1,gA=a8.next;a8.next=null,O1===null?E6=gA:O1.next=gA,O1=a8;var i7=E.alternate;i7!==null&&(i7=i7.updateQueue,p1=i7.lastBaseUpdate,p1!==O1&&(p1===null?i7.firstBaseUpdate=gA:p1.next=gA,i7.lastBaseUpdate=a8))}if(E6!==null){var N7=J6.baseState;O1=0,i7=gA=a8=null,p1=E6;do{var h4=p1.lane&-536870913,F3=h4!==p1.lane;if(F3?(I9&h4)===h4:(n&h4)===h4){h4!==0&&h4===Wo&&(Iy6=!0),i7!==null&&(i7=i7.next={lane:0,tag:p1.tag,payload:p1.payload,callback:null,next:null});A:{var SD=E,W46=p1;h4=S;var Np=p;switch(W46.tag){case 1:if(SD=W46.payload,typeof SD==="function"){N7=SD.call(Np,N7,h4);break A}N7=SD;break A;case 3:SD.flags=SD.flags&-65537|128;case 0:if(SD=W46.payload,h4=typeof SD==="function"?SD.call(Np,N7,h4):SD,h4===null||h4===void 0)break A;N7=Ay6({},N7,h4);break A;case 2:vB=!0}}h4=p1.callback,h4!==null&&(E.flags|=64,F3&&(E.flags|=8192),F3=J6.callbacks,F3===null?J6.callbacks=[h4]:F3.push(h4))}else F3={lane:h4,tag:p1.tag,payload:p1.payload,callback:p1.callback,next:null},i7===null?(gA=i7=F3,a8=N7):i7=i7.next=F3,O1|=h4;if(p1=p1.next,p1===null)if(p1=J6.shared.pending,p1===null)break;else F3=p1,p1=F3.next,F3.next=null,J6.lastBaseUpdate=F3,J6.shared.pending=null}while(1);i7===null&&(a8=N7),J6.baseState=a8,J6.firstBaseUpdate=gA,J6.lastBaseUpdate=i7,E6===null&&(J6.shared.lanes=0),Zk|=O1,E.lanes=O1,E.memoizedState=N7}}function Rw(E,S){if(typeof E!=="function")throw Error(Y(191,E));E.call(S)}function B$(E,S){var p=E.callbacks;if(p!==null)for(E.callbacks=null,E=0;E<p.length;E++)Rw(p[E],S)}function Wq(E,S){E=nh,D(hO6,E),D(fo,S),nh=E|S.baseLanes}function XY(){D(hO6,nh),D(fo,fo.current)}function H_(){nh=hO6.current,M(fo),M(hO6)}function k4(E){var S=E.alternate;D(LH,LH.current&1),D(Mf,E),VV===null&&(S===null||fo.current!==null?VV=E:S.memoizedState!==null&&(VV=E))}function D3(E){D(LH,LH.current),D(Mf,E),VV===null&&(VV=E)}function x5(E){E.tag===22?(D(LH,LH.current),D(Mf,E),VV===null&&(VV=E)):S9(E)}function S9(){D(LH,LH.current),D(Mf,Mf.current)}function H5(E){M(Mf),VV===E&&(VV=null),M(LH)}function PY(E){for(var S=E;S!==null;){if(S.tag===13){var p=S.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Y46(p)||Ny(p)))return S}else if(S.tag===19&&(S.memoizedProps.revealOrder==="forwards"||S.memoizedProps.revealOrder==="backwards"||S.memoizedProps.revealOrder==="unstable_legacy-backwards"||S.memoizedProps.revealOrder==="together")){if((S.flags&128)!==0)return S}else if(S.child!==null){S.child.return=S,S=S.child;continue}if(S===E)break;for(;S.sibling===null;){if(S.return===null||S.return===E)return null;S=S.return}S.sibling.return=S.return,S=S.sibling}return null}function C4(){throw Error(Y(321))}function x2(E,S){if(S===null)return!1;for(var p=0;p<S.length&&p<E.length;p++)if(!LD(E[p],S[p]))return!1;return!0}function Tz(E,S,p,n,J6,E6){return ch=E6,A5=S,S.memoizedState=null,S.updateQueue=null,S.lanes=0,VK.H=E===null||E.memoizedState===null?xO6:uO6,fp=!1,E6=p(n,J6),fp=!1,To&&(E6=Sw(S,p,n,J6)),UK(E),E6}function UK(E){VK.H=M46;var S=bw!==null&&bw.next!==null;if(ch=0,fj=bw=A5=null,IO6=!1,J46=0,Vo=null,S)throw Error(Y(300));E===null||Tj||(E=E.dependencies,E!==null&&f6(E)&&(Tj=!0))}function Sw(E,S,p,n){A5=E;var J6=0;do{if(To&&(Vo=null),J46=0,To=!1,25<=J6)throw Error(Y(301));if(J6+=1,fj=bw=null,E.updateQueue!=null){var E6=E.updateQueue;E6.lastEffect=null,E6.events=null,E6.stores=null,E6.memoCache!=null&&(E6.memoCache.index=0)}VK.H=_11,E6=S(p,n)}while(To);return E6}function NH(){var E=VK.H,S=E.useState()[0];return S=typeof S.then==="function"?AA(S):S,E=E.useState()[0],(bw!==null?bw.memoizedState:null)!==E&&(A5.flags|=1024),S}function Y1(){var E=bO6!==0;return bO6=0,E}function w1(E,S,p){S.updateQueue=E.updateQueue,S.flags&=-2053,E.lanes&=~p}function R1(E){if(IO6){for(E=E.memoizedState;E!==null;){var S=E.queue;S!==null&&(S.pending=null),E=E.next}IO6=!1}ch=0,fj=bw=A5=null,To=!1,J46=bO6=0,Vo=null}function F1(){var E={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fj===null?A5.memoizedState=fj=E:fj=fj.next=E,fj}function e1(){if(bw===null){var E=A5.alternate;E=E!==null?E.memoizedState:null}else E=bw.next;var S=fj===null?A5.memoizedState:fj.next;if(S!==null)fj=S,bw=E;else{if(E===null){if(A5.alternate===null)throw Error(Y(467));throw Error(Y(310))}bw=E,E={memoizedState:bw.memoizedState,baseState:bw.baseState,baseQueue:bw.baseQueue,queue:bw.queue,next:null},fj===null?A5.memoizedState=fj=E:fj=fj.next=E}return fj}function y8(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function AA(E){var S=J46;return J46+=1,Vo===null&&(Vo=[]),E=t8(Vo,E,S),S=A5,(fj===null?S.memoizedState:fj.next)===null&&(S=S.alternate,VK.H=S===null||S.memoizedState===null?xO6:uO6),E}function C1(E){if(E!==null&&typeof E==="object"){if(typeof E.then==="function")return AA(E);if(E.$$typeof===Gy)return V6(E)}throw Error(Y(438,String(E)))}function k8(E){var S=null,p=A5.updateQueue;if(p!==null&&(S=p.memoCache),S==null){var n=A5.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(S={data:n.data.map(function(J6){return J6.slice()}),index:0})))}if(S==null&&(S={data:[],index:0}),p===null&&(p=y8(),A5.updateQueue=p),p.memoCache=S,p=S.data[S.index],p===void 0)for(p=S.data[S.index]=Array(E),n=0;n<E;n++)p[n]=ZB;return S.index++,p}function g8(E,S){return typeof S==="function"?S(E):S}function o8(E){var S=e1();return WA(S,bw,E)}function WA(E,S,p){var n=E.queue;if(n===null)throw Error(Y(311));n.lastRenderedReducer=p;var J6=E.baseQueue,E6=n.pending;if(E6!==null){if(J6!==null){var O1=J6.next;J6.next=E6.next,E6.next=O1}S.baseQueue=J6=E6,n.pending=null}if(E6=E.baseState,J6===null)E.memoizedState=E6;else{S=J6.next;var p1=O1=null,a8=null,gA=S,i7=!1;do{var N7=gA.lane&-536870913;if(N7!==gA.lane?(I9&N7)===N7:(ch&N7)===N7){var h4=gA.revertLane;if(h4===0)a8!==null&&(a8=a8.next={lane:0,revertLane:0,gesture:null,action:gA.action,hasEagerState:gA.hasEagerState,eagerState:gA.eagerState,next:null}),N7===Wo&&(i7=!0);else if((ch&h4)===h4){gA=gA.next,h4===Wo&&(i7=!0);continue}else N7={lane:0,revertLane:gA.revertLane,gesture:null,action:gA.action,hasEagerState:gA.hasEagerState,eagerState:gA.eagerState,next:null},a8===null?(p1=a8=N7,O1=E6):a8=a8.next=N7,A5.lanes|=h4,Zk|=h4;N7=gA.action,fp&&p(E6,N7),E6=gA.hasEagerState?gA.eagerState:p(E6,N7)}else h4={lane:N7,revertLane:gA.revertLane,gesture:gA.gesture,action:gA.action,hasEagerState:gA.hasEagerState,eagerState:gA.eagerState,next:null},a8===null?(p1=a8=h4,O1=E6):a8=a8.next=h4,A5.lanes|=N7,Zk|=N7;gA=gA.next}while(gA!==null&&gA!==S);if(a8===null?O1=E6:a8.next=p1,!LD(E6,E.memoizedState)&&(Tj=!0,i7&&(p=Zo,p!==null)))throw p;E.memoizedState=E6,E.baseState=O1,E.baseQueue=a8,n.lastRenderedState=E6}return J6===null&&(n.lanes=0),[E.memoizedState,n.dispatch]}function y7(E){var S=e1(),p=S.queue;if(p===null)throw Error(Y(311));p.lastRenderedReducer=E;var{dispatch:n,pending:J6}=p,E6=S.memoizedState;if(J6!==null){p.pending=null;var O1=J6=J6.next;do E6=E(E6,O1.action),O1=O1.next;while(O1!==J6);LD(E6,S.memoizedState)||(Tj=!0),S.memoizedState=E6,S.baseQueue===null&&(S.baseState=E6),p.lastRenderedState=E6}return[E6,n]}function N3(E,S,p){var n=A5,J6=e1(),E6=r9;if(E6){if(p===void 0)throw Error(Y(407));p=p()}else p=S();var O1=!LD((bw||J6).memoizedState,p);if(O1&&(J6.memoizedState=p,Tj=!0),J6=J6.queue,vH(Aq.bind(null,n,J6,E),[E]),J6.getSnapshot!==S||O1||fj!==null&&fj.memoizedState.tag&1){if(n.flags|=2048,Dj(9,{destroy:void 0},W4.bind(null,n,J6,p,S),null),_2===null)throw Error(Y(349));E6||(ch&127)!==0||x4(n,S,p)}return p}function x4(E,S,p){E.flags|=16384,E={getSnapshot:S,value:p},S=A5.updateQueue,S===null?(S=y8(),A5.updateQueue=S,S.stores=[E]):(p=S.stores,p===null?S.stores=[E]:p.push(E))}function W4(E,S,p,n){S.value=p,S.getSnapshot=n,t5(S)&&pK(E)}function Aq(E,S,p){return p(function(){t5(S)&&pK(E)})}function t5(E){var S=E.getSnapshot;E=E.value;try{var p=S();return!LD(E,p)}catch(n){return!0}}function pK(E){var S=Mq(E,2);S!==null&&wM(S,E,2)}function C9(E){var S=F1();if(typeof E==="function"){var p=E;if(E=p(),fp){F(!0);try{p()}finally{F(!1)}}}return S.memoizedState=S.baseState=E,S.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:g8,lastRenderedState:E},S}function j_(E,S,p,n){return E.baseState=p,WA(E,bw,typeof n==="function"?n:g8)}function u2(E,S,p,n,J6){if(SO(E))throw Error(Y(485));if(E=S.action,E!==null){var E6={payload:J6,action:E,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O1){E6.listeners.push(O1)}};VK.T!==null?p(!0):E6.isTransition=!1,n(E6),p=S.pending,p===null?(E6.next=S.pending=E6,Vz(S,E6)):(E6.next=p.next,S.pending=p.next=E6)}}function Vz(E,S){var{action:p,payload:n}=S,J6=E.state;if(S.isTransition){var E6=VK.T,O1={};VK.T=O1;try{var p1=p(J6,n),a8=VK.S;a8!==null&&a8(O1,p1),F4(E,S,p1)}catch(gA){ww(E,S,gA)}finally{E6!==null&&O1.types!==null&&(E6.types=O1.types),VK.T=E6}}else try{E6=p(J6,n),F4(E,S,E6)}catch(gA){ww(E,S,gA)}}function F4(E,S,p){p!==null&&typeof p==="object"&&typeof p.then==="function"?p.then(function(n){yO(E,S,n)},function(n){return ww(E,S,n)}):yO(E,S,p)}function yO(E,S,p){S.status="fulfilled",S.value=p,fK(S),E.state=p,S=E.pending,S!==null&&(p=S.next,p===S?E.pending=null:(p=p.next,S.next=p,Vz(E,p)))}function ww(E,S,p){var n=E.pending;if(E.pending=null,n!==null){n=n.next;do S.status="rejected",S.reason=p,fK(S),S=S.next;while(S!==n)}E.action=null}function fK(E){E=E.listeners;for(var S=0;S<E.length;S++)(0,E[S])()}function vq(E,S){return S}function XV(E,S){if(r9){var p=_2.formState;if(p!==null){A:{var n=A5;if(r9){if(q$){var J6=m61(q$,fV);if(J6){q$=XO6(J6),n=g61(J6);break A}}P6(n)}n=!1}n&&(S=p[0])}}p=F1(),p.memoizedState=p.baseState=S,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vq,lastRenderedState:S},p.queue=n,p=z4.bind(null,A5,n),n.dispatch=p,n=C9(!1);var E6=$w.bind(null,A5,!1,n.queue);return n=F1(),J6={state:S,dispatch:null,action:E,pending:null},n.queue=J6,p=u2.bind(null,A5,J6,E6,p),J6.dispatch=p,n.memoizedState=E,[S,p,!1]}function wk(E){var S=e1();return Cw(S,bw,E)}function Cw(E,S,p){if(S=WA(E,S,vq)[0],E=o8(g8)[0],typeof S==="object"&&S!==null&&typeof S.then==="function")try{var n=AA(S)}catch(O1){if(O1===Go)throw SO6;throw O1}else n=S;S=e1();var J6=S.queue,E6=J6.dispatch;return p!==S.memoizedState&&(A5.flags|=2048,Dj(9,{destroy:void 0},MZ.bind(null,J6,p),null)),[n,E6,E]}function MZ(E,S){E.action=S}function GD(E){var S=e1(),p=bw;if(p!==null)return Cw(S,p,E);e1(),S=S.memoizedState,p=e1();var n=p.queue.dispatch;return p.memoizedState=E,[S,n,!1]}function Dj(E,S,p,n){return E={tag:E,create:p,deps:n,inst:S,next:null},S=A5.updateQueue,S===null&&(S=y8(),A5.updateQueue=S),p=S.lastEffect,p===null?S.lastEffect=E.next=E:(n=p.next,p.next=E,E.next=n,S.lastEffect=E),E}function v3(){return e1().memoizedState}function dK(E,S,p,n){var J6=F1();A5.flags|=E,J6.memoizedState=Dj(1|S,{destroy:void 0},p,n===void 0?null:n)}function OJ(E,S,p,n){var J6=e1();n=n===void 0?null:n;var E6=J6.memoizedState.inst;bw!==null&&n!==null&&x2(n,bw.memoizedState.deps)?J6.memoizedState=Dj(S,E6,p,n):(A5.flags|=E,J6.memoizedState=Dj(1|S,E6,p,n))}function z2(E,S){dK(8390656,8,E,S)}function vH(E,S){OJ(2048,8,E,S)}function HJ(E){A5.flags|=4;var S=A5.updateQueue;if(S===null)S=y8(),A5.updateQueue=S,S.events=[E];else{var p=S.events;p===null?S.events=[E]:p.push(E)}}function zM(E){var S=e1().memoizedState;return HJ({ref:S,nextImpl:E}),function(){if((D9&2)!==0)throw Error(Y(440));return S.impl.apply(void 0,arguments)}}function WY(E,S){return OJ(4,2,E,S)}function B2(E,S){return OJ(4,4,E,S)}function m2(E,S){if(typeof S==="function"){E=E();var p=S(E);return function(){typeof p==="function"?p():S(null)}}if(S!==null&&S!==void 0)return E=E(),S.current=E,function(){S.current=null}}function X3(E,S,p){p=p!==null&&p!==void 0?p.concat([E]):null,OJ(4,4,m2.bind(null,S,E),p)}function kH(){}function RO(E,S){var p=e1();S=S===void 0?null:S;var n=p.memoizedState;if(S!==null&&x2(S,n[1]))return n[0];return p.memoizedState=[E,S],E}function Xj(E,S){var p=e1();S=S===void 0?null:S;var n=p.memoizedState;if(S!==null&&x2(S,n[1]))return n[0];if(n=E(),fp){F(!0);try{E()}finally{F(!1)}}return p.memoizedState=[n,S],n}function Pj(E,S,p){if(p===void 0||(ch&1073741824)!==0&&(I9&261930)===0)return E.memoizedState=S;return E.memoizedState=p,E=qO6(),A5.lanes|=E,Zk|=E,p}function _w(E,S,p,n){if(LD(p,S))return p;if(fo.current!==null)return E=Pj(E,p,n),LD(E,S)||(Tj=!0),E;if((ch&42)===0||(ch&1073741824)!==0&&(I9&261930)===0)return Tj=!0,E.memoizedState=p;return E=qO6(),A5.lanes|=E,Zk|=E,S}function TA(E,S,p,n,J6){var E6=Dk();_M(E6!==0&&8>E6?E6:8);var O1=VK.T,p1={};VK.T=p1,$w(E,!1,S,p);try{var a8=J6(),gA=VK.S;if(gA!==null&&gA(p1,a8),a8!==null&&typeof a8==="object"&&typeof a8.then==="function"){var i7=m6(a8,n);J9(E,S,i7,yX(E))}else J9(E,S,n,yX(E))}catch(N7){J9(E,S,{then:function(){},status:"rejected",reason:N7},yX())}finally{_M(E6),O1!==null&&p1.types!==null&&(O1.types=p1.types),VK.T=O1}}function IA(E){var S=E.memoizedState;if(S!==null)return S;S={memoizedState:$p,baseState:$p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:g8,lastRenderedState:$p},next:null};var p={};return S.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:g8,lastRenderedState:p},next:null},E.memoizedState=S,E=E.alternate,E!==null&&(E.memoizedState=S),S}function qq(){return V6(Vy)}function P3(){return e1().memoizedState}function Dq(){return e1().memoizedState}function i9(E){for(var S=E.return;S!==null;){switch(S.tag){case 24:case 3:var p=yX();E=l9(p);var n=fz(S,E,p);n!==null&&(wM(n,S,p),a_(n,S,p)),S={cache:R6()},E.payload=S;return}S=S.return}}function hY(E,S,p){var n=yX();p={lane:n,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},SO(E)?hw(S,p):(p=g4(E,S,p,n),p!==null&&(wM(p,E,n),s_(p,S,n)))}function z4(E,S,p){var n=yX();J9(E,S,p,n)}function J9(E,S,p,n){var J6={lane:n,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(SO(E))hw(S,J6);else{var E6=E.alternate;if(E.lanes===0&&(E6===null||E6.lanes===0)&&(E6=S.lastRenderedReducer,E6!==null))try{var O1=S.lastRenderedState,p1=E6(O1,p);if(J6.hasEagerState=!0,J6.eagerState=p1,LD(p1,O1))return P7(E,S,J6,0),_2===null&&a7(),!1}catch(a8){}finally{}if(p=g4(E,S,J6,n),p!==null)return wM(p,E,n),s_(p,S,n),!0}return!1}function $w(E,S,p,n){if(n={lane:2,revertLane:v6(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},SO(E)){if(S)throw Error(Y(479))}else S=g4(E,p,n,2),S!==null&&wM(S,E,2)}function SO(E){var S=E.alternate;return E===A5||S!==null&&S===A5}function hw(E,S){To=IO6=!0;var p=E.pending;p===null?S.next=S:(S.next=p.next,p.next=S),E.pending=S}function s_(E,S,p){if((p&4194048)!==0){var n=S.lanes;n&=E.pendingLanes,p|=n,S.lanes=p,R(E,p)}}function m$(E,S,p,n){S=E.memoizedState,p=p(n,S),p=p===null||p===void 0?S:Ay6({},S,p),E.memoizedState=p,E.lanes===0&&(E.updateQueue.baseState=p)}function e5(E,S,p,n,J6,E6,O1){return E=E.stateNode,typeof E.shouldComponentUpdate==="function"?E.shouldComponentUpdate(n,E6,O1):S.prototype&&S.prototype.isPureReactComponent?!k1(p,n)||!k1(J6,E6):!0}function t_(E,S,p,n){E=S.state,typeof S.componentWillReceiveProps==="function"&&S.componentWillReceiveProps(p,n),typeof S.UNSAFE_componentWillReceiveProps==="function"&&S.UNSAFE_componentWillReceiveProps(p,n),S.state!==E&&by6.enqueueReplaceState(S,S.state,null)}function Ow(E,S){var p=S;if("ref"in S){p={};for(var n in S)n!=="ref"&&(p[n]=S[n])}if(E=E.defaultProps){p===S&&(p=Ay6({},p));for(var J6 in E)p[J6]===void 0&&(p[J6]=E[J6])}return p}function LX(E,S){try{var p=E.onUncaughtError;p(S.value,{componentStack:S.stack})}catch(n){setTimeout(function(){throw n})}}function z0(E,S,p){try{var n=E.onCaughtError;n(p.value,{componentStack:p.stack,errorBoundary:S.tag===1?S.stateNode:null})}catch(J6){setTimeout(function(){throw J6})}}function qf(E,S,p){return p=l9(p),p.tag=3,p.payload={element:null},p.callback=function(){LX(E,S)},p}function PV(E){return E=l9(E),E.tag=3,E}function _k(E,S,p,n){var J6=p.type.getDerivedStateFromError;if(typeof J6==="function"){var E6=n.value;E.payload=function(){return J6(E6)},E.callback=function(){z0(S,p,n)}}var O1=p.stateNode;O1!==null&&typeof O1.componentDidCatch==="function"&&(E.callback=function(){z0(S,p,n),typeof J6!=="function"&&(Gk===null?Gk=new Set([this]):Gk.add(this));var p1=n.stack;this.componentDidCatch(n.value,{componentStack:p1!==null?p1:""})})}function JB(E,S,p,n,J6){if(p.flags|=32768,n!==null&&typeof n==="object"&&typeof n.then==="function"){if(S=p.alternate,S!==null&&h6(S,p,J6,!0),p=Mf.current,p!==null){switch(p.tag){case 31:case 13:return VV===null?qA():p.alternate===null&&bO===0&&(bO=3),p.flags&=-257,p.flags|=65536,p.lanes=J6,n===CO6?p.flags|=16384:(S=p.updateQueue,S===null?p.updateQueue=new Set([n]):S.add(n),YO6(E,n,J6)),!1;case 22:return p.flags|=65536,n===CO6?p.flags|=16384:(S=p.updateQueue,S===null?(S={transitions:null,markerInstances:null,retryQueue:new Set([n])},p.updateQueue=S):(p=S.retryQueue,p===null?S.retryQueue=new Set([n]):p.add(n)),YO6(E,n,J6)),!1}throw Error(Y(435,p.tag))}return YO6(E,n,J6),qA(),!1}if(r9)return S=Mf.current,S!==null?((S.flags&65536)===0&&(S.flags|=256),S.flags|=65536,S.lanes=J6,n!==Ry6&&(E=Error(Y(422),{cause:n}),X6(t(E,p)))):(n!==Ry6&&(S=Error(Y(423),{cause:n}),X6(t(S,p))),E=E.current.alternate,E.flags|=65536,J6&=-J6,E.lanes|=J6,n=t(n,p),J6=qf(E.stateNode,n,J6),VH(E,J6),bO!==4&&(bO=2)),!1;var E6=Error(Y(520),{cause:n});if(E6=t(E6,p),X46===null?X46=[E6]:X46.push(E6),bO!==4&&(bO=2),S===null)return!0;n=t(n,p),p=S;do{switch(p.tag){case 3:return p.flags|=65536,E=J6&-J6,p.lanes|=E,E=qf(p.stateNode,n,E),VH(p,E),!1;case 1:if(S=p.type,E6=p.stateNode,(p.flags&128)===0&&(typeof S.getDerivedStateFromError==="function"||E6!==null&&typeof E6.componentDidCatch==="function"&&(Gk===null||!Gk.has(E6))))return p.flags|=65536,J6&=-J6,p.lanes|=J6,J6=PV(J6),_k(J6,E,p,n),VH(p,J6),!1}p=p.return}while(p!==null);return!1}function Iw(E,S,p,n){S.child=E===null?w11(S,null,p,n):Gp(S,E.child,p,n)}function fD(E,S,p,n,J6){p=p.render;var E6=S.ref;if("ref"in n){var O1={};for(var p1 in n)p1!=="ref"&&(O1[p1]=n[p1])}else O1=n;if(M6(S),n=Tz(E,S,p,O1,E6,J6),p1=Y1(),E!==null&&!Tj)return w1(E,S,J6),w0(E,S,J6);return r9&&p1&&Z6(S),S.flags|=1,Iw(E,S,n,J6),S.child}function B6(E,S,p,n,J6){if(E===null){var E6=p.type;if(typeof E6==="function"&&!sL6(E6)&&E6.defaultProps===void 0&&p.compare===null)return S.tag=15,S.type=E6,Q6(E,S,E6,n,J6);return E=wO6(p.type,null,n,S,S.mode,J6),E.ref=S.ref,E.return=S,S.child=E}if(E6=E.child,!Yo(E,J6)){var O1=E6.memoizedProps;if(p=p.compare,p=p!==null?p:k1,p(O1,n)&&E.ref===S.ref)return w0(E,S,J6)}return S.flags|=1,E=Bh(E6,n),E.ref=S.ref,E.return=S,S.child=E}function Q6(E,S,p,n,J6){if(E!==null){var E6=E.memoizedProps;if(k1(E6,n)&&E.ref===S.ref)if(Tj=!1,S.pendingProps=n=E6,Yo(E,J6))(E.flags&131072)!==0&&(Tj=!0);else return S.lanes=E.lanes,w0(E,S,J6)}return w2(E,S,p,n,J6)}function S1(E,S,p,n){var J6=n.children,E6=E!==null?E.memoizedState:null;if(E===null&&S.stateNode===null&&(S.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((S.flags&128)!==0){if(E6=E6!==null?E6.baseLanes|p:p,E!==null){n=S.child=E.child;for(J6=0;n!==null;)J6=J6|n.lanes|n.childLanes,n=n.sibling;n=J6&~E6}else n=0,S.child=null;return U8(E,S,E6,p,n)}if((p&536870912)!==0)S.memoizedState={baseLanes:0,cachePool:null},E!==null&&N1(S,E6!==null?E6.cachePool:null),E6!==null?Wq(S,E6):XY(),x5(S);else return n=S.lanes=536870912,U8(E,S,E6!==null?E6.baseLanes|p:p,p,n)}else E6!==null?(N1(S,E6.cachePool),Wq(S,E6),S9(S),S.memoizedState=null):(E!==null&&N1(S,null),XY(),S9(S));return Iw(E,S,J6,p),S.child}function N8(E,S){return E!==null&&E.tag===22||S.stateNode!==null||(S.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.sibling}function U8(E,S,p,n,J6){var E6=l6();return E6=E6===null?null:{parent:$f?F$._currentValue:F$._currentValue2,pool:E6},S.memoizedState={baseLanes:p,cachePool:E6},E!==null&&N1(S,null),XY(),x5(S),E!==null&&h6(E,S,n,!0),S.childLanes=J6,null}function R7(E,S){return S=J_({mode:S.mode,children:S.children},E.mode),S.ref=E.ref,E.child=S,S.return=E,S}function kq(E,S,p){return Gp(S,E.child,null,p),E=R7(S,S.pendingProps),E.flags|=2,H5(S),S.memoizedState=null,E}function tK(E,S,p){var n=S.pendingProps,J6=(S.flags&128)!==0;if(S.flags&=-129,E===null){if(r9){if(n.mode==="hidden")return E=R7(S,n),S.lanes=536870912,N8(null,E);if(D3(S),(E=q$)?(E=TZ(E,fV),E!==null&&(S.memoizedState={dehydrated:E,treeContext:ky!==null?{id:Xk,overflow:Pk}:null,retryLane:536870912,hydrationErrors:null},p=G61(E),p.return=S,S.child=p,RD=S,q$=null)):E=null,E===null)throw P6(S);return S.lanes=536870912,null}return R7(S,n)}var E6=E.memoizedState;if(E6!==null){var O1=E6.dehydrated;if(D3(S),J6)if(S.flags&256)S.flags&=-257,S=kq(E,S,p);else if(S.memoizedState!==null)S.child=E.child,S.flags|=128,S=null;else throw Error(Y(558));else if(Tj||h6(E,S,p,!1),J6=(p&E.childLanes)!==0,Tj||J6){if(n=_2,n!==null&&(O1=h(n,p),O1!==0&&O1!==E6.retryLane))throw E6.retryLane=O1,Mq(E,O1),wM(n,E,O1),xy6;qA(),S=kq(E,S,p)}else E=E6.treeContext,SX&&(q$=F61(O1),RD=S,r9=!0,VB=null,fV=!1,E!==null&&q6(S,E)),S=R7(S,n),S.flags|=4096;return S}return E=Bh(E.child,{mode:n.mode,children:n.children}),E.ref=S.ref,S.child=E,E.return=S,E}function n9(E,S){var p=S.ref;if(p===null)E!==null&&E.ref!==null&&(S.flags|=4194816);else{if(typeof p!=="function"&&typeof p!=="object")throw Error(Y(284));if(E===null||E.ref!==p)S.flags|=4194816}}function w2(E,S,p,n,J6){if(M6(S),p=Tz(E,S,p,n,void 0,J6),n=Y1(),E!==null&&!Tj)return w1(E,S,J6),w0(E,S,J6);return r9&&n&&Z6(S),S.flags|=1,Iw(E,S,p,J6),S.child}function CO(E,S,p,n,J6,E6){if(M6(S),S.updateQueue=null,p=Sw(S,n,p,J6),UK(E),n=Y1(),E!==null&&!Tj)return w1(E,S,E6),w0(E,S,E6);return r9&&n&&Z6(S),S.flags|=1,Iw(E,S,p,E6),S.child}function h1(E,S,p,n,J6){if(M6(S),S.stateNode===null){var E6=GV,O1=p.contextType;typeof O1==="object"&&O1!==null&&(E6=V6(O1)),E6=new p(n,E6),S.memoizedState=E6.state!==null&&E6.state!==void 0?E6.state:null,E6.updater=by6,S.stateNode=E6,E6._reactInternals=S,E6=S.stateNode,E6.props=n,E6.state=S.memoizedState,E6.refs={},Gz(S),O1=p.contextType,E6.context=typeof O1==="object"&&O1!==null?V6(O1):GV,E6.state=S.memoizedState,O1=p.getDerivedStateFromProps,typeof O1==="function"&&(m$(S,p,O1,n),E6.state=S.memoizedState),typeof p.getDerivedStateFromProps==="function"||typeof E6.getSnapshotBeforeUpdate==="function"||typeof E6.UNSAFE_componentWillMount!=="function"&&typeof E6.componentWillMount!=="function"||(O1=E6.state,typeof E6.componentWillMount==="function"&&E6.componentWillMount(),typeof E6.UNSAFE_componentWillMount==="function"&&E6.UNSAFE_componentWillMount(),O1!==E6.state&&by6.enqueueReplaceState(E6,E6.state,null),DY(S,n,E6,J6),R9(),E6.state=S.memoizedState),typeof E6.componentDidMount==="function"&&(S.flags|=4194308),n=!0}else if(E===null){E6=S.stateNode;var p1=S.memoizedProps,a8=Ow(p,p1);E6.props=a8;var gA=E6.context,i7=p.contextType;O1=GV,typeof i7==="object"&&i7!==null&&(O1=V6(i7));var N7=p.getDerivedStateFromProps;i7=typeof N7==="function"||typeof E6.getSnapshotBeforeUpdate==="function",p1=S.pendingProps!==p1,i7||typeof E6.UNSAFE_componentWillReceiveProps!=="function"&&typeof E6.componentWillReceiveProps!=="function"||(p1||gA!==O1)&&t_(S,E6,n,O1),vB=!1;var h4=S.memoizedState;E6.state=h4,DY(S,n,E6,J6),R9(),gA=S.memoizedState,p1||h4!==gA||vB?(typeof N7==="function"&&(m$(S,p,N7,n),gA=S.memoizedState),(a8=vB||e5(S,p,a8,n,h4,gA,O1))?(i7||typeof E6.UNSAFE_componentWillMount!=="function"&&typeof E6.componentWillMount!=="function"||(typeof E6.componentWillMount==="function"&&E6.componentWillMount(),typeof E6.UNSAFE_componentWillMount==="function"&&E6.UNSAFE_componentWillMount()),typeof E6.componentDidMount==="function"&&(S.flags|=4194308)):(typeof E6.componentDidMount==="function"&&(S.flags|=4194308),S.memoizedProps=n,S.memoizedState=gA),E6.props=n,E6.state=gA,E6.context=O1,n=a8):(typeof E6.componentDidMount==="function"&&(S.flags|=4194308),n=!1)}else{E6=S.stateNode,CY(E,S),O1=S.memoizedProps,i7=Ow(p,O1),E6.props=i7,N7=S.pendingProps,h4=E6.context,gA=p.contextType,a8=GV,typeof gA==="object"&&gA!==null&&(a8=V6(gA)),p1=p.getDerivedStateFromProps,(gA=typeof p1==="function"||typeof E6.getSnapshotBeforeUpdate==="function")||typeof E6.UNSAFE_componentWillReceiveProps!=="function"&&typeof E6.componentWillReceiveProps!=="function"||(O1!==N7||h4!==a8)&&t_(S,E6,n,a8),vB=!1,h4=S.memoizedState,E6.state=h4,DY(S,n,E6,J6),R9();var F3=S.memoizedState;O1!==N7||h4!==F3||vB||E!==null&&E.dependencies!==null&&f6(E.dependencies)?(typeof p1==="function"&&(m$(S,p,p1,n),F3=S.memoizedState),(i7=vB||e5(S,p,i7,n,h4,F3,a8)||E!==null&&E.dependencies!==null&&f6(E.dependencies))?(gA||typeof E6.UNSAFE_componentWillUpdate!=="function"&&typeof E6.componentWillUpdate!=="function"||(typeof E6.componentWillUpdate==="function"&&E6.componentWillUpdate(n,F3,a8),typeof E6.UNSAFE_componentWillUpdate==="function"&&E6.UNSAFE_componentWillUpdate(n,F3,a8)),typeof E6.componentDidUpdate==="function"&&(S.flags|=4),typeof E6.getSnapshotBeforeUpdate==="function"&&(S.flags|=1024)):(typeof E6.componentDidUpdate!=="function"||O1===E.memoizedProps&&h4===E.memoizedState||(S.flags|=4),typeof E6.getSnapshotBeforeUpdate!=="function"||O1===E.memoizedProps&&h4===E.memoizedState||(S.flags|=1024),S.memoizedProps=n,S.memoizedState=F3),E6.props=n,E6.state=F3,E6.context=a8,n=i7):(typeof E6.componentDidUpdate!=="function"||O1===E.memoizedProps&&h4===E.memoizedState||(S.flags|=4),typeof E6.getSnapshotBeforeUpdate!=="function"||O1===E.memoizedProps&&h4===E.memoizedState||(S.flags|=1024),n=!1)}return E6=n,n9(E,S),n=(S.flags&128)!==0,E6||n?(E6=S.stateNode,p=n&&typeof p.getDerivedStateFromError!=="function"?null:E6.render(),S.flags|=1,E!==null&&n?(S.child=Gp(S,E.child,null,J6),S.child=Gp(S,null,p,J6)):Iw(E,S,p,J6),S.memoizedState=E6.state,E=S.child):E=w0(E,S,J6),E}function VA(E,S,p,n){return a(),S.flags|=256,Iw(E,S,p,n),S.child}function S7(E){return{baseLanes:E,cachePool:X1()}}function E4(E,S,p){return E=E!==null?E.childLanes&~p:0,S&&(E|=Df),E}function e3(E,S,p){var n=S.pendingProps,J6=!1,E6=(S.flags&128)!==0,O1;if((O1=E6)||(O1=E!==null&&E.memoizedState===null?!1:(LH.current&2)!==0),O1&&(J6=!0,S.flags&=-129),O1=(S.flags&32)!==0,S.flags&=-33,E===null){if(r9){if(J6?k4(S):S9(S),(E=q$)?(E=vy(E,fV),E!==null&&(S.memoizedState={dehydrated:E,treeContext:ky!==null?{id:Xk,overflow:Pk}:null,retryLane:536870912,hydrationErrors:null},p=G61(E),p.return=S,S.child=p,RD=S,q$=null)):E=null,E===null)throw P6(S);return Ny(E)?S.lanes=32:S.lanes=536870912,null}var p1=n.children;if(n=n.fallback,J6)return S9(S),J6=S.mode,p1=J_({mode:"hidden",children:p1},J6),n=wf(n,J6,p,null),p1.return=S,n.return=S,p1.sibling=n,S.child=p1,n=S.child,n.memoizedState=S7(p),n.childLanes=E4(E,O1,p),S.memoizedState=uy6,N8(null,n);return k4(S),g$(S,p1)}var a8=E.memoizedState;if(a8!==null&&(p1=a8.dehydrated,p1!==null)){if(E6)S.flags&256?(k4(S),S.flags&=-257,S=hO(E,S,p)):S.memoizedState!==null?(S9(S),S.child=E.child,S.flags|=128,S=null):(S9(S),p1=n.fallback,J6=S.mode,n=J_({mode:"visible",children:n.children},J6),p1=wf(p1,J6,p,null),p1.flags|=2,n.return=S,p1.return=S,n.sibling=p1,S.child=n,Gp(S,E.child,null,p),n=S.child,n.memoizedState=S7(p),n.childLanes=E4(E,O1,p),S.memoizedState=uy6,S=N8(null,n));else if(k4(S),Ny(p1))O1=Wm1(p1).digest,n=Error(Y(419)),n.stack="",n.digest=O1,X6({value:n,source:null,stack:null}),S=hO(E,S,p);else if(Tj||h6(E,S,p,!1),O1=(p&E.childLanes)!==0,Tj||O1){if(O1=_2,O1!==null&&(n=h(O1,p),n!==0&&n!==a8.retryLane))throw a8.retryLane=n,Mq(E,n),wM(O1,E,n),xy6;Y46(p1)||qA(),S=hO(E,S,p)}else Y46(p1)?(S.flags|=192,S.child=E.child,S=null):(E=a8.treeContext,SX&&(q$=Q61(p1),RD=S,r9=!0,VB=null,fV=!1,E!==null&&q6(S,E)),S=g$(S,n.children),S.flags|=4096);return S}if(J6)return S9(S),p1=n.fallback,J6=S.mode,a8=E.child,E6=a8.sibling,n=Bh(a8,{mode:"hidden",children:n.children}),n.subtreeFlags=a8.subtreeFlags&65011712,E6!==null?p1=Bh(E6,p1):(p1=wf(p1,J6,p,null),p1.flags|=2),p1.return=S,n.return=S,n.sibling=p1,S.child=n,N8(null,n),n=S.child,p1=E.child.memoizedState,p1===null?p1=S7(p):(J6=p1.cachePool,J6!==null?(a8=$f?F$._currentValue:F$._currentValue2,J6=J6.parent!==a8?{parent:a8,pool:a8}:J6):J6=X1(),p1={baseLanes:p1.baseLanes|p,cachePool:J6}),n.memoizedState=p1,n.childLanes=E4(E,O1,p),S.memoizedState=uy6,N8(E.child,n);return k4(S),p=E.child,E=p.sibling,p=Bh(p,{mode:"visible",children:n.children}),p.return=S,p.sibling=null,E!==null&&(O1=S.deletions,O1===null?(S.deletions=[E],S.flags|=16):O1.push(E)),S.child=p,S.memoizedState=null,p}function g$(E,S){return S=J_({mode:"visible",children:S},E.mode),S.return=E,E.child=S}function J_(E,S){return E=q(22,E,null,S),E.lanes=0,E}function hO(E,S,p){return Gp(S,E.child,null,p),E=g$(S,S.pendingProps.children),E.flags|=2,S.memoizedState=null,E}function $k(E,S,p){E.lanes|=S;var n=E.alternate;n!==null&&(n.lanes|=S),y6(E.return,S,p)}function yh(E,S,p,n,J6,E6){var O1=E.memoizedState;O1===null?E.memoizedState={isBackwards:S,rendering:null,renderingStartTime:0,last:n,tail:p,tailMode:J6,treeForkCount:E6}:(O1.isBackwards=S,O1.rendering=null,O1.renderingStartTime=0,O1.last=n,O1.tail=p,O1.tailMode=J6,O1.treeForkCount=E6)}function DZ(E,S,p){var n=S.pendingProps,J6=n.revealOrder,E6=n.tail;n=n.children;var O1=LH.current,p1=(O1&2)!==0;if(p1?(O1=O1&1|2,S.flags|=128):O1&=1,D(LH,O1),Iw(E,S,n,p),n=r9?Jp:0,!p1&&E!==null&&(E.flags&128)!==0)A:for(E=S.child;E!==null;){if(E.tag===13)E.memoizedState!==null&&$k(E,p,S);else if(E.tag===19)$k(E,p,S);else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===S)break A;for(;E.sibling===null;){if(E.return===null||E.return===S)break A;E=E.return}E.sibling.return=E.return,E=E.sibling}switch(J6){case"forwards":p=S.child;for(J6=null;p!==null;)E=p.alternate,E!==null&&PY(E)===null&&(J6=p),p=p.sibling;p=J6,p===null?(J6=S.child,S.child=null):(J6=p.sibling,p.sibling=null),yh(S,!1,J6,p,E6,n);break;case"backwards":case"unstable_legacy-backwards":p=null,J6=S.child;for(S.child=null;J6!==null;){if(E=J6.alternate,E!==null&&PY(E)===null){S.child=J6;break}E=J6.sibling,J6.sibling=p,p=J6,J6=E}yh(S,!0,p,null,E6,n);break;case"together":yh(S,!1,null,null,void 0,n);break;default:S.memoizedState=null}return S.child}function w0(E,S,p){if(E!==null&&(S.dependencies=E.dependencies),Zk|=S.lanes,(p&S.childLanes)===0)if(E!==null){if(h6(E,S,p,!1),(p&S.childLanes)===0)return null}else return null;if(E!==null&&S.child!==E.child)throw Error(Y(153));if(S.child!==null){E=S.child,p=Bh(E,E.pendingProps),S.child=p;for(p.return=S;E.sibling!==null;)E=E.sibling,p=p.sibling=Bh(E,E.pendingProps),p.return=S;p.sibling=null}return S.child}function Yo(E,S){if((E.lanes&S)!==0)return!0;return E=E.dependencies,E!==null&&f6(E)?!0:!1}function Kf(E,S,p){switch(S.tag){case 3:w6(S,S.stateNode.containerInfo),O6(S,F$,E.memoizedState.cache),a();break;case 27:case 5:_6(S);break;case 4:w6(S,S.stateNode.containerInfo);break;case 10:O6(S,S.type,S.memoizedProps.value);break;case 31:if(S.memoizedState!==null)return S.flags|=128,D3(S),null;break;case 13:var n=S.memoizedState;if(n!==null){if(n.dehydrated!==null)return k4(S),S.flags|=128,null;if((p&S.child.childLanes)!==0)return e3(E,S,p);return k4(S),E=w0(E,S,p),E!==null?E.sibling:null}k4(S);break;case 19:var J6=(E.flags&128)!==0;if(n=(p&S.childLanes)!==0,n||(h6(E,S,p,!1),n=(p&S.childLanes)!==0),J6){if(n)return DZ(E,S,p);S.flags|=128}if(J6=S.memoizedState,J6!==null&&(J6.rendering=null,J6.tail=null,J6.lastEffect=null),D(LH,LH.current),n)break;else return null;case 22:return S.lanes=0,S1(E,S,p,S.pendingProps);case 24:O6(S,F$,E.memoizedState.cache)}return w0(E,S,p)}function oU(E,S,p){if(E!==null)if(E.memoizedProps!==S.pendingProps)Tj=!0;else{if(!Yo(E,p)&&(S.flags&128)===0)return Tj=!1,Kf(E,S,p);Tj=(E.flags&131072)!==0?!0:!1}else Tj=!1,r9&&(S.flags&1048576)!==0&&H6(S,Jp,S.index);switch(S.lanes=0,S.tag){case 16:A:{var n=S.pendingProps;if(E=s8(S.elementType),S.type=E,typeof E==="function")sL6(E)?(n=Ow(E,n),S.tag=1,S=h1(null,S,E,n,p)):(S.tag=0,S=w2(null,S,E,n,p));else{if(E!==void 0&&E!==null){var J6=E.$$typeof;if(J6===gh){S.tag=11,S=fD(null,S,E,n,p);break A}else if(J6===$O6){S.tag=14,S=B6(null,S,E,n,p);break A}}throw S=j(E)||E,Error(Y(306,S,""))}}return S;case 0:return w2(E,S,S.type,S.pendingProps,p);case 1:return n=S.type,J6=Ow(n,S.pendingProps),h1(E,S,n,J6,p);case 3:A:{if(w6(S,S.stateNode.containerInfo),E===null)throw Error(Y(387));var E6=S.pendingProps;J6=S.memoizedState,n=J6.element,CY(E,S),DY(S,E6,null,p);var O1=S.memoizedState;if(E6=O1.cache,O6(S,F$,E6),E6!==J6.cache&&C6(S,[F$],p,!0),R9(),E6=O1.element,SX&&J6.isDehydrated)if(J6={element:E6,isDehydrated:!1,cache:O1.cache},S.updateQueue.baseState=J6,S.memoizedState=J6,S.flags&256){S=VA(E,S,E6,p);break A}else if(E6!==n){n=t(Error(Y(424)),S),X6(n),S=VA(E,S,E6,p);break A}else for(SX&&(q$=fm1(S.stateNode.containerInfo),RD=S,r9=!0,VB=null,fV=!0),p=w11(S,null,E6,p),S.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(a(),E6===n){S=w0(E,S,p);break A}Iw(E,S,E6,p)}S=S.child}return S;case 26:if(ZV)return n9(E,S),E===null?(p=VO6(S.type,null,S.pendingProps,null))?S.memoizedState=p:r9||(S.stateNode=Lm1(S.type,S.pendingProps,yD.current,S)):S.memoizedState=VO6(S.type,E.memoizedProps,S.pendingProps,E.memoizedState),null;case 27:if(EH)return _6(S),E===null&&EH&&r9&&(n=S.stateNode=NO6(S.type,S.pendingProps,yD.current,Gj.current,!1),RD=S,fV=!0,q$=Tm1(S.type,n,q$)),Iw(E,S,S.pendingProps.children,p),n9(E,S),E===null&&(S.flags|=4194304),S.child;case 5:if(E===null&&r9){if(fO6(S.type,S.pendingProps,Gj.current),J6=n=q$)n=U61(n,S.type,S.pendingProps,fV),n!==null?(S.stateNode=n,RD=S,q$=Gm1(n),fV=!1,J6=!0):J6=!1;J6||P6(S)}return _6(S),J6=S.type,E6=S.pendingProps,O1=E!==null?E.memoizedProps:null,n=E6.children,JO6(J6,E6)?n=null:O1!==null&&JO6(J6,O1)&&(S.flags|=32),S.memoizedState!==null&&(J6=Tz(E,S,NH,null,null,p),$f?Vy._currentValue=J6:Vy._currentValue2=J6),n9(E,S),Iw(E,S,n,p),S.child;case 6:if(E===null&&r9){if(Em1(S.pendingProps,Gj.current),E=p=q$)p=p61(p,S.pendingProps,fV),p!==null?(S.stateNode=p,RD=S,q$=null,E=!0):E=!1;E||P6(S)}return null;case 13:return e3(E,S,p);case 4:return w6(S,S.stateNode.containerInfo),n=S.pendingProps,E===null?S.child=Gp(S,null,n,p):Iw(E,S,n,p),S.child;case 11:return fD(E,S,S.type,S.pendingProps,p);case 7:return Iw(E,S,S.pendingProps,p),S.child;case 8:return Iw(E,S,S.pendingProps.children,p),S.child;case 12:return Iw(E,S,S.pendingProps.children,p),S.child;case 10:return n=S.pendingProps,O6(S,S.type,n.value),Iw(E,S,n.children,p),S.child;case 9:return J6=S.type._context,n=S.pendingProps.children,M6(S),J6=V6(J6),n=n(J6),S.flags|=1,Iw(E,S,n,p),S.child;case 14:return B6(E,S,S.type,S.pendingProps,p);case 15:return Q6(E,S,S.type,S.pendingProps,p);case 19:return DZ(E,S,p);case 31:return tK(E,S,p);case 22:return S1(E,S,p,S.pendingProps);case 24:return M6(S),n=V6(F$),E===null?(J6=l6(),J6===null&&(J6=_2,E6=R6(),J6.pooledCache=E6,E6.refCount++,E6!==null&&(J6.pooledCacheLanes|=p),J6=E6),S.memoizedState={parent:n,cache:J6},Gz(S),O6(S,F$,J6)):((E.lanes&p)!==0&&(CY(E,S),DY(S,null,null,p),R9()),J6=E.memoizedState,E6=S.memoizedState,J6.parent!==n?(J6={parent:n,cache:n},S.memoizedState=J6,S.lanes===0&&(S.memoizedState=S.updateQueue.baseState=J6),O6(S,F$,n)):(n=E6.cache,O6(S,F$,n),n!==J6.cache&&C6(S,[F$],p,!0))),Iw(E,S,S.pendingProps.children,p),S.child;case 29:throw S.pendingProps}throw Error(Y(156,S.tag))}function IO(E){E.flags|=4}function My(E){Ty&&(E.flags|=8)}function U76(E,S){if(E!==null&&E.child===S.child)return!1;if((S.flags&16)!==0)return!0;for(E=S.child;E!==null;){if((E.flags&8218)!==0||(E.subtreeFlags&8218)!==0)return!0;E=E.sibling}return!1}function p76(E,S,p,n){if(kD)for(p=S.child;p!==null;){if(p.tag===5||p.tag===6)vD(E,p.stateNode);else if(!(p.tag===4||EH&&p.tag===27)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===S)break;for(;p.sibling===null;){if(p.return===null||p.return===S)return;p=p.return}p.sibling.return=p.return,p=p.sibling}else if(Ty)for(var J6=S.child;J6!==null;){if(J6.tag===5){var E6=J6.stateNode;p&&n&&(E6=Wy6(E6,J6.type,J6.memoizedProps)),vD(E,E6)}else if(J6.tag===6)E6=J6.stateNode,p&&n&&(E6=DO6(E6,J6.memoizedProps)),vD(E,E6);else if(J6.tag!==4){if(J6.tag===22&&J6.memoizedState!==null)E6=J6.child,E6!==null&&(E6.return=J6),p76(E,J6,!0,!0);else if(J6.child!==null){J6.child.return=J6,J6=J6.child;continue}}if(J6===S)break;for(;J6.sibling===null;){if(J6.return===null||J6.return===S)return;J6=J6.return}J6.sibling.return=J6.return,J6=J6.sibling}}function d76(E,S,p,n){var J6=!1;if(Ty)for(var E6=S.child;E6!==null;){if(E6.tag===5){var O1=E6.stateNode;p&&n&&(O1=Wy6(O1,E6.type,E6.memoizedProps)),K46(E,O1)}else if(E6.tag===6)O1=E6.stateNode,p&&n&&(O1=DO6(O1,E6.memoizedProps)),K46(E,O1);else if(E6.tag!==4){if(E6.tag===22&&E6.memoizedState!==null)J6=E6.child,J6!==null&&(J6.return=E6),d76(E,E6,!0,!0),J6=!0;else if(E6.child!==null){E6.child.return=E6,E6=E6.child;continue}}if(E6===S)break;for(;E6.sibling===null;){if(E6.return===null||E6.return===S)return J6;E6=E6.return}E6.sibling.return=E6.return,E6=E6.sibling}return J6}function Ok(E,S){if(Ty&&U76(E,S)){E=S.stateNode;var p=E.containerInfo,n=Py6();d76(n,S,!1,!1),E.pendingChildren=n,IO(S),B61(p,n)}}function TD(E,S,p,n){if(kD)E.memoizedProps!==n&&IO(S);else if(Ty){var{stateNode:J6,memoizedProps:E6}=E;if((E=U76(E,S))||E6!==n){var O1=Gj.current;E6=Xy6(J6,p,E6,n,!E,null),E6===J6?S.stateNode=J6:(My(S),jO6(E6,p,n,O1)&&IO(S),S.stateNode=E6,E&&p76(E6,S,!1,!1))}else S.stateNode=J6}}function c76(E,S,p,n,J6){if((E.mode&32)!==0&&(p===null?$m1(S,n):y61(S,p,n))){if(E.flags|=16777216,(J6&335544128)===J6||t76(S,n))if(R61(E.stateNode,S,n))E.flags|=8192;else if(KO6())E.flags|=8192;else throw Wp=CO6,NZ}else E.flags&=-16777217}function s$6(E,S){if(ym1(S)){if(E.flags|=16777216,!s61(S))if(KO6())E.flags|=8192;else throw Wp=CO6,NZ}else E.flags&=-16777217}function Dy(E,S){S!==null&&(E.flags|=4),E.flags&16384&&(S=E.tag!==22?f():536870912,E.lanes|=S,ko|=S)}function Hk(E,S){if(!r9)switch(E.tailMode){case"hidden":S=E.tail;for(var p=null;S!==null;)S.alternate!==null&&(p=S),S=S.sibling;p===null?E.tail=null:p.sibling=null;break;case"collapsed":p=E.tail;for(var n=null;p!==null;)p.alternate!==null&&(n=p),p=p.sibling;n===null?S||E.tail===null?E.tail=null:E.tail.sibling=null:n.sibling=null}}function Hw(E){var S=E.alternate!==null&&E.alternate.child===E.child,p=0,n=0;if(S)for(var J6=E.child;J6!==null;)p|=J6.lanes|J6.childLanes,n|=J6.subtreeFlags&65011712,n|=J6.flags&65011712,J6.return=E,J6=J6.sibling;else for(J6=E.child;J6!==null;)p|=J6.lanes|J6.childLanes,n|=J6.subtreeFlags,n|=J6.flags,J6.return=E,J6=J6.sibling;return E.subtreeFlags|=n,E.childLanes=p,S}function t$6(E,S,p){var n=S.pendingProps;switch(G6(S),S.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hw(S),null;case 1:return Hw(S),null;case 3:if(p=S.stateNode,n=null,E!==null&&(n=E.memoizedState.cache),S.memoizedState.cache!==n&&(S.flags|=2048),D6(F$),j6(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),E===null||E.child===null)z6(S)?IO(S):E===null||E.memoizedState.isDehydrated&&(S.flags&256)===0||(S.flags|=1024,r());return Ok(E,S),Hw(S),null;case 26:if(ZV){var{type:J6,memoizedState:E6}=S;return E===null?(IO(S),E6!==null?(Hw(S),s$6(S,E6)):(Hw(S),c76(S,J6,null,n,p))):E6?E6!==E.memoizedState?(IO(S),Hw(S),s$6(S,E6)):(Hw(S),S.flags&=-16777217):(E6=E.memoizedProps,kD?E6!==n&&IO(S):TD(E,S,J6,n),Hw(S),c76(S,J6,E6,n,p)),null}case 27:if(EH){if(k6(S),p=yD.current,J6=S.type,E!==null&&S.stateNode!=null)kD?E.memoizedProps!==n&&IO(S):TD(E,S,J6,n);else{if(!n){if(S.stateNode===null)throw Error(Y(166));return Hw(S),null}E=Gj.current,z6(S)?A6(S,E):(E=NO6(J6,n,p,E,!0),S.stateNode=E,IO(S))}return Hw(S),null}case 5:if(k6(S),J6=S.type,E!==null&&S.stateNode!=null)TD(E,S,J6,n);else{if(!n){if(S.stateNode===null)throw Error(Y(166));return Hw(S),null}if(E6=Gj.current,z6(S))A6(S,E6),km1(S.stateNode,J6,n,E6)&&(S.flags|=64);else{var O1=k61(J6,n,yD.current,E6,S);My(S),p76(O1,S,!1,!1),S.stateNode=O1,jO6(O1,J6,n,E6)&&IO(S)}}return Hw(S),c76(S,S.type,E===null?null:E.memoizedProps,S.pendingProps,p),null;case 6:if(E&&S.stateNode!=null)p=E.memoizedProps,kD?p!==n&&IO(S):Ty&&(p!==n?(E=yD.current,p=Gj.current,My(S),S.stateNode=E61(n,E,p,S)):S.stateNode=E.stateNode);else{if(typeof n!=="string"&&S.stateNode===null)throw Error(Y(166));if(E=yD.current,p=Gj.current,z6(S)){if(!SX)throw Error(Y(176));if(E=S.stateNode,p=S.memoizedProps,n=null,J6=RD,J6!==null)switch(J6.tag){case 27:case 5:n=J6.memoizedProps}Nm1(E,p,S,n)||P6(S,!0)}else My(S),S.stateNode=E61(n,E,p,S)}return Hw(S),null;case 31:if(p=S.memoizedState,E===null||E.memoizedState!==null){if(n=z6(S),p!==null){if(E===null){if(!n)throw Error(Y(318));if(!SX)throw Error(Y(556));if(E=S.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(Y(557));PO6(E,S)}else a(),(S.flags&128)===0&&(S.memoizedState=null),S.flags|=4;Hw(S),E=!1}else p=r(),E!==null&&E.memoizedState!==null&&(E.memoizedState.hydrationErrors=p),E=!0;if(!E){if(S.flags&256)return H5(S),S;return H5(S),null}if((S.flags&128)!==0)throw Error(Y(558))}return Hw(S),null;case 13:if(n=S.memoizedState,E===null||E.memoizedState!==null&&E.memoizedState.dehydrated!==null){if(J6=z6(S),n!==null&&n.dehydrated!==null){if(E===null){if(!J6)throw Error(Y(318));if(!SX)throw Error(Y(344));if(J6=S.memoizedState,J6=J6!==null?J6.dehydrated:null,!J6)throw Error(Y(317));Jo(J6,S)}else a(),(S.flags&128)===0&&(S.memoizedState=null),S.flags|=4;Hw(S),J6=!1}else J6=r(),E!==null&&E.memoizedState!==null&&(E.memoizedState.hydrationErrors=J6),J6=!0;if(!J6){if(S.flags&256)return H5(S),S;return H5(S),null}}if(H5(S),(S.flags&128)!==0)return S.lanes=p,S;return p=n!==null,E=E!==null&&E.memoizedState!==null,p&&(n=S.child,J6=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(J6=n.alternate.memoizedState.cachePool.pool),E6=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(E6=n.memoizedState.cachePool.pool),E6!==J6&&(n.flags|=2048)),p!==E&&p&&(S.child.flags|=8192),Dy(S,S.updateQueue),Hw(S),null;case 4:return j6(),Ok(E,S),E===null&&zm1(S.stateNode.containerInfo),Hw(S),null;case 10:return D6(S.type),Hw(S),null;case 19:if(M(LH),n=S.memoizedState,n===null)return Hw(S),null;if(J6=(S.flags&128)!==0,E6=n.rendering,E6===null)if(J6)Hk(n,!1);else{if(bO!==0||E!==null&&(E.flags&128)!==0)for(E=S.child;E!==null;){if(E6=PY(E),E6!==null){S.flags|=128,Hk(n,!1),E=E6.updateQueue,S.updateQueue=E,Dy(S,E),S.subtreeFlags=0,E=p;for(p=S.child;p!==null;)Z61(p,E),p=p.sibling;return D(LH,LH.current&1|2),r9&&s(S,n.treeForkCount),S.child}E=E.sibling}n.tail!==null&&VZ()>P46&&(S.flags|=128,J6=!0,Hk(n,!1),S.lanes=4194304)}else{if(!J6)if(E=PY(E6),E!==null){if(S.flags|=128,J6=!0,E=E.updateQueue,S.updateQueue=E,Dy(S,E),Hk(n,!0),n.tail===null&&n.tailMode==="hidden"&&!E6.alternate&&!r9)return Hw(S),null}else 2*VZ()-n.renderingStartTime>P46&&p!==536870912&&(S.flags|=128,J6=!0,Hk(n,!1),S.lanes=4194304);n.isBackwards?(E6.sibling=S.child,S.child=E6):(E=n.last,E!==null?E.sibling=E6:S.child=E6,n.last=E6)}if(n.tail!==null)return E=n.tail,n.rendering=E,n.tail=E.sibling,n.renderingStartTime=VZ(),E.sibling=null,p=LH.current,D(LH,J6?p&1|2:p&1),r9&&s(S,n.treeForkCount),E;return Hw(S),null;case 22:case 23:return H5(S),H_(),n=S.memoizedState!==null,E!==null?E.memoizedState!==null!==n&&(S.flags|=8192):n&&(S.flags|=8192),n?(p&536870912)!==0&&(S.flags&128)===0&&(Hw(S),S.subtreeFlags&6&&(S.flags|=8192)):Hw(S),p=S.updateQueue,p!==null&&Dy(S,p.retryQueue),p=null,E!==null&&E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(p=E.memoizedState.cachePool.pool),n=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(n=S.memoizedState.cachePool.pool),n!==p&&(S.flags|=2048),E!==null&&M(Pp),null;case 24:return p=null,E!==null&&(p=E.memoizedState.cache),S.memoizedState.cache!==p&&(S.flags|=2048),D6(F$),Hw(S),null;case 25:return null;case 30:return null}throw Error(Y(156,S.tag))}function Xy(E,S){switch(G6(S),S.tag){case 1:return E=S.flags,E&65536?(S.flags=E&-65537|128,S):null;case 3:return D6(F$),j6(),E=S.flags,(E&65536)!==0&&(E&128)===0?(S.flags=E&-65537|128,S):null;case 26:case 27:case 5:return k6(S),null;case 31:if(S.memoizedState!==null){if(H5(S),S.alternate===null)throw Error(Y(340));a()}return E=S.flags,E&65536?(S.flags=E&-65537|128,S):null;case 13:if(H5(S),E=S.memoizedState,E!==null&&E.dehydrated!==null){if(S.alternate===null)throw Error(Y(340));a()}return E=S.flags,E&65536?(S.flags=E&-65537|128,S):null;case 19:return M(LH),null;case 4:return j6(),null;case 10:return D6(S.type),null;case 22:case 23:return H5(S),H_(),E!==null&&M(Pp),E=S.flags,E&65536?(S.flags=E&-65537|128,S):null;case 24:return D6(F$),null;case 25:return null;default:return null}}function K8(E,S){switch(G6(S),S.tag){case 3:D6(F$),j6();break;case 26:case 27:case 5:k6(S);break;case 4:j6();break;case 31:S.memoizedState!==null&&H5(S);break;case 13:H5(S);break;case 19:M(LH);break;case 10:D6(S.type);break;case 22:case 23:H5(S),H_(),E!==null&&M(Pp);break;case 24:D6(F$)}}function zA(E,S){try{var p=S.updateQueue,n=p!==null?p.lastEffect:null;if(n!==null){var J6=n.next;p=J6;do{if((p.tag&E)===E){n=void 0;var{create:E6,inst:O1}=p;n=E6(),O1.destroy=n}p=p.next}while(p!==J6)}}catch(p1){j5(S,S.return,p1)}}function F8(E,S,p){try{var n=S.updateQueue,J6=n!==null?n.lastEffect:null;if(J6!==null){var E6=J6.next;n=E6;do{if((n.tag&E)===E){var O1=n.inst,p1=O1.destroy;if(p1!==void 0){O1.destroy=void 0,J6=S;var a8=p,gA=p1;try{gA()}catch(i7){j5(J6,a8,i7)}}}n=n.next}while(n!==E6)}}catch(i7){j5(S,S.return,i7)}}function Z4(E){var S=E.updateQueue;if(S!==null){var p=E.stateNode;try{B$(S,p)}catch(n){j5(E,E.return,n)}}}function TK(E,S,p){p.props=Ow(E.type,E.memoizedProps),p.state=E.memoizedState;try{p.componentWillUnmount()}catch(n){j5(E,S,n)}}function u5(E,S){try{var p=E.ref;if(p!==null){switch(E.tag){case 26:case 27:case 5:var n=Ho(E.stateNode);break;case 30:n=E.stateNode;break;default:n=E.stateNode}typeof p==="function"?E.refCleanup=p(n):p.current=n}}catch(J6){j5(E,S,J6)}}function rY(E,S){var{ref:p,refCleanup:n}=E;if(p!==null)if(typeof n==="function")try{n()}catch(J6){j5(E,S,J6)}finally{E.refCleanup=null,E=E.alternate,E!=null&&(E.refCleanup=null)}else if(typeof p==="function")try{p(null)}catch(J6){j5(E,S,J6)}else p.current=null}function Nz(E){var{type:S,memoizedProps:p,stateNode:n}=E;try{A46(n,S,p,E)}catch(J6){j5(E,E.return,J6)}}function Rh(E,S,p){try{b61(E.stateNode,E.type,p,S,E)}catch(n){j5(E,E.return,n)}}function l76(E){return E.tag===5||E.tag===3||(ZV?E.tag===26:!1)||(EH?E.tag===27&&Qq(E.type):!1)||E.tag===4}function VD(E){A:for(;;){for(;E.sibling===null;){if(E.return===null||l76(E.return))return null;E=E.return}E.sibling.return=E.return;for(E=E.sibling;E.tag!==5&&E.tag!==6&&E.tag!==18;){if(EH&&E.tag===27&&Qq(E.type))continue A;if(E.flags&2)continue A;if(E.child===null||E.tag===4)continue A;else E.child.return=E,E=E.child}if(!(E.flags&2))return E.stateNode}}function Sh(E,S,p){var n=E.tag;if(n===5||n===6)E=E.stateNode,S?Xm1(p,E,S):Jm1(p,E);else if(n!==4&&(EH&&n===27&&Qq(E.type)&&(p=E.stateNode,S=null),E=E.child,E!==null))for(Sh(E,S,p),E=E.sibling;E!==null;)Sh(E,S,p),E=E.sibling}function zo(E,S,p){var n=E.tag;if(n===5||n===6)E=E.stateNode,S?Dm1(p,E,S):B5(p,E);else if(n!==4&&(EH&&n===27&&Qq(E.type)&&(p=E.stateNode),E=E.child,E!==null))for(zo(E,S,p),E=E.sibling;E!==null;)zo(E,S,p),E=E.sibling}function jw(E,S,p){E=E.containerInfo;try{MO6(E,p)}catch(n){j5(S,S.return,n)}}function aU(E){var{stateNode:S,memoizedProps:p}=E;try{Ty6(E.type,p,S,E)}catch(n){j5(E,E.return,n)}}function sU(E,S){HO6(E.containerInfo);for($M=S;$M!==null;)if(E=$M,S=E.child,(E.subtreeFlags&1028)!==0&&S!==null)S.return=E,$M=S;else for(;$M!==null;){E=$M;var p=E.alternate;switch(S=E.flags,E.tag){case 0:if((S&4)!==0&&(S=E.updateQueue,S=S!==null?S.events:null,S!==null))for(var n=0;n<S.length;n++){var J6=S[n];J6.ref.impl=J6.nextImpl}break;case 11:case 15:break;case 1:if((S&1024)!==0&&p!==null){S=void 0,n=E,J6=p.memoizedProps,p=p.memoizedState;var E6=n.stateNode;try{var O1=Ow(n.type,J6);S=E6.getSnapshotBeforeUpdate(O1,p),E6.__reactInternalSnapshotBeforeUpdate=S}catch(p1){j5(n,n.return,p1)}}break;case 3:(S&1024)!==0&&kD&&GB(E.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((S&1024)!==0)throw Error(Y(163))}if(S=E.sibling,S!==null){S.return=E.return,$M=S;break}$M=E.return}}function IY(E,S,p){var n=p.flags;switch(p.tag){case 0:case 11:case 15:WZ(E,p),n&4&&zA(5,p);break;case 1:if(WZ(E,p),n&4)if(E=p.stateNode,S===null)try{E.componentDidMount()}catch(O1){j5(p,p.return,O1)}else{var J6=Ow(p.type,S.memoizedProps);S=S.memoizedState;try{E.componentDidUpdate(J6,S,E.__reactInternalSnapshotBeforeUpdate)}catch(O1){j5(p,p.return,O1)}}n&64&&Z4(p),n&512&&u5(p,p.return);break;case 3:if(WZ(E,p),n&64&&(n=p.updateQueue,n!==null)){if(E=null,p.child!==null)switch(p.child.tag){case 27:case 5:E=Ho(p.child.stateNode);break;case 1:E=p.child.stateNode}try{B$(n,E)}catch(O1){j5(p,p.return,O1)}}break;case 27:EH&&S===null&&n&4&&aU(p);case 26:case 5:if(WZ(E,p),S===null){if(n&4)Nz(p);else if(n&64){E=p.type,S=p.memoizedProps,J6=p.stateNode;try{vm1(J6,E,S,p)}catch(O1){j5(p,p.return,O1)}}}n&512&&u5(p,p.return);break;case 12:WZ(E,p);break;case 31:WZ(E,p),n&4&&Jk(E,p);break;case 13:WZ(E,p),n&4&&e$6(E,p),n&64&&(n=p.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(p=zO6.bind(null,p),fB(n,p))));break;case 22:if(n=p.memoizedState!==null||lh,!n){S=S!==null&&S.memoizedState!==null||Vj,J6=lh;var E6=Vj;lh=n,(Vj=S)&&!E6?ZZ(E,p,(p.subtreeFlags&8772)!==0):WZ(E,p),lh=J6,Vj=E6}break;case 30:break;default:WZ(E,p)}}function i76(E){var S=E.alternate;S!==null&&(E.alternate=null,i76(S)),E.child=null,E.deletions=null,E.sibling=null,E.tag===5&&(S=E.stateNode,S!==null&&_m1(S)),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 XZ(E,S,p){for(p=p.child;p!==null;)jk(E,S,p),p=p.sibling}function jk(E,S,p){if(jf&&typeof jf.onCommitFiberUnmount==="function")try{jf.onCommitFiberUnmount(O46,p)}catch(E6){}switch(p.tag){case 26:if(ZV){Vj||rY(p,S),XZ(E,S,p),p.memoizedState?Zy6(p.memoizedState):p.stateNode&&fy6(p.stateNode);break}case 27:if(EH){Vj||rY(p,S);var n=Q$,J6=vZ;Qq(p.type)&&(Q$=p.stateNode,vZ=!1),XZ(E,S,p),_46(p.stateNode),Q$=n,vZ=J6;break}case 5:Vj||rY(p,S);case 6:if(kD){if(n=Q$,J6=vZ,Q$=null,XZ(E,S,p),Q$=n,vZ=J6,Q$!==null)if(vZ)try{Pm1(Q$,p.stateNode)}catch(E6){j5(p,S,E6)}else try{WV(Q$,p.stateNode)}catch(E6){j5(p,S,E6)}}else XZ(E,S,p);break;case 18:kD&&Q$!==null&&(vZ?WO6(Q$,p.stateNode):n61(Q$,p.stateNode));break;case 4:kD?(n=Q$,J6=vZ,Q$=p.stateNode.containerInfo,vZ=!0,XZ(E,S,p),Q$=n,vZ=J6):(Ty&&jw(p.stateNode,p,Py6()),XZ(E,S,p));break;case 0:case 11:case 14:case 15:F8(2,p,S),Vj||F8(4,p,S),XZ(E,S,p);break;case 1:Vj||(rY(p,S),n=p.stateNode,typeof n.componentWillUnmount==="function"&&TK(p,S,n)),XZ(E,S,p);break;case 21:XZ(E,S,p);break;case 22:Vj=(n=Vj)||p.memoizedState!==null,XZ(E,S,p),Vj=n;break;default:XZ(E,S,p)}}function Jk(E,S){if(SX&&S.memoizedState===null&&(E=S.alternate,E!==null&&(E=E.memoizedState,E!==null))){E=E.dehydrated;try{Mo(E)}catch(p){j5(S,S.return,p)}}}function e$6(E,S){if(SX&&S.memoizedState===null&&(E=S.alternate,E!==null&&(E=E.memoizedState,E!==null&&(E=E.dehydrated,E!==null))))try{z46(E)}catch(p){j5(S,S.return,p)}}function PZ(E){switch(E.tag){case 31:case 13:case 19:var S=E.stateNode;return S===null&&(S=E.stateNode=new my6),S;case 22:return E=E.stateNode,S=E._retryCache,S===null&&(S=E._retryCache=new my6),S;default:throw Error(Y(435,E.tag))}}function Ch(E,S){var p=PZ(E);S.forEach(function(n){if(!p.has(n)){p.add(n);var J6=W61.bind(null,E,n);n.then(J6,J6)}})}function M_(E,S){var p=S.deletions;if(p!==null)for(var n=0;n<p.length;n++){var J6=p[n],E6=E,O1=S;if(kD){var p1=O1;A:for(;p1!==null;){switch(p1.tag){case 27:if(EH){if(Qq(p1.type)){Q$=p1.stateNode,vZ=!1;break A}break}case 5:Q$=p1.stateNode,vZ=!1;break A;case 3:case 4:Q$=p1.stateNode.containerInfo,vZ=!0;break A}p1=p1.return}if(Q$===null)throw Error(Y(160));jk(E6,O1,J6),Q$=null,vZ=!1}else jk(E6,O1,J6);E6=J6.alternate,E6!==null&&(E6.return=null),J6.return=null}if(S.subtreeFlags&13886)for(S=S.child;S!==null;)MB(S,E),S=S.sibling}function MB(E,S){var{alternate:p,flags:n}=E;switch(E.tag){case 0:case 11:case 14:case 15:M_(S,E),jJ(E),n&4&&(F8(3,E,E.return),zA(3,E),F8(5,E,E.return));break;case 1:M_(S,E),jJ(E),n&512&&(Vj||p===null||rY(p,p.return)),n&64&&lh&&(E=E.updateQueue,E!==null&&(n=E.callbacks,n!==null&&(p=E.shared.hiddenCallbacks,E.shared.hiddenCallbacks=p===null?n:p.concat(n))));break;case 26:if(ZV){var J6=Wk;if(M_(S,E),jJ(E),n&512&&(Vj||p===null||rY(p,p.return)),n&4){n=p!==null?p.memoizedState:null;var E6=E.memoizedState;p===null?E6===null?E.stateNode===null?E.stateNode=Qh(J6,E.type,E.memoizedProps,E):Gy6(J6,E.type,E.stateNode):E.stateNode=o61(J6,E6,E.memoizedProps):n!==E6?(n===null?p.stateNode!==null&&fy6(p.stateNode):Zy6(n),E6===null?Gy6(J6,E.type,E.stateNode):o61(J6,E6,E.memoizedProps)):E6===null&&E.stateNode!==null&&Rh(E,E.memoizedProps,p.memoizedProps)}break}case 27:if(EH){M_(S,E),jJ(E),n&512&&(Vj||p===null||rY(p,p.return)),p!==null&&n&4&&Rh(E,E.memoizedProps,p.memoizedProps);break}case 5:if(M_(S,E),jJ(E),n&512&&(Vj||p===null||rY(p,p.return)),kD){if(E.flags&32){J6=E.stateNode;try{q46(J6)}catch(N7){j5(E,E.return,N7)}}n&4&&E.stateNode!=null&&(J6=E.memoizedProps,Rh(E,J6,p!==null?p.memoizedProps:J6)),n&1024&&(By6=!0)}else Ty&&E.alternate!==null&&(E.alternate.stateNode=E.stateNode);break;case 6:if(M_(S,E),jJ(E),n&4&&kD){if(E.stateNode===null)throw Error(Y(162));n=E.memoizedProps,p=p!==null?p.memoizedProps:n,J6=E.stateNode;try{Mm1(J6,p,n)}catch(N7){j5(E,E.return,N7)}}break;case 3:if(ZV?(a61(),J6=Wk,Wk=TO6(S.containerInfo),M_(S,E),Wk=J6):M_(S,E),jJ(E),n&4){if(kD&&SX&&p!==null&&p.memoizedState.isDehydrated)try{l61(S.containerInfo)}catch(N7){j5(E,E.return,N7)}if(Ty){n=S.containerInfo,p=S.pendingChildren;try{MO6(n,p)}catch(N7){j5(E,E.return,N7)}}}By6&&(By6=!1,_0(E));break;case 4:ZV?(p=Wk,Wk=TO6(E.stateNode.containerInfo),M_(S,E),jJ(E),Wk=p):(M_(S,E),jJ(E)),n&4&&Ty&&jw(E.stateNode,E,E.stateNode.pendingChildren);break;case 12:M_(S,E),jJ(E);break;case 31:M_(S,E),jJ(E),n&4&&(n=E.updateQueue,n!==null&&(E.updateQueue=null,Ch(E,n)));break;case 13:M_(S,E),jJ(E),E.child.flags&8192&&E.memoizedState!==null!==(p!==null&&p.memoizedState!==null)&&(UO6=VZ()),n&4&&(n=E.updateQueue,n!==null&&(E.updateQueue=null,Ch(E,n)));break;case 22:J6=E.memoizedState!==null;var O1=p!==null&&p.memoizedState!==null,p1=lh,a8=Vj;if(lh=p1||J6,Vj=a8||O1,M_(S,E),Vj=a8,lh=p1,jJ(E),n&8192&&(S=E.stateNode,S._visibility=J6?S._visibility&-2:S._visibility|1,J6&&(p===null||O1||lh||Vj||JJ(E)),kD))A:if(p=null,kD)for(S=E;;){if(S.tag===5||ZV&&S.tag===26){if(p===null){O1=p=S;try{E6=O1.stateNode,J6?Dy6(E6):u61(O1.stateNode,O1.memoizedProps)}catch(N7){j5(O1,O1.return,N7)}}}else if(S.tag===6){if(p===null){O1=S;try{var gA=O1.stateNode;J6?x61(gA):Of(gA,O1.memoizedProps)}catch(N7){j5(O1,O1.return,N7)}}}else if(S.tag===18){if(p===null){O1=S;try{var i7=O1.stateNode;J6?r61(i7):ZO6(O1.stateNode)}catch(N7){j5(O1,O1.return,N7)}}}else if((S.tag!==22&&S.tag!==23||S.memoizedState===null||S===E)&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===E)break A;for(;S.sibling===null;){if(S.return===null||S.return===E)break A;p===S&&(p=null),S=S.return}p===S&&(p=null),S.sibling.return=S.return,S=S.sibling}n&4&&(n=E.updateQueue,n!==null&&(p=n.retryQueue,p!==null&&(n.retryQueue=null,Ch(E,p))));break;case 19:M_(S,E),jJ(E),n&4&&(n=E.updateQueue,n!==null&&(E.updateQueue=null,Ch(E,n)));break;case 30:break;case 21:break;default:M_(S,E),jJ(E)}}function jJ(E){var S=E.flags;if(S&2){try{for(var p,n=E.return;n!==null;){if(l76(n)){p=n;break}n=n.return}if(kD){if(p==null)throw Error(Y(160));switch(p.tag){case 27:if(EH){var J6=p.stateNode,E6=VD(E);zo(E,E6,J6);break}case 5:var O1=p.stateNode;p.flags&32&&(q46(O1),p.flags&=-33);var p1=VD(E);zo(E,p1,O1);break;case 3:case 4:var a8=p.stateNode.containerInfo,gA=VD(E);Sh(E,gA,a8);break;default:throw Error(Y(161))}}}catch(i7){j5(E,E.return,i7)}E.flags&=-3}S&4096&&(E.flags&=-4097)}function _0(E){if(E.subtreeFlags&1024)for(E=E.child;E!==null;){var S=E;_0(S),S.tag===5&&S.flags&1024&&Om1(S.stateNode),E=E.sibling}}function WZ(E,S){if(S.subtreeFlags&8772)for(S=S.child;S!==null;)IY(E,S.alternate,S),S=S.sibling}function JJ(E){for(E=E.child;E!==null;){var S=E;switch(S.tag){case 0:case 11:case 14:case 15:F8(4,S,S.return),JJ(S);break;case 1:rY(S,S.return);var p=S.stateNode;typeof p.componentWillUnmount==="function"&&TK(S,S.return,p),JJ(S);break;case 27:EH&&_46(S.stateNode);case 26:case 5:rY(S,S.return),JJ(S);break;case 22:S.memoizedState===null&&JJ(S);break;case 30:JJ(S);break;default:JJ(S)}E=E.sibling}}function ZZ(E,S,p){p=p&&(S.subtreeFlags&8772)!==0;for(S=S.child;S!==null;){var n=S.alternate,J6=E,E6=S,O1=E6.flags;switch(E6.tag){case 0:case 11:case 15:ZZ(J6,E6,p),zA(4,E6);break;case 1:if(ZZ(J6,E6,p),n=E6,J6=n.stateNode,typeof J6.componentDidMount==="function")try{J6.componentDidMount()}catch(gA){j5(n,n.return,gA)}if(n=E6,J6=n.updateQueue,J6!==null){var p1=n.stateNode;try{var a8=J6.shared.hiddenCallbacks;if(a8!==null)for(J6.shared.hiddenCallbacks=null,J6=0;J6<a8.length;J6++)Rw(a8[J6],p1)}catch(gA){j5(n,n.return,gA)}}p&&O1&64&&Z4(E6),u5(E6,E6.return);break;case 27:EH&&aU(E6);case 26:case 5:ZZ(J6,E6,p),p&&n===null&&O1&4&&Nz(E6),u5(E6,E6.return);break;case 12:ZZ(J6,E6,p);break;case 31:ZZ(J6,E6,p),p&&O1&4&&Jk(J6,E6);break;case 13:ZZ(J6,E6,p),p&&O1&4&&e$6(J6,E6);break;case 22:E6.memoizedState===null&&ZZ(J6,E6,p),u5(E6,E6.return);break;case 30:break;default:ZZ(J6,E6,p)}S=S.sibling}}function wo(E,S){var p=null;E!==null&&E.memoizedState!==null&&E.memoizedState.cachePool!==null&&(p=E.memoizedState.cachePool.pool),E=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(E=S.memoizedState.cachePool.pool),E!==p&&(E!=null&&E.refCount++,p!=null&&x6(p))}function hh(E,S){E=null,S.alternate!==null&&(E=S.alternate.memoizedState.cache),S=S.memoizedState.cache,S!==E&&(S.refCount++,E!=null&&x6(E))}function Wj(E,S,p,n){if(S.subtreeFlags&10256)for(S=S.child;S!==null;)DB(E,S,p,n),S=S.sibling}function DB(E,S,p,n){var J6=S.flags;switch(S.tag){case 0:case 11:case 15:Wj(E,S,p,n),J6&2048&&zA(9,S);break;case 1:Wj(E,S,p,n);break;case 3:Wj(E,S,p,n),J6&2048&&(E=null,S.alternate!==null&&(E=S.alternate.memoizedState.cache),S=S.memoizedState.cache,S!==E&&(S.refCount++,E!=null&&x6(E)));break;case 12:if(J6&2048){Wj(E,S,p,n),E=S.stateNode;try{var E6=S.memoizedProps,O1=E6.id,p1=E6.onPostCommit;typeof p1==="function"&&p1(O1,S.alternate===null?"mount":"update",E.passiveEffectDuration,-0)}catch(a8){j5(S,S.return,a8)}}else Wj(E,S,p,n);break;case 31:Wj(E,S,p,n);break;case 13:Wj(E,S,p,n);break;case 23:break;case 22:E6=S.stateNode,O1=S.alternate,S.memoizedState!==null?E6._visibility&2?Wj(E,S,p,n):tU(E,S):E6._visibility&2?Wj(E,S,p,n):(E6._visibility|=2,Ih(E,S,p,n,(S.subtreeFlags&10256)!==0||!1)),J6&2048&&wo(O1,S);break;case 24:Wj(E,S,p,n),J6&2048&&hh(S.alternate,S);break;default:Wj(E,S,p,n)}}function Ih(E,S,p,n,J6){J6=J6&&((S.subtreeFlags&10256)!==0||!1);for(S=S.child;S!==null;){var E6=E,O1=S,p1=p,a8=n,gA=O1.flags;switch(O1.tag){case 0:case 11:case 15:Ih(E6,O1,p1,a8,J6),zA(8,O1);break;case 23:break;case 22:var i7=O1.stateNode;O1.memoizedState!==null?i7._visibility&2?Ih(E6,O1,p1,a8,J6):tU(E6,O1):(i7._visibility|=2,Ih(E6,O1,p1,a8,J6)),J6&&gA&2048&&wo(O1.alternate,O1);break;case 24:Ih(E6,O1,p1,a8,J6),J6&&gA&2048&&hh(O1.alternate,O1);break;default:Ih(E6,O1,p1,a8,J6)}S=S.sibling}}function tU(E,S){if(S.subtreeFlags&10256)for(S=S.child;S!==null;){var p=E,n=S,J6=n.flags;switch(n.tag){case 22:tU(p,n),J6&2048&&wo(n.alternate,n);break;case 24:tU(p,n),J6&2048&&hh(n.alternate,n);break;default:tU(p,n)}S=S.sibling}}function bh(E,S,p){if(E.subtreeFlags&No)for(E=E.child;E!==null;)eU(E,S,p),E=E.sibling}function eU(E,S,p){switch(E.tag){case 26:if(bh(E,S,p),E.flags&No)if(E.memoizedState!==null)Uh(p,Wk,E.memoizedState,E.memoizedProps);else{var{stateNode:n,type:J6}=E;E=E.memoizedProps,((S&335544128)===S||t76(J6,E))&&Hy6(p,n,J6,E)}break;case 5:bh(E,S,p),E.flags&No&&(n=E.stateNode,J6=E.type,E=E.memoizedProps,((S&335544128)===S||t76(J6,E))&&Hy6(p,n,J6,E));break;case 3:case 4:ZV?(n=Wk,Wk=TO6(E.stateNode.containerInfo),bh(E,S,p),Wk=n):bh(E,S,p);break;case 22:E.memoizedState===null&&(n=E.alternate,n!==null&&n.memoizedState!==null?(n=No,No=16777216,bh(E,S,p),No=n):bh(E,S,p));break;default:bh(E,S,p)}}function Ap(E){var S=E.alternate;if(S!==null&&(E=S.child,E!==null)){S.child=null;do S=E.sibling,E.sibling=null,E=S;while(E!==null)}}function Mk(E){var S=E.deletions;if((E.flags&16)!==0){if(S!==null)for(var p=0;p<S.length;p++){var n=S[p];$M=n,n76(n,E)}Ap(E)}if(E.subtreeFlags&10256)for(E=E.child;E!==null;)oL6(E),E=E.sibling}function oL6(E){switch(E.tag){case 0:case 11:case 15:Mk(E),E.flags&2048&&F8(9,E,E.return);break;case 3:Mk(E);break;case 12:Mk(E);break;case 22:var S=E.stateNode;E.memoizedState!==null&&S._visibility&2&&(E.return===null||E.return.tag!==13)?(S._visibility&=-3,qp(E)):Mk(E);break;default:Mk(E)}}function qp(E){var S=E.deletions;if((E.flags&16)!==0){if(S!==null)for(var p=0;p<S.length;p++){var n=S[p];$M=n,n76(n,E)}Ap(E)}for(E=E.child;E!==null;){switch(S=E,S.tag){case 0:case 11:case 15:F8(8,S,S.return),qp(S);break;case 22:p=S.stateNode,p._visibility&2&&(p._visibility&=-3,qp(S));break;default:qp(S)}E=E.sibling}}function n76(E,S){for(;$M!==null;){var p=$M;switch(p.tag){case 0:case 11:case 15:F8(8,p,S);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var n=p.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:x6(p.memoizedState.cache)}if(n=p.child,n!==null)n.return=p,$M=n;else A:for(p=E;$M!==null;){n=$M;var{sibling:J6,return:E6}=n;if(i76(n),n===p){$M=null;break A}if(J6!==null){J6.return=E6,$M=J6;break A}$M=E6}}}function _o(E){var S=s76(E);if(S!=null){if(typeof S.memoizedProps["data-testname"]!=="string")throw Error(Y(364));return S}if(E=I61(E),E===null)throw Error(Y(362));return E.stateNode.current}function Jw(E,S){var p=E.tag;switch(S.$$typeof){case BO6:if(E.type===S.value)return!0;break;case mO6:A:{S=S.value,E=[E,0];for(p=0;p<E.length;){var n=E[p++],J6=n.tag,E6=E[p++],O1=S[E6];if(J6!==5&&J6!==26&&J6!==27||!jo(n)){for(;O1!=null&&Jw(n,O1);)E6++,O1=S[E6];if(E6===S.length){S=!0;break A}else for(n=n.child;n!==null;)E.push(n,E6),n=n.sibling}}S=!1}return S;case gO6:if((p===5||p===26||p===27)&&Jy6(E.stateNode,S.value))return!0;break;case QO6:if(p===5||p===6||p===26||p===27){if(E=jy6(E),E!==null&&0<=E.indexOf(S.value))return!0}break;case FO6:if(p===5||p===26||p===27){if(E=E.memoizedProps["data-testname"],typeof E==="string"&&E.toLowerCase()===S.value.toLowerCase())return!0}break;default:throw Error(Y(365))}return!1}function e_(E){switch(E.$$typeof){case BO6:return"<"+(j(E.value)||"Unknown")+">";case mO6:return":has("+(e_(E)||"")+")";case gO6:return'[role="'+E.value+'"]';case QO6:return'"'+E.value+'"';case FO6:return'[data-testname="'+E.value+'"]';default:throw Error(Y(365))}}function AO6(E,S){var p=[];E=[E,0];for(var n=0;n<E.length;){var J6=E[n++],E6=J6.tag,O1=E[n++],p1=S[O1];if(E6!==5&&E6!==26&&E6!==27||!jo(J6)){for(;p1!=null&&Jw(J6,p1);)O1++,p1=S[O1];if(O1===S.length)p.push(J6);else for(J6=J6.child;J6!==null;)E.push(J6,O1),J6=J6.sibling}}return p}function r76(E,S){if(!e76)throw Error(Y(363));E=_o(E),E=AO6(E,S),S=[],E=Array.from(E);for(var p=0;p<E.length;){var n=E[p++],J6=n.tag;if(J6===5||J6===26||J6===27)jo(n)||S.push(n.stateNode);else for(n=n.child;n!==null;)E.push(n),n=n.sibling}return S}function yX(){return(D9&2)!==0&&I9!==0?I9&-I9:VK.T!==null?v6():L61()}function qO6(){if(Df===0)if((I9&536870912)===0||r9){var E=vO6;vO6<<=1,(vO6&3932160)===0&&(vO6=262144),Df=E}else Df=536870912;return E=Mf.current,E!==null&&(E.flags|=32),Df}function wM(E,S,p){if(E===_2&&(Mw===2||Mw===9)||E.cancelPendingCommit!==null)Yf(E,0),RX(E,I9,Df,!1);if(N(E,p),(D9&2)===0||E!==_2)E===_2&&((D9&2)===0&&(Tp|=p),bO===4&&RX(E,I9,Df,!1)),t6(E)}function xh(E,S,p){if((D9&6)!==0)throw Error(Y(327));var n=!p&&(S&127)===0&&(S&E.expiredLanes)===0||Z(E,S),J6=n?x7(E,S):l7(E,S,!0),E6=n;do{if(J6===0){vo&&!n&&RX(E,S,0,!1);break}else{if(p=E.current.alternate,E6&&!XB(p)){J6=l7(E,S,!1),E6=!1;continue}if(J6===2){if(E6=S,E.errorRecoveryDisabledLanes&E6)var O1=0;else O1=E.pendingLanes&-536870913,O1=O1!==0?O1:O1&536870912?536870912:0;if(O1!==0){S=O1;A:{var p1=E;J6=X46;var a8=SX&&p1.current.memoizedState.isDehydrated;if(a8&&(Yf(p1,O1).flags|=256),O1=l7(p1,O1,!1),O1!==2){if(gy6&&!a8){p1.errorRecoveryDisabledLanes|=E6,Tp|=E6,J6=4;break A}E6=EZ,EZ=J6,E6!==null&&(EZ===null?EZ=E6:EZ.push.apply(EZ,E6))}J6=O1}if(E6=!1,J6!==2)continue}}if(J6===1){Yf(E,0),RX(E,S,0,!0);break}A:{switch(n=E,E6=J6,E6){case 0:case 1:throw Error(Y(345));case 4:if((S&4194048)!==S)break;case 6:RX(n,S,Df,!ih);break A;case 2:EZ=null;break;case 3:case 5:break;default:throw Error(Y(329))}if((S&62914560)===S&&(J6=UO6+300-VZ(),10<J6)){if(RX(n,S,Df,!ih),W(n,0,!0)!==0)break A;fk=S,n.timeoutHandle=Ym1($o.bind(null,n,p,EZ,pO6,Qy6,S,Df,Tp,ko,ih,E6,"Throttled",-0,0),J6);break A}$o(n,p,EZ,pO6,Qy6,S,Df,Tp,ko,ih,E6,null,-0,0)}}break}while(1);t6(E)}function $o(E,S,p,n,J6,E6,O1,p1,a8,gA,i7,N7,h4,F3){if(E.timeoutHandle=_p,N7=S.subtreeFlags,N7&8192||(N7&16785408)===16785408){N7=Oy6(),eU(S,E6,N7);var SD=(E6&62914560)===E6?UO6-VZ():(E6&4194048)===E6?$11-VZ():0;if(SD=S61(N7,SD),SD!==null){fk=E6,E.cancelPendingCommit=SD(Zj.bind(null,E,S,E6,p,n,J6,O1,p1,a8,i7,N7,null,h4,F3)),RX(E,E6,O1,!gA);return}}Zj(E,S,E6,p,n,J6,O1,p1,a8)}function XB(E){for(var S=E;;){var p=S.tag;if((p===0||p===11||p===15)&&S.flags&16384&&(p=S.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var n=0;n<p.length;n++){var J6=p[n],E6=J6.getSnapshot;J6=J6.value;try{if(!LD(E6(),J6))return!1}catch(O1){return!1}}if(p=S.child,S.subtreeFlags&16384&&p!==null)p.return=S,S=p;else{if(S===E)break;for(;S.sibling===null;){if(S.return===null||S.return===E)return!0;S=S.return}S.sibling.return=S.return,S=S.sibling}}return!0}function RX(E,S,p,n){S&=~Fy6,S&=~Tp,E.suspendedLanes|=S,E.pingedLanes&=~S,n&&(E.warmLanes|=S),n=E.expirationTimes;for(var J6=S;0<J6;){var E6=31-Hf(J6),O1=1<<E6;n[E6]=-1,J6&=~O1}p!==0&&y(E,p,S)}function GZ(){return(D9&6)===0?(L6(0,!1),!1):!0}function uh(){if(X9!==null){if(Mw===0)var E=X9.return;else E=X9,dh=Mp=null,R1(E),Zp=null,j46=0,E=X9;for(;E!==null;)K8(E.alternate,E),E=E.return;X9=null}}function Yf(E,S){var p=E.timeoutHandle;p!==_p&&(E.timeoutHandle=_p,$y6(p)),p=E.cancelPendingCommit,p!==null&&(E.cancelPendingCommit=null,p()),fk=0,uh(),_2=E,X9=p=Bh(E.current,null),I9=S,Mw=0,kZ=null,ih=!1,vo=Z(E,S),gy6=!1,ko=Df=Fy6=Tp=Zk=bO=0,EZ=X46=null,Qy6=!1,(S&8)!==0&&(S|=S&32);var n=E.entangledLanes;if(n!==0)for(E=E.entanglements,n&=S;0<n;){var J6=31-Hf(n),E6=1<<J6;S|=E[J6],n&=~E6}return nh=S,a7(),p}function o76(E,S){A5=null,VK.H=M46,S===Go||S===SO6?(S=_7(),Mw=3):S===NZ?(S=_7(),Mw=4):Mw=S===xy6?8:S!==null&&typeof S==="object"&&typeof S.then==="function"?6:1,kZ=S,X9===null&&(bO=1,LX(E,t(S,E.current)))}function KO6(){var E=Mf.current;return E===null?!0:(I9&4194048)===I9?VV===null?!0:!1:(I9&62914560)===I9||(I9&536870912)!==0?E===VV:!1}function L1(){var E=VK.H;return VK.H=M46,E===null?M46:E}function S8(){var E=VK.A;return VK.A=xm1,E}function qA(){bO=4,ih||(I9&4194048)!==I9&&Mf.current!==null||(vo=!0),(Zk&134217727)===0&&(Tp&134217727)===0||_2===null||RX(_2,I9,Df,!1)}function l7(E,S,p){var n=D9;D9|=2;var J6=L1(),E6=S8();if(_2!==E||I9!==S)pO6=null,Yf(E,S);S=!1;var O1=bO;A:do try{if(Mw!==0&&X9!==null){var p1=X9,a8=kZ;switch(Mw){case 8:uh(),O1=6;break A;case 3:case 2:case 9:case 6:Mf.current===null&&(S=!0);var gA=Mw;if(Mw=0,kZ=null,mq(E,p1,a8,gA),p&&vo){O1=0;break A}break;default:gA=Mw,Mw=0,kZ=null,mq(E,p1,a8,gA)}}tA(),O1=bO;break}catch(i7){o76(E,i7)}while(1);return S&&E.shellSuspendCounter++,dh=Mp=null,D9=n,VK.H=J6,VK.A=E6,X9===null&&(_2=null,I9=0,a7()),O1}function tA(){for(;X9!==null;)KK(X9)}function x7(E,S){var p=D9;D9|=2;var n=L1(),J6=S8();_2!==E||I9!==S?(pO6=null,P46=VZ()+500,Yf(E,S)):vo=Z(E,S);A:do try{if(Mw!==0&&X9!==null){S=X9;var E6=kZ;q:switch(Mw){case 1:Mw=0,kZ=null,mq(E,S,E6,1);break;case 2:case 9:if(i1(E6)){Mw=0,kZ=null,hq(S);break}S=function(){Mw!==2&&Mw!==9||_2!==E||(Mw=7),t6(E)},E6.then(S,S);break A;case 3:Mw=7;break A;case 4:Mw=5;break A;case 7:i1(E6)?(Mw=0,kZ=null,hq(S)):(Mw=0,kZ=null,mq(E,S,E6,7));break;case 5:var O1=null;switch(X9.tag){case 26:O1=X9.memoizedState;case 5:case 27:var p1=X9,a8=p1.type,gA=p1.pendingProps;if(O1?s61(O1):R61(p1.stateNode,a8,gA)){Mw=0,kZ=null;var i7=p1.sibling;if(i7!==null)X9=i7;else{var N7=p1.return;N7!==null?(X9=N7,Zq(N7)):X9=null}break q}}Mw=0,kZ=null,mq(E,S,E6,5);break;case 6:Mw=0,kZ=null,mq(E,S,E6,6);break;case 8:uh(),bO=6;break A;default:throw Error(Y(462))}}a6();break}catch(h4){o76(E,h4)}while(1);if(dh=Mp=null,VK.H=n,VK.A=J6,D9=p,X9!==null)return 0;return _2=null,I9=0,a7(),bO}function a6(){for(;X9!==null&&!e61();)KK(X9)}function KK(E){var S=oU(E.alternate,E,nh);E.memoizedProps=E.pendingProps,S===null?Zq(E):X9=S}function hq(E){var S=E,p=S.alternate;switch(S.tag){case 15:case 0:S=CO(p,S,S.pendingProps,S.type,void 0,I9);break;case 11:S=CO(p,S,S.pendingProps,S.type.render,S.ref,I9);break;case 5:R1(S);default:K8(p,S),S=X9=Z61(S,nh),S=oU(p,S,nh)}E.memoizedProps=E.pendingProps,S===null?Zq(E):X9=S}function mq(E,S,p,n){dh=Mp=null,R1(S),Zp=null,j46=0;var J6=S.return;try{if(JB(E,J6,S,p,I9)){bO=1,LX(E,t(p,E.current)),X9=null;return}}catch(E6){if(J6!==null)throw X9=J6,E6;bO=1,LX(E,t(p,E.current)),X9=null;return}if(S.flags&32768){if(r9||n===1)E=!0;else if(vo||(I9&536870912)!==0)E=!1;else if(ih=E=!0,n===2||n===9||n===3||n===6)n=Mf.current,n!==null&&n.tag===13&&(n.flags|=16384);vz(S,E)}else Zq(S)}function Zq(E){var S=E;do{if((S.flags&32768)!==0){vz(S,ih);return}E=S.return;var p=t$6(S.alternate,S,nh);if(p!==null){X9=p;return}if(S=S.sibling,S!==null){X9=S;return}X9=S=E}while(S!==null);bO===0&&(bO=5)}function vz(E,S){do{var p=Xy(E.alternate,E);if(p!==null){p.flags&=32767,X9=p;return}if(p=E.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!S&&(E=E.sibling,E!==null)){X9=E;return}X9=E=p}while(E!==null);bO=6,X9=null}function Zj(E,S,p,n,J6,E6,O1,p1,a8){E.cancelPendingCommit=null;do Py();while(DJ!==0);if((D9&6)!==0)throw Error(Y(327));if(S!==null){if(S===E.current)throw Error(Y(177));if(E6=S.lanes|S.childLanes,E6|=hy6,v(E,p,E6,O1,p1,a8),E===_2&&(X9=_2=null,I9=0),Vp=S,rh=E,fk=p,dO6=E6,cO6=J6,Uy6=n,(S.subtreeFlags&10256)!==0||(S.flags&10256)!==0?(E.callbackNode=null,E.callbackPriority=0,Wy(ED,function(){return a76(),null})):(E.callbackNode=null,E.callbackPriority=0),n=(S.flags&13878)!==0,(S.subtreeFlags&13878)!==0||n){n=VK.T,VK.T=null,J6=Dk(),_M(2),O1=D9,D9|=4;try{sU(E,S,p)}finally{D9=O1,_M(J6),VK.T=n}}DJ=1,h9(),A$(),zf()}}function h9(){if(DJ===1){DJ=0;var E=rh,S=Vp,p=(S.flags&13878)!==0;if((S.subtreeFlags&13878)!==0||p){p=VK.T,VK.T=null;var n=Dk();_M(2);var J6=D9;D9|=4;try{MB(S,E),wp(E.containerInfo)}finally{D9=J6,_M(n),VK.T=p}}E.current=S,DJ=2}}function A$(){if(DJ===2){DJ=0;var E=rh,S=Vp,p=(S.flags&8772)!==0;if((S.subtreeFlags&8772)!==0||p){p=VK.T,VK.T=null;var n=Dk();_M(2);var J6=D9;D9|=4;try{IY(E,S.alternate,S)}finally{D9=J6,_M(n),VK.T=p}}DJ=3}}function zf(){if(DJ===4||DJ===3){DJ=0,Rm1();var E=rh,S=Vp,p=fk,n=Uy6;(S.subtreeFlags&10256)!==0||(S.flags&10256)!==0?DJ=5:(DJ=0,Vp=rh=null,PB(E,E.pendingLanes));var J6=E.pendingLanes;if(J6===0&&(Gk=null),x(p),S=S.stateNode,jf&&typeof jf.onCommitFiberRoot==="function")try{jf.onCommitFiberRoot(O46,S,void 0,(S.current.flags&128)===128)}catch(a8){}if(n!==null){S=VK.T,J6=Dk(),_M(2),VK.T=null;try{for(var E6=E.onRecoverableError,O1=0;O1<n.length;O1++){var p1=n[O1];E6(p1.value,{componentStack:p1.stack})}}finally{VK.T=S,_M(J6)}}(fk&3)!==0&&Py(),t6(E),J6=E.pendingLanes,(p&261930)!==0&&(J6&42)!==0?E===py6?Eo++:(Eo=0,py6=E):Eo=0,SX&&i61(),L6(0,!1)}}function PB(E,S){(E.pooledCacheLanes&=S)===0&&(S=E.pooledCache,S!=null&&(E.pooledCache=null,x6(S)))}function Py(){return h9(),A$(),zf(),a76()}function a76(){if(DJ!==5)return!1;var E=rh,S=dO6;dO6=0;var p=x(fk),n=32>p?32:p;p=VK.T;var J6=Dk();try{_M(n),VK.T=null,n=cO6,cO6=null;var E6=rh,O1=fk;if(DJ=0,Vp=rh=null,fk=0,(D9&6)!==0)throw Error(Y(331));var p1=D9;if(D9|=4,oL6(E6.current),DB(E6,E6.current,O1,n),D9=p1,L6(0,!1),jf&&typeof jf.onPostCommitFiberRoot==="function")try{jf.onPostCommitFiberRoot(O46,E6)}catch(a8){}return!0}finally{_M(J6),VK.T=p,PB(E,S)}}function Kp(E,S,p){S=t(p,S),S=qf(E.stateNode,S,2),E=fz(E,S,2),E!==null&&(N(E,2),t6(E))}function j5(E,S,p){if(E.tag===3)Kp(E,E,p);else for(;S!==null;){if(S.tag===3){Kp(S,E,p);break}else if(S.tag===1){var n=S.stateNode;if(typeof S.type.getDerivedStateFromError==="function"||typeof n.componentDidCatch==="function"&&(Gk===null||!Gk.has(n))){E=t(p,E),p=PV(2),n=fz(S,p,2),n!==null&&(_k(p,n,S,E),N(n,2),t6(n));break}}S=S.return}}function YO6(E,S,p){var n=E.pingCache;if(n===null){n=E.pingCache=new um1;var J6=new Set;n.set(S,J6)}else J6=n.get(S),J6===void 0&&(J6=new Set,n.set(S,J6));J6.has(p)||(gy6=!0,J6.add(p),E=P61.bind(null,E,S,p),S.then(E,E))}function P61(E,S,p){var n=E.pingCache;n!==null&&n.delete(S),E.pingedLanes|=E.suspendedLanes&p,E.warmLanes&=~p,_2===E&&(I9&p)===p&&(bO===4||bO===3&&(I9&62914560)===I9&&300>VZ()-UO6?(D9&2)===0&&Yf(E,0):Fy6|=p,ko===I9&&(ko=0)),t6(E)}function aL6(E,S){S===0&&(S=f()),E=Mq(E,S),E!==null&&(N(E,S),t6(E))}function zO6(E){var S=E.memoizedState,p=0;S!==null&&(p=S.retryLane),aL6(E,p)}function W61(E,S){var p=0;switch(E.tag){case 31:case 13:var{stateNode:n,memoizedState:J6}=E;J6!==null&&(p=J6.retryLane);break;case 19:n=E.stateNode;break;case 22:n=E.stateNode._retryCache;break;default:throw Error(Y(314))}n!==null&&n.delete(S),aL6(E,p)}function Wy(E,S){return $46(E,S)}function Am1(E,S,p,n){this.tag=E,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=S,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sL6(E){return E=E.prototype,!(!E||!E.isReactComponent)}function Bh(E,S){var p=E.alternate;return p===null?(p=q(E.tag,S,E.key,E.mode),p.elementType=E.elementType,p.type=E.type,p.stateNode=E.stateNode,p.alternate=E,E.alternate=p):(p.pendingProps=S,p.type=E.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=E.flags&65011712,p.childLanes=E.childLanes,p.lanes=E.lanes,p.child=E.child,p.memoizedProps=E.memoizedProps,p.memoizedState=E.memoizedState,p.updateQueue=E.updateQueue,S=E.dependencies,p.dependencies=S===null?null:{lanes:S.lanes,firstContext:S.firstContext},p.sibling=E.sibling,p.index=E.index,p.ref=E.ref,p.refCleanup=E.refCleanup,p}function Z61(E,S){E.flags&=65011714;var p=E.alternate;return p===null?(E.childLanes=0,E.lanes=S,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=p.childLanes,E.lanes=p.lanes,E.child=p.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=p.memoizedProps,E.memoizedState=p.memoizedState,E.updateQueue=p.updateQueue,E.type=p.type,S=p.dependencies,E.dependencies=S===null?null:{lanes:S.lanes,firstContext:S.firstContext}),E}function wO6(E,S,p,n,J6,E6){var O1=0;if(n=E,typeof E==="function")sL6(E)&&(O1=1);else if(typeof E==="string")O1=ZV&&EH?w46(E,p,Gj.current)?26:Op(E)?27:5:ZV?w46(E,p,Gj.current)?26:5:EH?Op(E)?27:5:5;else A:switch(E){case Yp:return E=q(31,p,S,J6),E.elementType=Yp,E.lanes=E6,E;case Oo:return wf(p.children,J6,E6,S);case Ky6:O1=8,J6|=24;break;case Yy6:return E=q(12,p,S,J6|2),E.elementType=Yy6,E.lanes=E6,E;case fZ:return E=q(13,p,S,J6),E.elementType=fZ,E.lanes=E6,E;case zy6:return E=q(19,p,S,J6),E.elementType=zy6,E.lanes=E6,E;default:if(typeof E==="object"&&E!==null)switch(E.$$typeof){case Gy:O1=10;break A;case Zy:O1=9;break A;case gh:O1=11;break A;case $O6:O1=14;break A;case Fh:O1=16,n=null;break A}O1=29,p=Error(Y(130,E===null?"null":typeof E,"")),n=null}return S=q(O1,p,S,J6),S.elementType=E,S.type=n,S.lanes=E6,S}function wf(E,S,p,n){return E=q(7,E,n,S),E.lanes=p,E}function tL6(E,S,p){return E=q(6,E,null,S),E.lanes=p,E}function G61(E){var S=q(18,null,null,0);return S.stateNode=E,S}function _f(E,S,p){return S=q(4,E.children!==null?E.children:[],E.key,S),S.lanes=p,S.stateNode={containerInfo:E.containerInfo,pendingChildren:null,implementation:E.implementation},S}function qm1(E,S,p,n,J6,E6,O1,p1,a8){this.tag=1,this.containerInfo=E,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=_p,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=V(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=V(0),this.hiddenUpdates=V(null),this.identifierPrefix=n,this.onUncaughtError=J6,this.onCaughtError=E6,this.onRecoverableError=O1,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a8,this.incompleteTransitions=new Map}function f61(E,S,p,n,J6,E6,O1,p1,a8,gA,i7,N7){return E=new qm1(E,S,p,O1,a8,gA,i7,N7,p1),S=1,E6===!0&&(S|=24),E6=q(3,null,null,S),E.current=E6,E6.stateNode=E,S=R6(),S.refCount++,E.pooledCache=S,S.refCount++,E6.memoizedState={element:n,isDehydrated:p,cache:S},Gz(E6),E}function T61(E){if(!E)return GV;return E=GV,E}function V61(E){var S=E._reactInternals;if(S===void 0){if(typeof E.render==="function")throw Error(Y(188));throw E=Object.keys(E).join(","),Error(Y(268,E))}return E=_(S),E=E!==null?$(E):null,E===null?null:Ho(E.stateNode)}function N61(E,S,p,n,J6,E6){J6=T61(J6),n.context===null?n.context=J6:n.pendingContext=J6,n=l9(S),n.payload={element:p},E6=E6===void 0?null:E6,E6!==null&&(n.callback=E6),p=fz(E,n,S),p!==null&&(wM(p,E,S),a_(p,E,S))}function eL6(E,S){if(E=E.memoizedState,E!==null&&E.dehydrated!==null){var p=E.retryLane;E.retryLane=p!==0&&p<S?p:S}}function _O6(E,S){eL6(E,S),(E=E.alternate)&&eL6(E,S)}var M9={},Ay6=Object.assign,qy6=Symbol.for("react.element"),WB=Symbol.for("react.transitional.element"),mh=Symbol.for("react.portal"),Oo=Symbol.for("react.fragment"),Ky6=Symbol.for("react.strict_mode"),Yy6=Symbol.for("react.profiler"),Zy=Symbol.for("react.consumer"),Gy=Symbol.for("react.context"),gh=Symbol.for("react.forward_ref"),fZ=Symbol.for("react.suspense"),zy6=Symbol.for("react.suspense_list"),$O6=Symbol.for("react.memo"),Fh=Symbol.for("react.lazy"),Yp=Symbol.for("react.activity"),ZB=Symbol.for("react.memo_cache_sentinel"),wy6=Symbol.iterator,Km1=Symbol.for("react.client.reference"),zp=Array.isArray,VK=TJ8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,v61=A.rendererVersion,ND=A.rendererPackageName,OO6=A.extraDevToolsConfig,Ho=A.getPublicInstance,fy=A.getRootHostContext,_y6=A.getChildHostContext,HO6=A.prepareForCommit,wp=A.resetAfterCommit,k61=A.createInstance;A.cloneMutableInstance;var{appendInitialChild:vD,finalizeInitialChildren:jO6,shouldSetTextContent:JO6,createTextInstance:E61}=A;A.cloneMutableTextInstance;var{scheduleTimeout:Ym1,cancelTimeout:$y6,noTimeout:_p,isPrimaryRenderer:$f}=A;A.warnsIfNotActing;var{supportsMutation:kD,supportsPersistence:Ty,supportsHydration:SX,getInstanceFromNode:s76}=A;A.beforeActiveInstanceBlur;var zm1=A.preparePortalMount;A.prepareScopeUpdate,A.getInstanceFromScope;var{setCurrentUpdatePriority:_M,getCurrentUpdatePriority:Dk,resolveUpdatePriority:L61}=A;A.trackSchedulerEvent,A.resolveEventType,A.resolveEventTimeStamp;var{shouldAttemptEagerTransition:wm1,detachDeletedInstance:_m1}=A;A.requestPostPaintCallback;var{maySuspendCommit:$m1,maySuspendCommitOnUpdate:y61,maySuspendCommitInSyncRender:t76,preloadInstance:R61,startSuspendingCommit:Oy6,suspendInstance:Hy6}=A;A.suspendOnActiveViewTransition;var S61=A.waitForCommitToBeReady;A.getSuspendedCommitReason;var{NotPendingTransition:$p,HostTransitionContext:Vy,resetFormInstance:Om1}=A;A.bindToConsole;var{supportsMicrotasks:C61,scheduleMicrotask:h61,supportsTestSelectors:e76,findFiberRoot:I61,getBoundingRect:Hm1,getTextContent:jy6,isHiddenSubtree:jo,matchAccessibilityRole:Jy6,setFocusIfFocusable:jm1,setupIntersectionObserver:My6,appendChild:B5,appendChildToContainer:Jm1,commitTextUpdate:Mm1,commitMount:A46,commitUpdate:b61,insertBefore:Dm1,insertInContainerBefore:Xm1,removeChild:WV,removeChildFromContainer:Pm1,resetTextContent:q46,hideInstance:Dy6,hideTextInstance:x61,unhideInstance:u61,unhideTextInstance:Of}=A;A.cancelViewTransitionName,A.cancelRootViewTransitionName,A.restoreRootViewTransitionName,A.cloneRootViewTransitionContainer,A.removeRootViewTransitionClone,A.measureClonedInstance,A.hasInstanceChanged,A.hasInstanceAffectedParent,A.startViewTransition,A.startGestureTransition,A.stopViewTransition,A.getCurrentGestureOffset,A.createViewTransitionInstance;var GB=A.clearContainer;A.createFragmentInstance,A.updateFragmentInstanceFiber,A.commitNewChildToFragmentInstance,A.deleteChildFromFragmentInstance;var{cloneInstance:Xy6,createContainerChildSet:Py6,appendChildToContainerChildSet:K46,finalizeContainerChildren:B61,replaceContainerChildren:MO6,cloneHiddenInstance:Wy6,cloneHiddenTextInstance:DO6,isSuspenseInstancePending:Y46,isSuspenseInstanceFallback:Ny,getSuspenseInstanceFallbackErrorDetails:Wm1,registerSuspenseInstanceRetry:fB,canHydrateFormStateMarker:m61,isFormStateMarkerMatching:g61,getNextHydratableSibling:XO6,getNextHydratableSiblingAfterSingleton:Zm1,getFirstHydratableChild:Gm1,getFirstHydratableChildWithinContainer:fm1,getFirstHydratableChildWithinActivityInstance:F61,getFirstHydratableChildWithinSuspenseInstance:Q61,getFirstHydratableChildWithinSingleton:Tm1,canHydrateInstance:U61,canHydrateTextInstance:p61,canHydrateActivityInstance:TZ,canHydrateSuspenseInstance:vy,hydrateInstance:Vm1,hydrateTextInstance:Nm1,hydrateActivityInstance:PO6,hydrateSuspenseInstance:Jo,getNextHydratableInstanceAfterActivityInstance:d61,getNextHydratableInstanceAfterSuspenseInstance:c61,commitHydratedInstance:vm1,commitHydratedContainer:l61,commitHydratedActivityInstance:Mo,commitHydratedSuspenseInstance:z46,finalizeHydratedChildren:km1,flushHydrationEvents:i61}=A;A.clearActivityBoundary;var n61=A.clearSuspenseBoundary;A.clearActivityBoundaryFromContainer;var{clearSuspenseBoundaryFromContainer:WO6,hideDehydratedBoundary:r61,unhideDehydratedBoundary:ZO6,shouldDeleteUnhydratedTailInstances:GO6}=A;A.diffHydratedPropsForDevWarnings,A.diffHydratedTextForDevWarnings,A.describeHydratableInstanceForDevWarnings;var{validateHydratableInstance:fO6,validateHydratableTextInstance:Em1,supportsResources:ZV,isHostHoistableType:w46,getHoistableRoot:TO6,getResource:VO6,acquireResource:o61,releaseResource:Zy6,hydrateHoistable:Qh,mountHoistable:Gy6,unmountHoistable:fy6,createHoistableInstance:Lm1,prepareToCommitHoistables:a61,mayResourceSuspendCommit:ym1,preloadResource:s61,suspendResource:Uh,supportsSingletons:EH,resolveSingletonInstance:NO6,acquireSingletonInstance:Ty6,releaseSingletonInstance:_46,isHostSingletonType:Op,isSingletonScope:Qq}=A,Do=[],TB=-1,GV={},Hf=Math.clz32?Math.clz32:X,Vy6=Math.log,t61=Math.LN2,MJ=256,vO6=262144,kO6=4194304,$46=VH1,Ny6=ZJ8,e61=fJ8,Rm1=GJ8,VZ=Zg,A11=PJ8,ph=WJ8,ED=TH1,vy6=XJ8,Sm1=void 0,ky6=void 0,O46=null,jf=null,LD=typeof Object.is==="function"?Object.is:g,Ey6=typeof reportError==="function"?reportError:function(E){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof E==="object"&&E!==null&&typeof E.message==="string"?String(E.message):String(E),error:E});if(!window.dispatchEvent(S))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",E);return}console.error(E)},q11=Object.prototype.hasOwnProperty,Ly6,K11,yy6=!1,Y11=new WeakMap,Hp=[],jp=0,EO6=null,Jp=0,Jf=[],CX=0,ky=null,Xk=1,Pk="",Gj=J(null),Xo=J(null),yD=J(null),Ey=J(null),RD=null,q$=null,r9=!1,VB=null,fV=!1,Ry6=Error(Y(519)),LO6=J(null),Mp=null,dh=null,Cm1=typeof AbortController<"u"?AbortController:function(){var E=[],S=this.signal={aborted:!1,addEventListener:function(p,n){E.push(n)}};this.abort=function(){S.aborted=!0,E.forEach(function(p){return p()})}},hm1=VH1,Im1=TH1,F$={$$typeof:Gy,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},H46=null,Dp=null,yO6=!1,RO6=!1,Sy6=!1,Xp=0,Po=null,Cy6=0,Wo=0,Zo=null,z11=VK.S;VK.S=function(E,S){$11=VZ(),typeof S==="object"&&S!==null&&typeof S.then==="function"&&A1(E,S),z11!==null&&z11(E,S)};var Pp=J(null),Go=Error(Y(460)),NZ=Error(Y(474)),SO6=Error(Y(542)),CO6={then:function(){}},Wp=null,Zp=null,j46=0,Gp=aA(!0),w11=aA(!1),TV=[],NB=0,hy6=0,vB=!1,Iy6=!1,fo=J(null),hO6=J(0),Mf=J(null),VV=null,LH=J(0),ch=0,A5=null,bw=null,fj=null,IO6=!1,To=!1,fp=!1,bO6=0,J46=0,Vo=null,bm1=0,M46={readContext:V6,use:C1,useCallback:C4,useContext:C4,useEffect:C4,useImperativeHandle:C4,useLayoutEffect:C4,useInsertionEffect:C4,useMemo:C4,useReducer:C4,useRef:C4,useState:C4,useDebugValue:C4,useDeferredValue:C4,useTransition:C4,useSyncExternalStore:C4,useId:C4,useHostTransitionStatus:C4,useFormState:C4,useActionState:C4,useOptimistic:C4,useMemoCache:C4,useCacheRefresh:C4};M46.useEffectEvent=C4;var xO6={readContext:V6,use:C1,useCallback:function(E,S){return F1().memoizedState=[E,S===void 0?null:S],E},useContext:V6,useEffect:z2,useImperativeHandle:function(E,S,p){p=p!==null&&p!==void 0?p.concat([E]):null,dK(4194308,4,m2.bind(null,S,E),p)},useLayoutEffect:function(E,S){return dK(4194308,4,E,S)},useInsertionEffect:function(E,S){dK(4,2,E,S)},useMemo:function(E,S){var p=F1();S=S===void 0?null:S;var n=E();if(fp){F(!0);try{E()}finally{F(!1)}}return p.memoizedState=[n,S],n},useReducer:function(E,S,p){var n=F1();if(p!==void 0){var J6=p(S);if(fp){F(!0);try{p(S)}finally{F(!1)}}}else J6=S;return n.memoizedState=n.baseState=J6,E={pending:null,lanes:0,dispatch:null,lastRenderedReducer:E,lastRenderedState:J6},n.queue=E,E=E.dispatch=hY.bind(null,A5,E),[n.memoizedState,E]},useRef:function(E){var S=F1();return E={current:E},S.memoizedState=E},useState:function(E){E=C9(E);var S=E.queue,p=z4.bind(null,A5,S);return S.dispatch=p,[E.memoizedState,p]},useDebugValue:kH,useDeferredValue:function(E,S){var p=F1();return Pj(p,E,S)},useTransition:function(){var E=C9(!1);return E=TA.bind(null,A5,E.queue,!0,!1),F1().memoizedState=E,[!1,E]},useSyncExternalStore:function(E,S,p){var n=A5,J6=F1();if(r9){if(p===void 0)throw Error(Y(407));p=p()}else{if(p=S(),_2===null)throw Error(Y(349));(I9&127)!==0||x4(n,S,p)}J6.memoizedState=p;var E6={value:p,getSnapshot:S};return J6.queue=E6,z2(Aq.bind(null,n,E6,E),[E]),n.flags|=2048,Dj(9,{destroy:void 0},W4.bind(null,n,E6,p,S),null),p},useId:function(){var E=F1(),S=_2.identifierPrefix;if(r9){var p=Pk,n=Xk;p=(n&~(1<<32-Hf(n)-1)).toString(32)+p,S="_"+S+"R_"+p,p=bO6++,0<p&&(S+="H"+p.toString(32)),S+="_"}else p=bm1++,S="_"+S+"r_"+p.toString(32)+"_";return E.memoizedState=S},useHostTransitionStatus:qq,useFormState:XV,useActionState:XV,useOptimistic:function(E){var S=F1();S.memoizedState=S.baseState=E;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return S.queue=p,S=$w.bind(null,A5,!0,p),p.dispatch=S,[E,S]},useMemoCache:k8,useCacheRefresh:function(){return F1().memoizedState=i9.bind(null,A5)},useEffectEvent:function(E){var S=F1(),p={impl:E};return S.memoizedState=p,function(){if((D9&2)!==0)throw Error(Y(440));return p.impl.apply(void 0,arguments)}}},uO6={readContext:V6,use:C1,useCallback:RO,useContext:V6,useEffect:vH,useImperativeHandle:X3,useInsertionEffect:WY,useLayoutEffect:B2,useMemo:Xj,useReducer:o8,useRef:v3,useState:function(){return o8(g8)},useDebugValue:kH,useDeferredValue:function(E,S){var p=e1();return _w(p,bw.memoizedState,E,S)},useTransition:function(){var E=o8(g8)[0],S=e1().memoizedState;return[typeof E==="boolean"?E:AA(E),S]},useSyncExternalStore:N3,useId:P3,useHostTransitionStatus:qq,useFormState:wk,useActionState:wk,useOptimistic:function(E,S){var p=e1();return j_(p,bw,E,S)},useMemoCache:k8,useCacheRefresh:Dq};uO6.useEffectEvent=zM;var _11={readContext:V6,use:C1,useCallback:RO,useContext:V6,useEffect:vH,useImperativeHandle:X3,useInsertionEffect:WY,useLayoutEffect:B2,useMemo:Xj,useReducer:y7,useRef:v3,useState:function(){return y7(g8)},useDebugValue:kH,useDeferredValue:function(E,S){var p=e1();return bw===null?Pj(p,E,S):_w(p,bw.memoizedState,E,S)},useTransition:function(){var E=y7(g8)[0],S=e1().memoizedState;return[typeof E==="boolean"?E:AA(E),S]},useSyncExternalStore:N3,useId:P3,useHostTransitionStatus:qq,useFormState:GD,useActionState:GD,useOptimistic:function(E,S){var p=e1();if(bw!==null)return j_(p,bw,E,S);return p.baseState=E,[E,p.queue.dispatch]},useMemoCache:k8,useCacheRefresh:Dq};_11.useEffectEvent=zM;var by6={enqueueSetState:function(E,S,p){E=E._reactInternals;var n=yX(),J6=l9(n);J6.payload=S,p!==void 0&&p!==null&&(J6.callback=p),S=fz(E,J6,n),S!==null&&(wM(S,E,n),a_(S,E,n))},enqueueReplaceState:function(E,S,p){E=E._reactInternals;var n=yX(),J6=l9(n);J6.tag=1,J6.payload=S,p!==void 0&&p!==null&&(J6.callback=p),S=fz(E,J6,n),S!==null&&(wM(S,E,n),a_(S,E,n))},enqueueForceUpdate:function(E,S){E=E._reactInternals;var p=yX(),n=l9(p);n.tag=2,S!==void 0&&S!==null&&(n.callback=S),S=fz(E,n,p),S!==null&&(wM(S,E,p),a_(S,E,p))}},xy6=Error(Y(461)),Tj=!1,uy6={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},lh=!1,Vj=!1,By6=!1,my6=typeof WeakSet==="function"?WeakSet:Set,$M=null,Q$=null,vZ=!1,Wk=null,No=8192,xm1={getCacheForType:function(E){var S=V6(F$),p=S.data.get(E);return p===void 0&&(p=E(),S.data.set(E,p)),p},cacheSignal:function(){return V6(F$).controller.signal}},BO6=0,mO6=1,gO6=2,FO6=3,QO6=4;if(typeof Symbol==="function"&&Symbol.for){var D46=Symbol.for;BO6=D46("selector.component"),mO6=D46("selector.has_pseudo_class"),gO6=D46("selector.role"),FO6=D46("selector.test_id"),QO6=D46("selector.text")}var um1=typeof WeakMap==="function"?WeakMap:Map,D9=0,_2=null,X9=null,I9=0,Mw=0,kZ=null,ih=!1,vo=!1,gy6=!1,nh=0,bO=0,Zk=0,Tp=0,Fy6=0,Df=0,ko=0,X46=null,EZ=null,Qy6=!1,UO6=0,$11=0,P46=1/0,pO6=null,Gk=null,DJ=0,rh=null,Vp=null,fk=0,dO6=0,cO6=null,Uy6=null,Eo=0,py6=null;return M9.attemptContinuousHydration=function(E){if(E.tag===13||E.tag===31){var S=Mq(E,67108864);S!==null&&wM(S,E,67108864),_O6(E,67108864)}},M9.attemptHydrationAtCurrentPriority=function(E){if(E.tag===13||E.tag===31){var S=yX();S=B(S);var p=Mq(E,S);p!==null&&wM(p,E,S),_O6(E,S)}},M9.attemptSynchronousHydration=function(E){switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var S=P(E.pendingLanes);if(S!==0){E.pendingLanes|=2;for(E.entangledLanes|=2;S;){var p=1<<31-Hf(S);E.entanglements[1]|=p,S&=~p}t6(E),(D9&6)===0&&(P46=VZ()+500,L6(0,!1))}}break;case 31:case 13:S=Mq(E,2),S!==null&&wM(S,E,2),GZ(),_O6(E,2)}},M9.batchedUpdates=function(E,S){return E(S)},M9.createComponentSelector=function(E){return{$$typeof:BO6,value:E}},M9.createContainer=function(E,S,p,n,J6,E6,O1,p1,a8,gA){return f61(E,S,!1,null,p,n,E6,null,O1,p1,a8,gA)},M9.createHasPseudoClassSelector=function(E){return{$$typeof:mO6,value:E}},M9.createHydrationContainer=function(E,S,p,n,J6,E6,O1,p1,a8,gA,i7,N7,h4,F3){return E=f61(p,n,!0,E,J6,E6,p1,F3,a8,gA,i7,N7),E.context=T61(null),p=E.current,n=yX(),n=B(n),J6=l9(n),J6.callback=S!==void 0&&S!==null?S:null,fz(p,J6,n),S=n,E.current.lanes=S,N(E,S),t6(E),E},M9.createPortal=function(E,S,p){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mh,key:n==null?null:""+n,children:E,containerInfo:S,implementation:p}},M9.createRoleSelector=function(E){return{$$typeof:gO6,value:E}},M9.createTestNameSelector=function(E){return{$$typeof:FO6,value:E}},M9.createTextSelector=function(E){return{$$typeof:QO6,value:E}},M9.defaultOnCaughtError=function(E){console.error(E)},M9.defaultOnRecoverableError=function(E){Ey6(E)},M9.defaultOnUncaughtError=function(E){Ey6(E)},M9.deferredUpdates=function(E){var S=VK.T,p=Dk();try{return _M(32),VK.T=null,E()}finally{_M(p),VK.T=S}},M9.discreteUpdates=function(E,S,p,n,J6){var E6=VK.T,O1=Dk();try{return _M(2),VK.T=null,E(S,p,n,J6)}finally{_M(O1),VK.T=E6,D9===0&&(P46=VZ()+500)}},M9.findAllNodes=r76,M9.findBoundingRects=function(E,S){if(!e76)throw Error(Y(363));S=r76(E,S),E=[];for(var p=0;p<S.length;p++)E.push(Hm1(S[p]));for(S=E.length-1;0<S;S--){p=E[S];for(var n=p.x,J6=n+p.width,E6=p.y,O1=E6+p.height,p1=S-1;0<=p1;p1--)if(S!==p1){var a8=E[p1],gA=a8.x,i7=gA+a8.width,N7=a8.y,h4=N7+a8.height;if(n>=gA&&E6>=N7&&J6<=i7&&O1<=h4){E.splice(S,1);break}else if(!(n!==gA||p.width!==a8.width||h4<E6||N7>O1)){N7>E6&&(a8.height+=N7-E6,a8.y=E6),h4<O1&&(a8.height=O1-N7),E.splice(S,1);break}else if(!(E6!==N7||p.height!==a8.height||i7<n||gA>J6)){gA>n&&(a8.width+=gA-n,a8.x=n),i7<J6&&(a8.width=J6-gA),E.splice(S,1);break}}}return E},M9.findHostInstance=V61,M9.findHostInstanceWithNoPortals=function(E){return E=_(E),E=E!==null?O(E):null,E===null?null:Ho(E.stateNode)},M9.findHostInstanceWithWarning=function(E){return V61(E)},M9.flushPassiveEffects=Py,M9.flushSyncFromReconciler=function(E){var S=D9;D9|=1;var p=VK.T,n=Dk();try{if(_M(2),VK.T=null,E)return E()}finally{_M(n),VK.T=p,D9=S,(D9&6)===0&&L6(0,!1)}},M9.flushSyncWork=GZ,M9.focusWithin=function(E,S){if(!e76)throw Error(Y(363));E=_o(E),S=AO6(E,S),S=Array.from(S);for(E=0;E<S.length;){var p=S[E++],n=p.tag;if(!jo(p)){if((n===5||n===26||n===27)&&jm1(p.stateNode))return!0;for(p=p.child;p!==null;)S.push(p),p=p.sibling}}return!1},M9.getFindAllNodesFailureDescription=function(E,S){if(!e76)throw Error(Y(363));var p=0,n=[];E=[_o(E),0];for(var J6=0;J6<E.length;){var E6=E[J6++],O1=E6.tag,p1=E[J6++],a8=S[p1];if(O1!==5&&O1!==26&&O1!==27||!jo(E6)){if(Jw(E6,a8)&&(n.push(e_(a8)),p1++,p1>p&&(p=p1)),p1<S.length)for(E6=E6.child;E6!==null;)E.push(E6,p1),E6=E6.sibling}}if(p<S.length){for(E=[];p<S.length;p++)E.push(e_(S[p]));return`findAllNodes was able to match part of the selector:
  `+(n.join(" > ")+`

No matching component was found for:
  `)+E.join(" > ")}return null},M9.getPublicRootInstance=function(E){if(E=E.current,!E.child)return null;switch(E.child.tag){case 27:case 5:return Ho(E.child.stateNode);default:return E.child.stateNode}},M9.injectIntoDevTools=function(){var E={bundleType:0,version:v61,rendererPackageName:ND,currentDispatcherRef:VK,reconcilerVersion:"19.2.0"};if(OO6!==null&&(E.rendererConfig=OO6),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")E=!1;else{var S=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(S.isDisabled||!S.supportsFiber)E=!0;else{try{O46=S.inject(E),jf=S}catch(p){}E=S.checkDCE?!0:!1}}return E},M9.isAlreadyRendering=function(){return(D9&6)!==0},M9.observeVisibleRects=function(E,S,p,n){if(!e76)throw Error(Y(363));E=r76(E,S);var J6=My6(E,p,n).disconnect;return{disconnect:function(){J6()}}},M9.shouldError=function(){return null},M9.shouldSuspend=function(){return!1},M9.startHostTransition=function(E,S,p,n){if(E.tag!==5)throw Error(Y(476));var J6=IA(E).queue;TA(E,J6,S,$p,p===null?K:function(){var E6=IA(E);return E6.next===null&&(E6=E.alternate.memoizedState),J9(E,E6.next.queue,{},yX()),p(n)})},M9.updateContainer=function(E,S,p,n){var J6=S.current,E6=yX();return N61(J6,E6,E,S,p,n),E6},M9.updateContainerSync=function(E,S,p,n){return N61(S.current,2,E,S,p,n),2},M9};Yg6.exports.default=Yg6.exports;Object.defineProperty(Yg6.exports,"__esModule",{value:!0})});var VJ8=1,NJ8=32;var vJ8=()=>{};var f9,NH1,LE,zg6,dc,v56,vH1,kJ8,kH1,L06;var k56=k(()=>{f9={All:"all",Horizontal:"horizontal",Vertical:"vertical",Left:"left",Right:"right",Top:"top",Bottom:"bottom",Start:"start",End:"end"},NH1={All:"all",Column:"column",Row:"row"},LE={Flex:"flex",None:"none"},zg6={Row:"row",RowReverse:"row-reverse",Column:"column",ColumnReverse:"column-reverse"},dc={Auto:"auto",Stretch:"stretch",FlexStart:"flex-start",Center:"center",FlexEnd:"flex-end"},v56={FlexStart:"flex-start",Center:"center",FlexEnd:"flex-end",SpaceBetween:"space-between",SpaceAround:"space-around",SpaceEvenly:"space-evenly"},vH1={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},kJ8={Relative:"relative",Absolute:"absolute"},kH1={Visible:"visible",Hidden:"hidden",Scroll:"scroll"},L06={Undefined:"undefined",Exactly:"exactly",AtMost:"at-most"}});function LH1(A){let q=EH1.get(A);if(q!==void 0)return q;let K=B8(A);if(EH1.size>=UK9)EH1.clear();return EH1.set(A,K),K}var EH1,UK9=4096;var EJ8=k(()=>{y5();EH1=new Map});function pK9(A,q){if(A.length===0)return{width:0,height:0};let K=q<=0||!Number.isFinite(q),Y=0,z=0,w=0;while(w<=A.length){let _=A.indexOf(`
`,w),$=_===-1?A.substring(w):A.substring(w,_),O=LH1($);if(z=Math.max(z,O),K)Y++;else Y+=O===0?1:Math.ceil(O/q);if(_===-1)break;w=_+1}return{width:z,height:Y}}var yH1;var Zy7=k(()=>{EJ8();yH1=pK9});function RH1(A,q,K){if(typeof K==="string")A.setPositionPercent(q,Number.parseInt(K,10));else if(typeof K==="number")A.setPosition(q,K);else A.setPosition(q,Number.NaN)}var dK9=(A,q)=>{if("position"in q)A.setPositionType(q.position==="absolute"?kJ8.Absolute:kJ8.Relative);if("top"in q)RH1(A,"top",q.top);if("bottom"in q)RH1(A,"bottom",q.bottom);if("left"in q)RH1(A,"left",q.left);if("right"in q)RH1(A,"right",q.right)},cK9=(A,q)=>{let K=q.overflowY??q.overflow,Y=q.overflowX??q.overflow;if(K==="scroll"||Y==="scroll")A.setOverflow(kH1.Scroll);else if(K==="hidden"||Y==="hidden")A.setOverflow(kH1.Hidden);else if("overflow"in q||"overflowX"in q||"overflowY"in q)A.setOverflow(kH1.Visible)},lK9=(A,q)=>{if("margin"in q)A.setMargin(f9.All,q.margin??0);if("marginX"in q)A.setMargin(f9.Horizontal,q.marginX??0);if("marginY"in q)A.setMargin(f9.Vertical,q.marginY??0);if("marginLeft"in q)A.setMargin(f9.Start,q.marginLeft||0);if("marginRight"in q)A.setMargin(f9.End,q.marginRight||0);if("marginTop"in q)A.setMargin(f9.Top,q.marginTop||0);if("marginBottom"in q)A.setMargin(f9.Bottom,q.marginBottom||0)},iK9=(A,q)=>{if("padding"in q)A.setPadding(f9.All,q.padding??0);if("paddingX"in q)A.setPadding(f9.Horizontal,q.paddingX??0);if("paddingY"in q)A.setPadding(f9.Vertical,q.paddingY??0);if("paddingLeft"in q)A.setPadding(f9.Left,q.paddingLeft||0);if("paddingRight"in q)A.setPadding(f9.Right,q.paddingRight||0);if("paddingTop"in q)A.setPadding(f9.Top,q.paddingTop||0);if("paddingBottom"in q)A.setPadding(f9.Bottom,q.paddingBottom||0)},nK9=(A,q)=>{if("flexGrow"in q)A.setFlexGrow(q.flexGrow??0);if("flexShrink"in q)A.setFlexShrink(typeof q.flexShrink==="number"?q.flexShrink:1);if("flexWrap"in q){if(q.flexWrap==="nowrap")A.setFlexWrap(vH1.NoWrap);if(q.flexWrap==="wrap")A.setFlexWrap(vH1.Wrap);if(q.flexWrap==="wrap-reverse")A.setFlexWrap(vH1.WrapReverse)}if("flexDirection"in q){if(q.flexDirection==="row")A.setFlexDirection(zg6.Row);if(q.flexDirection==="row-reverse")A.setFlexDirection(zg6.RowReverse);if(q.flexDirection==="column")A.setFlexDirection(zg6.Column);if(q.flexDirection==="column-reverse")A.setFlexDirection(zg6.ColumnReverse)}if("flexBasis"in q)if(typeof q.flexBasis==="number")A.setFlexBasis(q.flexBasis);else if(typeof q.flexBasis==="string")A.setFlexBasisPercent(Number.parseInt(q.flexBasis,10));else A.setFlexBasis(Number.NaN);if("alignItems"in q){if(q.alignItems==="stretch"||!q.alignItems)A.setAlignItems(dc.Stretch);if(q.alignItems==="flex-start")A.setAlignItems(dc.FlexStart);if(q.alignItems==="center")A.setAlignItems(dc.Center);if(q.alignItems==="flex-end")A.setAlignItems(dc.FlexEnd)}if("alignSelf"in q){if(q.alignSelf==="auto"||!q.alignSelf)A.setAlignSelf(dc.Auto);if(q.alignSelf==="flex-start")A.setAlignSelf(dc.FlexStart);if(q.alignSelf==="center")A.setAlignSelf(dc.Center);if(q.alignSelf==="flex-end")A.setAlignSelf(dc.FlexEnd)}if("justifyContent"in q){if(q.justifyContent==="flex-start"||!q.justifyContent)A.setJustifyContent(v56.FlexStart);if(q.justifyContent==="center")A.setJustifyContent(v56.Center);if(q.justifyContent==="flex-end")A.setJustifyContent(v56.FlexEnd);if(q.justifyContent==="space-between")A.setJustifyContent(v56.SpaceBetween);if(q.justifyContent==="space-around")A.setJustifyContent(v56.SpaceAround);if(q.justifyContent==="space-evenly")A.setJustifyContent(v56.SpaceEvenly)}},rK9=(A,q)=>{if("width"in q)if(typeof q.width==="number")A.setWidth(q.width);else if(typeof q.width==="string")A.setWidthPercent(Number.parseInt(q.width,10));else A.setWidthAuto();if("height"in q)if(typeof q.height==="number")A.setHeight(q.height);else if(typeof q.height==="string")A.setHeightPercent(Number.parseInt(q.height,10));else A.setHeightAuto();if("minWidth"in q)if(typeof q.minWidth==="string")A.setMinWidthPercent(Number.parseInt(q.minWidth,10));else A.setMinWidth(q.minWidth??0);if("minHeight"in q)if(typeof q.minHeight==="string")A.setMinHeightPercent(Number.parseInt(q.minHeight,10));else A.setMinHeight(q.minHeight??0);if("maxWidth"in q)if(typeof q.maxWidth==="string")A.setMaxWidthPercent(Number.parseInt(q.maxWidth,10));else A.setMaxWidth(q.maxWidth??0);if("maxHeight"in q)if(typeof q.maxHeight==="string")A.setMaxHeightPercent(Number.parseInt(q.maxHeight,10));else A.setMaxHeight(q.maxHeight??0)},oK9=(A,q)=>{if("display"in q)A.setDisplay(q.display==="flex"?LE.Flex:LE.None)},aK9=(A,q,K)=>{let Y=K??q;if("borderStyle"in q){let z=q.borderStyle?1:0;A.setBorder(f9.Top,Y.borderTop!==!1?z:0),A.setBorder(f9.Bottom,Y.borderBottom!==!1?z:0),A.setBorder(f9.Left,Y.borderLeft!==!1?z:0),A.setBorder(f9.Right,Y.borderRight!==!1?z:0)}else{if("borderTop"in q&&q.borderTop!==void 0)A.setBorder(f9.Top,q.borderTop===!1?0:1);if("borderBottom"in q&&q.borderBottom!==void 0)A.setBorder(f9.Bottom,q.borderBottom===!1?0:1);if("borderLeft"in q&&q.borderLeft!==void 0)A.setBorder(f9.Left,q.borderLeft===!1?0:1);if("borderRight"in q&&q.borderRight!==void 0)A.setBorder(f9.Right,q.borderRight===!1?0:1)}},sK9=(A,q)=>{if("gap"in q)A.setGap(NH1.All,q.gap??0);if("columnGap"in q)A.setGap(NH1.Column,q.columnGap??0);if("rowGap"in q)A.setGap(NH1.Row,q.rowGap??0)},tK9=(A,q={},K)=>{dK9(A,q),cK9(A,q),lK9(A,q),iK9(A,q),nK9(A,q),rK9(A,q),oK9(A,q),aK9(A,q,K),sK9(A,q)},wg6;var LJ8=k(()=>{k56();wg6=tK9});var fy7=C((Af2,Gy7)=>{Gy7.exports=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});function E56(A,q={}){if(typeof A!=="string"||A.length===0)return 0;let{ambiguousIsNarrow:K=!0,countAnsiEscapeCodes:Y=!1}=q;if(!Y)A=lz(A);if(A.length===0)return 0;let z=0,w={ambiguousAsWide:!K};for(let{segment:_}of eK9.segment(A)){let $=_.codePointAt(0);if($<=31||$>=127&&$<=159)continue;if($>=8203&&$<=8207||$===65279)continue;if($>=768&&$<=879||$>=6832&&$<=6911||$>=7616&&$<=7679||$>=8400&&$<=8447||$>=65056&&$<=65071)continue;if($>=55296&&$<=57343)continue;if($>=65024&&$<=65039)continue;if(A39.test(_))continue;if(Ty7.default().test(_)){z+=2;continue}z+=NK6($,w)}return z}var Ty7,eK9,A39;var Vy7=k(()=>{uf();yI6();Ty7=e(fy7(),1),eK9=new Intl.Segmenter,A39=/^\p{Default_Ignorable_Code_Point}$/u});function Y39(){let A=new Map;for(let[q,K]of Object.entries(oO)){for(let[Y,z]of Object.entries(K))oO[Y]={open:`\x1B[${z[0]}m`,close:`\x1B[${z[1]}m`},K[Y]=oO[Y],A.set(z[0],z[1]);Object.defineProperty(oO,q,{value:K,enumerable:!1})}return Object.defineProperty(oO,"codes",{value:A,enumerable:!1}),oO.color.close="\x1B[39m",oO.bgColor.close="\x1B[49m",oO.color.ansi=Ny7(),oO.color.ansi256=vy7(),oO.color.ansi16m=ky7(),oO.bgColor.ansi=Ny7(10),oO.bgColor.ansi256=vy7(10),oO.bgColor.ansi16m=ky7(10),Object.defineProperties(oO,{rgbToAnsi256:{value:(q,K,Y)=>{if(q===K&&K===Y){if(q<8)return 16;if(q>248)return 231;return Math.round((q-8)/247*24)+232}return 16+36*Math.round(q/255*5)+6*Math.round(K/255*5)+Math.round(Y/255*5)},enumerable:!1},hexToRgb:{value:(q)=>{let K=/[a-f\d]{6}|[a-f\d]{3}/i.exec(q.toString(16));if(!K)return[0,0,0];let[Y]=K;if(Y.length===3)Y=[...Y].map((w)=>w+w).join("");let z=Number.parseInt(Y,16);return[z>>16&255,z>>8&255,z&255]},enumerable:!1},hexToAnsi256:{value:(q)=>oO.rgbToAnsi256(...oO.hexToRgb(q)),enumerable:!1},ansi256ToAnsi:{value:(q)=>{if(q<8)return 30+q;if(q<16)return 90+(q-8);let K,Y,z;if(q>=232)K=((q-232)*10+8)/255,Y=K,z=K;else{q-=16;let $=q%36;K=Math.floor(q/36)/5,Y=Math.floor($/6)/5,z=$%6/5}let w=Math.max(K,Y,z)*2;if(w===0)return 30;let _=30+(Math.round(z)<<2|Math.round(Y)<<1|Math.round(K));if(w===2)_+=60;return _},enumerable:!1},rgbToAnsi:{value:(q,K,Y)=>oO.ansi256ToAnsi(oO.rgbToAnsi256(q,K,Y)),enumerable:!1},hexToAnsi:{value:(q)=>oO.ansi256ToAnsi(oO.hexToAnsi256(q)),enumerable:!1}}),oO}var Ny7=(A=0)=>(q)=>`\x1B[${q+A}m`,vy7=(A=0)=>(q)=>`\x1B[${38+A};5;${q}m`,ky7=(A=0)=>(q,K,Y)=>`\x1B[${38+A};2;${q};${K};${Y}m`,oO,zf2,q39,K39,wf2,z39,EJ;var _g6=k(()=>{oO={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},zf2=Object.keys(oO.modifier),q39=Object.keys(oO.color),K39=Object.keys(oO.bgColor),wf2=[...q39,...K39];z39=Y39(),EJ=z39});function SJ8(A,q,K){return String(A).normalize().replaceAll(`\r
`,`
`).split(`
`).map((Y)=>H39(Y,q,K)).join(`
`)}var CH1,w39=39,RJ8="\x07",yy7="[",_39="]",Ry7="m",SH1,Ey7=(A)=>`${CH1.values().next().value}${yy7}${A}${Ry7}`,Ly7=(A)=>`${CH1.values().next().value}${SH1}${A}${RJ8}`,$39=(A)=>A.split(" ").map((q)=>E56(q)),yJ8=(A,q,K)=>{let Y=[...q],z=!1,w=!1,_=E56(lz(A.at(-1)));for(let[$,O]of Y.entries()){let H=E56(O);if(_+H<=K)A[A.length-1]+=O;else A.push(O),_=0;if(CH1.has(O))z=!0,w=Y.slice($+1,$+1+SH1.length).join("")===SH1;if(z){if(w){if(O===RJ8)z=!1,w=!1}else if(O===Ry7)z=!1;continue}if(_+=H,_===K&&$<Y.length-1)A.push(""),_=0}if(!_&&A.at(-1).length>0&&A.length>1)A[A.length-2]+=A.pop()},O39=(A)=>{let q=A.split(" "),K=q.length;while(K>0){if(E56(q[K-1])>0)break;K--}if(K===q.length)return A;return q.slice(0,K).join(" ")+q.slice(K).join("")},H39=(A,q,K={})=>{if(K.trim!==!1&&A.trim()==="")return"";let Y="",z,w,_=$39(A),$=[""];for(let[J,M]of A.split(" ").entries()){if(K.trim!==!1)$[$.length-1]=$.at(-1).trimStart();let D=E56($.at(-1));if(J!==0){if(D>=q&&(K.wordWrap===!1||K.trim===!1))$.push(""),D=0;if(D>0||K.trim===!1)$[$.length-1]+=" ",D++}if(K.hard&&_[J]>q){let X=q-D,P=1+Math.floor((_[J]-X-1)/q);if(Math.floor((_[J]-1)/q)<P)$.push("");yJ8($,M,q);continue}if(D+_[J]>q&&D>0&&_[J]>0){if(K.wordWrap===!1&&D<q){yJ8($,M,q);continue}$.push("")}if(D+_[J]>q&&K.wordWrap===!1){yJ8($,M,q);continue}$[$.length-1]+=M}if(K.trim!==!1)$=$.map((J)=>O39(J));let O=$.join(`
`),H=[...O],j=0;for(let[J,M]of H.entries()){if(Y+=M,CH1.has(M)){let{groups:X}=new RegExp(`(?:\\${yy7}(?<code>\\d+)m|\\${SH1}(?<uri>.*)${RJ8})`).exec(O.slice(j))||{groups:{}};if(X.code!==void 0){let P=Number.parseFloat(X.code);z=P===w39?void 0:P}else if(X.uri!==void 0)w=X.uri.length===0?void 0:X.uri}let D=EJ.codes.get(Number(z));if(H[J+1]===`
`){if(w)Y+=Ly7("");if(z&&D)Y+=Ey7(D)}else if(M===`
`){if(z&&D)Y+=Ey7(z);if(w)Y+=Ly7(w)}j+=M.length}return Y};var Sy7=k(()=>{Vy7();uf();_g6();CH1=new Set(["\x1B",""]),SH1=`${_39}8;;`});var j39,L56;var hH1=k(()=>{Sy7();j39=typeof Bun<"u"&&typeof Bun.wrapAnsi==="function"?Bun.wrapAnsi:null,L56=j39??SJ8});function CJ8(A){if(!Number.isInteger(A))return!1;return A>=4352&&(A<=4447||A===9001||A===9002||11904<=A&&A<=12871&&A!==12351||12880<=A&&A<=19903||19968<=A&&A<=42182||43360<=A&&A<=43388||44032<=A&&A<=55203||63744<=A&&A<=64255||65040<=A&&A<=65049||65072<=A&&A<=65131||65281<=A&&A<=65376||65504<=A&&A<=65510||110592<=A&&A<=110593||127488<=A&&A<=127569||131072<=A&&A<=262141)}function Gg(A,q,K){let Y=[...A],z=[],w=typeof K==="number"?K:Y.length,_=!1,$,O=0,H="";for(let[j,J]of Y.entries()){let M=!1;if(hy7.includes(J)){let D=/\d[^m]*/.exec(A.slice(j,j+18));if($=D&&D.length>0?D[0]:void 0,O<w){if(_=!0,$!==void 0)z.push($)}}else if(_&&J==="m")_=!1,M=!0;if(!_&&!M)O++;if(!J39.test(J)&&CJ8(J.codePointAt())){if(O++,typeof K!=="number")w++}if(O>q&&O<=w)H+=J;else if(O===q&&!_&&$!==void 0)H=Cy7(z);else if(O>=w){H+=Cy7(z,!0,$);break}}return H}var J39,hy7,IH1=(A)=>`${hy7[0]}[${A}m`,Cy7=(A,q,K)=>{let Y=[];A=[...A];for(let z of A){let w=z;if(z.includes(";"))z=z.split(";")[0][0]+"0";let _=EJ.codes.get(Number.parseInt(z,10));if(_){let $=A.indexOf(_.toString());if($===-1)Y.push(IH1(q?_:w));else A.splice($,1)}else if(q){Y.push(IH1(0));break}else Y.push(IH1(w))}if(q){if(Y=Y.filter((z,w)=>Y.indexOf(z)===w),K!==void 0){let z=IH1(EJ.codes.get(Number.parseInt(K,10)));Y=Y.reduce((w,_)=>_===z?[_,...w]:[...w,_],[])}}return Y.join("")};var Iy7=k(()=>{_g6();J39=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,hy7=["\x1B",""]});var xy7=C((Zf2,by7)=>{by7.exports=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});function y06(A,q={}){if(typeof A!=="string"||A.length===0)return 0;let{ambiguousIsNarrow:K=!0,countAnsiEscapeCodes:Y=!1}=q;if(!Y)A=lz(A);if(A.length===0)return 0;let z=0,w={ambiguousAsWide:!K};for(let{segment:_}of M39.segment(A)){let $=_.codePointAt(0);if($<=31||$>=127&&$<=159)continue;if($>=8203&&$<=8207||$===65279)continue;if($>=768&&$<=879||$>=6832&&$<=6911||$>=7616&&$<=7679||$>=8400&&$<=8447||$>=65056&&$<=65071)continue;if($>=55296&&$<=57343)continue;if($>=65024&&$<=65039)continue;if(D39.test(_))continue;if(uy7.default().test(_)){z+=2;continue}z+=NK6($,w)}return z}var uy7,M39,D39;var By7=k(()=>{uf();yI6();uy7=e(xy7(),1),M39=new Intl.Segmenter,D39=/^\p{Default_Ignorable_Code_Point}$/u});function bH1(A,q,K){if(A.charAt(q)===" ")return q;let Y=K?1:-1;for(let z=0;z<=3;z++){let w=q+z*Y;if(A.charAt(w)===" ")return w}return q}function hJ8(A,q,K={}){let{position:Y="end",space:z=!1,preferTruncationOnSpace:w=!1}=K,{truncationCharacter:_="…"}=K;if(typeof A!=="string")throw TypeError(`Expected \`input\` to be a string, got ${typeof A}`);if(typeof q!=="number")throw TypeError(`Expected \`columns\` to be a number, got ${typeof q}`);if(q<1)return"";if(q===1)return _;let $=y06(A);if($<=q)return A;if(Y==="start"){if(w){let O=bH1(A,$-q+1,!0);return _+Gg(A,O,$).trim()}if(z===!0)_+=" ";return _+Gg(A,$-q+y06(_),$)}if(Y==="middle"){if(z===!0)_=` ${_} `;let O=Math.floor(q/2);if(w){let H=bH1(A,O),j=bH1(A,$-(q-O)+1,!0);return Gg(A,0,H)+_+Gg(A,j,$).trim()}return Gg(A,0,O)+_+Gg(A,$-(q-O)+y06(_),$)}if(Y==="end"){if(w){let O=bH1(A,q-1);return Gg(A,0,O)+_}if(z===!0)_=` ${_}`;return Gg(A,0,q-y06(_))+_}throw Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${Y}`)}var my7=k(()=>{Iy7();By7()});function yE(A,q,K){if(K==="wrap")return L56(A,q,{trim:!1,hard:!0});if(K==="wrap-trim")return L56(A,q,{trim:!0,hard:!0});if(K.startsWith("truncate")){let Y="end";if(K==="truncate-middle")Y="middle";if(K==="truncate-start")Y="start";return hJ8(A,q,{position:Y})}return A}var xH1=k(()=>{hH1();my7()});function uH1(A,q={},K,Y=[]){let z=A.textStyles?{...q,...A.textStyles}:q;for(let w of A.childNodes){if(w===void 0)continue;if(w.nodeName==="#text"){if(w.nodeValue.length>0)Y.push({text:w.nodeValue,styles:z,hyperlink:K})}else if(w.nodeName==="ink-text"||w.nodeName==="ink-virtual-text")uH1(w,z,K,Y);else if(w.nodeName==="ink-link"){let _=w.attributes.href;uH1(w,z,_||K,Y)}}return Y}function IJ8(A){let q="";for(let K of A.childNodes){if(K===void 0)continue;if(K.nodeName==="#text")q+=K.nodeValue;else if(K.nodeName==="ink-text"||K.nodeName==="ink-virtual-text")q+=IJ8(K);else if(K.nodeName==="ink-link")q+=IJ8(K)}return q}var gy7;var bJ8=k(()=>{gy7=IJ8});function xJ8(A){return A>=48&&A<=126}var fg,Ae="\x1B",cc="\x07",qe=";",Wb;var y56=k(()=>{fg={NUL:0,SOH:1,STX:2,ETX:3,EOT:4,ENQ:5,ACK:6,BEL:7,BS:8,HT:9,LF:10,VT:11,FF:12,CR:13,SO:14,SI:15,DLE:16,DC1:17,DC2:18,DC3:19,DC4:20,NAK:21,SYN:22,ETB:23,CAN:24,EM:25,SUB:26,ESC:27,FS:28,GS:29,RS:30,US:31,DEL:127},Wb={CSI:91,OSC:93,DCS:80,APC:95,PM:94,SOS:88,ST:92}});function Fy7(A){return A>=R06.PARAM_START&&A<=R06.PARAM_END}function BH1(A){return A>=R06.INTERMEDIATE_START&&A<=R06.INTERMEDIATE_END}function Qy7(A){return A>=R06.FINAL_START&&A<=R06.FINAL_END}function AO(...A){if(A.length===0)return uJ8;if(A.length===1)return`${uJ8}${A[0]}`;let q=A.slice(0,-1),K=A[A.length-1];return`${uJ8}${q.join(qe)}${K}`}function dy7(A=1){return A===0?"":AO(A,"A")}function X39(A=1){return A===0?"":AO(A,"B")}function P39(A=1){return A===0?"":AO(A,"C")}function W39(A=1){return A===0?"":AO(A,"D")}function cy7(A){return AO(A,"G")}function ly7(A,q){let K="";if(A<0)K+=W39(-A);else if(A>0)K+=P39(A);if(q<0)K+=dy7(-q);else if(q>0)K+=X39(q);return K}function iy7(A){if(A<=0)return"";let q="";for(let K=0;K<A;K++)if(q+=G39,K<A-1)q+=dy7(1);return q+=Z39,q}var uJ8,R06,aO,Uy7,py7,BJ8,Z39,mJ8,Cf2,hf2,G39,mH1,gJ8,ny7,ry7,oy7,ay7,sy7,S06;var Zb=k(()=>{y56();uJ8=Ae+String.fromCharCode(Wb.CSI),R06={PARAM_START:48,PARAM_END:63,INTERMEDIATE_START:32,INTERMEDIATE_END:47,FINAL_START:64,FINAL_END:126};aO={CUU:65,CUD:66,CUF:67,CUB:68,CNL:69,CPL:70,CHA:71,CUP:72,CHT:73,VPA:100,HVP:102,ED:74,EL:75,ECH:88,IL:76,DL:77,ICH:64,DCH:80,SU:83,SD:84,SM:104,RM:108,SGR:109,DSR:110,DECSCUSR:113,DECSTBM:114,SCOSC:115,SCORC:117,CBT:90},Uy7=["toEnd","toStart","all","scrollback"],py7=["toEnd","toStart","all"],BJ8=[{style:"block",blinking:!0},{style:"block",blinking:!0},{style:"block",blinking:!1},{style:"underline",blinking:!0},{style:"underline",blinking:!1},{style:"bar",blinking:!0},{style:"bar",blinking:!1}];Z39=AO("G"),mJ8=AO("H");Cf2=AO("s"),hf2=AO("u"),G39=AO(2,"K"),mH1=AO(2,"J"),gJ8=AO(3,"J");ny7=AO("200~"),ry7=AO("201~"),oy7=AO("I"),ay7=AO("O"),sy7=AO(">1u"),S06=AO("<u")});function C06(){let A="ground",q="";return{feed(K){let Y=ty7(K,A,q,!1);return A=Y.state.state,q=Y.state.buffer,Y.tokens},flush(){let K=ty7("",A,q,!0);return A=K.state.state,q=K.state.buffer,K.tokens},reset(){A="ground",q=""},buffer(){return q}}}function ty7(A,q,K,Y){let z=[],w={state:q,buffer:""},_=K+A,$=0,O=0,H=0,j=()=>{if($>O){let M=_.slice(O,$);if(M)z.push({type:"text",value:M})}O=$},J=(M)=>{if(M)z.push({type:"sequence",value:M});w.state="ground",O=$};while($<_.length){let M=_.charCodeAt($);switch(w.state){case"ground":if(M===fg.ESC)j(),H=$,w.state="escape",$++;else $++;break;case"escape":if(M===Wb.CSI)w.state="csi",$++;else if(M===Wb.OSC)w.state="osc",$++;else if(M===Wb.DCS)w.state="dcs",$++;else if(M===Wb.APC)w.state="apc",$++;else if(M===79)w.state="ss3",$++;else if(BH1(M))w.state="escapeIntermediate",$++;else if(xJ8(M))$++,J(_.slice(H,$));else if(M===fg.ESC)J(_.slice(H,$)),H=$,w.state="escape",$++;else w.state="ground",O=H;break;case"escapeIntermediate":if(BH1(M))$++;else if(xJ8(M))$++,J(_.slice(H,$));else w.state="ground",O=H;break;case"csi":if(Qy7(M))$++,J(_.slice(H,$));else if(Fy7(M)||BH1(M))$++;else w.state="ground",O=H;break;case"ss3":if(M>=64&&M<=126)$++,J(_.slice(H,$));else w.state="ground",O=H;break;case"osc":if(M===fg.BEL)$++,J(_.slice(H,$));else if(M===fg.ESC&&$+1<_.length&&_.charCodeAt($+1)===Wb.ST)$+=2,J(_.slice(H,$));else $++;break;case"dcs":case"apc":if(M===fg.BEL)$++,J(_.slice(H,$));else if(M===fg.ESC&&$+1<_.length&&_.charCodeAt($+1)===Wb.ST)$+=2,J(_.slice(H,$));else $++;break}}if(w.state==="ground")j();else if(Y){let M=_.slice(H);if(M)z.push({type:"sequence",value:M});w.state="ground"}else w.buffer=_.slice(H);return{tokens:z,state:w}}var gH1=k(()=>{y56();Zb()});function ey7(A,q=f39){if(!A.includes("\t"))return A;let K=C06(),Y=K.feed(A);Y.push(...K.flush());let z="",w=0;for(let _ of Y)if(_.type==="sequence")z+=_.value;else{let $=_.value.split(/(\t|\n)/);for(let O of $)if(O==="\t"){let H=q-w%q;z+=" ".repeat(H),w+=H}else if(O===`
`)z+=O,w=0;else z+=O,w+=B8(O)}return z}var f39=8;var AR7=k(()=>{y5();gH1()});function qR7(A,q,K){let Y=$g6.get(A);if(Y)Y.push(q);else $g6.set(A,[q]);if(K)FJ8=!0}function KR7(){let A=FJ8;return FJ8=!1,A}var kN,$g6,FJ8=!1;var Og6=k(()=>{kN=new WeakMap,$g6=new WeakMap});var T39,YR7;var zR7=k(()=>{T39=(()=>{var A=import.meta.url;return function(q){q=q||{};var K;K||(K=typeof q<"u"?q:{});var Y,z;K.ready=new Promise(function(Y1,w1){Y=Y1,z=w1});var w=Object.assign({},K),_="";typeof document<"u"&&document.currentScript&&(_=document.currentScript.src),A&&(_=A),_.indexOf("blob:")!==0?_=_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):_="";var $=K.print||console.log.bind(console),O=K.printErr||console.warn.bind(console);Object.assign(K,w),w=null;var H;K.wasmBinary&&(H=K.wasmBinary);var j=K.noExitRuntime||!0;typeof WebAssembly!="object"&&d("no native wasm support detected");var J,M=!1;function D(Y1,w1,R1){R1=w1+R1;for(var F1="";!(w1>=R1);){var e1=Y1[w1++];if(!e1)break;if(e1&128){var y8=Y1[w1++]&63;if((e1&224)==192)F1+=String.fromCharCode((e1&31)<<6|y8);else{var AA=Y1[w1++]&63;e1=(e1&240)==224?(e1&15)<<12|y8<<6|AA:(e1&7)<<18|y8<<12|AA<<6|Y1[w1++]&63,65536>e1?F1+=String.fromCharCode(e1):(e1-=65536,F1+=String.fromCharCode(55296|e1>>10,56320|e1&1023))}}else F1+=String.fromCharCode(e1)}return F1}var X,P,W,Z,G,f,V,N,v;function y(){var Y1=J.buffer;X=Y1,K.HEAP8=P=new Int8Array(Y1),K.HEAP16=Z=new Int16Array(Y1),K.HEAP32=f=new Int32Array(Y1),K.HEAPU8=W=new Uint8Array(Y1),K.HEAPU16=G=new Uint16Array(Y1),K.HEAPU32=V=new Uint32Array(Y1),K.HEAPF32=N=new Float32Array(Y1),K.HEAPF64=v=new Float64Array(Y1)}var R,h=[],B=[],x=[];function F(){var Y1=K.preRun.shift();h.unshift(Y1)}var g=0,b=null,U=null;function d(Y1){if(K.onAbort)K.onAbort(Y1);throw Y1="Aborted("+Y1+")",O(Y1),M=!0,Y1=new WebAssembly.RuntimeError(Y1+". Build with -sASSERTIONS for more info."),z(Y1),Y1}function l(Y1){return Y1.startsWith("data:application/octet-stream;base64,")}var t="data:application/octet-stream;base64, ";if(!l(t)){var s=t;t=K.locateFile?K.locateFile(s,_):_+s}function H6(){var Y1=t;try{if(Y1==t&&H)return new Uint8Array(H);if(l(Y1))try{var w1=PY(Y1.slice(37)),R1=new Uint8Array(w1.length);for(Y1=0;Y1<w1.length;++Y1)R1[Y1]=w1.charCodeAt(Y1);var F1=R1}catch(y8){throw Error("Converting base64 string to bytes failed.")}else F1=void 0;var e1=F1;if(e1)return e1;throw"both async and sync fetching of the wasm failed"}catch(y8){d(y8)}}function Z6(){return H||typeof fetch!="function"?Promise.resolve().then(function(){return H6()}):fetch(t,{credentials:"same-origin"}).then(function(Y1){if(!Y1.ok)throw"failed to load wasm binary file at '"+t+"'";return Y1.arrayBuffer()}).catch(function(){return H6()})}function G6(Y1){for(;0<Y1.length;)Y1.shift()(K)}function q6(Y1){if(Y1===void 0)return"_unknown";Y1=Y1.replace(/[^a-zA-Z0-9_]/g,"$");var w1=Y1.charCodeAt(0);return 48<=w1&&57>=w1?"_"+Y1:Y1}function w6(Y1,w1){return Y1=q6(Y1),function(){return w1.apply(this,arguments)}}var j6=[{},{value:void 0},{value:null},{value:!0},{value:!1}],_6=[];function k6(Y1){var w1=Error,R1=w6(Y1,function(F1){this.name=Y1,this.message=F1,F1=Error(F1).stack,F1!==void 0&&(this.stack=this.toString()+`
`+F1.replace(/^Error(:[^\n]*)?\n/,""))});return R1.prototype=Object.create(w1.prototype),R1.prototype.constructor=R1,R1.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},R1}var P6=void 0;function A6(Y1){throw new P6(Y1)}var K6=(Y1)=>{return Y1||A6("Cannot use deleted val. handle = "+Y1),j6[Y1].value},z6=(Y1)=>{switch(Y1){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var w1=_6.length?_6.pop():j6.length;return j6[w1]={ga:1,value:Y1},w1}},a=void 0,r=void 0;function X6(Y1){for(var w1="";W[Y1];)w1+=r[W[Y1++]];return w1}var O6=[];function D6(){for(;O6.length;){var Y1=O6.pop();Y1.M.$=!1,Y1.delete()}}var y6=void 0,C6={};function h6(Y1,w1){for(w1===void 0&&A6("ptr should not be undefined");Y1.R;)w1=Y1.ba(w1),Y1=Y1.R;return w1}var f6={};function M6(Y1){Y1=x2(Y1);var w1=X6(Y1);return UK(Y1),w1}function V6(Y1,w1){var R1=f6[Y1];return R1===void 0&&A6(w1+" has unknown type "+M6(Y1)),R1}function p6(){}var b6=!1;function R6(Y1){--Y1.count.value,Y1.count.value===0&&(Y1.T?Y1.U.W(Y1.T):Y1.P.N.W(Y1.O))}function x6(Y1,w1,R1){if(w1===R1)return Y1;if(R1.R===void 0)return null;return Y1=x6(Y1,w1,R1.R),Y1===null?null:R1.na(Y1)}var d6={};function t6(Y1,w1){return w1=h6(Y1,w1),C6[w1]}var L6=void 0;function u6(Y1){throw new L6(Y1)}function e6(Y1,w1){return w1.P&&w1.O||u6("makeClassHandle requires ptr and ptrType"),!!w1.U!==!!w1.T&&u6("Both smartPtrType and smartPtr must be specified"),w1.count={value:1},H1(Object.create(Y1,{M:{value:w1}}))}function H1(Y1){if(typeof FinalizationRegistry>"u")return H1=(w1)=>w1,Y1;return b6=new FinalizationRegistry((w1)=>{R6(w1.M)}),H1=(w1)=>{var R1=w1.M;return R1.T&&b6.register(w1,{M:R1},w1),w1},p6=(w1)=>{b6.unregister(w1)},H1(Y1)}var Z1={};function v1(Y1){for(;Y1.length;){var w1=Y1.pop();Y1.pop()(w1)}}function T6(Y1){return this.fromWireType(f[Y1>>2])}var v6={},A1={};function F6(Y1,w1,R1){function F1(C1){C1=R1(C1),C1.length!==Y1.length&&u6("Mismatched type converter count");for(var k8=0;k8<Y1.length;++k8)l6(Y1[k8],C1[k8])}Y1.forEach(function(C1){A1[C1]=w1});var e1=Array(w1.length),y8=[],AA=0;w1.forEach((C1,k8)=>{f6.hasOwnProperty(C1)?e1[k8]=f6[C1]:(y8.push(C1),v6.hasOwnProperty(C1)||(v6[C1]=[]),v6[C1].push(()=>{e1[k8]=f6[C1],++AA,AA===y8.length&&F1(e1)}))}),y8.length===0&&F1(e1)}function m6(Y1){switch(Y1){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw TypeError("Unknown type size: "+Y1)}}function l6(Y1,w1,R1={}){if(!("argPackAdvance"in w1))throw TypeError("registerType registeredInstance requires argPackAdvance");var F1=w1.name;if(Y1||A6('type "'+F1+'" must have a positive integer typeid pointer'),f6.hasOwnProperty(Y1)){if(R1.ua)return;A6("Cannot register type '"+F1+"' twice")}f6[Y1]=w1,delete A1[Y1],v6.hasOwnProperty(Y1)&&(w1=v6[Y1],delete v6[Y1],w1.forEach((e1)=>e1()))}function N1(Y1){A6(Y1.M.P.N.name+" instance already deleted")}function X1(){}function k1(Y1,w1,R1){if(Y1[w1].S===void 0){var F1=Y1[w1];Y1[w1]=function(){return Y1[w1].S.hasOwnProperty(arguments.length)||A6("Function '"+R1+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+Y1[w1].S+")!"),Y1[w1].S[arguments.length].apply(this,arguments)},Y1[w1].S=[],Y1[w1].S[F1.Z]=F1}}function i1(Y1,w1){K.hasOwnProperty(Y1)?(A6("Cannot register public name '"+Y1+"' twice"),k1(K,Y1,Y1),K.hasOwnProperty(void 0)&&A6("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),K[Y1].S[void 0]=w1):K[Y1]=w1}function t8(Y1,w1,R1,F1,e1,y8,AA,C1){this.name=Y1,this.constructor=w1,this.X=R1,this.W=F1,this.R=e1,this.pa=y8,this.ba=AA,this.na=C1,this.ja=[]}function s8(Y1,w1,R1){for(;w1!==R1;)w1.ba||A6("Expected null or instance of "+R1.name+", got an instance of "+w1.name),Y1=w1.ba(Y1),w1=w1.R;return Y1}function _7(Y1,w1){if(w1===null)return this.ea&&A6("null is not a valid "+this.name),0;return w1.M||A6('Cannot pass "'+Gz(w1)+'" as a '+this.name),w1.M.O||A6("Cannot pass deleted object as a pointer of type "+this.name),s8(w1.M.O,w1.M.P.N,this.N)}function X7(Y1,w1){if(w1===null){if(this.ea&&A6("null is not a valid "+this.name),this.da){var R1=this.fa();return Y1!==null&&Y1.push(this.W,R1),R1}return 0}if(w1.M||A6('Cannot pass "'+Gz(w1)+'" as a '+this.name),w1.M.O||A6("Cannot pass deleted object as a pointer of type "+this.name),!this.ca&&w1.M.P.ca&&A6("Cannot convert argument of type "+(w1.M.U?w1.M.U.name:w1.M.P.name)+" to parameter type "+this.name),R1=s8(w1.M.O,w1.M.P.N,this.N),this.da)switch(w1.M.T===void 0&&A6("Passing raw pointer to smart pointer is illegal"),this.Ba){case 0:w1.M.U===this?R1=w1.M.T:A6("Cannot convert argument of type "+(w1.M.U?w1.M.U.name:w1.M.P.name)+" to parameter type "+this.name);break;case 1:R1=w1.M.T;break;case 2:if(w1.M.U===this)R1=w1.M.T;else{var F1=w1.clone();R1=this.xa(R1,z6(function(){F1.delete()})),Y1!==null&&Y1.push(this.W,R1)}break;default:A6("Unsupporting sharing policy")}return R1}function RA(Y1,w1){if(w1===null)return this.ea&&A6("null is not a valid "+this.name),0;return w1.M||A6('Cannot pass "'+Gz(w1)+'" as a '+this.name),w1.M.O||A6("Cannot pass deleted object as a pointer of type "+this.name),w1.M.P.ca&&A6("Cannot convert argument of type "+w1.M.P.name+" to parameter type "+this.name),s8(w1.M.O,w1.M.P.N,this.N)}function M7(Y1,w1,R1,F1){this.name=Y1,this.N=w1,this.ea=R1,this.ca=F1,this.da=!1,this.W=this.xa=this.fa=this.ka=this.Ba=this.wa=void 0,w1.R!==void 0?this.toWireType=X7:(this.toWireType=F1?_7:RA,this.V=null)}function Fq(Y1,w1){K.hasOwnProperty(Y1)||u6("Replacing nonexistant public symbol"),K[Y1]=w1,K[Y1].Z=void 0}function aA(Y1,w1){var R1=[];return function(){if(R1.length=0,Object.assign(R1,arguments),Y1.includes("j")){var F1=K["dynCall_"+Y1];F1=R1&&R1.length?F1.apply(null,[w1].concat(R1)):F1.call(null,w1)}else F1=R.get(w1).apply(null,R1);return F1}}function a7(Y1,w1){Y1=X6(Y1);var R1=Y1.includes("j")?aA(Y1,w1):R.get(w1);return typeof R1!="function"&&A6("unknown function pointer with signature "+Y1+": "+w1),R1}var P7=void 0;function g4(Y1,w1){function R1(y8){e1[y8]||f6[y8]||(A1[y8]?A1[y8].forEach(R1):(F1.push(y8),e1[y8]=!0))}var F1=[],e1={};throw w1.forEach(R1),new P7(Y1+": "+F1.map(M6).join([", "]))}function Mq(Y1,w1,R1,F1,e1){var y8=w1.length;2>y8&&A6("argTypes array size mismatch! Must at least get return value and 'this' types!");var AA=w1[1]!==null&&R1!==null,C1=!1;for(R1=1;R1<w1.length;++R1)if(w1[R1]!==null&&w1[R1].V===void 0){C1=!0;break}var k8=w1[0].name!=="void",g8=y8-2,o8=Array(g8),WA=[],y7=[];return function(){if(arguments.length!==g8&&A6("function "+Y1+" called with "+arguments.length+" arguments, expected "+g8+" args!"),y7.length=0,WA.length=AA?2:1,WA[0]=e1,AA){var N3=w1[1].toWireType(y7,this);WA[1]=N3}for(var x4=0;x4<g8;++x4)o8[x4]=w1[x4+2].toWireType(y7,arguments[x4]),WA.push(o8[x4]);if(x4=F1.apply(null,WA),C1)v1(y7);else for(var W4=AA?1:2;W4<w1.length;W4++){var Aq=W4===1?N3:o8[W4-2];w1[W4].V!==null&&w1[W4].V(Aq)}return N3=k8?w1[0].fromWireType(x4):void 0,N3}}function nY(Y1,w1){for(var R1=[],F1=0;F1<Y1;F1++)R1.push(V[w1+4*F1>>2]);return R1}function HK(Y1){4<Y1&&--j6[Y1].ga===0&&(j6[Y1]=void 0,_6.push(Y1))}function Gz(Y1){if(Y1===null)return"null";var w1=typeof Y1;return w1==="object"||w1==="array"||w1==="function"?Y1.toString():""+Y1}function CY(Y1,w1){switch(w1){case 2:return function(R1){return this.fromWireType(N[R1>>2])};case 3:return function(R1){return this.fromWireType(v[R1>>3])};default:throw TypeError("Unknown float type: "+Y1)}}function l9(Y1,w1,R1){switch(w1){case 0:return R1?function(F1){return P[F1]}:function(F1){return W[F1]};case 1:return R1?function(F1){return Z[F1>>1]}:function(F1){return G[F1>>1]};case 2:return R1?function(F1){return f[F1>>2]}:function(F1){return V[F1>>2]};default:throw TypeError("Unknown integer type: "+Y1)}}function fz(Y1,w1){for(var R1="",F1=0;!(F1>=w1/2);++F1){var e1=Z[Y1+2*F1>>1];if(e1==0)break;R1+=String.fromCharCode(e1)}return R1}function a_(Y1,w1,R1){if(R1===void 0&&(R1=2147483647),2>R1)return 0;R1-=2;var F1=w1;R1=R1<2*Y1.length?R1/2:Y1.length;for(var e1=0;e1<R1;++e1)Z[w1>>1]=Y1.charCodeAt(e1),w1+=2;return Z[w1>>1]=0,w1-F1}function VH(Y1){return 2*Y1.length}function R9(Y1,w1){for(var R1=0,F1="";!(R1>=w1/4);){var e1=f[Y1+4*R1>>2];if(e1==0)break;++R1,65536<=e1?(e1-=65536,F1+=String.fromCharCode(55296|e1>>10,56320|e1&1023)):F1+=String.fromCharCode(e1)}return F1}function DY(Y1,w1,R1){if(R1===void 0&&(R1=2147483647),4>R1)return 0;var F1=w1;R1=F1+R1-4;for(var e1=0;e1<Y1.length;++e1){var y8=Y1.charCodeAt(e1);if(55296<=y8&&57343>=y8){var AA=Y1.charCodeAt(++e1);y8=65536+((y8&1023)<<10)|AA&1023}if(f[w1>>2]=y8,w1+=4,w1+4>R1)break}return f[w1>>2]=0,w1-F1}function Rw(Y1){for(var w1=0,R1=0;R1<Y1.length;++R1){var F1=Y1.charCodeAt(R1);55296<=F1&&57343>=F1&&++R1,w1+=4}return w1}var B$={};function Wq(Y1){var w1=B$[Y1];return w1===void 0?X6(Y1):w1}var XY=[];function H_(Y1){var w1=XY.length;return XY.push(Y1),w1}function k4(Y1,w1){for(var R1=Array(Y1),F1=0;F1<Y1;++F1)R1[F1]=V6(V[w1+4*F1>>2],"parameter "+F1);return R1}var D3=[],x5=[null,[],[]];P6=K.BindingError=k6("BindingError"),K.count_emval_handles=function(){for(var Y1=0,w1=5;w1<j6.length;++w1)j6[w1]!==void 0&&++Y1;return Y1},K.get_first_emval=function(){for(var Y1=5;Y1<j6.length;++Y1)if(j6[Y1]!==void 0)return j6[Y1];return null},a=K.PureVirtualError=k6("PureVirtualError");for(var S9=Array(256),H5=0;256>H5;++H5)S9[H5]=String.fromCharCode(H5);r=S9,K.getInheritedInstanceCount=function(){return Object.keys(C6).length},K.getLiveInheritedInstances=function(){var Y1=[],w1;for(w1 in C6)C6.hasOwnProperty(w1)&&Y1.push(C6[w1]);return Y1},K.flushPendingDeletes=D6,K.setDelayFunction=function(Y1){y6=Y1,O6.length&&y6&&y6(D6)},L6=K.InternalError=k6("InternalError"),X1.prototype.isAliasOf=function(Y1){if(!(this instanceof X1&&Y1 instanceof X1))return!1;var w1=this.M.P.N,R1=this.M.O,F1=Y1.M.P.N;for(Y1=Y1.M.O;w1.R;)R1=w1.ba(R1),w1=w1.R;for(;F1.R;)Y1=F1.ba(Y1),F1=F1.R;return w1===F1&&R1===Y1},X1.prototype.clone=function(){if(this.M.O||N1(this),this.M.aa)return this.M.count.value+=1,this;var Y1=H1,w1=Object,R1=w1.create,F1=Object.getPrototypeOf(this),e1=this.M;return Y1=Y1(R1.call(w1,F1,{M:{value:{count:e1.count,$:e1.$,aa:e1.aa,O:e1.O,P:e1.P,T:e1.T,U:e1.U}}})),Y1.M.count.value+=1,Y1.M.$=!1,Y1},X1.prototype.delete=function(){this.M.O||N1(this),this.M.$&&!this.M.aa&&A6("Object already scheduled for deletion"),p6(this),R6(this.M),this.M.aa||(this.M.T=void 0,this.M.O=void 0)},X1.prototype.isDeleted=function(){return!this.M.O},X1.prototype.deleteLater=function(){return this.M.O||N1(this),this.M.$&&!this.M.aa&&A6("Object already scheduled for deletion"),O6.push(this),O6.length===1&&y6&&y6(D6),this.M.$=!0,this},M7.prototype.qa=function(Y1){return this.ka&&(Y1=this.ka(Y1)),Y1},M7.prototype.ha=function(Y1){this.W&&this.W(Y1)},M7.prototype.argPackAdvance=8,M7.prototype.readValueFromPointer=T6,M7.prototype.deleteObject=function(Y1){if(Y1!==null)Y1.delete()},M7.prototype.fromWireType=function(Y1){function w1(){return this.da?e6(this.N.X,{P:this.wa,O:R1,U:this,T:Y1}):e6(this.N.X,{P:this,O:Y1})}var R1=this.qa(Y1);if(!R1)return this.ha(Y1),null;var F1=t6(this.N,R1);if(F1!==void 0){if(F1.M.count.value===0)return F1.M.O=R1,F1.M.T=Y1,F1.clone();return F1=F1.clone(),this.ha(Y1),F1}if(F1=this.N.pa(R1),F1=d6[F1],!F1)return w1.call(this);F1=this.ca?F1.la:F1.pointerType;var e1=x6(R1,this.N,F1.N);return e1===null?w1.call(this):this.da?e6(F1.N.X,{P:F1,O:e1,U:this,T:Y1}):e6(F1.N.X,{P:F1,O:e1})},P7=K.UnboundTypeError=k6("UnboundTypeError");var PY=typeof atob=="function"?atob:function(Y1){var w1="",R1=0;Y1=Y1.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var F1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(Y1.charAt(R1++)),e1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(Y1.charAt(R1++)),y8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(Y1.charAt(R1++)),AA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(Y1.charAt(R1++));F1=F1<<2|e1>>4,e1=(e1&15)<<4|y8>>2;var C1=(y8&3)<<6|AA;w1+=String.fromCharCode(F1),y8!==64&&(w1+=String.fromCharCode(e1)),AA!==64&&(w1+=String.fromCharCode(C1))}while(R1<Y1.length);return w1},C4={l:function(Y1,w1,R1,F1){d("Assertion failed: "+(Y1?D(W,Y1):"")+", at: "+[w1?w1?D(W,w1):"":"unknown filename",R1,F1?F1?D(W,F1):"":"unknown function"])},q:function(Y1,w1,R1){Y1=X6(Y1),w1=V6(w1,"wrapper"),R1=K6(R1);var F1=[].slice,e1=w1.N,y8=e1.X,AA=e1.R.X,C1=e1.R.constructor;Y1=w6(Y1,function(){e1.R.ja.forEach(function(g8){if(this[g8]===AA[g8])throw new a("Pure virtual function "+g8+" must be implemented in JavaScript")}.bind(this)),Object.defineProperty(this,"__parent",{value:y8}),this.__construct.apply(this,F1.call(arguments))}),y8.__construct=function(){this===y8&&A6("Pass correct 'this' to __construct");var g8=C1.implement.apply(void 0,[this].concat(F1.call(arguments)));p6(g8);var o8=g8.M;g8.notifyOnDestruction(),o8.aa=!0,Object.defineProperties(this,{M:{value:o8}}),H1(this),g8=o8.O,g8=h6(e1,g8),C6.hasOwnProperty(g8)?A6("Tried to register registered instance: "+g8):C6[g8]=this},y8.__destruct=function(){this===y8&&A6("Pass correct 'this' to __destruct"),p6(this);var g8=this.M.O;g8=h6(e1,g8),C6.hasOwnProperty(g8)?delete C6[g8]:A6("Tried to unregister unregistered instance: "+g8)},Y1.prototype=Object.create(y8);for(var k8 in R1)Y1.prototype[k8]=R1[k8];return z6(Y1)},j:function(Y1){var w1=Z1[Y1];delete Z1[Y1];var{fa:R1,W:F1,ia:e1}=w1,y8=e1.map((AA)=>AA.ta).concat(e1.map((AA)=>AA.za));F6([Y1],y8,(AA)=>{var C1={};return e1.forEach((k8,g8)=>{var o8=AA[g8],WA=k8.ra,y7=k8.sa,N3=AA[g8+e1.length],x4=k8.ya,W4=k8.Aa;C1[k8.oa]={read:(Aq)=>o8.fromWireType(WA(y7,Aq)),write:(Aq,t5)=>{var pK=[];x4(W4,Aq,N3.toWireType(pK,t5)),v1(pK)}}}),[{name:w1.name,fromWireType:function(k8){var g8={},o8;for(o8 in C1)g8[o8]=C1[o8].read(k8);return F1(k8),g8},toWireType:function(k8,g8){for(var o8 in C1)if(!(o8 in g8))throw TypeError('Missing field:  "'+o8+'"');var WA=R1();for(o8 in C1)C1[o8].write(WA,g8[o8]);return k8!==null&&k8.push(F1,WA),WA},argPackAdvance:8,readValueFromPointer:T6,V:F1}]})},v:function(){},B:function(Y1,w1,R1,F1,e1){var y8=m6(R1);w1=X6(w1),l6(Y1,{name:w1,fromWireType:function(AA){return!!AA},toWireType:function(AA,C1){return C1?F1:e1},argPackAdvance:8,readValueFromPointer:function(AA){if(R1===1)var C1=P;else if(R1===2)C1=Z;else if(R1===4)C1=f;else throw TypeError("Unknown boolean type size: "+w1);return this.fromWireType(C1[AA>>y8])},V:null})},f:function(Y1,w1,R1,F1,e1,y8,AA,C1,k8,g8,o8,WA,y7){o8=X6(o8),y8=a7(e1,y8),C1&&(C1=a7(AA,C1)),g8&&(g8=a7(k8,g8)),y7=a7(WA,y7);var N3=q6(o8);i1(N3,function(){g4("Cannot construct "+o8+" due to unbound types",[F1])}),F6([Y1,w1,R1],F1?[F1]:[],function(x4){if(x4=x4[0],F1)var W4=x4.N,Aq=W4.X;else Aq=X1.prototype;x4=w6(N3,function(){if(Object.getPrototypeOf(this)!==t5)throw new P6("Use 'new' to construct "+o8);if(pK.Y===void 0)throw new P6(o8+" has no accessible constructor");var j_=pK.Y[arguments.length];if(j_===void 0)throw new P6("Tried to invoke ctor of "+o8+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(pK.Y).toString()+") parameters instead!");return j_.apply(this,arguments)});var t5=Object.create(Aq,{constructor:{value:x4}});x4.prototype=t5;var pK=new t8(o8,x4,t5,y7,W4,y8,C1,g8);W4=new M7(o8,pK,!0,!1),Aq=new M7(o8+"*",pK,!1,!1);var C9=new M7(o8+" const*",pK,!1,!0);return d6[Y1]={pointerType:Aq,la:C9},Fq(N3,x4),[W4,Aq,C9]})},d:function(Y1,w1,R1,F1,e1,y8,AA){var C1=nY(R1,F1);w1=X6(w1),y8=a7(e1,y8),F6([],[Y1],function(k8){function g8(){g4("Cannot call "+o8+" due to unbound types",C1)}k8=k8[0];var o8=k8.name+"."+w1;w1.startsWith("@@")&&(w1=Symbol[w1.substring(2)]);var WA=k8.N.constructor;return WA[w1]===void 0?(g8.Z=R1-1,WA[w1]=g8):(k1(WA,w1,o8),WA[w1].S[R1-1]=g8),F6([],C1,function(y7){return y7=Mq(o8,[y7[0],null].concat(y7.slice(1)),null,y8,AA),WA[w1].S===void 0?(y7.Z=R1-1,WA[w1]=y7):WA[w1].S[R1-1]=y7,[]}),[]})},p:function(Y1,w1,R1,F1,e1,y8){0<w1||d();var AA=nY(w1,R1);e1=a7(F1,e1),F6([],[Y1],function(C1){C1=C1[0];var k8="constructor "+C1.name;if(C1.N.Y===void 0&&(C1.N.Y=[]),C1.N.Y[w1-1]!==void 0)throw new P6("Cannot register multiple constructors with identical number of parameters ("+(w1-1)+") for class '"+C1.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return C1.N.Y[w1-1]=()=>{g4("Cannot construct "+C1.name+" due to unbound types",AA)},F6([],AA,function(g8){return g8.splice(1,0,null),C1.N.Y[w1-1]=Mq(k8,g8,null,e1,y8),[]}),[]})},a:function(Y1,w1,R1,F1,e1,y8,AA,C1){var k8=nY(R1,F1);w1=X6(w1),y8=a7(e1,y8),F6([],[Y1],function(g8){function o8(){g4("Cannot call "+WA+" due to unbound types",k8)}g8=g8[0];var WA=g8.name+"."+w1;w1.startsWith("@@")&&(w1=Symbol[w1.substring(2)]),C1&&g8.N.ja.push(w1);var y7=g8.N.X,N3=y7[w1];return N3===void 0||N3.S===void 0&&N3.className!==g8.name&&N3.Z===R1-2?(o8.Z=R1-2,o8.className=g8.name,y7[w1]=o8):(k1(y7,w1,WA),y7[w1].S[R1-2]=o8),F6([],k8,function(x4){return x4=Mq(WA,x4,g8,y8,AA),y7[w1].S===void 0?(x4.Z=R1-2,y7[w1]=x4):y7[w1].S[R1-2]=x4,[]}),[]})},A:function(Y1,w1){w1=X6(w1),l6(Y1,{name:w1,fromWireType:function(R1){var F1=K6(R1);return HK(R1),F1},toWireType:function(R1,F1){return z6(F1)},argPackAdvance:8,readValueFromPointer:T6,V:null})},n:function(Y1,w1,R1){R1=m6(R1),w1=X6(w1),l6(Y1,{name:w1,fromWireType:function(F1){return F1},toWireType:function(F1,e1){return e1},argPackAdvance:8,readValueFromPointer:CY(w1,R1),V:null})},e:function(Y1,w1,R1,F1,e1){w1=X6(w1),e1===-1&&(e1=4294967295),e1=m6(R1);var y8=(C1)=>C1;if(F1===0){var AA=32-8*R1;y8=(C1)=>C1<<AA>>>AA}R1=w1.includes("unsigned")?function(C1,k8){return k8>>>0}:function(C1,k8){return k8},l6(Y1,{name:w1,fromWireType:y8,toWireType:R1,argPackAdvance:8,readValueFromPointer:l9(w1,e1,F1!==0),V:null})},b:function(Y1,w1,R1){function F1(y8){y8>>=2;var AA=V;return new e1(X,AA[y8+1],AA[y8])}var e1=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][w1];R1=X6(R1),l6(Y1,{name:R1,fromWireType:F1,argPackAdvance:8,readValueFromPointer:F1},{ua:!0})},o:function(Y1,w1){w1=X6(w1);var R1=w1==="std::string";l6(Y1,{name:w1,fromWireType:function(F1){var e1=V[F1>>2],y8=F1+4;if(R1)for(var AA=y8,C1=0;C1<=e1;++C1){var k8=y8+C1;if(C1==e1||W[k8]==0){if(AA=AA?D(W,AA,k8-AA):"",g8===void 0)var g8=AA;else g8+=String.fromCharCode(0),g8+=AA;AA=k8+1}}else{g8=Array(e1);for(C1=0;C1<e1;++C1)g8[C1]=String.fromCharCode(W[y8+C1]);g8=g8.join("")}return UK(F1),g8},toWireType:function(F1,e1){e1 instanceof ArrayBuffer&&(e1=new Uint8Array(e1));var y8,AA=typeof e1=="string";if(AA||e1 instanceof Uint8Array||e1 instanceof Uint8ClampedArray||e1 instanceof Int8Array||A6("Cannot pass non-string to std::string"),R1&&AA){var C1=0;for(y8=0;y8<e1.length;++y8){var k8=e1.charCodeAt(y8);127>=k8?C1++:2047>=k8?C1+=2:55296<=k8&&57343>=k8?(C1+=4,++y8):C1+=3}y8=C1}else y8=e1.length;if(C1=Tz(4+y8+1),k8=C1+4,V[C1>>2]=y8,R1&&AA){if(AA=k8,k8=y8+1,y8=W,0<k8){k8=AA+k8-1;for(var g8=0;g8<e1.length;++g8){var o8=e1.charCodeAt(g8);if(55296<=o8&&57343>=o8){var WA=e1.charCodeAt(++g8);o8=65536+((o8&1023)<<10)|WA&1023}if(127>=o8){if(AA>=k8)break;y8[AA++]=o8}else{if(2047>=o8){if(AA+1>=k8)break;y8[AA++]=192|o8>>6}else{if(65535>=o8){if(AA+2>=k8)break;y8[AA++]=224|o8>>12}else{if(AA+3>=k8)break;y8[AA++]=240|o8>>18,y8[AA++]=128|o8>>12&63}y8[AA++]=128|o8>>6&63}y8[AA++]=128|o8&63}}y8[AA]=0}}else if(AA)for(AA=0;AA<y8;++AA)g8=e1.charCodeAt(AA),255<g8&&(UK(k8),A6("String has UTF-16 code units that do not fit in 8 bits")),W[k8+AA]=g8;else for(AA=0;AA<y8;++AA)W[k8+AA]=e1[AA];return F1!==null&&F1.push(UK,C1),C1},argPackAdvance:8,readValueFromPointer:T6,V:function(F1){UK(F1)}})},i:function(Y1,w1,R1){if(R1=X6(R1),w1===2)var F1=fz,e1=a_,y8=VH,AA=()=>G,C1=1;else w1===4&&(F1=R9,e1=DY,y8=Rw,AA=()=>V,C1=2);l6(Y1,{name:R1,fromWireType:function(k8){for(var g8=V[k8>>2],o8=AA(),WA,y7=k8+4,N3=0;N3<=g8;++N3){var x4=k8+4+N3*w1;if(N3==g8||o8[x4>>C1]==0)y7=F1(y7,x4-y7),WA===void 0?WA=y7:(WA+=String.fromCharCode(0),WA+=y7),y7=x4+w1}return UK(k8),WA},toWireType:function(k8,g8){typeof g8!="string"&&A6("Cannot pass non-string to C++ string type "+R1);var o8=y8(g8),WA=Tz(4+o8+w1);return V[WA>>2]=o8>>C1,e1(g8,WA+4,o8+w1),k8!==null&&k8.push(UK,WA),WA},argPackAdvance:8,readValueFromPointer:T6,V:function(k8){UK(k8)}})},k:function(Y1,w1,R1,F1,e1,y8){Z1[Y1]={name:X6(w1),fa:a7(R1,F1),W:a7(e1,y8),ia:[]}},h:function(Y1,w1,R1,F1,e1,y8,AA,C1,k8,g8){Z1[Y1].ia.push({oa:X6(w1),ta:R1,ra:a7(F1,e1),sa:y8,za:AA,ya:a7(C1,k8),Aa:g8})},C:function(Y1,w1){w1=X6(w1),l6(Y1,{va:!0,name:w1,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},s:function(Y1,w1,R1,F1,e1){Y1=XY[Y1],w1=K6(w1),R1=Wq(R1);var y8=[];return V[F1>>2]=z6(y8),Y1(w1,R1,y8,e1)},t:function(Y1,w1,R1,F1){Y1=XY[Y1],w1=K6(w1),R1=Wq(R1),Y1(w1,R1,null,F1)},g:HK,m:function(Y1,w1){var R1=k4(Y1,w1),F1=R1[0];w1=F1.name+"_$"+R1.slice(1).map(function(AA){return AA.name}).join("_")+"$";var e1=D3[w1];if(e1!==void 0)return e1;var y8=Array(Y1-1);return e1=H_((AA,C1,k8,g8)=>{for(var o8=0,WA=0;WA<Y1-1;++WA)y8[WA]=R1[WA+1].readValueFromPointer(g8+o8),o8+=R1[WA+1].argPackAdvance;AA=AA[C1].apply(AA,y8);for(WA=0;WA<Y1-1;++WA)R1[WA+1].ma&&R1[WA+1].ma(y8[WA]);if(!F1.va)return F1.toWireType(k8,AA)}),D3[w1]=e1},D:function(Y1){4<Y1&&(j6[Y1].ga+=1)},r:function(Y1){var w1=K6(Y1);v1(w1),HK(Y1)},c:function(){d("")},x:function(Y1,w1,R1){W.copyWithin(Y1,w1,w1+R1)},w:function(Y1){var w1=W.length;if(Y1>>>=0,2147483648<Y1)return!1;for(var R1=1;4>=R1;R1*=2){var F1=w1*(1+0.2/R1);F1=Math.min(F1,Y1+100663296);var e1=Math;F1=Math.max(Y1,F1),e1=e1.min.call(e1,2147483648,F1+(65536-F1%65536)%65536);A:{try{J.grow(e1-X.byteLength+65535>>>16),y();var y8=1;break A}catch(AA){}y8=void 0}if(y8)return!0}return!1},z:function(){return 52},u:function(){return 70},y:function(Y1,w1,R1,F1){for(var e1=0,y8=0;y8<R1;y8++){var AA=V[w1>>2],C1=V[w1+4>>2];w1+=8;for(var k8=0;k8<C1;k8++){var g8=W[AA+k8],o8=x5[Y1];g8===0||g8===10?((Y1===1?$:O)(D(o8,0)),o8.length=0):o8.push(g8)}e1+=C1}return V[F1>>2]=e1,0}};(function(){function Y1(e1){K.asm=e1.exports,J=K.asm.E,y(),R=K.asm.J,B.unshift(K.asm.F),g--,K.monitorRunDependencies&&K.monitorRunDependencies(g),g==0&&(b!==null&&(clearInterval(b),b=null),U&&(e1=U,U=null,e1()))}function w1(e1){Y1(e1.instance)}function R1(e1){return Z6().then(function(y8){return WebAssembly.instantiate(y8,F1)}).then(function(y8){return y8}).then(e1,function(y8){O("failed to asynchronously prepare wasm: "+y8),d(y8)})}var F1={a:C4};if(g++,K.monitorRunDependencies&&K.monitorRunDependencies(g),K.instantiateWasm)try{return K.instantiateWasm(F1,Y1)}catch(e1){O("Module.instantiateWasm callback failed with error: "+e1),z(e1)}return function(){return H||typeof WebAssembly.instantiateStreaming!="function"||l(t)||typeof fetch!="function"?R1(w1):fetch(t,{credentials:"same-origin"}).then(function(e1){return WebAssembly.instantiateStreaming(e1,F1).then(w1,function(y8){return O("wasm streaming compile failed: "+y8),O("falling back to ArrayBuffer instantiation"),R1(w1)})})}().catch(z),{}})(),K.___wasm_call_ctors=function(){return(K.___wasm_call_ctors=K.asm.F).apply(null,arguments)};var x2=K.___getTypeName=function(){return(x2=K.___getTypeName=K.asm.G).apply(null,arguments)};K.__embind_initialize_bindings=function(){return(K.__embind_initialize_bindings=K.asm.H).apply(null,arguments)};var Tz=K._malloc=function(){return(Tz=K._malloc=K.asm.I).apply(null,arguments)},UK=K._free=function(){return(UK=K._free=K.asm.K).apply(null,arguments)};K.dynCall_jiji=function(){return(K.dynCall_jiji=K.asm.L).apply(null,arguments)};var Sw;U=function Y1(){Sw||NH(),Sw||(U=Y1)};function NH(){function Y1(){if(!Sw&&(Sw=!0,K.calledRun=!0,!M)){if(G6(B),Y(K),K.onRuntimeInitialized)K.onRuntimeInitialized();if(K.postRun)for(typeof K.postRun=="function"&&(K.postRun=[K.postRun]);K.postRun.length;){var w1=K.postRun.shift();x.unshift(w1)}G6(x)}}if(!(0<g)){if(K.preRun)for(typeof K.preRun=="function"&&(K.preRun=[K.preRun]);K.preRun.length;)F();G6(h),0<g||(K.setStatus?(K.setStatus("Running..."),setTimeout(function(){setTimeout(function(){K.setStatus("")},1),Y1()},1)):Y1())}}if(K.preInit)for(typeof K.preInit=="function"&&(K.preInit=[K.preInit]);0<K.preInit.length;)K.preInit.pop()();return NH(),q.ready}})(),YR7=T39});var IM,wR7,_R7,R56,S56,cD,h06,V39,lc,C56,RE,I06,b06,$R7,h56,x06,Gb,I56,N39,OR7;var FH1=k(()=>{IM=function(A){return A[A.Auto=0]="Auto",A[A.FlexStart=1]="FlexStart",A[A.Center=2]="Center",A[A.FlexEnd=3]="FlexEnd",A[A.Stretch=4]="Stretch",A[A.Baseline=5]="Baseline",A[A.SpaceBetween=6]="SpaceBetween",A[A.SpaceAround=7]="SpaceAround",A[A.SpaceEvenly=8]="SpaceEvenly",A}({}),wR7=function(A){return A[A.BorderBox=0]="BorderBox",A[A.ContentBox=1]="ContentBox",A}({}),_R7=function(A){return A[A.Width=0]="Width",A[A.Height=1]="Height",A}({}),R56=function(A){return A[A.Inherit=0]="Inherit",A[A.LTR=1]="LTR",A[A.RTL=2]="RTL",A}({}),S56=function(A){return A[A.Flex=0]="Flex",A[A.None=1]="None",A[A.Contents=2]="Contents",A}({}),cD=function(A){return A[A.Left=0]="Left",A[A.Top=1]="Top",A[A.Right=2]="Right",A[A.Bottom=3]="Bottom",A[A.Start=4]="Start",A[A.End=5]="End",A[A.Horizontal=6]="Horizontal",A[A.Vertical=7]="Vertical",A[A.All=8]="All",A}({}),h06=function(A){return A[A.None=0]="None",A[A.StretchFlexBasis=1]="StretchFlexBasis",A[A.AbsolutePositionWithoutInsetsExcludesPadding=2]="AbsolutePositionWithoutInsetsExcludesPadding",A[A.AbsolutePercentAgainstInnerSize=4]="AbsolutePercentAgainstInnerSize",A[A.All=2147483647]="All",A[A.Classic=2147483646]="Classic",A}({}),V39=function(A){return A[A.WebFlexBasis=0]="WebFlexBasis",A}({}),lc=function(A){return A[A.Column=0]="Column",A[A.ColumnReverse=1]="ColumnReverse",A[A.Row=2]="Row",A[A.RowReverse=3]="RowReverse",A}({}),C56=function(A){return A[A.Column=0]="Column",A[A.Row=1]="Row",A[A.All=2]="All",A}({}),RE=function(A){return A[A.FlexStart=0]="FlexStart",A[A.Center=1]="Center",A[A.FlexEnd=2]="FlexEnd",A[A.SpaceBetween=3]="SpaceBetween",A[A.SpaceAround=4]="SpaceAround",A[A.SpaceEvenly=5]="SpaceEvenly",A}({}),I06=function(A){return A[A.Error=0]="Error",A[A.Warn=1]="Warn",A[A.Info=2]="Info",A[A.Debug=3]="Debug",A[A.Verbose=4]="Verbose",A[A.Fatal=5]="Fatal",A}({}),b06=function(A){return A[A.Undefined=0]="Undefined",A[A.Exactly=1]="Exactly",A[A.AtMost=2]="AtMost",A}({}),$R7=function(A){return A[A.Default=0]="Default",A[A.Text=1]="Text",A}({}),h56=function(A){return A[A.Visible=0]="Visible",A[A.Hidden=1]="Hidden",A[A.Scroll=2]="Scroll",A}({}),x06=function(A){return A[A.Static=0]="Static",A[A.Relative=1]="Relative",A[A.Absolute=2]="Absolute",A}({}),Gb=function(A){return A[A.Undefined=0]="Undefined",A[A.Point=1]="Point",A[A.Percent=2]="Percent",A[A.Auto=3]="Auto",A}({}),I56=function(A){return A[A.NoWrap=0]="NoWrap",A[A.Wrap=1]="Wrap",A[A.WrapReverse=2]="WrapReverse",A}({}),N39={ALIGN_AUTO:IM.Auto,ALIGN_FLEX_START:IM.FlexStart,ALIGN_CENTER:IM.Center,ALIGN_FLEX_END:IM.FlexEnd,ALIGN_STRETCH:IM.Stretch,ALIGN_BASELINE:IM.Baseline,ALIGN_SPACE_BETWEEN:IM.SpaceBetween,ALIGN_SPACE_AROUND:IM.SpaceAround,ALIGN_SPACE_EVENLY:IM.SpaceEvenly,BOX_SIZING_BORDER_BOX:wR7.BorderBox,BOX_SIZING_CONTENT_BOX:wR7.ContentBox,DIMENSION_WIDTH:_R7.Width,DIMENSION_HEIGHT:_R7.Height,DIRECTION_INHERIT:R56.Inherit,DIRECTION_LTR:R56.LTR,DIRECTION_RTL:R56.RTL,DISPLAY_FLEX:S56.Flex,DISPLAY_NONE:S56.None,DISPLAY_CONTENTS:S56.Contents,EDGE_LEFT:cD.Left,EDGE_TOP:cD.Top,EDGE_RIGHT:cD.Right,EDGE_BOTTOM:cD.Bottom,EDGE_START:cD.Start,EDGE_END:cD.End,EDGE_HORIZONTAL:cD.Horizontal,EDGE_VERTICAL:cD.Vertical,EDGE_ALL:cD.All,ERRATA_NONE:h06.None,ERRATA_STRETCH_FLEX_BASIS:h06.StretchFlexBasis,ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING:h06.AbsolutePositionWithoutInsetsExcludesPadding,ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE:h06.AbsolutePercentAgainstInnerSize,ERRATA_ALL:h06.All,ERRATA_CLASSIC:h06.Classic,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:V39.WebFlexBasis,FLEX_DIRECTION_COLUMN:lc.Column,FLEX_DIRECTION_COLUMN_REVERSE:lc.ColumnReverse,FLEX_DIRECTION_ROW:lc.Row,FLEX_DIRECTION_ROW_REVERSE:lc.RowReverse,GUTTER_COLUMN:C56.Column,GUTTER_ROW:C56.Row,GUTTER_ALL:C56.All,JUSTIFY_FLEX_START:RE.FlexStart,JUSTIFY_CENTER:RE.Center,JUSTIFY_FLEX_END:RE.FlexEnd,JUSTIFY_SPACE_BETWEEN:RE.SpaceBetween,JUSTIFY_SPACE_AROUND:RE.SpaceAround,JUSTIFY_SPACE_EVENLY:RE.SpaceEvenly,LOG_LEVEL_ERROR:I06.Error,LOG_LEVEL_WARN:I06.Warn,LOG_LEVEL_INFO:I06.Info,LOG_LEVEL_DEBUG:I06.Debug,LOG_LEVEL_VERBOSE:I06.Verbose,LOG_LEVEL_FATAL:I06.Fatal,MEASURE_MODE_UNDEFINED:b06.Undefined,MEASURE_MODE_EXACTLY:b06.Exactly,MEASURE_MODE_AT_MOST:b06.AtMost,NODE_TYPE_DEFAULT:$R7.Default,NODE_TYPE_TEXT:$R7.Text,OVERFLOW_VISIBLE:h56.Visible,OVERFLOW_HIDDEN:h56.Hidden,OVERFLOW_SCROLL:h56.Scroll,POSITION_TYPE_STATIC:x06.Static,POSITION_TYPE_RELATIVE:x06.Relative,POSITION_TYPE_ABSOLUTE:x06.Absolute,UNIT_UNDEFINED:Gb.Undefined,UNIT_POINT:Gb.Point,UNIT_PERCENT:Gb.Percent,UNIT_AUTO:Gb.Auto,WRAP_NO_WRAP:I56.NoWrap,WRAP_WRAP:I56.Wrap,WRAP_WRAP_REVERSE:I56.WrapReverse},OR7=N39});function QJ8(A){function q(z,w,_){let $=z[w];z[w]=function(){for(var O=arguments.length,H=Array(O),j=0;j<O;j++)H[j]=arguments[j];return _.call(this,$,...H)}}for(let z of["setPosition","setMargin","setFlexBasis","setWidth","setHeight","setMinWidth","setMinHeight","setMaxWidth","setMaxHeight","setPadding","setGap"]){let w={[Gb.Point]:A.Node.prototype[z],[Gb.Percent]:A.Node.prototype[`${z}Percent`],[Gb.Auto]:A.Node.prototype[`${z}Auto`]};q(A.Node.prototype,z,function(_){for(var $=arguments.length,O=Array($>1?$-1:0),H=1;H<$;H++)O[H-1]=arguments[H];let j=O.pop(),J,M;if(j==="auto")J=Gb.Auto,M=void 0;else if(typeof j==="object")J=j.unit,M=j.valueOf();else if(J=typeof j==="string"&&j.endsWith("%")?Gb.Percent:Gb.Point,M=parseFloat(j),j!==void 0&&!Number.isNaN(j)&&Number.isNaN(M))throw Error(`Invalid value ${j} for ${z}`);if(!w[J])throw Error(`Failed to execute "${z}": Unsupported unit '${j}'`);if(M!==void 0)return w[J].call(this,...O,M);else return w[J].call(this,...O)})}function K(z){return A.MeasureCallback.implement({measure:function(){let{width:w,height:_}=z(...arguments);return{width:w??NaN,height:_??NaN}}})}q(A.Node.prototype,"setMeasureFunc",function(z,w){if(w)return z.call(this,K(w));else return this.unsetMeasureFunc()});function Y(z){return A.DirtiedCallback.implement({dirtied:z})}return q(A.Node.prototype,"setDirtiedFunc",function(z,w){z.call(this,Y(w))}),q(A.Config.prototype,"free",function(){A.Config.destroy(this)}),q(A.Node,"create",(z,w)=>{return w?A.Node.createWithConfig(w):A.Node.createDefault()}),q(A.Node.prototype,"free",function(){A.Node.destroy(this)}),q(A.Node.prototype,"freeRecursive",function(){for(let z=0,w=this.getChildCount();z<w;++z)this.getChild(0).freeRecursive();this.free()}),q(A.Node.prototype,"calculateLayout",function(z){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NaN,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R56.LTR;return z.call(this,w,_,$)}),{Config:A.Config,Node:A.Node,...OR7}}var HR7=k(()=>{FH1();FH1()});async function UJ8(){return QJ8(await YR7())}var jR7=k(()=>{zR7();HR7();FH1()});class pJ8{yoga;constructor(A){this.yoga=A}insertChild(A,q){this.yoga.insertChild(A.yoga,q)}removeChild(A){this.yoga.removeChild(A.yoga)}getChildCount(){return this.yoga.getChildCount()}getParent(){let A=this.yoga.getParent();return A?new pJ8(A):null}calculateLayout(A,q){this.yoga.calculateLayout(A,void 0,R56.LTR)}setMeasureFunc(A){this.yoga.setMeasureFunc((q,K)=>{let Y=K===b06.Exactly?L06.Exactly:K===b06.AtMost?L06.AtMost:L06.Undefined;return A(q,Y)})}unsetMeasureFunc(){this.yoga.unsetMeasureFunc()}markDirty(){this.yoga.markDirty()}getComputedLeft(){return this.yoga.getComputedLeft()}getComputedTop(){return this.yoga.getComputedTop()}getComputedWidth(){return this.yoga.getComputedWidth()}getComputedHeight(){return this.yoga.getComputedHeight()}getComputedBorder(A){return this.yoga.getComputedBorder(b56[A])}getComputedPadding(A){return this.yoga.getComputedPadding(b56[A])}setWidth(A){this.yoga.setWidth(A)}setWidthPercent(A){this.yoga.setWidthPercent(A)}setWidthAuto(){this.yoga.setWidthAuto()}setHeight(A){this.yoga.setHeight(A)}setHeightPercent(A){this.yoga.setHeightPercent(A)}setHeightAuto(){this.yoga.setHeightAuto()}setMinWidth(A){this.yoga.setMinWidth(A)}setMinWidthPercent(A){this.yoga.setMinWidthPercent(A)}setMinHeight(A){this.yoga.setMinHeight(A)}setMinHeightPercent(A){this.yoga.setMinHeightPercent(A)}setMaxWidth(A){this.yoga.setMaxWidth(A)}setMaxWidthPercent(A){this.yoga.setMaxWidthPercent(A)}setMaxHeight(A){this.yoga.setMaxHeight(A)}setMaxHeightPercent(A){this.yoga.setMaxHeightPercent(A)}setFlexDirection(A){let q={row:lc.Row,"row-reverse":lc.RowReverse,column:lc.Column,"column-reverse":lc.ColumnReverse};this.yoga.setFlexDirection(q[A])}setFlexGrow(A){this.yoga.setFlexGrow(A)}setFlexShrink(A){this.yoga.setFlexShrink(A)}setFlexBasis(A){this.yoga.setFlexBasis(A)}setFlexBasisPercent(A){this.yoga.setFlexBasisPercent(A)}setFlexWrap(A){let q={nowrap:I56.NoWrap,wrap:I56.Wrap,"wrap-reverse":I56.WrapReverse};this.yoga.setFlexWrap(q[A])}setAlignItems(A){let q={auto:IM.Auto,stretch:IM.Stretch,"flex-start":IM.FlexStart,center:IM.Center,"flex-end":IM.FlexEnd};this.yoga.setAlignItems(q[A])}setAlignSelf(A){let q={auto:IM.Auto,stretch:IM.Stretch,"flex-start":IM.FlexStart,center:IM.Center,"flex-end":IM.FlexEnd};this.yoga.setAlignSelf(q[A])}setJustifyContent(A){let q={"flex-start":RE.FlexStart,center:RE.Center,"flex-end":RE.FlexEnd,"space-between":RE.SpaceBetween,"space-around":RE.SpaceAround,"space-evenly":RE.SpaceEvenly};this.yoga.setJustifyContent(q[A])}setDisplay(A){this.yoga.setDisplay(A==="flex"?S56.Flex:S56.None)}getDisplay(){return this.yoga.getDisplay()===S56.None?LE.None:LE.Flex}setPositionType(A){this.yoga.setPositionType(A==="absolute"?x06.Absolute:x06.Relative)}setPosition(A,q){this.yoga.setPosition(b56[A],q)}setPositionPercent(A,q){this.yoga.setPositionPercent(b56[A],q)}setOverflow(A){let q={visible:h56.Visible,hidden:h56.Hidden,scroll:h56.Scroll};this.yoga.setOverflow(q[A])}setMargin(A,q){this.yoga.setMargin(b56[A],q)}setPadding(A,q){this.yoga.setPadding(b56[A],q)}setBorder(A,q){this.yoga.setBorder(b56[A],q)}setGap(A,q){this.yoga.setGap(v39[A],q)}free(){this.yoga.free()}freeRecursive(){this.yoga.freeRecursive()}}async function JR7(){if(jg6)return;if(!UH1)UH1=UJ8().then((A)=>{jg6=A});await UH1}function MR7(){if(!jg6)throw Error("Yoga not loaded");return new pJ8(jg6.Node.create())}function DR7(){if(QH1||Hg6)return;QH1=UJ8().then((A)=>{Hg6=A,QH1=void 0},()=>{QH1=void 0})}function XR7(){if(!Hg6)return!1;return jg6=Hg6,Hg6=void 0,UH1=void 0,!0}var b56,v39,jg6,UH1,Hg6,QH1;var PR7=k(()=>{jR7();k56();b56={all:cD.All,horizontal:cD.Horizontal,vertical:cD.Vertical,left:cD.Left,right:cD.Right,top:cD.Top,bottom:cD.Bottom,start:cD.Start,end:cD.End},v39={all:C56.All,column:C56.Column,row:C56.Row}});var WR7={};m1(WR7,{swapLayout:()=>cJ8,preloadLayout:()=>dJ8,initLayout:()=>pH1,createLayoutNode:()=>dH1});async function pH1(){await JR7()}function dH1(){return MR7()}function dJ8(){DR7()}function cJ8(){return XR7()}var Jg6=k(()=>{PR7()});function ZR7(A,q,K=!1){if(q.nodeName==="#text")return;let Y=q,z=K||Y.style.position==="absolute",w=kN.get(Y);if(w)qR7(A,w,z),kN.delete(Y);for(let _ of Y.childNodes)ZR7(A,_,z)}function k39(A,q){if(A===q)return!0;let K=Object.keys(A),Y=Object.keys(q);if(K.length!==Y.length)return!1;for(let z of K)if(A[z]!==q[z])return!1;return!0}function VR7(A){let q=A.yogaNode;iH1(A),q?.freeRecursive(),NR7(A)}function E39(A){return A.nodeName!=="#text"}function NR7(A){if(A.nodeName!=="ink-virtual-text"&&A.nodeName!=="ink-link"&&A.nodeName!=="ink-progress"){if(A.yogaNode=dH1(),wg6(A.yogaNode,A.style),A.isHidden)A.yogaNode.setDisplay(LE.None);if(A.nodeName==="ink-text")A.yogaNode.setMeasureFunc(fR7.bind(null,A));else if(A.nodeName==="ink-raw-ansi")A.yogaNode.setMeasureFunc(TR7.bind(null,A))}for(let K of A.childNodes){if(!E39(K))continue;if(NR7(K),K.yogaNode&&A.yogaNode)A.yogaNode.insertChild(K.yogaNode,A.yogaNode.getChildCount())}}var cH1=(A)=>{let K={nodeName:A,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:A!=="ink-virtual-text"&&A!=="ink-link"&&A!=="ink-progress"?dH1():void 0,dirty:!1};if(A==="ink-text")K.yogaNode?.setMeasureFunc(fR7.bind(null,K));else if(A==="ink-raw-ansi")K.yogaNode?.setMeasureFunc(TR7.bind(null,K));return K},lH1=(A,q)=>{if(q.parentNode)Mg6(q.parentNode,q);if(q.parentNode=A,A.childNodes.push(q),q.yogaNode)A.yogaNode?.insertChild(q.yogaNode,A.yogaNode.getChildCount());KS(A)},lJ8=(A,q,K)=>{if(q.parentNode)Mg6(q.parentNode,q);q.parentNode=A;let Y=A.childNodes.indexOf(K);if(Y>=0){let z=0;if(q.yogaNode&&A.yogaNode){for(let w=0;w<Y;w++)if(A.childNodes[w]?.yogaNode)z++}if(A.childNodes.splice(Y,0,q),q.yogaNode&&A.yogaNode)A.yogaNode.insertChild(q.yogaNode,z);KS(A);return}if(A.childNodes.push(q),q.yogaNode)A.yogaNode?.insertChild(q.yogaNode,A.yogaNode.getChildCount());KS(A)},Mg6=(A,q)=>{if(q.yogaNode)q.parentNode?.yogaNode?.removeChild(q.yogaNode);ZR7(A,q),q.parentNode=void 0;let K=A.childNodes.indexOf(q);if(K>=0)A.childNodes.splice(K,1);KS(A)},iJ8=(A,q,K)=>{if(q==="children")return;if(A.attributes[q]===K)return;A.attributes[q]=K,KS(A)},nJ8=(A,q)=>{if(k39(A.style,q))return;A.style=q,KS(A)},GR7=(A)=>{let q={nodeName:"#text",nodeValue:A,yogaNode:void 0,parentNode:void 0,style:{}};return Dg6(q,A),q},fR7=function(A,q,K){let Y=A.nodeName==="#text"?A.nodeValue:gy7(A),z=ey7(Y),w=yH1(z,q);if(w.width<=q)return w;if(w.width>=1&&q>0&&q<1)return w;if(z.includes(`
`)&&K===L06.Undefined){let O=Math.max(q,w.width);return yH1(z,O)}let _=A.style?.textWrap??"wrap",$=yE(z,q,_);return yH1($,q)},TR7=function(A){return{width:A.attributes.rawWidth,height:A.attributes.rawHeight}},KS=(A)=>{let q=A,K=!1;while(q){if(q.nodeName!=="#text"){if(q.dirty=!0,!K&&(q.nodeName==="ink-text"||q.nodeName==="ink-raw-ansi")&&q.yogaNode)q.yogaNode.markDirty(),K=!0}q=q.parentNode}},Dg6=(A,q)=>{if(typeof q!=="string")q=String(q);if(A.nodeValue===q)return;A.nodeValue=q,KS(A)},iH1=(A)=>{if("childNodes"in A)for(let q of A.childNodes)iH1(q);A.yogaNode=void 0};var Xg6=k(()=>{Zy7();LJ8();xH1();bJ8();AR7();Og6();k56();Jg6()});var ER7,vR7=(A,q)=>{if(A===q)return;if(!A)return q;let K={},Y=!1;for(let z of Object.keys(A))if(q?!Object.hasOwn(q,z):!0)K[z]=void 0,Y=!0;if(q){for(let z of Object.keys(q))if(q[z]!==A[z])K[z]=q[z],Y=!0}return Y?K:void 0},kR7=(A)=>{let q=A.yogaNode;if(q)q.unsetMeasureFunc(),iH1(A),q.freeRecursive()},rJ8,ic;var oJ8=k(()=>{vJ8();k56();Xg6();LJ8();ER7=e(Wy7(),1),rJ8=NJ8,ic=ER7.default({getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>null,preparePortalMount:()=>null,clearContainer:()=>!1,resetAfterCommit(A){if(typeof A.onComputeLayout==="function")A.onComputeLayout();A.onRender?.()},getChildHostContext(A,q){let K=A.isInsideText,Y=q==="ink-text"||q==="ink-virtual-text"||q==="ink-link";if(K===Y)return A;return{isInsideText:Y}},shouldSetTextContent:()=>!1,createInstance(A,q,K,Y){if(Y.isInsideText&&A==="ink-box")throw Error("<Box> can't be nested inside <Text> component");let z=A==="ink-text"&&Y.isInsideText?"ink-virtual-text":A,w=cH1(z);for(let[_,$]of Object.entries(q)){if(_==="children")continue;if(_==="style"){if(nJ8(w,$),w.yogaNode)wg6(w.yogaNode,$);continue}if(_==="textStyles"){w.textStyles=$;continue}if(_==="onClick"){w.onClick=$;continue}iJ8(w,_,$)}return w},createTextInstance(A,q,K){if(!K.isInsideText)throw Error(`Text string "${A}" must be rendered inside <Text> component`);return GR7(A)},resetTextContent(){},hideTextInstance(A){Dg6(A,"")},unhideTextInstance(A,q){Dg6(A,q)},getPublicInstance:(A)=>A,hideInstance(A){A.isHidden=!0,A.yogaNode?.setDisplay(LE.None),KS(A)},unhideInstance(A){A.isHidden=!1,A.yogaNode?.setDisplay(LE.Flex),KS(A)},appendInitialChild:lH1,appendChild:lH1,insertBefore:lJ8,finalizeInitialChildren:()=>!1,isPrimaryRenderer:!0,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:clearTimeout,noTimeout:-1,getCurrentUpdatePriority:()=>rJ8,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},getInstanceFromNode:()=>null,prepareScopeUpdate(){},getInstanceFromScope:()=>null,appendChildToContainer:lH1,insertInContainerBefore:lJ8,removeChildFromContainer(A,q){Mg6(A,q),kR7(q)},commitUpdate(A,q,K,Y){let z=vR7(K,Y),w=vR7(K.style,Y.style);if(z)for(let[_,$]of Object.entries(z)){if(_==="style"){nJ8(A,$);continue}if(_==="textStyles"){A.textStyles=$,KS(A);continue}if(_==="onClick"){A.onClick=$;continue}iJ8(A,_,$)}if(w&&A.yogaNode)wg6(A.yogaNode,w,Y.style)},commitTextUpdate(A,q,K){Dg6(A,K)},removeChild(A,q){Mg6(A,q),kR7(q)},maySuspendCommit(){return!1},preloadInstance(){return!0},startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady(){return null},NotPendingTransition:null,HostTransitionContext:{$$typeof:Symbol.for("react.context"),_currentValue:null},setCurrentUpdatePriority(A){rJ8=A},resolveUpdatePriority(){return rJ8},resetFormInstance(){},requestPostPaintCallback(){},shouldAttemptEagerTransition(){return!1},trackSchedulerEvent(){},resolveEventType(){return null},resolveEventTimeStamp(){return-1.1}})});function nH1(A){let q=0,K=0;while(K<=A.length){let Y=A.indexOf(`
`,K),z=Y===-1?A.substring(K):A.substring(K,Y);if(q=Math.max(q,LH1(z)),Y===-1)break;K=Y+1}return q}var aJ8=k(()=>{EJ8()});function sJ8(A,q=1,K={}){let{indent:Y=" ",includeEmptyLines:z=!1}=K;if(typeof A!=="string")throw TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof A}\``);if(typeof q!=="number")throw TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof q}\``);if(q<0)throw RangeError(`Expected \`count\` to be at least 0, got \`${q}\``);if(typeof Y!=="string")throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof Y}\``);if(q===0)return A;let w=z?/^/gm:/^(?!\s*$)/gm;return A.replace(w,Y.repeat(q))}var y39=(A)=>{return A.getComputedWidth()-A.getComputedPadding(f9.Left)-A.getComputedPadding(f9.Right)-A.getComputedBorder(f9.Left)-A.getComputedBorder(f9.Right)},LR7;var yR7=k(()=>{k56();LR7=y39});var RR7=C((ZT2,R39)=>{R39.exports={single:{topLeft:"┌",top:"─",topRight:"┐",right:"│",bottomRight:"┘",bottom:"─",bottomLeft:"└",left:"│"},double:{topLeft:"╔",top:"═",topRight:"╗",right:"║",bottomRight:"╝",bottom:"═",bottomLeft:"╚",left:"║"},round:{topLeft:"╭",top:"─",topRight:"╮",right:"│",bottomRight:"╯",bottom:"─",bottomLeft:"╰",left:"│"},bold:{topLeft:"┏",top:"━",topRight:"┓",right:"┃",bottomRight:"┛",bottom:"━",bottomLeft:"┗",left:"┃"},singleDouble:{topLeft:"╓",top:"─",topRight:"╖",right:"║",bottomRight:"╜",bottom:"─",bottomLeft:"╙",left:"║"},doubleSingle:{topLeft:"╒",top:"═",topRight:"╕",right:"│",bottomRight:"╛",bottom:"═",bottomLeft:"╘",left:"│"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"↘",top:"↓",topRight:"↙",right:"←",bottomRight:"↖",bottom:"↑",bottomLeft:"↗",left:"→"}}});var CR7=C((GT2,tJ8)=>{var SR7=RR7();tJ8.exports=SR7;tJ8.exports.default=SR7});function B06(A,q){let K=A;if(q.inverse)K=M1.inverse(K);if(q.strikethrough)K=M1.strikethrough(K);if(q.underline)K=M1.underline(K);if(q.italic)K=M1.italic(K);if(q.bold)K=M1.bold(K);if(q.dim)K=M1.dim(K);if(q.color)K=u06(K,q.color,"foreground");if(q.backgroundColor)K=u06(K,q.backgroundColor,"background");return K}function nc(A,q){if(!q)return A;return u06(A,q,"foreground")}var S39,C39,u06=(A,q,K)=>{if(!q)return A;if(q.startsWith("ansi:"))switch(q.substring(5)){case"black":return K==="foreground"?M1.black(A):M1.bgBlack(A);case"red":return K==="foreground"?M1.red(A):M1.bgRed(A);case"green":return K==="foreground"?M1.green(A):M1.bgGreen(A);case"yellow":return K==="foreground"?M1.yellow(A):M1.bgYellow(A);case"blue":return K==="foreground"?M1.blue(A):M1.bgBlue(A);case"magenta":return K==="foreground"?M1.magenta(A):M1.bgMagenta(A);case"cyan":return K==="foreground"?M1.cyan(A):M1.bgCyan(A);case"white":return K==="foreground"?M1.white(A):M1.bgWhite(A);case"blackBright":return K==="foreground"?M1.blackBright(A):M1.bgBlackBright(A);case"redBright":return K==="foreground"?M1.redBright(A):M1.bgRedBright(A);case"greenBright":return K==="foreground"?M1.greenBright(A):M1.bgGreenBright(A);case"yellowBright":return K==="foreground"?M1.yellowBright(A):M1.bgYellowBright(A);case"blueBright":return K==="foreground"?M1.blueBright(A):M1.bgBlueBright(A);case"magentaBright":return K==="foreground"?M1.magentaBright(A):M1.bgMagentaBright(A);case"cyanBright":return K==="foreground"?M1.cyanBright(A):M1.bgCyanBright(A);case"whiteBright":return K==="foreground"?M1.whiteBright(A):M1.bgWhiteBright(A)}if(q.startsWith("#"))return K==="foreground"?M1.hex(q)(A):M1.bgHex(q)(A);if(q.startsWith("ansi256")){let Y=C39.exec(q);if(!Y)return A;let z=Number(Y[1]);return K==="foreground"?M1.ansi256(z)(A):M1.bgAnsi256(z)(A)}if(q.startsWith("rgb")){let Y=S39.exec(q);if(!Y)return A;let z=Number(Y[1]),w=Number(Y[2]),_=Number(Y[3]);return K==="foreground"?M1.rgb(z,w,_)(A):M1.bgRgb(z,w,_)(A)}return A};var m06=k(()=>{iK();S39=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,C39=/^ansi256\(\s?(\d+)\s?\)$/});function hR7(A,q,K,Y=0,z){let w=B8(q),_=A.length;if(w>=_-2)return["",q.substring(0,_),""];let $;if(K==="center")$=Math.floor((_-w)/2);else if(K==="start")$=Y+1;else $=_-w-Y-1;$=Math.max(1,Math.min($,_-w-1));let O=A.substring(0,1)+z.repeat($-1),H=z.repeat(_-$-w-1)+A.substring(_-1);return[O,q,H]}function g06(A,q,K){let Y=nc(A,q);if(K)Y=M1.dim(Y);return Y}var IR7,h39,I39=(A,q,K,Y)=>{if(K.style.borderStyle){let z=Math.floor(K.yogaNode.getComputedWidth()),w=Math.floor(K.yogaNode.getComputedHeight()),_=typeof K.style.borderStyle==="string"?h39[K.style.borderStyle]??IR7.default[K.style.borderStyle]:K.style.borderStyle,$=K.style.borderTopColor??K.style.borderColor,O=K.style.borderBottomColor??K.style.borderColor,H=K.style.borderLeftColor??K.style.borderColor,j=K.style.borderRightColor??K.style.borderColor,J=K.style.borderTopDimColor??K.style.borderDimColor,M=K.style.borderBottomDimColor??K.style.borderDimColor,D=K.style.borderLeftDimColor??K.style.borderDimColor,X=K.style.borderRightDimColor??K.style.borderDimColor,P=K.style.borderTop!==!1,W=K.style.borderBottom!==!1,Z=K.style.borderLeft!==!1,G=K.style.borderRight!==!1,f=Math.max(0,z-(Z?1:0)-(G?1:0)),V=P?(Z?_.topLeft:"")+_.top.repeat(f)+(G?_.topRight:""):"",N;if(P&&K.style.borderText?.position==="top"){let[F,g,b]=hR7(V,K.style.borderText.content,K.style.borderText.align,K.style.borderText.offset,_.top);N=g06(F,$,J)+g+g06(b,$,J)}else if(P)N=g06(V,$,J);let v=w;if(P)v-=1;if(W)v-=1;v=Math.max(0,v);let y=(nc(_.left,H)+`
`).repeat(v);if(D)y=M1.dim(y);let R=(nc(_.right,j)+`
`).repeat(v);if(X)R=M1.dim(R);let h=W?(Z?_.bottomLeft:"")+_.bottom.repeat(f)+(G?_.bottomRight:""):"",B;if(W&&K.style.borderText?.position==="bottom"){let[F,g,b]=hR7(h,K.style.borderText.content,K.style.borderText.align,K.style.borderText.offset,_.bottom);B=g06(F,O,M)+g+g06(b,O,M)}else if(W)B=g06(h,O,M);let x=P?1:0;if(N)Y.write(A,q,N);if(Z)Y.write(A,q+x,y);if(G)Y.write(A+z-1,q+x,R);if(B)Y.write(A,q+w-1,B)}},bR7;var xR7=k(()=>{iK();y5();m06();IR7=e(CR7(),1),h39={dashed:{top:"╌",left:"╎",right:"╎",bottom:"╌",topLeft:" ",topRight:" ",bottomLeft:" ",bottomRight:" "}};bR7=I39});function gR7(){F06=!1}function FR7(){return F06}function rH1(A,q){return`${uR7}8;;${q}${BR7}${A}${uR7}8;;${BR7}`}function b39(A){let q=[];for(let K=0;K<A.length;K++){let Y=A[K].text.length;for(let z=0;z<Y;z++)q.push(K)}return q}function x39(A,q,K,Y,z=!1){let w=A.split(`
`),_=[],$=0;for(let O=0;O<w.length;O++){let H=w[O];if(z&&H.length>0){let P=/\s/.test(H[0]);if($<Y.length&&/\s/.test(Y[$])&&!P)while($<Y.length&&/\s/.test(Y[$]))$++}let j="",J=0,M=K[$]??0;for(let P=0;P<H.length;P++){let W=K[$]??M;if(W!==M){let Z=H.slice(J,P),G=q[M];if(G){let f=B06(Z,G.styles);if(G.hyperlink)f=rH1(f,G.hyperlink);j+=f}else j+=Z;J=P,M=W}$++}let D=H.slice(J),X=q[M];if(X){let P=B06(D,X.styles);if(X.hyperlink)P=rH1(P,X.hyperlink);j+=P}else j+=D;if(_.push(j),$<Y.length&&Y[$]===`
`)$++;if(z&&O<w.length-1){let P=w[O+1],W=P.length>0?P[0]:null;while($<Y.length&&/\s/.test(Y[$])){if(W!==null&&Y[$]===W)break;$++}}}return _.join(`
`)}function u39(A,q){let K=A.childNodes[0]?.yogaNode;if(K){let Y=K.getComputedLeft(),z=K.getComputedTop();q=`
`.repeat(z)+sJ8(q,Y)}return q}function eJ8(A,q,{offsetX:K=0,offsetY:Y=0,prevScreen:z,inheritedBackgroundColor:w}){let{yogaNode:_}=A;if(_){if(_.getDisplay()===LE.None){if(A.dirty){let P=kN.get(A);if(P)q.clear({x:Math.floor(P.x),y:Math.floor(P.y),width:Math.floor(P.width),height:Math.floor(P.height)}),kN.delete(A),F06=!0}return}let $=K+_.getComputedLeft(),O=Y+_.getComputedTop(),H=_.getComputedWidth(),j=_.getComputedHeight(),J=kN.get(A);if(!A.dirty&&J&&J.x===$&&J.y===O&&J.width===H&&J.height===j&&z){q.blit(z,{x:Math.floor($),y:Math.floor(O),width:Math.floor(H),height:Math.floor(j)});return}let M=J!==void 0&&(J.x!==$||J.y!==O||J.width!==H||J.height!==j);if(M)F06=!0;if(J&&(A.dirty||M))q.clear({x:Math.floor(J.x),y:Math.floor(J.y),width:Math.floor(J.width),height:Math.floor(J.height)});let D=$g6.get(A),X=D!==void 0;if(X){F06=!0;for(let P of D)q.clear({x:Math.floor(P.x),y:Math.floor(P.y),width:Math.floor(P.width),height:Math.floor(P.height)});$g6.delete(A)}if(A.nodeName==="ink-raw-ansi"){let P=A.attributes.rawText;if(P)q.write($,O,P)}else if(A.nodeName==="ink-text"){let P=uH1(A,w?{backgroundColor:w}:void 0),W=P.map((Z)=>Z.text).join("");if(W.length>0){let Z=Math.min(LR7(_),q.width-$),G=A.style.textWrap??"wrap",f=nH1(W)>Z,V;if(f&&P.length===1){let N=P[0];V=yE(W,Z,G).split(`
`).map((y)=>{let R=B06(y,N.styles);if(N.hyperlink)R=rH1(R,N.hyperlink);return R}).join(`
`)}else if(f){let N=yE(W,Z,G),v=b39(P);V=x39(N,P,v,W,G==="wrap-trim")}else V=P.map((N)=>{let v=B06(N.text,N.styles);if(N.hyperlink)v=rH1(v,N.hyperlink);return v}).join("");V=u39(A,V),q.write($,O,V)}}else if(A.nodeName==="ink-box"){let P=A.style.backgroundColor??w;if(A.style.noSelect){let R=Math.floor($),h=A.style.noSelect==="from-left-edge";q.noSelect({x:h?0:R,y:Math.floor(O),width:h?R+Math.floor(H):Math.floor(H),height:Math.floor(j)})}let W=A.style.overflowX??A.style.overflow,Z=A.style.overflowY??A.style.overflow,G=W==="hidden"||W==="scroll",f=Z==="hidden"||Z==="scroll",V=Z==="scroll",N=G||f,v,y;if(N){let R=G?$+_.getComputedBorder(f9.Left):void 0,h=G?$+_.getComputedWidth()-_.getComputedBorder(f9.Right):void 0;v=f?O+_.getComputedBorder(f9.Top):void 0,y=f?O+_.getComputedHeight()-_.getComputedBorder(f9.Bottom):void 0,q.clip({x1:R,x2:h,y1:v,y2:y})}if(V){let R=Math.max(0,(y??O+j)-(v??O)-_.getComputedPadding(f9.Top)-_.getComputedPadding(f9.Bottom)),h=A.childNodes.find((U)=>U.yogaNode),B=h?.yogaNode,x=B?.getComputedHeight()??0;A.scrollHeight=x,A.scrollViewportHeight=R;let F=Math.max(0,x-R);if(A.stickyScroll??Boolean(A.attributes.stickyScroll))A.scrollTop=F;let b=Math.max(0,Math.min(A.scrollTop??0,F));if(A.scrollTop=b,h&&B){let U=$+B.getComputedLeft(),d=O+B.getComputedTop()-b,l=kN.get(h);if(l&&l.y!==d)F06=!0;if(v!==void 0&&y!==void 0)q.clear({x:Math.floor($),y:Math.floor(v),width:Math.floor(H),height:Math.floor(y-v)});B39(h,q,U,d,X,void 0,b,b+R,P),kN.set(h,{x:U,y:d,width:B.getComputedWidth(),height:B.getComputedHeight()}),h.dirty=!1}}else{let R=A.style.backgroundColor;if(R||A.style.opaque){let h=_.getComputedBorder(f9.Left),B=_.getComputedBorder(f9.Right),x=_.getComputedBorder(f9.Top),F=_.getComputedBorder(f9.Bottom),g=Math.floor(H)-h-B,b=Math.floor(j)-x-F;if(g>0&&b>0){let U=" ".repeat(g),d=R?B06(U,{backgroundColor:R}):U,l=Array(b).fill(d).join(`
`);q.write($+h,O+x,l)}}mR7(A,q,$,O,X,R?void 0:z,P)}if(N)q.unclip();bR7($,O,A,q)}else if(A.nodeName==="ink-root")mR7(A,q,$,O,X,z,w);kN.set(A,{x:$,y:O,width:H,height:j}),A.dirty=!1}}function mR7(A,q,K,Y,z,w,_){let $=!1;for(let O of A.childNodes){let H=O,j=H.dirty;if(eJ8(H,q,{offsetX:K,offsetY:Y,prevScreen:z||$?void 0:w,inheritedBackgroundColor:_}),j)$=!0}}function B39(A,q,K,Y,z,w,_,$,O){let H=!1;for(let j of A.childNodes){let J=j,M=J.yogaNode;if(M){let X=M.getComputedTop();if(X+M.getComputedHeight()<=_||X>=$){QR7(J);continue}}let D=J.dirty;if(eJ8(J,q,{offsetX:K,offsetY:Y,prevScreen:z||H?void 0:w,inheritedBackgroundColor:O}),D)H=!0}}function QR7(A){kN.delete(A);for(let q of A.childNodes)if(q.nodeName!=="#text")QR7(q)}var F06=!1,uR7="\x1B]",BR7="\x07",UR7;var AM8=k(()=>{aJ8();k56();xH1();yR7();bJ8();xR7();m06();Og6();UR7=eJ8});function YM8(A){if(oH1.has(A))return A;if(qM8.has(A))return qM8.get(A);if(A.startsWith(aH1))return m39;if(A=A.slice(2),A.startsWith("38"))return EJ.color.close;else if(A.startsWith("48"))return EJ.bgColor.close;let q=EJ.codes.get(parseInt(A,10));if(q)return EJ.color.ansi(q);else return EJ.reset.open}function tf(A){return A.map((q)=>q.code).join("")}var pR7,dR7,cR7,oH1,qM8,aH1="\x1B]8;;",KM8,lR7="\x07",BT2,m39;var Pg6=k(()=>{_g6();pR7=new Set([27,155]),dR7="[".codePointAt(0),cR7="]".codePointAt(0),oH1=new Set,qM8=new Map;for(let[A,q]of EJ.codes)oH1.add(EJ.color.ansi(q)),qM8.set(EJ.color.ansi(A),EJ.color.ansi(q));KM8=aH1.split("").map((A)=>A.charCodeAt(0)),BT2=lR7.charCodeAt(0),m39=`\x1B]8;;${lR7}`});function Ke(A){return sH1([],A)}function sH1(A,q){let K=[...A];for(let Y of q)if(Y.code===EJ.reset.open)K=[];else if(oH1.has(Y.code))K=K.filter((z)=>z.endCode!==Y.code);else if(Y.code===EJ.bold.open||Y.code===EJ.dim.open){if(!K.find((w)=>w.code===Y.code&&w.endCode===Y.endCode))K.push(Y)}else K=K.filter((w)=>w.endCode!==Y.endCode),K.push(Y);return K}var tH1=k(()=>{_g6();Pg6()});function x56(A){return Ke(A).reverse().map((q)=>({...q,code:q.endCode}))}var zM8=k(()=>{tH1()});function fb(A,q){let K=new Set(q.map((z)=>z.endCode)),Y=new Set(A.map((z)=>z.code));return[...x56(A.filter((z)=>!K.has(z.endCode))),...q.filter((z)=>!Y.has(z.code))]}var wM8=k(()=>{zM8()});function iR7(A){let q=[],K=[];for(let Y of A)if(Y.type==="ansi")q=sH1(q,[Y]);else if(Y.type==="char")K.push({...Y,styles:[...q]});return K}var nR7=k(()=>{Pg6();wM8();tH1()});function _M8(A){if(!Number.isInteger(A))return!1;return EI6(A)||LI6(A)}var rR7=k(()=>{yI6()});function g39(A,q){A=A.slice(q);for(let Y=1;Y<KM8.length;Y++)if(A.charCodeAt(Y)!==KM8[Y])return;let K=A.indexOf("\x07",aH1.length);if(K===-1)return;return A.slice(0,K+1)}function d39(A){for(let q=2;q<A.length;q++){let K=A.charCodeAt(q);if(K===p39)return q;if(K===U39)continue;if(K>=F39&&K<=Q39)continue;break}return-1}function c39(A,q){A=A.slice(q);let K=d39(A);if(K===-1)return;return A.slice(0,K+1)}function l39(A){if(!A.includes(";"))return[A];let q=A.slice(2,-1).split(";"),K=[];for(let Y=0;Y<q.length;Y++){let z=q[Y];if(z==="38"||z==="48"){if(Y+2<q.length&&q[Y+1]==="5"){K.push(q.slice(Y,Y+3).join(";")),Y+=2;continue}else if(Y+4<q.length&&q[Y+1]==="2"){K.push(q.slice(Y,Y+5).join(";")),Y+=4;continue}}K.push(z)}return K.map((Y)=>`\x1B[${Y}m`)}function Q06(A,q=Number.POSITIVE_INFINITY){let K=[],Y=0,z=0;while(Y<A.length){let w=A.codePointAt(Y);if(pR7.has(w)){let O,H=A.codePointAt(Y+1);if(H===cR7){if(O=g39(A,Y),O)K.push({type:"ansi",code:O,endCode:YM8(O)})}else if(H===dR7){if(O=c39(A,Y),O){let j=l39(O);for(let J of j)K.push({type:"ansi",code:J,endCode:YM8(J)})}}if(O){Y+=O.length;continue}}let _=_M8(w),$=String.fromCodePoint(w);if(K.push({type:"char",value:$,fullWidth:_}),Y+=$.length,z+=_?2:$.length,z>=q)break}return K}var F39=48,Q39=57,U39=59,p39=109;var oR7=k(()=>{rR7();Pg6()});var u56=k(()=>{Pg6();wM8();tH1();zM8();nR7();oR7()});function i39(A){return A.code===A.endCode}function aR7(A){return A.filter((q)=>!i39(q))}function SE(A,q,K){let Y=Q06(A,K),z=[],w=0,_="",$=!1;for(let H of Y){if(K!==void 0&&w>=K)break;if(H.type==="ansi"){if(z.push(H),$)_+=H.code}else{if(!$&&w>=q)$=!0,z=aR7(Ke(z)),_=tf(z);if($)_+=H.value;w+=H.fullWidth?2:H.value.length}}let O=aR7(Ke(z));return _+=tf(x56(O)),_}var U06=k(()=>{u56()});function Ye(A,q){let K=Math.min(A.x,q.x),Y=Math.min(A.y,q.y),z=Math.max(A.x+A.width,q.x+q.width),w=Math.max(A.y+A.height,q.y+q.height);return{x:K,y:Y,width:z-K,height:w-Y}}var $M8=()=>{};function QH(A,q){if(A===void 0)return;if(Number.isInteger(A))return;L(`${q} should be an integer, got ${A}`,{level:"warn"})}var OM8=k(()=>{G1()});class eH1{strings=[" ",""];stringMap=new Map([[" ",0],["",1]]);ascii=a39();intern(A){if(A.length===1){let Y=A.charCodeAt(0);if(Y<128){let z=this.ascii[Y];if(z!==-1)return z;let w=this.strings.length;return this.strings.push(A),this.ascii[Y]=w,w}}let q=this.stringMap.get(A);if(q!==void 0)return q;let K=this.strings.length;return this.strings.push(A),this.stringMap.set(A,K),K}get(A){return this.strings[A]??" "}}class Aj1{strings=[""];stringMap=new Map;intern(A){if(!A)return 0;let q=this.stringMap.get(A);if(q===void 0)q=this.strings.length,this.strings.push(A),this.stringMap.set(A,q);return q}get(A){return A===0?void 0:this.strings[A]}}class jM8{ids=new Map;styles=[];transitionCache=new Map;none;constructor(){this.none=this.intern([])}intern(A){let q=A.length===0?"":A.map((Y)=>Y.code).join("\x00"),K=this.ids.get(q);if(K===void 0){let Y=this.styles.length;this.styles.push(A.length===0?[]:A),K=Y<<1|(A.length>0&&o39(A)?1:0),this.ids.set(q,K)}return K}get(A){return this.styles[A>>>1]??[]}transition(A,q){if(A===q)return"";let K=A*1048576+q,Y=this.transitionCache.get(K);if(Y===void 0)Y=tf(fb(this.get(A),this.get(q))),this.transitionCache.set(K,Y);return Y}inverseCache=new Map;withInverse(A){let q=this.inverseCache.get(A);if(q===void 0){let K=this.get(A);q=K.some((z)=>z.endCode==="\x1B[27m")?A:this.intern([...K,n39]),this.inverseCache.set(A,q)}return q}bgCache=new Map;withBackground(A,q){let K=A*1048576+this.intern([q]),Y=this.bgCache.get(K);if(Y===void 0){let w=this.get(A).filter((_)=>_.endCode!=="\x1B[49m"&&_.endCode!=="\x1B[27m");Y=this.intern([...w,q]),this.bgCache.set(K,Y)}return Y}}function o39(A){for(let q of A)if(r39.has(q.endCode))return!0;return!1}function a39(){let A=new Int32Array(128);return A.fill(-1),A[32]=HM8,A}function B56(A,q,K){return A<<p06|q<<d06|K}function t39(A,q){let K=q<<1;return A.cells[K]===0&&A.cells[K|1]===0}function eR7(A,q,K){if(q<0||K<0||q>=A.width||K>=A.height)return!0;return t39(A,K*A.width+q)}function e39(A,q){return A.hyperlinkPool.intern(q)}function m56(A,q,K,Y,z){if(QH(A,"createScreen width"),QH(q,"createScreen height"),!Number.isInteger(A)||A<0)A=Math.max(0,Math.floor(A)||0);if(!Number.isInteger(q)||q<0)q=Math.max(0,Math.floor(q)||0);let w=A*q,_=new ArrayBuffer(w<<3),$=new Int32Array(_),O=new BigInt64Array(_);return{width:A,height:q,cells:$,cells64:O,charPool:Y,hyperlinkPool:z,emptyStyleId:K.none,damage:void 0,noSelect:new Uint8Array(w)}}function JM8(A,q,K){if(QH(q,"resetScreen width"),QH(K,"resetScreen height"),!Number.isInteger(q)||q<0)q=Math.max(0,Math.floor(q)||0);if(!Number.isInteger(K)||K<0)K=Math.max(0,Math.floor(K)||0);let Y=q*K;if(A.cells64.length<Y){let z=new ArrayBuffer(Y<<3);A.cells=new Int32Array(z),A.cells64=new BigInt64Array(z),A.noSelect=new Uint8Array(Y)}A.cells64.fill(s39,0,Y),A.noSelect.fill(0,0,Y),A.width=q,A.height=K,A.damage=void 0}function AS7(A,q,K){let{charPool:Y,hyperlinkPool:z}=A;if(Y===q&&z===K)return;let w=A.width*A.height,_=A.cells;for(let $=0;$<w<<1;$+=2){let O=_[$];_[$]=q.intern(Y.get(O));let H=_[$+1],j=H>>>d06&Wg6;if(j!==0){let J=z.get(j),M=K.intern(J),D=H>>>p06,X=H&rc;_[$+1]=B56(D,M,X)}}A.charPool=q,A.hyperlinkPool=K}function Zg6(A,q,K){if(q<0||K<0||q>=A.width||K>=A.height)return;return MM8(A,K*A.width+q)}function MM8(A,q){let K=q<<1,Y=A.cells[K+1],z=Y>>>d06&Wg6;return{char:A.charPool.get(A.cells[K]),styleId:Y>>>p06,width:Y&rc,hyperlink:z===0?void 0:A.hyperlinkPool.get(z)}}function qS7(A,q,K,Y,z){let w=Y<<1,_=A[w];if(_===1)return;let $=A[w+1];if(_===0&&($&262140)===0){let H=$>>>p06;if(H===0||H===z)return}let O=$>>>d06&Wg6;return{char:q.get(_),styleId:$>>>p06,width:$&rc,hyperlink:O===0?void 0:K.get(O)}}function ze(A,q,K){let Y=q|1,z=A.cells[Y];K.char=A.charPool.get(A.cells[q]),K.styleId=z>>>p06,K.width=z&rc;let w=z>>>d06&Wg6;K.hyperlink=w===0?void 0:A.hyperlinkPool.get(w)}function DM8(A,q,K){if(q<0||K<0||q>=A.width||K>=A.height)return;let Y=K*A.width+q<<1;return A.charPool.get(A.cells[Y])}function qj1(A,q,K,Y){if(q<0||K<0||q>=A.width||K>=A.height)return;let z=K*A.width+q<<1,w=A.cells,_=w[z+1]&rc;if(_===1&&Y.width!==1){if(q+1<A.width){let J=z+2;if((w[J+1]&rc)===2)w[J]=HM8,w[J+1]=B56(A.emptyStyleId,0,0)}}let $=-1;if(_===2&&Y.width!==2){if(q>0){let j=z-2;if((w[j+1]&rc)===1)w[j]=HM8,w[j+1]=B56(A.emptyStyleId,0,0),$=q-1}}w[z]=A59(A,Y.char),w[z+1]=B56(Y.styleId,e39(A,Y.hyperlink),Y.width);let O=$>=0?Math.min(q,$):q,H=A.damage;if(H){let j=H.x+H.width,J=H.y+H.height;if(O<H.x)H.width+=H.x-O,H.x=O;else if(q>=j)H.width=q-H.x+1;if(K<H.y)H.height+=H.y-K,H.y=K;else if(K>=J)H.height=K-H.y+1}else A.damage={x:O,y:K,width:q-O+1,height:1};if(Y.width===1){let j=q+1;if(j<A.width){let J=z+2;w[J]=tR7,w[J+1]=B56(A.emptyStyleId,0,2);let M=A.damage;if(M&&j>=M.x+M.width)M.width=j-M.x+1}}}function KS7(A,q,K,Y){if(q<0||K<0||q>=A.width||K>=A.height)return;let z=K*A.width+q<<1,w=A.cells,_=w[z+1],$=_&rc;if($===2||$===3)return;let O=_>>>d06&Wg6;w[z+1]=B56(Y,O,$);let H=A.damage;if(H)A.damage=Ye(H,{x:q,y:K,width:1,height:1});else A.damage={x:q,y:K,width:1,height:1}}function A59(A,q){return A.charPool.intern(q)}function YS7(A,q,K,Y,z,w){if(K=Math.max(0,K),Y=Math.max(0,Y),K>=z||Y>=w)return;let _=z-K,$=q.width<<1,O=A.width<<1,H=_<<1,j=q.cells,J=A.cells,M=q.noSelect,D=A.noSelect;if(K===0&&z===q.width&&q.width===A.width){let P=Y*$,W=(w-Y)*$;J.set(j.subarray(P,P+W),P);let Z=Y*q.width,G=(w-Y)*q.width;D.set(M.subarray(Z,Z+G),Z)}else{let P=Y*$+(K<<1),W=Y*O+(K<<1),Z=Y*q.width+K,G=Y*A.width+K;for(let f=Y;f<w;f++)J.set(j.subarray(P,P+H),W),D.set(M.subarray(Z,Z+_),G),P+=$,W+=O,Z+=q.width,G+=A.width}let X={x:K,y:Y,width:_,height:w-Y};if(A.damage)A.damage=Ye(A.damage,X);else A.damage=X;if(z<A.width){let P=Y*q.width+(z-1)<<1,W=Y*A.width+z<<1,Z=!1;for(let G=Y;G<w;G++){if((j[P+1]&rc)===1)J[W]=tR7,J[W+1]=B56(A.emptyStyleId,0,2),Z=!0;P+=$,W+=O}if(Z&&A.damage){if(A.damage.x+A.damage.width===z)A.damage={...A.damage,width:A.damage.width+1}}}}function wS7(A){for(let q of A){let K=q.code;if(K.length<5||!K.startsWith(Gg6))continue;let Y=K.match(zS7);if(Y)return Y[1]||null}return null}function _S7(A){return A.filter((q)=>!q.code.startsWith(Gg6)||!zS7.test(q.code))}function XM8(A,q,K){let Y=A.width,z=q.width,w=A.height,_=q.height,$;if(Y===0&&w===0)$={x:0,y:0,width:z,height:_};else if(q.damage){if($=q.damage,A.damage)$=Ye($,A.damage)}else if(A.damage)$=A.damage;else $={x:0,y:0,width:0,height:0};if(w>_)$=Ye($,{x:0,y:_,width:Y,height:w-_});if(Y>z)$=Ye($,{x:z,y:0,width:Y-z,height:w});let O=Math.max(w,_),H=Math.max(Y,z),j=Math.min($.y+$.height,O),J=Math.min($.x+$.width,H);if(Y===z)return w59(A,q,$.x,J,$.y,j,K);return _59(A,q,$.x,J,$.y,j,K)}function q59(A,q,K,Y){for(let z=0;z<Y;z++,K+=2){let w=K|1;if(A[K]!==q[K]||A[w]!==q[w])return z}return Y}function K59(A,q,K,Y,z,w,_,$,O,H,j){let J=_;while(J<$){let M=q59(A,q,z,$-J);if(J+=M,z+=M<<1,J>=$)break;if(ze(K,z,O),ze(Y,z,H),j(J,w,O,H))return!0;J++,z+=2}return!1}function Y59(A,q,K,Y,z,w,_){for(let $=Y;$<z;$++,q+=2)if(ze(A,q,w),_($,K,w,void 0))return!0;return!1}function z59(A,q,K,Y,z,w,_,$){for(let O=z;O<w;O++,K+=2){if(A[K]===0&&A[K|1]===0)continue;if(ze(q,K,_),$(O,Y,void 0,_))return!0}return!1}function w59(A,q,K,Y,z,w,_){let $=A.cells,O=q.cells,H=A.width,j=A.height,J=q.height,M=H<<1,D={char:" ",styleId:0,width:0,hyperlink:void 0},X={char:" ",styleId:0,width:0,hyperlink:void 0},P=Math.min(Y,H),W=z*H+K<<1;for(let Z=z;Z<w;Z++){let G=Z<j,f=Z<J;if(G&&f){if(K59($,O,A,q,W,Z,K,P,D,X,_))return!0}else if(G){if(Y59(A,W,Z,K,P,D,_))return!0}else if(f){if(z59(O,q,W,Z,K,P,X,_))return!0}W+=M}return!1}function _59(A,q,K,Y,z,w,_){let $=A.width,O=q.width,H=A.cells,j=q.cells,J={char:" ",styleId:0,width:0,hyperlink:void 0},M={char:" ",styleId:0,width:0,hyperlink:void 0},D=$<<1,X=O<<1,P=z*$+K<<1,W=z*O+K<<1;for(let Z=z;Z<w;Z++){let G=Z<A.height,f=Z<q.height,V=G?Math.min(Y,$):K,N=f?Math.min(Y,O):K,v=Math.min(V,N),y=P,R=W;for(let h=K;h<v;h++){if(H[y]===j[R]&&H[y+1]===j[R+1]){y+=2,R+=2;continue}if(ze(A,y,J),ze(q,R,M),y+=2,R+=2,_(h,Z,J,M))return!0}if(V>v){y=P+(v-K<<1);for(let h=v;h<V;h++)if(ze(A,y,J),y+=2,_(h,Z,J,void 0))return!0}if(N>v){R=W+(v-K<<1);for(let h=v;h<N;h++){if(j[R]===0&&j[R|1]===0){R+=2;continue}if(ze(q,R,M),R+=2,_(h,Z,void 0,M))return!0}}P+=D,W+=X}return!1}function $S7(A,q,K,Y,z){let w=Math.min(q+Y,A.width),_=Math.min(K+z,A.height),$=A.noSelect,O=A.width;for(let H=Math.max(0,K);H<_;H++){let j=H*O;$.fill(1,j+Math.max(0,q),j+w)}}var n39,r39,HM8=0,tR7=1,p06=17,d06=2,Wg6=32767,rc=3,s39=0n,zS7,Gg6;var g56=k(()=>{$M8();u56();OM8();y56();n39={type:"ansi",code:"\x1B[7m",endCode:"\x1B[27m"};r39=new Set(["\x1B[49m","\x1B[27m","\x1B[24m","\x1B[29m","\x1B[55m"]);zS7=new RegExp(`^${Ae}\\]8${qe}${qe}([^${cc}]*)${cc}$`),Gg6=`${Ae}]8${qe}`});function $59(A,q){if(!A)return q;return{x1:OS7(A.x1,q.x1),x2:HS7(A.x2,q.x2),y1:OS7(A.y1,q.y1),y2:HS7(A.y2,q.y2)}}function OS7(A,q){if(A===void 0)return q;if(q===void 0)return A;return Math.max(A,q)}function HS7(A,q){if(A===void 0)return q;if(q===void 0)return A;return Math.min(A,q)}class Kj1{width;height;stylePool;screen;operations=[];charCache=new Map;constructor(A){let{width:q,height:K,stylePool:Y,screen:z}=A;this.width=q,this.height=K,this.stylePool=Y,this.screen=z,JM8(z,q,K)}reset(A,q,K){if(this.width=A,this.height=q,this.screen=K,this.operations.length=0,JM8(K,A,q),this.charCache.size>16384)this.charCache.clear()}blit(A,q){this.operations.push({type:"blit",src:A,region:q})}clear(A){this.operations.push({type:"clear",region:A})}noSelect(A){this.operations.push({type:"noSelect",region:A})}write(A,q,K){if(!K)return;this.operations.push({type:"write",x:A,y:q,text:K})}clip(A){this.operations.push({type:"clip",clip:A})}unclip(){this.operations.push({type:"unclip"})}get(){let A=this.screen,q=this.width,K=this.height,Y=0,z=0;for(let $ of this.operations){if($.type!=="clear")continue;let{x:O,y:H,width:j,height:J}=$.region,M=Math.max(0,O),D=Math.max(0,H),X=Math.min(O+j,q),P=Math.min(H+J,K);if(M>=X||D>=P)continue;let W={x:M,y:D,width:X-M,height:P-D};A.damage=A.damage?Ye(A.damage,W):W}let w=[];for(let $ of this.operations)switch($.type){case"clear":continue;case"clip":w.push($59(w.at(-1),$.clip));continue;case"unclip":w.pop();continue;case"blit":{let{src:O,region:H}=$,{x:j,y:J,width:M,height:D}=H,X=Math.min(J+D,K,O.height),P=Math.min(j+M,q,O.width);YS7(A,O,j,J,P,X),Y+=(X-J)*(P-j);continue}case"write":{let{text:O}=$,{x:H,y:j}=$,J=O.split(`
`),M=w.at(-1);if(M){let X=typeof M?.x1==="number"&&typeof M?.x2==="number",P=typeof M?.y1==="number"&&typeof M?.y2==="number";if(X){let W=nH1(O);if(H+W<M.x1||H>M.x2)continue}if(P){let W=J.length;if(j+W<M.y1||j>M.y2)continue}if(X){if(J=J.map((W)=>{let Z=H<M.x1?M.x1-H:0,G=B8(W),f=H+G>M.x2?M.x2-H:G;return SE(W,Z,f)}),H<M.x1)H=M.x1}if(P){let W=j<M.y1?M.y1-j:0,Z=J.length,G=j+Z>M.y2?M.y2-j:Z;if(J=J.slice(W,G),j<M.y1)j=M.y1}}let D=0;for(let X of J){let P=j+D;if(P>=K)break;z+=j59(A,X,H,P,q,this.stylePool,this.charCache),D++}continue}}for(let $ of this.operations)if($.type==="noSelect"){let{x:O,y:H,width:j,height:J}=$.region;$S7(A,O,H,j,J)}let _=Y+z;if(_>1000&&z>Y)L(`High write ratio: blit=${Y}, write=${z} (${(z/_*100).toFixed(1)}% writes), screen=${K}x${q}`);return A}}function O59(A,q){if(A===q)return!0;let K=A.length;if(K!==q.length)return!1;if(K===0)return!0;for(let Y=0;Y<K;Y++)if(A[Y].code!==q[Y].code)return!1;return!0}function H59(A,q){let K=A.length;if(K===0)return[];let Y=[],z=[],w=A[0].styles;for(let _=0;_<K;_++){let $=A[_],O=$.styles;if(z.length>0&&!O59(O,w))jS7(z.join(""),w,q,Y),z.length=0;z.push($.value),w=O}if(z.length>0)jS7(z.join(""),w,q,Y);return Y}function jS7(A,q,K,Y){let z=wS7(q)??void 0,_=z!==void 0||q.some((O)=>O.code.length>=Gg6.length&&O.code.startsWith(Gg6))?_S7(q):q,$=K.intern(_);for(let{segment:O}of hj().segment(A))Y.push({value:O,width:B8(O),styleId:$,hyperlink:z})}function j59(A,q,K,Y,z,w,_){let $=_.get(q);if(!$)$=H59(iR7(Q06(q)),w),_.set(q,$);let O=K,H=0;for(let j=0;j<$.length;j++){let J=$[j],M=J.value.codePointAt(0);if(M!==void 0&&M<=31){if(M===9){let W=8-O%8;for(let Z=0;Z<W&&O<z;Z++)qj1(A,O,Y,{char:" ",styleId:w.none,width:0,hyperlink:void 0}),O++}else if(M===27){let P=$[j+1]?.value,W=P?.codePointAt(0);if(P==="("||P===")"||P==="*"||P==="+")j+=2;else if(P==="["){j++;while(j<$.length-1){j++;let Z=$[j]?.value.codePointAt(0);if(Z!==void 0&&Z>=64&&Z<=126)break}}else if(P==="]"||P==="P"||P==="_"||P==="^"||P==="X"){j++;while(j<$.length-1){j++;let Z=$[j]?.value;if(Z==="\x07")break;if(Z==="\x1B"){if($[j+1]?.value==="\\"){j++;break}}}}else if(W!==void 0&&W>=48&&W<=126)j++}continue}let D=J.width;if(D===0)continue;let X=D>=2;if(X&&O+2>z){qj1(A,O,Y,{char:" ",styleId:w.none,width:3,hyperlink:void 0}),O++;continue}qj1(A,O,Y,{char:J.value,styleId:J.styleId,width:X?1:0,hyperlink:J.hyperlink}),H++,O+=X?2:1}return H}var MS7=k(()=>{U06();aJ8();u56();y5();g56();G1();$M8();YR()});function PM8(A,q){let K;return(Y)=>{let{frontFrame:z,backFrame:w,isTTY:_,terminalWidth:$,terminalRows:O}=Y,H=z.screen,j=w.screen,J=j.charPool,M=j.hyperlinkPool,D=A.yogaNode?.getComputedHeight(),X=A.yogaNode?.getComputedWidth(),P=D===void 0||!Number.isFinite(D)||D<0,W=X===void 0||!Number.isFinite(X)||X<0;if(!A.yogaNode||P||W){if(A.yogaNode&&(P||W))L(`Invalid yoga dimensions: width=${X}, height=${D}, childNodes=${A.childNodes.length}, terminalWidth=${$}, terminalRows=${O}`);return{screen:m56($,0,q,J,M),viewport:{width:$,height:O},cursor:{x:0,y:0,visible:!0}}}let Z=Math.floor(A.yogaNode.getComputedWidth()),G=Math.floor(A.yogaNode.getComputedHeight()),f=j??m56(Z,G,q,J,M);if(K)K.reset(Z,G,f);else K=new Kj1({width:Z,height:G,stylePool:q,screen:f});gR7();let V=KR7();return UR7(A,K,{prevScreen:V||Y.altScreen&&Y.prevFrameContaminated?void 0:H}),{screen:K.get(),viewport:{width:$,height:Y.altScreen?O+1:O},cursor:{x:0,y:Y.altScreen?Math.max(0,Math.min(f.height,O)-1):f.height,visible:!_||f.height===0}}}}var DS7=k(()=>{AM8();Og6();MS7();g56();G1()});import{Buffer as J59}from"buffer";function Q0(...A){let q=YA.terminal==="kitty"?M59:cc;return`${WM8}${A.join(qe)}${q}`}function ZM8(A){let q=J59.from(A,"utf8").toString("base64");return Q0(Uj.CLIPBOARD,"c",q)}function XS7(A){let q=A.indexOf(";"),K=q>=0?A.slice(0,q):A,Y=q>=0?A.slice(q+1):"",z=parseInt(K,10);if(z===Uj.SET_TITLE_AND_ICON)return{type:"title",action:{type:"both",title:Y}};if(z===Uj.SET_ICON)return{type:"title",action:{type:"iconName",name:Y}};if(z===Uj.SET_TITLE)return{type:"title",action:{type:"windowTitle",title:Y}};if(z===Uj.HYPERLINK){let w=Y.split(";"),_=w[0]??"",$=w.slice(1).join(";");if($==="")return{type:"link",action:{type:"end"}};let O={};if(_)for(let H of _.split(":")){let j=H.indexOf("=");if(j>=0)O[H.slice(0,j)]=H.slice(j+1)}return{type:"link",action:{type:"start",url:$,params:Object.keys(O).length>0?O:void 0}}}return{type:"unknown",sequence:`\x1B]${A}`}}function Yj1(A,q){let K=q?Object.entries(q).map(([Y,z])=>`${Y}=${z}`).join(":"):"";return Q0(Uj.HYPERLINK,K,A)}var WM8,M59,Uj,GM8,F56,Q56,zj1,PS7;var Tg=k(()=>{y56();K9();WM8=Ae+String.fromCharCode(Wb.OSC),M59=Ae+"\\";Uj={SET_TITLE_AND_ICON:0,SET_ICON:1,SET_TITLE:2,SET_COLOR:4,SET_CWD:7,HYPERLINK:8,ITERM2:9,SET_FG_COLOR:10,SET_BG_COLOR:11,SET_CURSOR_COLOR:12,CLIPBOARD:52,KITTY:99,RESET_COLOR:104,RESET_FG_COLOR:110,RESET_BG_COLOR:111,RESET_CURSOR_COLOR:112,SEMANTIC_PROMPT:133,GHOSTTY:777};GM8=Q0(Uj.HYPERLINK,"",""),F56={NOTIFY:0,BADGE:2,PROGRESS:4},Q56={CLEAR:0,SET:1,ERROR:2,INDETERMINATE:3},zj1=`${WM8}${Uj.ITERM2};${F56.PROGRESS};${Q56.CLEAR};${cc}`,PS7=`${WM8}${Uj.SET_TITLE_AND_ICON};${cc}`});class TM8{options;state;constructor(A){this.options=A;this.state={previousOutput:""}}renderPreviousOutput_DEPRECATED(A){if(!this.options.isTTY)return[wj1];return this.getRenderOpsForDone(A)}reset(){this.state.previousOutput=""}renderFullFrame(A){let{screen:q}=A,K=[],Y=[],z=void 0;for(let w=0;w<q.height;w++){let _="";for(let O=0;O<q.width;O++){let H=Zg6(q,O,w);if(H&&H.width!==2){if(H.hyperlink!==z){if(z!==void 0)_+=GM8;if(H.hyperlink!==void 0)_+=Yj1(H.hyperlink);z=H.hyperlink}let j=this.options.stylePool.get(H.styleId),J=fb(Y,j);if(J.length>0)_+=tf(J),Y=j;_+=H.char}}if(z!==void 0)_+=GM8,z=void 0;let $=fb(Y,[]);if($.length>0)_+=tf($),Y=[];K.push(_.trimEnd())}if(K.length===0)return[];return[{type:"stdout",content:K.join(`
`)}]}getRenderOpsForDone(A){if(this.state.previousOutput="",!A.cursor.visible)return[{type:"cursorShow"}];return[]}render(A,q){if(!this.options.isTTY)return this.renderFullFrame(q);let K=performance.now();if(q.viewport.height<A.viewport.height||A.viewport.width!==0&&q.viewport.width!==A.viewport.width)return fg6(q,"resize",this.options.stylePool);let Y=A.cursor.y>=A.screen.height,z=q.screen.height>A.screen.height,w=Y&&A.screen.height>=A.viewport.height,_=q.screen.height<A.screen.height,$=q.screen.height<=A.viewport.height;if(w&&$&&_)return L(`Full reset (shrink->below): prevHeight=${A.screen.height}, nextHeight=${q.screen.height}, viewport=${A.viewport.height}`),fg6(q,"offscreen",this.options.stylePool);if(A.screen.height>=A.viewport.height&&A.screen.height>0&&Y&&!z){let f=A.screen.height-A.viewport.height+1,V=-1;if(XM8(A.screen,q.screen,(N,v)=>{if(v<f)return V=v,!0}),V>=0){let N="";for(let y=0;y<A.screen.width;y++)N+=DM8(A.screen,y,V)??" ";let v="";for(let y=0;y<q.screen.width;y++)v+=DM8(q.screen,y,V)??" ";return L(`Full reset (scrollback changes): scrollbackRows=${f}, firstChangeY=${V}
  prev: "${N}"
  next: "${v}"`),fg6(q,"offscreen",this.options.stylePool)}}let O=new NM8(A.cursor,q.viewport.width),H=Math.max(q.screen.height,1)-Math.max(A.screen.height,1),j=H<0,J=H>0;if(j){let G=A.screen.height-q.screen.height;if(G>A.viewport.height)return fg6(q,"offscreen",this.options.stylePool);O.txn((f)=>[[{type:"clear",count:G},{type:"cursorMove",x:0,y:-1}],{dx:-f.x,dy:-G}])}let M=w?1:0,D=J?Math.max(0,A.screen.height-A.viewport.height+M):Math.max(A.screen.height,q.screen.height)-q.viewport.height+M,X=[],P=void 0,W=!1;if(XM8(A.screen,q.screen,(G,f,V,N)=>{if(J&&f>=A.screen.height)return;if(N&&(N.width===2||N.width===3))return;if(V&&(V.width===2||V.width===3)&&!N)return;if(N&&eR7(q.screen,G,f)&&!V)return;if(f<D)return W=!0,!0;if(fM8(O,G,f),N){if(N.width===1&&VM8(N.char)&&G+1<q.screen.width){let h=Zg6(A.screen,G+1,f);if(h&&h.width!==2&&h.width!==3){if(X.length>0){let B=fb(X,[]);if(B.length>0)O.diff.push({type:"style",codes:B})}if(P!==void 0)O.diff.push({type:"hyperlink",uri:""}),P=void 0;X=[],O.txn(()=>[[{type:"cursorTo",col:G+2},{type:"stdout",content:" "},{type:"cursorTo",col:G+1}],{dx:0,dy:0}])}}let v=N.hyperlink;P=WS7(O.diff,P,v);let y=this.options.stylePool.get(N.styleId),R=fb(X,y);X59(O,N,R),X=y}else if(V){let v=X,y=P;X=[],P=void 0,O.txn(()=>{let R=[];if(v.length>0){let h=fb(v,[]);if(h.length>0)R.push({type:"style",codes:h})}if(y!==void 0)R.push({type:"hyperlink",uri:""});return R.push({type:"stdout",content:" "}),[R,{dx:1,dy:0}]})}}),W)return fg6(q,"offscreen",this.options.stylePool);if(X.length>0){let G=fb(X,[]);if(G.length>0)O.diff.push({type:"style",codes:G});X=[]}if(P!==void 0)O.diff.push({type:"hyperlink",uri:""}),P=void 0;if(J)ZS7(O,q,A.screen.height,q.screen.height,this.options.stylePool);if(q.cursor.y>=q.screen.height)O.txn((G)=>{let f=q.cursor.y-G.y;if(f>0){let N=Array(1+f);N[0]=c06;for(let v=0;v<f;v++)N[1+v]=wj1;return[N,{dx:-G.x,dy:f}]}let V=q.cursor.y-G.y;if(V!==0||G.x!==q.cursor.x){let N=[c06];return N.push({type:"cursorMove",x:q.cursor.x,y:V}),[N,{dx:q.cursor.x-G.x,dy:V}]}return[[],{dx:0,dy:0}]});else fM8(O,q.cursor.x,q.cursor.y);let Z=performance.now()-K;if(Z>50){let G=q.screen.damage,f=G?`${G.width}x${G.height} at (${G.x},${G.y})`:"none";L(`Slow render: ${Z.toFixed(1)}ms, screen: ${q.screen.height}x${q.screen.width}, damage: ${f}, changes: ${O.diff.length}`)}return O.diff}}function WS7(A,q,K){if(q!==K)return A.push({type:"hyperlink",uri:K??""}),K;return q}function fg6(A,q,K){let Y=new NM8({x:0,y:0},A.viewport.width);return D59(Y,A,K),[{type:"clearTerminal",reason:q},...Y.diff]}function D59(A,q,K){ZS7(A,q,0,q.screen.height,K)}function ZS7(A,q,K,Y,z){let w=z.none,_=void 0,$=-1,{width:O,cells:H,charPool:j,hyperlinkPool:J}=q.screen,M=K*O;for(let D=K;D<Y;D+=1){if(A.cursor.y<D){let X=D-A.cursor.y;A.txn((P)=>{let W=Array(1+X);W[0]=c06;for(let Z=0;Z<X;Z++)W[1+Z]=wj1;return[W,{dx:-P.x,dy:X}]})}$=-1;for(let X=0;X<O;X+=1,M+=1){let P=qS7(H,j,J,M,$);if(!P)continue;fM8(A,X,D);let W=P.hyperlink;_=WS7(A.diff,_,W);let Z=z.transition(w,P.styleId);P59(A,P,Z),w=P.styleId,$=P.styleId}if(w!==z.none){let X=z.transition(w,z.none);if(X.length>0)A.diff.push({type:"styleStr",str:X});w=z.none}if(_!==void 0)A.diff.push({type:"hyperlink",uri:""}),_=void 0;A.txn((X)=>[[c06,wj1],{dx:-X.x,dy:1}])}if(_!==void 0)A.diff.push({type:"hyperlink",uri:""});if(w!==z.none){let D=z.transition(w,z.none);if(D.length>0)A.diff.push({type:"styleStr",str:D})}return A}function X59(A,q,K){A.txn((Y)=>{let z=q.width===1?2:1;if(z===2&&Y.x<A.viewportWidth){let O=q.char.length>2?A.viewportWidth:A.viewportWidth+1;if(Y.x+2>=O)return[[],{dx:0,dy:0}]}let w=Y.x>=A.viewportWidth?z-Y.x:z,_=Y.x>=A.viewportWidth?1:0,$=K.length>0?[{type:"style",codes:K},{type:"stdout",content:q.char}]:[{type:"stdout",content:q.char}];if(z===2&&VM8(q.char))$.push({type:"cursorTo",col:Y.x+z+1});return[$,{dx:w,dy:_}]})}function P59(A,q,K){let Y=q.width===1?2:1,z=A.cursor.x,w=A.viewportWidth;if(Y===2&&z<w){let $=q.char.length>2?w:w+1;if(z+2>=$)return}let _=A.diff;if(K.length>0)_.push({type:"styleStr",str:K});if(_.push({type:"stdout",content:q.char}),Y===2&&VM8(q.char))_.push({type:"cursorTo",col:z+Y+1});if(z>=w)A.cursor.x=Y,A.cursor.y++;else A.cursor.x=z+Y}function fM8(A,q,K){A.txn((Y)=>{let z=q-Y.x,w=K-Y.y;if(Y.x>=A.viewportWidth)return[[c06,{type:"cursorMove",x:q,y:w}],{dx:z,dy:w}];if(w!==0)return[[c06,{type:"cursorMove",x:q,y:w}],{dx:z,dy:w}];return[[{type:"cursorMove",x:z,y:w}],{dx:z,dy:w}]})}function VM8(A){let q=A.codePointAt(0);if(q===void 0)return!1;if(q>=129648&&q<=129791||q>=129792&&q<=130047)return!0;if(A.length>=2){for(let K=0;K<A.length;K++)if(A.charCodeAt(K)===65039)return!0}return!1}class NM8{viewportWidth;cursor;diff=[];constructor(A,q){this.viewportWidth=q;this.cursor={...A}}txn(A){let[q,K]=A(this.cursor);for(let Y of q)this.diff.push(Y);this.cursor.x+=K.dx,this.cursor.y+=K.dy}}var c06,wj1;var GS7=k(()=>{g56();u56();G1();Tg();c06={type:"carriageReturn"},wj1={type:"stdout",content:`
`}});var W59,wP;var Vg=k(()=>{W59=new Map,wP=W59});class Tb{_didStopImmediatePropagation=!1;didStopImmediatePropagation(){return this._didStopImmediatePropagation}stopImmediatePropagation(){this._didStopImmediatePropagation=!0}}import{EventEmitter as Z59}from"events";var U56;var _j1=k(()=>{U56=class U56 extends Z59{constructor(){super();this.setMaxListeners(0)}emit(A,...q){if(A==="error")return super.emit(A,...q);let K=this.rawListeners(A);if(K.length===0)return!1;let Y=q[0]instanceof Tb?q[0]:null;for(let z of K)if(z.apply(this,q),Y?.didStopImmediatePropagation())break;return!0}}});var fS7,TS7,$j1;var vM8=k(()=>{fS7=e(W6(),1),TS7=fS7.createContext({exit(){}});TS7.displayName="InternalAppContext";$j1=TS7});var VS7,NS7,l06;var Oj1=k(()=>{_j1();VS7=e(W6(),1),NS7=VS7.createContext({stdin:process.stdin,internal_eventEmitter:new U56,setRawMode(){},isRawModeSupported:!1,internal_exitOnCtrlC:!0,internal_querier:null});NS7.displayName="InternalStdinContext";l06=NS7});var vS7,kS7,i06;var Hj1=k(()=>{vS7=e(W6(),1),kS7=vS7.createContext({activeId:void 0,add(){},remove(){},activate(){},deactivate(){},enableFocus(){},disableFocus(){},focusNext(){},focusPrevious(){},focus(){}});kS7.displayName="InternalFocusContext";i06=kS7});function LM8(A){EM8=A?"focused":"blurred";for(let q of kM8)q();if(!A){for(let q of ES7)q();ES7.clear()}}function jj1(){return EM8!=="blurred"}function LS7(){return EM8}function yM8(A){return kM8.add(A),()=>{kM8.delete(A)}}var EM8="unknown",ES7,kM8;var Jj1=k(()=>{ES7=new Set,kM8=new Set});function yS7(A){let q=Y6(6),{children:K}=A,Y=p56.useSyncExternalStore(yM8,jj1),z=p56.useSyncExternalStore(yM8,LS7),w;if(q[0]!==Y||q[1]!==z)w={isTerminalFocused:Y,terminalFocusState:z},q[0]=Y,q[1]=z,q[2]=w;else w=q[2];let _=w,$;if(q[3]!==K||q[4]!==_)$=p56.default.createElement(RM8.Provider,{value:_},K),q[3]=K,q[4]=_,q[5]=$;else $=q[5];return $}var p56,RM8,RS7;var SM8=k(()=>{K1();Jj1();p56=e(W6(),1),RM8=p56.createContext({isTerminalFocused:!0,terminalFocusState:"unknown"});RM8.displayName="TerminalFocusContext";RS7=RM8});var CS7=C((eV2,SS7)=>{var G59=/[|\\{}()[\]^$+*?.-]/g;SS7.exports=(A)=>{if(typeof A!=="string")throw TypeError("Expected a string");return A.replace(G59,"\\$&")}});var xS7=C((AN2,bS7)=>{var f59=CS7(),T59=typeof process==="object"&&process&&typeof process.cwd==="function"?process.cwd():".",IS7=[].concat(g6("module").builtinModules,"bootstrap_node","node").map((A)=>new RegExp(`(?:\\((?:node:)?${A}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${A}(?:\\.js)?:\\d+:\\d+$)`));IS7.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);class CM8{constructor(A){if(A={ignoredPackages:[],...A},"internals"in A===!1)A.internals=CM8.nodeInternals();if("cwd"in A===!1)A.cwd=T59;this._cwd=A.cwd.replace(/\\/g,"/"),this._internals=[].concat(A.internals,V59(A.ignoredPackages)),this._wrapCallSite=A.wrapCallSite||!1}static nodeInternals(){return[...IS7]}clean(A,q=0){if(q=" ".repeat(q),!Array.isArray(A))A=A.split(`
`);if(!/^\s*at /.test(A[0])&&/^\s*at /.test(A[1]))A=A.slice(1);let K=!1,Y=null,z=[];return A.forEach((w)=>{if(w=w.replace(/\\/g,"/"),this._internals.some(($)=>$.test(w)))return;let _=/^\s*at /.test(w);if(K)w=w.trimEnd().replace(/^(\s+)at /,"$1");else if(w=w.trim(),_)w=w.slice(3);if(w=w.replace(`${this._cwd}/`,""),w)if(_){if(Y)z.push(Y),Y=null;z.push(w)}else K=!0,Y=w}),z.map((w)=>`${q}${w}
`).join("")}captureString(A,q=this.captureString){if(typeof A==="function")q=A,A=1/0;let{stackTraceLimit:K}=Error;if(A)Error.stackTraceLimit=A;let Y={};Error.captureStackTrace(Y,q);let{stack:z}=Y;return Error.stackTraceLimit=K,this.clean(z)}capture(A,q=this.capture){if(typeof A==="function")q=A,A=1/0;let{prepareStackTrace:K,stackTraceLimit:Y}=Error;if(Error.prepareStackTrace=(_,$)=>{if(this._wrapCallSite)return $.map(this._wrapCallSite);return $},A)Error.stackTraceLimit=A;let z={};Error.captureStackTrace(z,q);let{stack:w}=z;return Object.assign(Error,{prepareStackTrace:K,stackTraceLimit:Y}),w}at(A=this.at){let[q]=this.capture(1,A);if(!q)return{};let K={line:q.getLineNumber(),column:q.getColumnNumber()};if(hS7(K,q.getFileName(),this._cwd),q.isConstructor())Object.defineProperty(K,"constructor",{value:!0,configurable:!0});if(q.isEval())K.evalOrigin=q.getEvalOrigin();if(q.isNative())K.native=!0;let Y;try{Y=q.getTypeName()}catch(_){}if(Y&&Y!=="Object"&&Y!=="[object Object]")K.type=Y;let z=q.getFunctionName();if(z)K.function=z;let w=q.getMethodName();if(w&&z!==w)K.method=w;return K}parseLine(A){let q=A&&A.match(N59);if(!q)return null;let K=q[1]==="new",Y=q[2],z=q[3],w=q[4],_=Number(q[5]),$=Number(q[6]),O=q[7],H=q[8],j=q[9],J=q[10]==="native",M=q[11]===")",D,X={};if(H)X.line=Number(H);if(j)X.column=Number(j);if(M&&O){let P=0;for(let W=O.length-1;W>0;W--)if(O.charAt(W)===")")P++;else if(O.charAt(W)==="("&&O.charAt(W-1)===" "){if(P--,P===-1&&O.charAt(W-1)===" "){let Z=O.slice(0,W-1);O=O.slice(W+1),Y+=` (${Z}`;break}}}if(Y){let P=Y.match(v59);if(P)Y=P[1],D=P[2]}if(hS7(X,O,this._cwd),K)Object.defineProperty(X,"constructor",{value:!0,configurable:!0});if(z)X.evalOrigin=z,X.evalLine=_,X.evalColumn=$,X.evalFile=w&&w.replace(/\\/g,"/");if(J)X.native=!0;if(Y)X.function=Y;if(D&&Y!==D)X.method=D;return X}}function hS7(A,q,K){if(q){if(q=q.replace(/\\/g,"/"),q.startsWith(`${K}/`))q=q.slice(K.length+1);A.file=q}}function V59(A){if(A.length===0)return[];let q=A.map((K)=>f59(K));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${q.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var N59=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),v59=/^(.*?) \[as (.*?)\]$/;bS7.exports=CM8});var k59=(A,q=2)=>{return A.replace(/^\t+/gm,(K)=>" ".repeat(K.length*q))},uS7;var BS7=k(()=>{uS7=k59});var E59=(A,q)=>{let K=[],Y=A-q,z=A+q;for(let w=Y;w<=z;w++)K.push(w);return K},L59=(A,q,K={})=>{var Y;if(typeof A!=="string")throw TypeError("Source code is missing.");if(!q||q<1)throw TypeError("Line number must start from `1`.");let z=uS7(A).split(/\r?\n/);if(q>z.length)return;return E59(q,(Y=K.around)!==null&&Y!==void 0?Y:3).filter((w)=>z[w-1]!==void 0).map((w)=>({line:w,value:z[w-1]}))},mS7;var gS7=k(()=>{BS7();mS7=L59});function y59(A){let q=Y6(22),K,Y,z,w,_,$,O,H;if(q[0]!==A){let{children:X,flexWrap:P,flexDirection:W,flexGrow:Z,flexShrink:G,ref:f,onClick:V,...N}=A;K=X,O=f,$=V,H=N,_=P===void 0?"nowrap":P,Y=W===void 0?"row":W,z=Z===void 0?0:Z,w=G===void 0?1:G,QH(H.margin,"margin"),QH(H.marginX,"marginX"),QH(H.marginY,"marginY"),QH(H.marginTop,"marginTop"),QH(H.marginBottom,"marginBottom"),QH(H.marginLeft,"marginLeft"),QH(H.marginRight,"marginRight"),QH(H.padding,"padding"),QH(H.paddingX,"paddingX"),QH(H.paddingY,"paddingY"),QH(H.paddingTop,"paddingTop"),QH(H.paddingBottom,"paddingBottom"),QH(H.paddingLeft,"paddingLeft"),QH(H.paddingRight,"paddingRight"),QH(H.gap,"gap"),QH(H.columnGap,"columnGap"),QH(H.rowGap,"rowGap"),q[0]=A,q[1]=K,q[2]=Y,q[3]=z,q[4]=w,q[5]=_,q[6]=$,q[7]=O,q[8]=H}else K=q[1],Y=q[2],z=q[3],w=q[4],_=q[5],$=q[6],O=q[7],H=q[8];let j=H.overflowX??H.overflow??"visible",J=H.overflowY??H.overflow??"visible",M;if(q[9]!==Y||q[10]!==z||q[11]!==w||q[12]!==_||q[13]!==H||q[14]!==j||q[15]!==J)M={flexWrap:_,flexDirection:Y,flexGrow:z,flexShrink:w,...H,overflowX:j,overflowY:J},q[9]=Y,q[10]=z,q[11]=w,q[12]=_,q[13]=H,q[14]=j,q[15]=J,q[16]=M;else M=q[16];let D;if(q[17]!==K||q[18]!==$||q[19]!==O||q[20]!==M)D=FS7.default.createElement("ink-box",{ref:O,onClick:$,style:M},K),q[17]=K,q[18]=$,q[19]=O,q[20]=M,q[21]=D;else D=q[21];return D}var FS7,bM;var we=k(()=>{K1();OM8();FS7=e(W6(),1);bM=y59});function Cz(A){let q=Y6(29),{color:K,backgroundColor:Y,bold:z,dim:w,italic:_,underline:$,strikethrough:O,inverse:H,wrap:j,children:J}=A,M=_===void 0?!1:_,D=$===void 0?!1:$,X=O===void 0?!1:O,P=H===void 0?!1:H,W=j===void 0?"wrap":j;if(J===void 0||J===null)return null;let Z;if(q[0]!==K)Z=K&&{color:K},q[0]=K,q[1]=Z;else Z=q[1];let G;if(q[2]!==Y)G=Y&&{backgroundColor:Y},q[2]=Y,q[3]=G;else G=q[3];let f;if(q[4]!==w)f=w&&{dim:w},q[4]=w,q[5]=f;else f=q[5];let V;if(q[6]!==z)V=z&&{bold:z},q[6]=z,q[7]=V;else V=q[7];let N;if(q[8]!==M)N=M&&{italic:M},q[8]=M,q[9]=N;else N=q[9];let v;if(q[10]!==D)v=D&&{underline:D},q[10]=D,q[11]=v;else v=q[11];let y;if(q[12]!==X)y=X&&{strikethrough:X},q[12]=X,q[13]=y;else y=q[13];let R;if(q[14]!==P)R=P&&{inverse:P},q[14]=P,q[15]=R;else R=q[15];let h;if(q[16]!==N||q[17]!==v||q[18]!==y||q[19]!==R||q[20]!==Z||q[21]!==G||q[22]!==f||q[23]!==V)h={...Z,...G,...f,...V,...N,...v,...y,...R},q[16]=N,q[17]=v,q[18]=y,q[19]=R,q[20]=Z,q[21]=G,q[22]=f,q[23]=V,q[24]=h;else h=q[24];let B=h,x=R59[W],F;if(q[25]!==J||q[26]!==x||q[27]!==B)F=QS7.default.createElement("ink-text",{style:x,textStyles:B},J),q[25]=J,q[26]=x,q[27]=B,q[28]=F;else F=q[28];return F}var QS7,R59;var d56=k(()=>{K1();QS7=e(W6(),1),R59={wrap:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"wrap"},"wrap-trim":{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"wrap-trim"},end:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"end"},middle:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"middle"},"truncate-end":{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"truncate-end"},truncate:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"truncate"},"truncate-middle":{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"truncate-middle"},"truncate-start":{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:"truncate-start"}}});import{readFileSync as S59}from"fs";function IM8({error:A}){let q=A.stack?A.stack.split(`
`).slice(1):void 0,K=q?pS7.parseLine(q[0]):void 0,Y=US7(K?.file),z,w=0;if(Y&&K?.line)try{let _=S59(Y,"utf8");if(z=mS7(_,K.line),z)for(let{line:$}of z)w=Math.max(w,String($).length)}catch{}return xM.default.createElement(bM,{flexDirection:"column",padding:1},xM.default.createElement(bM,null,xM.default.createElement(Cz,{backgroundColor:"ansi:red",color:"ansi:white"}," ","ERROR"," "),xM.default.createElement(Cz,null," ",A.message)),K&&Y&&xM.default.createElement(bM,{marginTop:1},xM.default.createElement(Cz,{dim:!0},Y,":",K.line,":",K.column)),K&&z&&xM.default.createElement(bM,{marginTop:1,flexDirection:"column"},z.map(({line:_,value:$})=>xM.default.createElement(bM,{key:_},xM.default.createElement(bM,{width:w+1},xM.default.createElement(Cz,{dim:_!==K.line,backgroundColor:_===K.line?"ansi:red":void 0,color:_===K.line?"ansi:white":void 0},String(_).padStart(w," "),":")),xM.default.createElement(Cz,{key:_,backgroundColor:_===K.line?"ansi:red":void 0,color:_===K.line?"ansi:white":void 0}," "+$)))),A.stack&&xM.default.createElement(bM,{marginTop:1,flexDirection:"column"},A.stack.split(`
`).slice(1).map((_)=>{let $=pS7.parseLine(_);if(!$)return xM.default.createElement(bM,{key:_},xM.default.createElement(Cz,{dim:!0},"- "),xM.default.createElement(Cz,{bold:!0},_));return xM.default.createElement(bM,{key:_},xM.default.createElement(Cz,{dim:!0},"- "),xM.default.createElement(Cz,{bold:!0},$.function),xM.default.createElement(Cz,{dim:!0}," ","(",US7($.file)??"",":",$.line,":",$.column,")"))})))}var xM,hM8,US7=(A)=>{return A?.replace(`file://${process.cwd()}/`,"")},pS7;var dS7=k(()=>{gS7();we();d56();xM=e(W6(),1),hM8=e(xS7(),1),pS7=new hM8.default({cwd:process.cwd(),internals:hM8.default.nodeInternals()})});var n06=16;function V_(){let{isTerminalFocused:A}=cS7.useContext(RS7);return A}var cS7;var Tg6=k(()=>{SM8();cS7=e(W6(),1)});function C59(A){let q=new Map,K=null,Y=A,z=0,w=0;function _(){w=Date.now()-z;for(let O of q.keys())O()}function $(){if([...q.values()].some(Boolean)){if(K)clearInterval(K),K=null;if(z===0)z=Date.now();K=setInterval(_,Y)}else if(K)clearInterval(K),K=null}return{subscribe(O,H){return q.set(O,H),$(),()=>{q.delete(O),$()}},now(){if(z===0)z=Date.now();if(K&&w)return w;return Date.now()-z},setTickInterval(O){if(O===Y)return;Y=O,$()}}}function lS7(A){let q=Y6(7),{children:K}=A,[Y]=_e.useState(I59),z=V_(),w,_;if(q[0]!==Y||q[1]!==z)w=()=>{Y.setTickInterval(z?n06:h59)},_=[Y,z],q[0]=Y,q[1]=z,q[2]=w,q[3]=_;else w=q[2],_=q[3];_e.useEffect(w,_);let $;if(q[4]!==K||q[5]!==Y)$=_e.default.createElement(r06.Provider,{value:Y},K),q[4]=K,q[5]=Y,q[6]=$;else $=q[6];return $}function I59(){return C59(n06)}var _e,r06,h59;var Mj1=k(()=>{K1();Tg6();_e=e(W6(),1);r06=_e.createContext(null),h59=n06*2});import{Buffer as b59}from"buffer";function iS7(A){return{kind:"key",name:"",fn:!1,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:A,raw:A,isPasted:!0}}function c59(A){if(A.startsWith("\x1B[")){let q;if(q=g59.exec(A))return{type:"decrpm",mode:parseInt(q[1],10),status:parseInt(q[2],10)};if(q=F59.exec(A))return{type:"da1",params:nS7(q[1])};if(q=Q59.exec(A))return{type:"da2",params:nS7(q[1])};if(q=U59.exec(A))return{type:"kittyKeyboard",flags:parseInt(q[1],10)};if(q=p59.exec(A))return{type:"cursorPosition",row:parseInt(q[1],10),col:parseInt(q[2],10)};return null}if(A.startsWith("\x1B]")){let q=d59.exec(A);if(q)return{type:"osc",code:parseInt(q[1],10),data:q[2]}}return null}function nS7(A){if(!A)return[];return A.split(";").map((q)=>parseInt(q,10))}function l59(A){if(b59.isBuffer(A))if(A[0]>127&&A[1]===void 0)return A[0]-=128,"\x1B"+String(A);else return String(A);else if(A!==void 0&&typeof A!=="string")return String(A);else if(!A)return"";else return A}function eS7(A,q=""){let K=q===null,Y=K?"":l59(q),z=A._tokenizer??C06(),w=K?z.flush():z.feed(Y),_=[],$=A.mode==="IN_PASTE",O=A.pasteBuffer;for(let j of w)if(j.type==="sequence")if(j.value===ny7)$=!0,O="";else if(j.value===ry7)_.push(iS7(O)),$=!1,O="";else if($)O+=j.value;else{let J=c59(j.value);if(J)_.push({kind:"response",sequence:j.value,response:J});else{let M=r59(j.value);if(M)_.push(M);else _.push(aS7(j.value))}}else if(j.type==="text")if($)O+=j.value;else _.push(aS7(j.value));if(K&&$&&O)_.push(iS7(O)),$=!1,O="";let H={mode:$?"IN_PASTE":"NORMAL",incomplete:z.buffer(),pasteBuffer:O,_tokenizer:z};return[_,H]}function rS7(A){let q=A-1;return{shift:!!(q&1),meta:!!(q&2)||!!(q&8),ctrl:!!(q&4)}}function oS7(A){switch(A){case 9:return"tab";case 13:return"return";case 27:return"escape";case 32:return"space";case 127:return"backspace";case 57399:return"0";case 57400:return"1";case 57401:return"2";case 57402:return"3";case 57403:return"4";case 57404:return"5";case 57405:return"6";case 57406:return"7";case 57407:return"8";case 57408:return"9";case 57409:return".";case 57410:return"/";case 57411:return"*";case 57412:return"-";case 57413:return"+";case 57414:return"return";case 57415:return"=";default:if(A>=32&&A<=126)return String.fromCharCode(A).toLowerCase();return}}function r59(A){let q=sS7.exec(A);if(!q)return null;let K=parseInt(q[1],10);if((K&64)!==0)return null;return{kind:"mouse",button:K,action:q[4]==="M"?"press":"release",col:parseInt(q[2],10),row:parseInt(q[3],10),sequence:A}}function aS7(A=""){let q,K={kind:"key",name:"",fn:!1,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:A,raw:A,isPasted:!1};K.sequence=K.sequence||A||K.name;let Y;if(Y=B59.exec(A)){let z=parseInt(Y[1],10),w=Y[2]?parseInt(Y[2],10):1,_=rS7(w);return{kind:"key",name:oS7(z),fn:!1,ctrl:_.ctrl,meta:_.meta,shift:_.shift,option:!1,sequence:A,raw:A,isPasted:!1}}if(Y=m59.exec(A)){let z=rS7(parseInt(Y[1],10));return{kind:"key",name:oS7(parseInt(Y[2],10)),fn:!1,ctrl:z.ctrl,meta:z.meta,shift:z.shift,option:!1,sequence:A,raw:A,isPasted:!1}}if(Y=sS7.exec(A)){let z=parseInt(Y[1],10);if((z&67)===64)return oc(A,"wheelup",!1);if((z&67)===65)return oc(A,"wheeldown",!1);return oc(A,"mouse",!1)}if(A==="\r")K.raw=void 0,K.name="return";else if(A===`
`)K.name="enter";else if(A==="\t")K.name="tab";else if(A==="\b"||A==="\x1B\b")K.name="backspace",K.meta=A.charAt(0)==="\x1B";else if(A==="